Informix Error -55274: Could not translate host name 'host-name', gethostbyname( ) failed.
Cause and resolution
Could not translate host name 'host-name', gethostbyname( ) failed.
Host-name resolution follows this precedence:
1. The /etc/hosts file on the local computer
2. NIS hosts map when NIS (Network Information Service) is running
Check whether the 'ypcat hosts' command returns the specified host.
3. DNS data when DNS (Domain Name Server) is running
Check whether the 'ping' and 'rlogin' commands can access the specified host.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-55274 fires when gethostbyname() can't resolve the given host name — per the official
guidance, host-name resolution follows a documented three-step precedence.
- The host missing from the local
/etc/hostsfile, per the official guidance's first precedence step. - The host missing from the NIS hosts map, per the official guidance's second step, if NIS is running.
- The host missing from DNS data, per the official guidance's third step, if DNS is running.
Solutions / Resolution
- Check
/etc/hostson the local computer first, per the official guidance's documented precedence. - If NIS is running, check with
ypcat hosts, per the official guidance. - If DNS is running, check with
pingandrloginagainst the specified host, per the official guidance.
Examples
Checking each resolution step in order
$ grep <host-name> /etc/hosts
$ ypcat hosts | grep <host-name>
$ ping <host-name>
$ rlogin <host-name>
Per the official guidance, these map directly to the three documented precedence steps:
/etc/hosts, NIS, then DNS.
Diagnostic Checks
- Check
/etc/hostsfor the named host, as the first precedence step. - Check
ypcat hostsif NIS is running. - Check
ping/rloginagainst the host if DNS is running.
Related Errors / Related Topics
- -55250 — "socket() failed." An earlier step in the same connection chain.
- -55251 — "Could not translate service name... getservbyname() failed." The equivalent resolution failure for service names rather than host names.
- -55252 — "bind() using service... failed." Another step in the same chain.
- -55276 — "connect() to host... using service... failed." The final step in the same chain, which depends on this host-name resolution succeeding first.
The host name couldn't be resolved — check it in order against /etc/hosts, NIS (ypcat hosts),
then DNS (ping/rlogin), per the documented precedence.