Select from two OnLine 5.20 instances, both on 1 machine
Posted in 2005
Colin runs two OnLine 5.20 instances (pineb_gtest, pineb_prod) on one AIX 4.3.3 box, each with its own tbconfig, sqlhosts entry, /etc/services port and sqlexecd daemon. Each connects fine individually, but a cross-instance join (tracsy@pineb_gtest ... tracsy@pineb_prod) fails with error 908 "Attempt to connect to database server (pineb) failed. Bad file number". Suggestions included checking I-STAR/sqlexecd logs, netstat, trying a simple remote query, .rhosts//etc/hosts.equiv, and setting DBSERVERNAME/DBPATH correctly per instance. No resolution is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration, Networking & sqlhosts Configuration
Two instances of the OnLine engine running on one machine
(tbconfig.gtest, tbconfig.prod)
$INFORMIXDIR/etc/sqlhosts:
pineb_gtest olsoctcp pineb sqlturbo2
pineb_prod olsoctcp pineb sqlturbo3
Entries in /etc/services:
sqlturbo2 1542/tcp # informix pineb_gtest
sqlturbo3 1543/tcp # informix pineb_prod
Two sqlexecd daemons running:
/usr/informix_5.20/lib/sqlexecd sqlturbo3 -l
/usr/informix_5.20/prod_sqlexecd.log
/usr/informix_5.20/lib/sqlexecd sqlturbo2
Can't seem to connect to the two instances at the same time, tried with
ODBC from a PC, the following is from within dbaccess on the machine
itself:
select A.user_id g_user_id,
b.user_id p_user_id
from tracsy@pineb_gtest:mu_user_02 A,
tracsy@pineb_prod:mu_user_02 B
where g_user_id = p_user_id
908: Attempt to connect to database server (pineb) failed.
Bad file number
you may need to install I-STAR and run the sqlexecd daemon
not sure if this is supplied with OnLine 5.20 or not
Colin wrote:
> Two instances of the OnLine engine running on one machine
> (tbconfig.gtest, tbconfig.prod)
>
> $INFORMIXDIR/etc/sqlhosts:
> pineb_gtest olsoctcp pineb sqlturbo2
> pineb_prod olsoctcp pineb sqlturbo3>
> Entries in /etc/services:
> sqlturbo2 1542/tcp # informix pineb_gtest
> sqlturbo3 1543/tcp # informix pineb_prod
>
> Two sqlexecd daemons running:
> /usr/informix_5.20/lib/sqlexecd sqlturbo3 -l
> /usr/informix_5.20/prod_sqlexecd.log
> /usr/informix_5.20/lib/sqlexecd sqlturbo2
>
> Can't seem to connect to the two instances at the same time, tried with
> ODBC from a PC, the following is from within dbaccess on the machine
> itself:
>
> select A.user_id g_user_id,
> b.user_id p_user_id
> from tracsy@pineb_gtest:mu_user_02 A,
> tracsy@pineb_prod:mu_user_02 B
> where g_user_id = p_user_id
>
> 908: Attempt to connect to database server (pineb) failed.
> Bad file number
I-STAR running, sqlexecd daemons running for both instances (see my
earlier post)
scottishpoet wrote:
> you may need to install I-STAR and run the sqlexecd daemon
>
> not sure if this is supplied with OnLine 5.20 or not
>
>
>
>
> Colin wrote:
> > Two instances of the OnLine engine running on one machine
> > (tbconfig.gtest, tbconfig.prod)
> >
> > $INFORMIXDIR/etc/sqlhosts:
> > pineb_gtest olsoctcp pineb sqlturbo2
> > pineb_prod olsoctcp pineb sqlturbo3> >
> > Entries in /etc/services:
> > sqlturbo2 1542/tcp # informix pineb_gtest
> > sqlturbo3 1543/tcp # informix pineb_prod
> >
> > Two sqlexecd daemons running:
> > /usr/informix_5.20/lib/sqlexecd sqlturbo3 -l
> > /usr/informix_5.20/prod_sqlexecd.log
> > /usr/informix_5.20/lib/sqlexecd sqlturbo2
> >
> > Can't seem to connect to the two instances at the same time, tried with
> > ODBC from a PC, the following is from within dbaccess on the machine
> > itself:
> >
> > select A.user_id g_user_id,
> > b.user_id p_user_id
> > from tracsy@pineb_gtest:mu_user_02 A,
> > tracsy@pineb_prod:mu_user_02 B
> > where g_user_id = p_user_id
> >
> > 908: Attempt to connect to database server (pineb) failed.
> > Bad file number
Each server has the right entries in the $TBCONFIG file?
netstat -s shows something listening on both ports?
Using dbaccess you can set $TBCONFIG etc and connect to both ok?
Log both sqlexecd's. No messages in the logs?
No messages in online.log on either server?
Kernel parameters have been set ok as per release notes?
Which OS are you on?
Each server has the right entries in the $TBCONFIG file
netstat -s doesn't seem to show anything regarding the tcp ports I'm
using.
Using dbaccess I can connect to both ok, individually. Likewise via
Crystal reports
Sqlexecd logs show normal connection message info.
No relevant messages in online.log on either server.
Kernel parameters have been set as per release notes.
That machine is running AIX 4.3.3
david@smooth1.co.uk wrote:
> Each server has the right entries in the $TBCONFIG file?
>
> netstat -s shows something listening on both ports?
>
> Using dbaccess you can set $TBCONFIG etc and connect to both ok?
>
> Log both sqlexecd's. No messages in the logs?
>
> No messages in online.log on either server?
>
> Kernel parameters have been set ok as per release notes?
>
> Which OS are you on?
Colin wrote:
> Two instances of the OnLine engine running on one machine
> (tbconfig.gtest, tbconfig.prod)
>
> $INFORMIXDIR/etc/sqlhosts:
> pineb_gtest olsoctcp pineb sqlturbo2
> pineb_prod olsoctcp pineb sqlturbo3>
> Entries in /etc/services:
> sqlturbo2 1542/tcp # informix pineb_gtest
> sqlturbo3 1543/tcp # informix pineb_prod
>
> Two sqlexecd daemons running:
> /usr/informix_5.20/lib/sqlexecd sqlturbo3 -l
> /usr/informix_5.20/prod_sqlexecd.log
> /usr/informix_5.20/lib/sqlexecd sqlturbo2
>
> Can't seem to connect to the two instances at the same time, tried with
> ODBC from a PC, the following is from within dbaccess on the machine
> itself:
>
> select A.user_id g_user_id,
> b.user_id p_user_id
> from tracsy@pineb_gtest:mu_user_02 A,
> tracsy@pineb_prod:mu_user_02 B
> where g_user_id = p_user_id
>
> 908: Attempt to connect to database server (pineb) failed.
> Bad file number
It is odd that it is complaining about pineb rather than pineb_gtest or
pineb_prod. With your environment set to connect to pineb_gtest, can
you run 'select tabid from tracsy@pineb_prod:informix.systables'? This
is a simpler, non-joining query.
Is there any question of needing .rhosts or /etc/hosts.equiv files?
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
ahum.. this has been a while since i played with it...
what is the info in setnet when connecting from a pc??
specially informixserver.
if i recall correctly one has to set in tbconfig.xxx the
value of DBSERVER correct i would recommend to change this
(if not already done ) from online to pineb_gtest and pineb_prod
before starting sqlexecd you may need to set
DBSERVERNAME to pineb_gtest for sqlturbo2
and DBSERVERNAME to pineb_prod for sqlturbo3
then try to connect;
you may want to set DBPATH eq
export DBPATH=//pineb_gtest://pineb_prodand then try and access the databases using dbaccess; this may also
list all your db's in one screen with the @ sign.
again i may be off here and i have no manual at hand....
afaicr it should be doc''d somewhere at least it was in the training
manual for V5
chapter two phase commit.... maybe someone can have a look..... and
comment
on my remarks.
Superboer.
Colin schreef:
> Two instances of the OnLine engine running on one machine
> (tbconfig.gtest, tbconfig.prod)
>
> $INFORMIXDIR/etc/sqlhosts:
> pineb_gtest olsoctcp pineb sqlturbo2
> pineb_prod olsoctcp pineb sqlturbo3>
> Entries in /etc/services:
> sqlturbo2 1542/tcp # informix pineb_gtest
> sqlturbo3 1543/tcp # informix pineb_prod
>
> Two sqlexecd daemons running:
> /usr/informix_5.20/lib/sqlexecd sqlturbo3 -l
> /usr/informix_5.20/prod_sqlexecd.log
> /usr/informix_5.20/lib/sqlexecd sqlturbo2
>
> Can't seem to connect to the two instances at the same time, tried with
> ODBC from a PC, the following is from within dbaccess on the machine
> itself:
>
> select A.user_id g_user_id,
> b.user_id p_user_id
> from tracsy@pineb_gtest:mu_user_02 A,
> tracsy@pineb_prod:mu_user_02 B
> where g_user_id = p_user_id
>
> 908: Attempt to connect to database server (pineb) failed.
> Bad file number