configuring sqlexecd for remote tcp connections.. problems :(
Posted in 2005
Topics: Server Administration, Networking & sqlhosts Configuration
server: sco osr 5.0.6
db server: informix 7.24.UC10 (output from dbaccess -v)
client: debian sarge 3.1 linux
db client: informix clientsdk 2.90.UC3
database I wanna connect to is called 'local_se' when I use dbaccess
from the command line on the server.
I'd like to verify my settings with you guys to see if you spot any
issues:
here are the contents of the $INFORMIXDIR/etc/sqlhosts on the SERVER
after I added the last line:
demo_on onipcshm on_hostname on_servernamedemo_se seipcpip se_hostname sqlexec
tms_se sesoctcp coca sqlserv
local_se seipcpip coca sqlexec
localse_remote setlitcp coca 1526
I have no idea what the other entries before mine are about. 'coca' is
the alias in /etc/hosts for the system ip of the server. and I started
the sqlexecd with the following command in the $INFORMIXDIR/lib
directory:
./sqlexecd localse_remote
it started just fine and verified that it was running with a ps -Ae and
I could:
telnet coca 1526
and see that it was establishing a tcp connection.
....
here are the contents of my $INFORMIXDIR/etc/sqlhosts on the CLIENT
after I added the last line:
demo_on onipcshm on_hostname on_servernamedemo_se seipcpip se_hostname sqlexec
localse_remote oltlitcp coca 1526
I'm using (perl) DBD::Informix (this problem doesn't seem DBD::Informix
related) and according to the docs it uses the TLI connect method.
Yes, I also added the coca alias to the /etc/hosts on the client as
well.
$dbh = DBI->connect("dbi:Informix:local_se@localse_remote", "", "")
is the only code I added and I'm getting errors about:
-25596: The INFORMIXSERVER value is not listed in the sqlhosts file orthe Registry.
so I set the INFORMIXSERVER value to 'localse_remote' and
INFORMIXSQLHOSTS value to "$INFORMIX/etc/sqlhosts" for good measure and
removed the @localse_remote from the connect command. Running the same
perl code again I then received:
-25507: <Failed to locate SQL error message>
my guess was this is just because i'm connecting to such an old version
of informix with the newest clientsdk. I did some searching and it
looks like its something along the same lines about not finding the
correct information in the sqlhosts file.
What did I do wrong guys? I'd really appreciate any help you can offer.
-Matt
matthewlenz@gmail.com wrote:
> server: sco osr 5.0.6
> db server: informix 7.24.UC10 (output from dbaccess -v)
>
> client: debian sarge 3.1 linux
> db client: informix clientsdk 2.90.UC3
>
> database I wanna connect to is called 'local_se' when I use dbaccess
> from the command line on the server.
That is on the SCO machine? Is the SCO box also running sqlexecd
listening to the correct port? What is the name of the server (SCO)
machine?
> I'd like to verify my settings with you guys to see if you spot any
> issues:
>
> here are the contents of the $INFORMIXDIR/etc/sqlhosts on the SERVER
> after I added the last line:
>
> demo_on onipcshm on_hostname on_servername> demo_se seipcpip se_hostname sqlexec
> tms_se sesoctcp coca sqlserv
> local_se seipcpip coca sqlexec
> localse_remote setlitcp coca 1526
OK - sorta. Usually, you use a service name, but the number should work
too. SCO might use setlitcp, but the previous entry - tms_se - suggests
that (a) it might use sesoctcp instead, and (b) there may already be a
service ready and waiting.
What happens when you run DB-Access on the SCO machine and connect to:
yourdb@tms_se
What is the sqlserv service number? Is there an sqlexecd running and
monitoring that port?
> I have no idea what the other entries before mine are about. 'coca' is
> the alias in /etc/hosts for the system ip of the server. and I started
> the sqlexecd with the following command in the $INFORMIXDIR/lib
> directory:
>
> ./sqlexecd localse_remote
Given the sesoctcp entry, I'm dubious about this.
It might be an idea to run sqlexecd with logging (-l /log/file).
Is it still running.
I've normally run $INFORMIXDIR/lib/sqlexecd, but what you did should
work as long as DBPATH for sqlexecd is set to locate the actual SE
database directory reliably.
> it started just fine and verified that it was running with a ps -Ae and
> I could:
>
> telnet coca 1526
>
> and see that it was establishing a tcp connection.
>
> ....
OK - that answers that - probably. Something was running on the port.
> here are the contents of my $INFORMIXDIR/etc/sqlhosts on the CLIENT
> after I added the last line:
>
> demo_on onipcshm on_hostname on_servername> demo_se seipcpip se_hostname sqlexec
Remove these two lines - they are the default (meaningless) entries from
sqlhosts.demo. They show the layout of sqlhosts entries, but that's
about all.
> localse_remote oltlitcp coca 1526
A local remote? Interesting naming!
> I'm using (perl) DBD::Informix (this problem doesn't seem DBD::Informix
> related) and according to the docs it uses the TLI connect method.
It uses whatever your system uses - as configured by sqlhosts. It
better be what your system understands. Using oltiltcp on a machine
that expects olsoctcp leads to errors.
You're on Linux? Use olsoctcp. However, the error you're getting isn't
the one I'd expect for using the wrong connection type.
So, step 1: reconfigure client to use sesoctcp (SE server, TCP
connections with Sockets library). Step 2: ensure coca is known on the
client (I'm sure it is...just checking!)
> Yes, I also added the coca alias to the /etc/hosts on the client as
> well.
>
> $dbh = DBI->connect("dbi:Informix:local_se@localse_remote", "", "")
>
> is the only code I added and I'm getting errors about:
>
> -25596: The INFORMIXSERVER value is not listed in the sqlhosts file or> the Registry.
>
> so I set the INFORMIXSERVER value to 'localse_remote' and
> INFORMIXSQLHOSTS value to "$INFORMIX/etc/sqlhosts" for good measure and
> removed the @localse_remote from the connect command. Running the same
> perl code again I then received:
>
> -25507: <Failed to locate SQL error message>
Now that's a familiar number - telling you that oltlitcp is not a good
connection method to use on Linux.
What's odd is that the SQL error message could not be found. What was
your INFORMIXDIR set to? Is it a working INFORMIXDIR?
> my guess was this is just because i'm connecting to such an old version
> of informix with the newest clientsdk. I did some searching and it
> looks like its something along the same lines about not finding the
> correct information in the sqlhosts file.
>
> What did I do wrong guys? I'd really appreciate any help you can offer.
Generally, CSDK is pretty good about connecting - both backwards and
forwards. It might be the version mismatch - but I think you need to
fix the configuration first. Worry about why Perl or ESQL/C couldn't
find the error message. Fix the sqlhosts file.
(How did you test DBD::Informix on the Linux machine if you couldn't
access a database server?)
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/