KB Article #189182

Resolving the 'no way to get hostname ip' Error on Production Server

Problem Overview

The following error can occur in various scenarios, particularly when launching a new production server or using custom jobs v3 :

getaddrinfo failed (Name or service not known)

no way to get hostname ip: (null) (set pref: TO_HTTP_HOSTIP to fix)

This error indicates that the system is unable to resolve the server's hostname to an IP address. It is commonly observed in environments with:

  • Complex networking setups (e.g., multiple network interfaces or subnets).
  • Virtualized or containerized environments like Docker.
  • Incomplete or misconfigured DNS settings.

Root Cause

The system fails to automatically compute the hostname’s IP address, resulting in connection issues. This often affects server authentication when connections originate from localhost.

Resolution

To address this issue, you must explicitly configure the TO_HTTP_HOSTIP preference in the Pserver/config/OPSchedule.ini file. Follow the steps below:

  1. Open the OPSchedule.ini file located in the Pserver/config directory.
  2. Add or modify the following line:
    TO_HTTP_HOSTIP=<IP_of_the_server>
    Replace <IP_of_the_server> with the actual IP address of the server.
  3. Save the changes and restart the server to apply the configuration.

Preference Definition

  • Preference Name: TO_HTTP_HOSTIP
  • Description: Forces the system to use a specific IP address for the HTTP server. This is particularly useful in cases where the automatically computed default value is incorrect due to complex networking configurations or containerized setups.
  • Use Case: Ensures successful server authentication when connections are initiated from localhost.
  • Default Value: Automatically computed based on the server's hostname.
  • Expected Value: The explicit IP address of the server.

Key Points to Consider

  • Ensure the IP address provided is static and reachable within the network.