Troubleshooting
Problem
This article explains the cause of the error "25507 The specified service name or protocol is unknown." when trying to access a remote database, through the TCP/IP protocol.
Symptom
You receive this error when trying to access a remote database:
25507: The specified service name or protocol is unknown.
and the remote database does not have any problems with local TCP/IP connections.
Cause
- The protocol ( column 2 ) in the sqlhosts file (Unix), or the sqlhosts registry set through Informix SetNet32 (Windows), is set incorrectly.
- The service ( column 4 ) does not exist in the /etc/services file (Unix), or %WINDIR%\system32\drivers\etc\services (Windows).
Resolving The Problem
- It is a common mistake to set the TCP/IP protocol in local client machine's sqlhosts exactly as it appears on the sqlhosts file that belongs to the remote instance you want to connect to. If the local machine supports a different implementation of TCP/IP protocol (ex: HP-UX uses sockets), than the remote server machine, (ex: Solaris uses TLI), but the local machine is set the same as the remote machine (the HP-UX machine is set to use TLI instead of sockets), this error arises at connection time.
The TCP/IP settings are machine based. Set the use of TLI or SOC to match the TCP/IP protocol that is supported by the operating system where the local sqlhosts resides. The correct settings for your local installation are documented in the Machine Notes of the IBM Informix product. Here are some examples of operating systems and the TCP/IP protocols they use:
This operating system | Uses this type of TCP protocol |
Solaris (IDS 11.10 and above) | soc/tli |
Solaris (IDS before 11.10) | tli |
AIX | soc |
HP UX | soc |
Windows (all platforms) | soc |
Tru64 | soc |
Linux | soc |
Example:
Assume there is an instance called online1 on a HP-UX machine named test1, and you have another instance called online2 on a Solaris machine named test2.
You want to be able to connect to online1 from online2 and vice versa. The sqlhosts files must look like these:
On test1 (HP-UX that uses soc):
#Server Name Protocol Hostname Service Name
online1 onsoctcp test1 online1
online2 onsoctcp test2 online2
On test2 (Solaris that uses tli):
#Server Name Protocol Hostname Service Name
online1 ontlitcp test1 online1
online2 ontlitcp test2 online2
- Check the /etc/services file. Make sure that there is an entry that corresponds to the service name entry in the sqlhosts file.
Example:
#Service Name Port/Protocol
online1 1525/tcp
online2 1526/tcp
[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.0;11.1;11.5;11.7","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21252384