Re: Network connection.,,
Posted in 1997
>From: thabib@bob.zentropy.softaware.com >Date: Mon, 7 Jul 1997 17:25:59 -0700 (PDT) >X-Informix-List-Id: <list.15334> > >I'm trying to connect to a INFORMIX-OnLine Version 7.12.UC1 (online >dynamic server) with a esql/c application (INFORMIX-ESQL Version 7.12.UC1). >I have doubled-checked the sqlhosts files, onconfig, hosts.equiv, hosts >files, and restarted the database engine, only to get a -908 SQLCODE code >returned... What am I forgetting? > >Is there any way to check if Informix is actually listening on a port >besides using ESQL/C? And can i connect over a network by using infperl, >or any other langauges? Any help would be greatly appreciated. The relevant error message description from finderr is: -908 Attempt to connect to database server (servername, conerr=connection-error-number, oserr=system-error-number) failed. The program or application is trying to access another database server but has failed. Note the server name in the current statement. Note also the connection error number and/or system error number that is shown in the message. The desired database server is unavailable, or the network is down or is congested. Ask your DBA and system administrator to verify that the server and network are operational. If the network is congested, use the environment variables INFORMIXCONTIME and INFORMIXCONRETRY to tune connection timing. See Chapter 4 in the Informix Guide to SQL: Reference for information on setting these environment variables. This message appears in Version 6.0 and later. We therefore really need to know what server name you are using, what the corresponding entry in etc/sqlhosts is, what your machine name is, what your $ONCONFIG says under DBSERVERNAME and DBSERVERALIASES. Things to look for are: ixd=${INFORMIXDIR:-/usr/informix} server=${INFORMIXSERVER:?} sqlhosts=${INFORMIXSQLHOSTS:-$ixd/etc/sqlhosts} onconfig=$ixd/etc/$ONCONFIG # Confirm the entry in sqlhosts that will be used. grep "^$server[ ]" $sqlhosts # Confirm that the server name is known by the OnLine system egrep 'DBSERVERNAME|DBSERVERALIASES' $onconfig | grep $server Check that your .rhosts file and /etc/hosts.equiv files have the correct information in them. On some systems, I have both an unadorned machine name and a domain-based machine name in .rhosts. You need to ensure that the OnLine system did come up with the correct listeners if you are not using olipcshm connectivity. You should be able to connect to your database using DB-Access. If you can't do that, fix your configuration until you can. Using DB-Access will provide the extra information such as conner and oserr in the description. Providing these, along with your platform (machine, os, os version) may help. You should also know about whether you are in an NIS (NIS+, YP) environment or whether you are using local files such as /etc/hosts and /etc/services. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> PS: I decline to respond to messages with anti-spam in the return path.