problematic multiple instance
Posted in 2006
A user running two IDS 9.30 instances on one AIX 4.3.3 box found shared-memory connections getting crossed: dbaccess returned error -761 and the second instance's startup effectively stole SHM connectivity from the first, while TCP/ODBC connections worked fine. Replies suggested checking for distinct SERVERNUM values and, crucially, unique dummy service names in the sqlhosts shared-memory entries. That was the cause — the poster had left the service column as "-" for both; making it unique fixed it. An IBM developer explained the service name forms an instance-specific SHM listener filename, so duplicates overwrite each other.
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, Platform-Specific Issues, Versions, Editions & End-of-Life
I have a problem i never saw before and cannot figure out. I need to have two
instances running in the same box, so i did the usual thing: created a new
onconfig, added the entries in sqlhosts, set the variables and created the
instance. Everything worked fine until I tried to use dbaccess with the new
instance, it gave me and error 761. I double checked everything and tried
again and same thing, so i went to my original instance and tried dbaccess to
connect to the ORIGINAL (not the new) instance and gave me a 761, I shutdown
the NEW instance and when i tried dbaccess from the ORIGINAL it told me that
the instance (original, running normally) is off. Somehow, somewhere the
connections to shared memory are getting mixed, confused, crossed, i don't
know. The interesting thing is that all connections using TCP/IP (odbc) are
connecting correctly, and all onstat and onmode command are also working as
they should. Could it be a problem with dbaccess itself? I run a lot of OS
scripts and pipe commands to dbaccess, i need this to work. I have another
identical server working with two instances with no problem, but i need the
box so i need to move those instances to this box that is giving the problem.
I'm running IDS 9.30.UC1 on AIX 4.3.3
Any thoughts wuold br appreciated.
Rolando Calfa
Did you make sure that the two instances have different values for SERVERNUM?
Art S. Kagel
----- Original Message -----
From: Rolando Calfa <ids@iiug.org>
At: 5/18 12:51:15
I have a problem i never saw before and cannot figure out. I need to have two
instances running in the same box, so i did the usual thing: created a new
onconfig, added the entries in sqlhosts, set the variables and created the
instance. Everything worked fine until I tried to use dbaccess with the new
instance, it gave me and error 761. I double checked everything and tried
again and same thing, so i went to my original instance and tried dbaccess to
connect to the ORIGINAL (not the new) instance and gave me a 761, I shutdown
the NEW instance and when i tried dbaccess from the ORIGINAL it told me that
the instance (original, running normally) is off. Somehow, somewhere the
connections to shared memory are getting mixed, confused, crossed, i don't
know. The interesting thing is that all connections using TCP/IP (odbc) are
connecting correctly, and all onstat and onmode command are also working as
they should. Could it be a problem with dbaccess itself? I run a lot of OS
scripts and pipe commands to dbaccess, i need this to work. I have another
identical server working with two instances with no problem, but i need the
box so i need to move those instances to this box that is giving the problem.
I'm running IDS 9.30.UC1 on AIX 4.3.3
Any thoughts wuold br appreciated.
Rolando Calfa
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Another possibility:
The dummy service/port name you used for the shared memory connections in the
sqlhosts file: They have to be unique, should NOT be actual port names in
/etc/services, and MUST be different from any used by another server, local or
remote. I've seen all kinds of confusion if this is not followed. Instances on
different machines can share the same service name for TCP connections, but
all of the dummy services in a single sqlhosts file must be unique.
Art S. Kagel
----- Original Message -----
From: Rolando Calfa <ids@iiug.org>
At: 5/18 12:51:15
I have a problem i never saw before and cannot figure out. I need to have two
instances running in the same box, so i did the usual thing: created a new
onconfig, added the entries in sqlhosts, set the variables and created the
instance. Everything worked fine until I tried to use dbaccess with the new
instance, it gave me and error 761. I double checked everything and tried
again and same thing, so i went to my original instance and tried dbaccess to
connect to the ORIGINAL (not the new) instance and gave me a 761, I shutdown
the NEW instance and when i tried dbaccess from the ORIGINAL it told me that
the instance (original, running normally) is off. Somehow, somewhere the
connections to shared memory are getting mixed, confused, crossed, i don't
know. The interesting thing is that all connections using TCP/IP (odbc) are
connecting correctly, and all onstat and onmode command are also working as
they should. Could it be a problem with dbaccess itself? I run a lot of OS
scripts and pipe commands to dbaccess, i need this to work. I have another
identical server working with two instances with no problem, but i need the
box so i need to move those instances to this box that is giving the problem.
I'm running IDS 9.30.UC1 on AIX 4.3.3
Any thoughts wuold br appreciated.
Rolando Calfa
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Check the folow:
- The value of SERVERNUM in each onconfig is different.
- Your TCP ports in sqlhosts for socket connection are unique.
- the 'service column' value in the sqlhosts for SHM conection is unique for
each instance.
-----Mensaje original-----
De: ROLANDO CALFA [mailto:rolandocalfa@hotmail.com]
Enviado el: Jueves, 18 de Mayo de 2006 11:48 a.m.
Para: ids@iiug.org
Asunto: problematic multiple instance [6758]
I have a problem i never saw before and cannot figure out. I need to have
two
instances running in the same box, so i did the usual thing: created a new
onconfig, added the entries in sqlhosts, set the variables and created the
instance. Everything worked fine until I tried to use dbaccess with the new
instance, it gave me and error 761. I double checked everything and tried
again and same thing, so i went to my original instance and tried dbaccess
to
connect to the ORIGINAL (not the new) instance and gave me a 761, I shutdown
the NEW instance and when i tried dbaccess from the ORIGINAL it told me that
the instance (original, running normally) is off. Somehow, somewhere the
connections to shared memory are getting mixed, confused, crossed, i don't
know. The interesting thing is that all connections using TCP/IP (odbc) are
connecting correctly, and all onstat and onmode command are also working as
they should. Could it be a problem with dbaccess itself? I run a lot of OS
scripts and pipe commands to dbaccess, i need this to work. I have another
identical server working with two instances with no problem, but i need the
box so i need to move those instances to this box that is giving the
problem.
I'm running IDS 9.30.UC1 on AIX 4.3.3
Any thoughts wuold br appreciated.
Rolando Calfa
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
thank you all for your help. I forgot to make the column for /etc/services to something different from the original "-" and that was the cause.I should be ashamed of myself for forgeting that. Again thanks Rolando Calfa
Hi Art,
you are right, of course.
The uniqueness of "service names" in sqlhosts files
is not only required within the same sqlhosts file. As far
as I know it is required for all instances on the same
machine. This is because that name is used to create
an instance specific filename for each SHM listener in
a common directory. Therefore when starting an
instance with a duplicate "service name", it will grab
the SHM connectivity from an already running instance
that uses that same service name by overwriting the
specific file. After that you can connect (via SHM) only
to the newly started instance, but not to the one that
was already running (which is the confusing effect that
you see in this situation).
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
Visit one of the upcoming Infobahn events in Germany
to get up-to-date information on Informix products:
- June 20, 2006 at the IBM Forum Muenchen
- June 21, 2006 at the IBM Forum Frankfurt
- June 22, 2006 at the IBM Forum Berlin
For more please see:
http://www.ibm.com/de/events/infobahn/
ids-bounces@iiug.org wrote on 18.05.2006 18:54:20:
>
> Another possibility:
>
> The dummy service/port name you used for the shared memory connections
in the
> sqlhosts file: They have to be unique, should NOT be actual port names
in
> /etc/services, and MUST be different from any used by another server,
local or
> remote. I've seen all kinds of confusion if this is not followed.
Instances on
> different machines can share the same service name for TCP connections,
but
> all of the dummy services in a single sqlhosts file must be unique.
>
> Art S. Kagel
>
> ----- Original Message -----
> From: Rolando Calfa <ids@iiug.org>
> At: 5/18 12:51:15
>
> I have a problem i never saw before and cannot figure out. I need to
have two
> instances running in the same box, so i did the usual thing: created a
new
> onconfig, added the entries in sqlhosts, set the variables and created
the
> instance. Everything worked fine until I tried to use dbaccess with the
new
> instance, it gave me and error 761. I double checked everything and
tried
> again and same thing, so i went to my original instance and tried
dbaccess to
> connect to the ORIGINAL (not the new) instance and gave me a 761, I
shutdown
> the NEW instance and when i tried dbaccess from the ORIGINAL it told me
that
> the instance (original, running normally) is off. Somehow, somewhere the
> connections to shared memory are getting mixed, confused, crossed, i
don't
> know. The interesting thing is that all connections using TCP/IP (odbc)
are
> connecting correctly, and all onstat and onmode command are also working
as
> they should. Could it be a problem with dbaccess itself? I run a lot of
OS
> scripts and pipe commands to dbaccess, i need this to work. I have
another
> identical server working with two instances with no problem, but i need
the
> box so i need to move those instances to this box that is giving the
problem.
> I'm running IDS 9.30.UC1 on AIX 4.3.3
> Any thoughts wuold br appreciated.
>
> Rolando Calfa
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>