Informix Error -931
-931 Cannot locate servicename service/tcp service in /etc/services.
The service servicename is not listed in the network configuration file /etc/services (UNIX) or \etc\services (DOS). Check the $INFORMIXDIR/etc/sqlhosts file, and check that the service name for the desired server is correct. If so, contact your network administrator to find out why the service is not known. If you are using IBM Informix OnLine for NetWare, check the \etc\services file on the client for the required entries.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-931 fires when a specific named service isn't listed in /etc/services (or \etc\services on
DOS) — per the official guidance, this is the general form of -905's restriction, for any
service name sqlhosts references, not just sqlexec specifically.
- The service name referenced by
$INFORMIXDIR/etc/sqlhostsmissing from/etc/services, per the official guidance. - A typo in the service name in either
sqlhostsor/etc/services, causing the two to not actually match even though both files have entries. - On IBM Informix OnLine for NetWare, missing entries in the client's own
\etc\servicesfile, per the official guidance.
Solutions / Resolution
- Check the
$INFORMIXDIR/etc/sqlhostsfile for the service name expected for the desired server, per the official guidance:cat "$INFORMIXDIR/etc/sqlhosts" - Check
/etc/servicesfor a matching entry, per the official guidance:grep servicename /etc/services - If the service name is correct in
sqlhostsbut still missing from/etc/services, contact your network administrator, per the official guidance, to find out why. - On IBM Informix OnLine for NetWare, check the client's own
\etc\services, per the official guidance.
Examples
Cross-checking sqlhosts and /etc/services
$ cat "$INFORMIXDIR/etc/sqlhosts"
dbserver1 onsoctcp hostname1 sqlexec1
$ grep sqlexec1 /etc/services
Diagnostic Checks
- Compare the service name in
sqlhostsagainst/etc/services, checking for a typo or a genuinely missing entry.
Related Errors / Related Topics
- -905 — "Cannot locate sqlexec service /tcp service in /etc/services." The specific,
sqlexec-only form of this same general restriction. - -925 — "The protocol type should be tcp." A related
sqlhosts-configuration error, about the protocol field rather than the service name.
The general form of -905 — cross-check the service name between sqlhosts and /etc/services.