Re: Informix Connect
Posted in 2004
Tom can't connect a Windows Informix Connect/ODBC client (setnet32, ILogin, DBPing) to Informix SE 7.2 on a SCO server, always getting SQLCODE -908 / SQLSTATE 08004, "Attempt to connect to database server (pei) failed". Paul Watson and Clive Eisen walk through diagnostics: check the sqlhosts entry and protocol (SE release notes indicate tli for TCP), the sqlexec service entry in /etc/services, whether sqlexecd was started with the right exported environment, netstat -a for the listener, and a plain telnet to port 1525. The telnet fails, showing nothing is listening on that port; suggestions are a firewall in the way or errors in the Informix log at sqlexecd startup. The thread ends there with no resolution recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Error Codes & Troubleshooting, Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Networking & sqlhosts Configuration
On Tue, 20 Apr 2004 21:33:28 +0100, Paul Watson <paul@oninit.com>
wrote:
>What does the release notes say the connection should be? I don't
>have a Sco box.
I don't understand what you mean.
>
>Have you started sqlexecd ?
Yes.
>
>I would expect the Unix end to be
>
>pei setlitcp eptsco sqlexec
>
>with a line in /etc/services for sqlexec
>
You mean like:
sqlexec 1525/tcp # INFORMIX SQLexec DAEMON
sqlexe2 1526/tcp # INFORMIX SQLexec DAEMON
sqlexe3 1527/tcp # INFORMIX SQLexec DAEMON
sqlexe4 1528/tcp # INFORMIX SQLexec DAEMON
>at the PC end I tend to start with DBPing if it doesn't just work.
>If DBPing doesn't work then nothing else will
Under the TCPIP TAB
[ ip found ] 0
9:18:35 AM : Ping IP 10.254.2.10 [ ip found ] 0 RoundTrip Time 7 ms
Packet Size 11 bytes Hello There
9:18:35 AM : Fully Qualified HostName: 10.254.2.10
9:18:35 AM : This Host has no Aliases
9:18:35 AM : Host IP Address(s) retrieved
In Service and Port information
(note - only service name worked, not port #)
9:19:57 AM : Service Name retrieved Sucessfully!
9:19:57 AM : This Service has no Aliases
Under the Native Connect TAB
SQLSTATE = 08004
SQLCODE = -908
08004 means "Data source rejected establishment of connection"?
Under the COM+ TAB
DSN=PentIBMtax;UID=informix;PWD=########
ATTEMPTING TO MAKE A CONNECTION
CONNECTION FAILED
-2147217843
[Informix][Informix ODBC Driver][Informix]Attempt to connect to
database server (pei) failed.
Under the ODBC TAB
9:26:11 AM : SQLAllocEnv Successful
9:26:11 AM : SQLAllocConnect Successful
9:27:33 AM : There was an error within SQLConnect!
9:27:33 AM : SQLState = 08004
9:27:33 AM : Native Error = -908
9:27:33 AM : Error Message = [Informix][Informix ODBC
Driver][Informix]Attempt to connect to database server (pei) failed.
In the release notes I found:
The IBM Informix TCP listener thread binds to a particular IP
address/port.
It listens for incoming calls addressed to only one IP address. If
there are
multiple IP addresses configured on the system, a TLI client will
not be able
to connect to the server. (If DNS is configured to resolve the
hostname on a
rotary of the four IP addresses, you do not know which of those
addresses
has been selected by the IBM Informix TCP listener).
The solution is that in the \\$INFORMIXDIR/etc/sqlhosts file, use
"*hostname"
instead of "hostname". It will make the IBM Informix TCP listener
bind to
INADDR_ANY instead of a particular address.
Is this something that I need to worry about?
My impression is that we're the proverbial "this close". But whether
we are or not, I don't really know. Is there something that I should
have done on the SCO box? Is there something about "remote
connections" that I have to enable?
Thanks for all your help, it is appreciated.
Tom
>
>Tom wrote:
>>
>> Great. Here goes...
>>
>[cutting]
>
>> When I run Setnet32...
>>
>> Environment TAB
>> INFORMIXDIR=C:\\Program Files\\Informix\\Connect\\
>> INFORMIXSERVER=pei>> INFORMIXSQLHOSTS=
>>
>> Server Information TAB
>> IBM Informix Server - <pei>
>> Hostname - <server's IP address>
>> Protocolname - <sesoctcp>
>> Service Name - <1525>
>> Options - <empty>
>>
>> Host Information TAB
>> Current Host - <server's IP address>
>> User Name - <informix>
>> Password Option - <password>
>> Password - <informix's password>
>>
>> About Setnet32
>> 9.53 2.81.TC2
>
>Looks OK, I tend to run regcopy after changing setnet32
>
>>
>> When I run ILogin Demo...
>>
>> Login parameters
>> Server pei
>> Hostname server's IP address
>> Servicename 1525
>> Protocolname sesoctcp
>> Username informix
>> Password informix's password
>> Stores Database Stores7 <or one of my databases>
>>
>> I get an error message...
>>
>> Message from ILogin Demo
>> Database: Sqlcode = -908
>> Refer to informix Find Error utility or
>
>Is sqlexecd listening on the port, you can use netstat -a on server
>to check.
>
>[cutting]
Tom wrote: > On Tue, 20 Apr 2004 21:33:28 +0100, Paul Watson <paul@oninit.com> > wrote: snip > > My impression is that we're the proverbial "this close". But whether > we are or not, I don't really know. Is there something that I should > have done on the SCO box? Is there something about "remote > connections" that I have to enable? > snip >>Is sqlexecd listening on the port, you can use netstat -a on server >>to check. >> I didnt see your answer to this On the windows box try telnet 1.2.3.4 1525 and see if you actually can connect wher you put the ip address of your SCO box in place of 1.2.3.4
Tom wrote: > > On Tue, 20 Apr 2004 21:33:28 +0100, Paul Watson <paul@oninit.com> > wrote: > > >What does the release notes say the connection should be? I don't > >have a Sco box. > > I don't understand what you mean. In $INFORMIXDIR/release/*/*/ there should be a number of files, look for the engine release note and see what the connection should be > > > > >Have you started sqlexecd ? > > Yes. Did you export the environment when you started it. When you run netstat -a can you see the listener on the port? Is it the port you are expecting? Telnet to <ip> <port>, you should get a connection closed message. > > > > >I would expect the Unix end to be > > > >pei setlitcp eptsco sqlexec > > > >with a line in /etc/services for sqlexec > > > > You mean like: > > sqlexec 1525/tcp # INFORMIX SQLexec DAEMON > sqlexe2 1526/tcp # INFORMIX SQLexec DAEMON > sqlexe3 1527/tcp # INFORMIX SQLexec DAEMON > sqlexe4 1528/tcp # INFORMIX SQLexec DAEMON > > >at the PC end I tend to start with DBPing if it doesn't just work. > >If DBPing doesn't work then nothing else will > > Under the TCPIP TAB > [ ip found ] 0 > 9:18:35 AM : Ping IP 10.254.2.10 [ ip found ] 0 RoundTrip Time 7 ms > Packet Size 11 bytes Hello There > 9:18:35 AM : Fully Qualified HostName: 10.254.2.10 > 9:18:35 AM : This Host has no Aliases > 9:18:35 AM : Host IP Address(s) retrieved > > In Service and Port information > (note - only service name worked, not port #) > 9:19:57 AM : Service Name retrieved Sucessfully! > 9:19:57 AM : This Service has no Aliases > > Under the Native Connect TAB > SQLSTATE = 08004 > SQLCODE = -908 > > 08004 means "Data source rejected establishment of connection"? The ODBC testing will not work 'cos of the above. It's not something dumb like a mixture of case is it? > > Under the COM+ TAB > DSN=PentIBMtax;UID=informix;PWD=######## > ATTEMPTING TO MAKE A CONNECTION > CONNECTION FAILED > -2147217843 > [Informix][Informix ODBC Driver][Informix]Attempt to connect to > database server (pei) failed. [cutting] -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
On Wed, 21 Apr 2004 16:15:36 +0100, Paul Watson <paul@oninit.com> wrote: >Tom wrote: >> >> On Tue, 20 Apr 2004 21:33:28 +0100, Paul Watson <paul@oninit.com> >> wrote: >> >> >What does the release notes say the connection should be? I don't >> >have a Sco box. >> >> I don't understand what you mean. > >In $INFORMIXDIR/release/*/*/ there should be a number of files, >look for the engine release note and see what the connection should be > >> >> > >> >Have you started sqlexecd ? >> >> Yes. > >Did you export the environment when you started it. When you run >netstat -a can you see the listener on the port? Is it the port >you are expecting? Telnet to <ip> <port>, you should get a >connection closed message. > No, but it was running when I telneted into it. (It's set up to bounce itself every night.) As I mentioned in my earlier msg, I see both "pei" and "pei2" when I use the netstat -a command. But nowhere do I see any mention of what port they're listening on. As for telnetting to it: C:\\ > telnet 10.254.2.10 1525 Connecting To 10.254.2.10...Could not open connection to the host, on port 1525: Connect failed >> >> > >> >I would expect the Unix end to be >> > >> >pei setlitcp eptsco sqlexec >> > >> >with a line in /etc/services for sqlexec >> > >> >> You mean like: >> >> sqlexec 1525/tcp # INFORMIX SQLexec DAEMON >> sqlexe2 1526/tcp # INFORMIX SQLexec DAEMON >> sqlexe3 1527/tcp # INFORMIX SQLexec DAEMON >> sqlexe4 1528/tcp # INFORMIX SQLexec DAEMON >> >> >at the PC end I tend to start with DBPing if it doesn't just work. >> >If DBPing doesn't work then nothing else will >> >> Under the TCPIP TAB >> [ ip found ] 0 >> 9:18:35 AM : Ping IP 10.254.2.10 [ ip found ] 0 RoundTrip Time 7 ms >> Packet Size 11 bytes Hello There >> 9:18:35 AM : Fully Qualified HostName: 10.254.2.10 >> 9:18:35 AM : This Host has no Aliases >> 9:18:35 AM : Host IP Address(s) retrieved >> >> In Service and Port information >> (note - only service name worked, not port #) >> 9:19:57 AM : Service Name retrieved Sucessfully! >> 9:19:57 AM : This Service has no Aliases >> >> Under the Native Connect TAB >> SQLSTATE = 08004 >> SQLCODE = -908 >> >> 08004 means "Data source rejected establishment of connection"? > >The ODBC testing will not work 'cos of the above. It's not something >dumb like a mixture of case is it? > >> >> Under the COM+ TAB >> DSN=PentIBMtax;UID=informix;PWD=######## >> ATTEMPTING TO MAKE A CONNECTION >> CONNECTION FAILED >> -2147217843 >> [Informix][Informix ODBC Driver][Informix]Attempt to connect to >> database server (pei) failed. > >[cutting]
On Wed, 21 Apr 2004 16:15:36 +0100, Paul Watson <paul@oninit.com> wrote: >Tom wrote: >> >> On Tue, 20 Apr 2004 21:33:28 +0100, Paul Watson <paul@oninit.com> >> wrote: >> >> >What does the release notes say the connection should be? I don't >> >have a Sco box. >> >> I don't understand what you mean. > >In $INFORMIXDIR/release/*/*/ there should be a number of files, >look for the engine release note and see what the connection should be > Looking in SE_7.2, it says one should use "tli" for tcp. >> >> > >> >Have you started sqlexecd ? >> >> Yes. > >Did you export the environment when you started it. When you run >netstat -a can you see the listener on the port? Is it the port >you are expecting? Telnet to <ip> <port>, you should get a >connection closed message. > >> >> > >> >I would expect the Unix end to be >> > >> >pei setlitcp eptsco sqlexec >> > >> >with a line in /etc/services for sqlexec >> > >> >> You mean like: >> >> sqlexec 1525/tcp # INFORMIX SQLexec DAEMON >> sqlexe2 1526/tcp # INFORMIX SQLexec DAEMON >> sqlexe3 1527/tcp # INFORMIX SQLexec DAEMON >> sqlexe4 1528/tcp # INFORMIX SQLexec DAEMON >> >> >at the PC end I tend to start with DBPing if it doesn't just work. >> >If DBPing doesn't work then nothing else will >> >> Under the TCPIP TAB >> [ ip found ] 0 >> 9:18:35 AM : Ping IP 10.254.2.10 [ ip found ] 0 RoundTrip Time 7 ms >> Packet Size 11 bytes Hello There >> 9:18:35 AM : Fully Qualified HostName: 10.254.2.10 >> 9:18:35 AM : This Host has no Aliases >> 9:18:35 AM : Host IP Address(s) retrieved >> >> In Service and Port information >> (note - only service name worked, not port #) >> 9:19:57 AM : Service Name retrieved Sucessfully! >> 9:19:57 AM : This Service has no Aliases >> >> Under the Native Connect TAB >> SQLSTATE = 08004 >> SQLCODE = -908 >> >> 08004 means "Data source rejected establishment of connection"? > >The ODBC testing will not work 'cos of the above. It's not something >dumb like a mixture of case is it? > >> >> Under the COM+ TAB >> DSN=PentIBMtax;UID=informix;PWD=######## >> ATTEMPTING TO MAKE A CONNECTION >> CONNECTION FAILED >> -2147217843 >> [Informix][Informix ODBC Driver][Informix]Attempt to connect to >> database server (pei) failed. > >[cutting]
Have you got a firewall in the way ??? Tom wrote: > > On Wed, 21 Apr 2004 16:15:36 +0100, Paul Watson <paul@oninit.com> > wrote: > > >Tom wrote: > >> > >> On Tue, 20 Apr 2004 21:33:28 +0100, Paul Watson <paul@oninit.com> > >> wrote: > >> > >> >What does the release notes say the connection should be? I don't > >> >have a Sco box. > >> > >> I don't understand what you mean. > > > >In $INFORMIXDIR/release/*/*/ there should be a number of files, > >look for the engine release note and see what the connection should be > > > >> > >> > > >> >Have you started sqlexecd ? > >> > >> Yes. > > > >Did you export the environment when you started it. When you run > >netstat -a can you see the listener on the port? Is it the port > >you are expecting? Telnet to <ip> <port>, you should get a > >connection closed message. > > > No, but it was running when I telneted into it. (It's set up to > bounce itself every night.) > > As I mentioned in my earlier msg, I see both "pei" and "pei2" when I > use the netstat -a command. But nowhere do I see any mention of what > port they're listening on. > > As for telnetting to it: > > C:\\ > > telnet 10.254.2.10 1525 > Connecting To 10.254.2.10...Could not open connection to the host, on > port 1525: Connect failed > > >> > >> > > >> >I would expect the Unix end to be > >> > > >> >pei setlitcp eptsco sqlexec > >> > > >> >with a line in /etc/services for sqlexec > >> > > >> > >> You mean like: > >> > >> sqlexec 1525/tcp # INFORMIX SQLexec DAEMON > >> sqlexe2 1526/tcp # INFORMIX SQLexec DAEMON > >> sqlexe3 1527/tcp # INFORMIX SQLexec DAEMON > >> sqlexe4 1528/tcp # INFORMIX SQLexec DAEMON > >> > >> >at the PC end I tend to start with DBPing if it doesn't just work. > >> >If DBPing doesn't work then nothing else will > >> > >> Under the TCPIP TAB > >> [ ip found ] 0 > >> 9:18:35 AM : Ping IP 10.254.2.10 [ ip found ] 0 RoundTrip Time 7 ms > >> Packet Size 11 bytes Hello There > >> 9:18:35 AM : Fully Qualified HostName: 10.254.2.10 > >> 9:18:35 AM : This Host has no Aliases > >> 9:18:35 AM : Host IP Address(s) retrieved > >> > >> In Service and Port information > >> (note - only service name worked, not port #) > >> 9:19:57 AM : Service Name retrieved Sucessfully! > >> 9:19:57 AM : This Service has no Aliases > >> > >> Under the Native Connect TAB > >> SQLSTATE = 08004 > >> SQLCODE = -908 > >> > >> 08004 means "Data source rejected establishment of connection"? > > > >The ODBC testing will not work 'cos of the above. It's not something > >dumb like a mixture of case is it? > > > >> > >> Under the COM+ TAB > >> DSN=PentIBMtax;UID=informix;PWD=######## > >> ATTEMPTING TO MAKE A CONNECTION > >> CONNECTION FAILED > >> -2147217843 > >> [Informix][Informix ODBC Driver][Informix]Attempt to connect to > >> database server (pei) failed. > > > >[cutting] -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
Tom wrote: > On Wed, 21 Apr 2004 16:15:36 +0100, Paul Watson <paul@oninit.com> > wrote: snip > As for telnetting to it: > > C:\\ > >>telnet 10.254.2.10 1525 > > Connecting To 10.254.2.10...Could not open connection to the host, on > port 1525: Connect failed It ain't listening Anything in the informix log when you start sqlexecd?