[SOLVED]Uncaught exception 'IspcfgUnknownServerException' with message 'No server found with IP ...'

Discussion in 'Developers' Forum' started by Manuelb, May 23, 2016.

  1. Manuelb

    Manuelb New Member

    Hi, I have a problem recovering a site on new server, which one have an assistant to deploy sites on own ispconfig at the same server, this have worked before on dead server (I think similar version different patch) and I have no idea why is now not working appears that the server does not return proper answer to fetchServerId request.
    The remote user have all permissions on ispconfig.

    Here is the error:
    -----------------------------------------------------------------------------------------------------------------------
    Fatal error
    : Uncaught exception 'IspcfgUnknownServerException' with message 'No server found with IP x.x.x.x' in /sitepath/asistente/includes/ISPConfig.class.php:216 Stack trace:
    #0 /sitepath/asistente/includes/ISPConfig.class.php(59): ISPConfigClient->fetchServerId('x.x.x.x')
    #1 /sitepath/asistente/includes/ispconfig.inc.php(53): ISPConfigClient->login('user', 'password')
    #2 /sitepath/asistente/config_parametros.php(268): include_once('/var/www/client...')
    #3 {main} thrown in/sitepath/asistente/includes/ISPConfig.class.php on line 216
    ------------------------------------------------------------------------------------------------------------------------
    The called function from the class is:

    protected function fetchServerId($ip) {
    if (empty($ip))
    throw new IspcfgException('Unable to determine IP for host '.$ip);
    try {
    $server_id = $this->soapClient->server_get_serverid_by_ip($this->session_id, $ip);
    if (is_array($server_id))
    $server_id = array_pop($server_id);
    if ($server_id === false || !isset($server_id['server_id']))
    throw new IspcfgUnknownServerException('No server found with IP '.$ip);
    $server_id = $server_id['server_id'];
    } catch (SoapFault $e) {
    throw new IspcfgException($e->getMessage(), 500);
    }
    return $server_id;
    }
    ---------------------------------------------------------------------------------------------------------------------------------------------
    I think the problem comes from server_get_serverid_by_ip wich does not return if
    The program is running in a site at the own accessed ispconfig.
    ispconfig version 3.0.5.4p8

    Thank you in advance
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The remote api is aonly used trough the master server and the master server has all records for all servers, so it does not matter on which node of a multiserver setup a website is. Are you really sure that your remote client function connects to the master?
     
  3. Manuelb

    Manuelb New Member

    Thx for answer Till.
    The PHP client connect to itself no other servers linked, it is the only one avaible but appear to be some kind of problem to resolve its own id from ip address.
    The request is correct and must be answered by remote api server?
    Sould I do anything else to enable remote api in addition to create the remote user?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    And you are really sure that the IP that you query is listed under System > Server IP in the list of IP addresses in ispconfig?
     
    Manuelb likes this.
  5. Manuelb

    Manuelb New Member

    Thanks Till!
    That was it, I did not remember to enter the IP address of the server on which the configuration section.
    Now the web application breaks at different step and return a different error, but this problem has been solved because of your help. I am going for next round, thank you so much.
     

Share This Page