connect through java using group_name con mgr
Posted in 2009
Kamran couldn't connect via JDBC to an 11.50 HDR/RSS cluster through Connection Manager, getting "INFORMIXSERVER does not match DBSERVERNAME/DBSERVERALIASES" when using the SLA name (oltp) or group name (g_mach). Ping Tang explained that onstat -g cmsm only shows SLA/FOC info, that the JDBC URL must use the SLA's own port (9991) from the oncmsm sqlhosts, and that g_mach is only for oncmsm's internal connections unless defined in the client sqlhosts. A subsequent -408 error was fixed by upgrading to JDBC 3.50. A later problem (SLA payroll=RSS failing, "no server returned") was still being diagnosed; no resolution is recorded for it.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Error Codes & Troubleshooting, Connectivity: ODBC / JDBC / .NET, Server Administration, Security, Permissions & Auditing, Networking & sqlhosts Configuration, Clustering, Grid & MACH11, Java & JDBC Development, Versions, Editions & End-of-Life
Hi
At end of this message is the information of our HDR configuration at primary
server alongwith connection manager configuration.
it includes how we set environment for database and connection manager, how we
run the connection manager and what we got in connection managers log.
Problem 1: connection manager log shows that it run successfully but onstst
g cmsm command dont show the information about other group members (we
defined in the group in sqlhosts file).
Problem 2: We are able to connect through java application using following
string
jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=ids_net_primary
but unable to connect through following connection strings
a) jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=oltp
b) jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=g_mach
for both a & b we get following error message
INFORMIXSERVER does not match either DBSERVERNAME or DBSERVERALIASES.
How can we connect through using group-name (g_mach)
And using connection manager group member (oltp)
regards,
Kamran
Primary Database Server's IP : 192.168.0.16
Connection manager IP : 192.168.0.16
Secondary Database Server IP : 192.168.0.15
RSS Database Server IP : 192.168.0.14
-- sqlhosts entry
g_mach group - - e=ids_net_RSS
ids_net_primary ontlitcp 192.168.0.16 sql_net_primary g=g_mach
ids_net_secondary ontlitcp 192.168.0.15 sql_net_secondary g=g_mach
ids_net_RSS ontlitcp 192.168.0.14 sql_net_RSS g=g_mach
oltp onsoctcp 192.168.0.16 9991
report onsoctcp 192.168.0.16 9992
payroll onsoctcp 192.168.0.16 9993
-- /etc/services
sqlturbo_pri 9201/tcp
sql_net_primary 9202/tcp
sqlturbo_sec 8201/tcp
sql_net_secondary 8202/tcp
sqlturbo_RSS 9203/tcp
sql_net_RSS 9204/tcp
/etc/hosts
192.168.0.16 sunpak04.i2c.com sunpak04
192.168.0.15 sunpak03
192.168.0.14 sunpak02.i2c.com sunpak02
-- onconfig
SERVERNUM 88
DBSERVERNAME ids_primaryDBSERVERALIASES ids_net_primary
#DBSERVERALIASES g_mach
HA_ALIAS ids_net_primary
#HA_ALIAS g_mach
DRAUTO 0
DRINTERVAL 30
DRTIMEOUT 30
HA_ALIAS ids_net_primary
#HA_ALIAS g_mach
DRLOSTFOUND /export/informix11-50-3/etc/dr.lostfound
DRIDXAUTO 0
LOG_INDEX_BUILDS 1
SDS_ENABLE 0
SDS_TIMEOUT 20
SDS_PAGINGREDIRECTED_WRITES 0
FAILOVER_CALLBACK
TEMPTAB_NOLOG 1
-- enviornment script
INFORMIXDIR=/export/informix11-50-3 ;export INFORMIXDIR
INFORMIXSERVER=ids_primary ;export INFORMIXSERVER#INFORMIXSERVER=g_mach ;export INFORMIXSERVER
ONCONFIG=onconfig_test02 ;export ONCONFIG
INFORMIXSTACKSIZE=128 ;export INFORMIXSTACKSIZE
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/sbin:/usr/sfw/sparc-sun-solaris2.10/bin/:/usr/local/ssl/bin:$INFORMIXDIR/bin:$I
NFORMIXDIR/etc ; export PATH
INFORMIXSERVERALIAS=ids_net_primary ;export INFORMIXSERVERALIAS#INFORMIXSERVERALIAS=g_mach ;export INFORMIXSERVERALIAS
IDSNETSERVICE=sql_net_test-9201
IDSSHMSERVICE=sqlturbo_test-9202
INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts ;export INFORMIXSQLHOSTSONCONFIGFILE=$INFORMIXDIR/etc/onconfig_test02 ;export ONCONFIGFILE
-- cmsm.cfg
NAME cm_test
SLA oltp=primary
SLA report=HDR
SLA payroll=RSS
FOC HDR+RSS,0
SLA_WORKERS 16
DEBUG 1 # debug information
LOGFILE /export/informix11-50-3/tmp/cmlog.log
-- password file
ids_net_primary - informix password
ids_net_secondary - informix password
#ids_net_rss1_12 - informix password
-- script to run connection manager (con_mgr_test)
INFORMIXDIR=/export/informix11-50-3 ;export INFORMIXDIR
INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts ;export INFORMIXSQLHOSTS
INFORMIXSERVER=ids_net_primary ;export INFORMIXSERVER
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/sbin:/usr/sfw/sparc-sun-solaris2.10/bin/:/usr/local/ssl/bin:$INFORMIXDIR/bin:$I
NFORMIXDIR/etc ; export PATH
-- How we started connection manager
oncmsm -c /export/informix11-50-3/etc/cmsm.cfg
-- connection manager status don't show information about RSS and secondary
server
onstat -g cmsm
-- output of above command
IBM Informix Dynamic Server Version 11.50.FC3 -- On-Line (Prim) -- Up 02:49:00
-- 328704 KbytesCM name host sla define foc flag connections
-- connection manager is closed successfully with following command
oncmsm -k cm_test
-- output of connection manager log
Thu Apr 16 19:15:02 2009
19:15:02 IBM Informix Connection Manager
19:15:02 Connection Manager name is cm_test
19:15:02 Starting Connection Manager...
19:15:04 Current max open fd is 32767
19:15:04 switch to daemon mode
19:15:04 new daemon pid is 18724 [cmsm_main.c:2525]
19:15:04 fcntl(/export/informix11-50-3/tmp/cmsm.pid.cm_test) success errno = 0
[cmsm_main.c:1781]
19:15:04 dbservername = ids_primary
19:15:04 nettype = onipcshm
19:15:04 hostname = 192.168.0.16
19:15:04 servicename = sqlturbo_primary
19:15:04 options =
19:15:04 listener oltp initializing
19:15:04 create new thread 5 for ids_primary [cmsm_sla.c:557]
19:15:04 19:15:04 CONNECT to
sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri listener report
initializing [cmsm_
server.ec:123]
19:15:04 listener payroll initializing
19:15:04 Listener oltp=primary is active with 16 worker threads
19:15:04 Listener report=HDR is active with 16 worker threads
19:15:04 Listener payroll=RSS is active with 16 worker threads
19:15:04 CONNECT to sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri
SQLCODE = (0,0,) [cmsm_server.ec:139]
19:15:04 Connection Manager successfully connected to ids_primary
19:15:04 ids_primary protocols = 1 [cmsm_server.ec:1147]
19:15:04 adding ids_primary alias ids_net_primary with protocol ontlitcp 1
[cmsm_server.ec:1237]
19:15:04 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
19:15:04 Adding server ids_primary [cmsm_server.ec:1572]
19:15:04 Arbitrator FOC string = HDR+RSS,0
19:15:04 Arbitrator setting primary name = ids_primary [cmsm_arb.c:518]
19:15:04 FOC[0] = HDR
19:15:04 FOC[1] = RSS
19:15:04 FOC timeout = 0
19:15:04 Adding server ids_net_RSS [cmsm_server.ec:1572]
19:15:04 create new thread 55 for ids_net_RSS [cmsm_sla.c:557]
19:15:04 CONNECT to sysmaster@ids_net_RSS|ontlitcp|192.168.0.14|sql_net_RSS
[cmsm_server.ec:123]
19:15:04 Adding server ids_net_secondary [cmsm_server.ec:1572]
19:15:04 create new thread 56 for ids_net_secondary [cmsm_sla.c:557]
19:15:04 CONNECT to
sysmaster@ids_net_secondary|ontlitcp|192.168.0.15|sql_net_secondary USER
informix [cmsm_server.ec:123]
19:15:05 CONNECT to sysmaster@ids_net_RSS|ontlitcp|192.168.0.14|sql_net_RSS
SQLCODE = (0,0,) [cmsm_server.ec:139]
19:15:05 Connection Manager successfully connected to ids_net_RSS
19:15:05 ids_net_RSS protocols = 1 [cmsm_server.ec:1147]
19:15:05 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
19:15:05 Arbitrator FOC string = HDR+RSS,0
19:15:05 Arbitrator setting primary name = ids_net_primary [cmsm_arb.c:518]
19:15:05 FOC[0] = HDR
19:15:05 FOC[1] = RSS
19:15:05 FOC timeout = 0
19:15:05 get ids_net_RSS CM_ADM event 8:3 cm_test [cmsm_server.ec:1042]
19:15:05 CONNECT to
sysmaster@
Hi Kamran
Regarding to your first problem. Onstat -g cmsm should display information
feeding by your cmconfig file. Basically, it will display SLA and FOC rule.
So it will not display information from your sqlhosts file.
About your second problem. You used the wrong port number for oltp. I have
changed the port number as below. Basically, you should use the port number
for oltp which was defined in your oncmsm's sqlhosts file.
jdbc:informix-sqli://192.168.0.16:9991/cards:informixserver=oltp
Your group was defined in the sqlhosts for oncmsm, you can't access the server
via g_mach. The g_mach group was used by oncmsm to connect to each nodes when
oncmsm was brought up. If you want to access a single node via group, you have
to define the group in your server sqlhosts file.
Regards,
-Ping
> a)
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=oltp
>
> b)
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=g_mach
>
--- On Wed, 4/22/09, KAMRAN HAQ <khaq@i2cinc.com> wrote:
> From: KAMRAN HAQ <khaq@i2cinc.com>
> Subject: connect through java using group_name con mgr [15579]
> To: ids@iiug.org
> Date: Wednesday, April 22, 2009, 6:20 AM
> Hi
>
> At end of this message is the information of our HDR
> configuration at primary
> server alongwith connection manager configuration.
> it includes how we set environment for database and
> connection manager, how we
> run the connection manager and what we got in connection
> managers log.
>
> Problem 1: connection manager log shows that it run
> successfully but onstst
> g cmsm command dont show the information about
> other group members (we
> defined in the group in sqlhosts file).
>
> Problem 2: We are able to connect through java application
> using following
> string
>
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=ids_net_primary
>
>
> but unable to connect through following connection strings
>
>
> a)
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=oltp
>
> b)
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=g_mach
>
>
> for both a & b we get following error
> message
>
> INFORMIXSERVER does not match either DBSERVERNAME or
> DBSERVERALIASES.
>
> How can we connect through using group-name (g_mach)
> And using connection manager group member (oltp)
>
> regards,
> Kamran
>
> Primary Database Server's IP : 192.168.0.16
> Connection manager IP : 192.168.0.16
> Secondary Database Server IP : 192.168.0.15
> RSS Database Server IP : 192.168.0.14
>
> -- sqlhosts entry
>
> g_mach group - - e=ids_net_RSS
> ids_net_primary ontlitcp 192.168.0.16 sql_net_primary
> g=g_mach
> ids_net_secondary ontlitcp 192.168.0.15 sql_net_secondary
> g=g_mach
> ids_net_RSS ontlitcp 192.168.0.14 sql_net_RSS g=g_mach
> oltp onsoctcp 192.168.0.16 9991
> report onsoctcp 192.168.0.16 9992
> payroll onsoctcp 192.168.0.16 9993>
> -- /etc/services
> sqlturbo_pri 9201/tcp
> sql_net_primary 9202/tcp
> sqlturbo_sec 8201/tcp
> sql_net_secondary 8202/tcp
> sqlturbo_RSS 9203/tcp
> sql_net_RSS 9204/tcp
>
> /etc/hosts
> 192.168.0.16 sunpak04.i2c.com sunpak04
> 192.168.0.15 sunpak03
> 192.168.0.14 sunpak02.i2c.com sunpak02
>
> -- onconfig
> SERVERNUM 88
> DBSERVERNAME ids_primary> DBSERVERALIASES ids_net_primary
> #DBSERVERALIASES g_mach
>
> HA_ALIAS ids_net_primary
> #HA_ALIAS g_mach
>
> DRAUTO 0
> DRINTERVAL 30
> DRTIMEOUT 30
> HA_ALIAS ids_net_primary
> #HA_ALIAS g_mach
> DRLOSTFOUND /export/informix11-50-3/etc/dr.lostfound
> DRIDXAUTO 0
> LOG_INDEX_BUILDS 1
> SDS_ENABLE 0
> SDS_TIMEOUT 20
> SDS_PAGING> REDIRECTED_WRITES 0
> FAILOVER_CALLBACK
> TEMPTAB_NOLOG 1>
> -- enviornment script
> INFORMIXDIR=/export/informix11-50-3 ;export INFORMIXDIR
> INFORMIXSERVER=ids_primary ;export INFORMIXSERVER> #INFORMIXSERVER=g_mach ;export INFORMIXSERVER
> ONCONFIG=onconfig_test02 ;export ONCONFIG
> INFORMIXSTACKSIZE=128 ;export INFORMIXSTACKSIZE>
>
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/sbin:/usr/sfw/sparc-sun-solaris2.10/bin/:/usr/local/ssl/bin:$INFORMIXDIR/bin:$I
>
> NFORMIXDIR/etc ; export PATH
> INFORMIXSERVERALIAS=ids_net_primary ;export> INFORMIXSERVERALIAS
> #INFORMIXSERVERALIAS=g_mach ;export INFORMIXSERVERALIAS
> IDSNETSERVICE=sql_net_test-9201
> IDSSHMSERVICE=sqlturbo_test-9202
> INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts> ;export INFORMIXSQLHOSTS
> ONCONFIGFILE=$INFORMIXDIR/etc/onconfig_test02 ;export
> ONCONFIGFILE
>
> -- cmsm.cfg
> NAME cm_test
> SLA oltp=primary
> SLA report=HDR
> SLA payroll=RSS
> FOC HDR+RSS,0
> SLA_WORKERS 16
> DEBUG 1 # debug information
> LOGFILE /export/informix11-50-3/tmp/cmlog.log
>
> -- password file
> ids_net_primary - informix password
> ids_net_secondary - informix password
> #ids_net_rss1_12 - informix password
>
> -- script to run connection manager (con_mgr_test)
> INFORMIXDIR=/export/informix11-50-3 ;export INFORMIXDIR
> INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts> ;export INFORMIXSQLHOSTS
> INFORMIXSERVER=ids_net_primary ;export INFORMIXSERVER>
>
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/sbin:/usr/sfw/sparc-sun-solaris2.10/bin/:/usr/local/ssl/bin:$INFORMIXDIR/bin:$I
>
> NFORMIXDIR/etc ; export PATH
>
> -- How we started connection manager
> oncmsm -c /export/informix11-50-3/etc/cmsm.cfg
>
> -- connection manager status don't show information about
> RSS and secondary
> server
> onstat -g cmsm>
> -- output of above command
> IBM Informix Dynamic Server Version 11.50.FC3 -- On-Line
> (Prim) -- Up 02:49:00
> -- 328704 Kbytes> CM name host sla define foc flag connections
>
> -- connection manager is closed successfully with following
> command
> oncmsm -k cm_test
>
> -- output of connection manager log
>
> Thu Apr 16 19:15:02 2009
> 19:15:02 IBM Informix Connection Manager
> 19:15:02 Connection Manager name is cm_test
> 19:15:02 Starting Connection Manager...
> 19:15:04 Current max open fd is 32767
> 19:15:04 switch to daemon mode
> 19:15:04 new daemon pid is 18724 [cmsm_main.c:2525]
> 19:15:04
> fcntl(/export/informix11-50-3/tmp/cmsm.pid.cm_test) success
> errno = 0
> [cmsm_main.c:1781]
> 19:15:04 dbservername = ids_primary
> 19:15:04 nettype = onipcshm
> 19:15:04 hostname = 192.168.0.16
> 19:15:04 servicename = sqlturbo_primary
> 19:15:04 options =
> 19:15:04 listener oltp initializing
> 19:15:04 create new thread 5 for ids_primary
> [cmsm_sla.c:557]
> 19:15:04 19:15:04 CONNECT to
> sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri
> listener report
> initializing [cmsm_
> server.ec:123]
>
> 19:15:04 listener payroll initializing
> 19:15:04 Listener oltp=primary is active with 16 worker
> threads
> 19:15:04 Listener report=HDR is active with 16 worker
> threads
> 19:15:04 Listener payroll=RSS is active with 16 worker
> threads
> 19:15:04 CONNE
Kamran:
If you want to access all nodes as a group, you could modify and add a
mach_group to the oncmsm's sqlhosts as below.
g_mach group - - e=ids_net_RSS
ids_net_primary ontlitcp 192.168.0.16 sql_net_primary g=g_mach
ids_net_secondary ontlitcp 192.168.0.15 sql_net_secondary g=g_mach
ids_net_RSS ontlitcp 192.168.0.14 sql_net_RSS g=g_mach
mach_group group - - e=payroll <==
oltp onsoctcp 192.168.0.16 9991 g=mach_group <==
report onsoctcp 192.168.0.16 9992 g=mach_group <==
payroll onsoctcp 192.168.0.16 9993 g=mach_group <==
Regards,
--- On Wed, 4/22/09, PING TANG <ptang83@yahoo.com> wrote:
> From: PING TANG <ptang83@yahoo.com>
> Subject: Re: connect through java using group_name con mgr [15579]
> To: ids@iiug.org
> Date: Wednesday, April 22, 2009, 4:25 PM
> Hi Kamran
>
> Regarding to your first problem. Onstat -g cmsm should
> display information feeding by your cmconfig file.
> Basically, it will display SLA and FOC rule.
> So it will not display information from your sqlhosts
> file.
>
> About your second problem. You used the wrong port number
> for oltp. I have changed the port number as below.
> Basically, you should use the port number for oltp which was
> defined in your oncmsm's sqlhosts file.
> jdbc:informix-sqli://192.168.0.16:9991/cards:informixserver=oltp
>
> Your group was defined in the sqlhosts for oncmsm, you
> can't access the server via g_mach. The g_mach group was
> used by oncmsm to connect to each nodes when oncmsm was
> brought up. If you want to access a single node via group,
> you have to define the group in your server sqlhosts file.
>
> Regards,
>
> -Ping
>
> > a)
> >
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=oltp
> >
> > b)
> >
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=g_mach
> >
>
>
> --- On Wed, 4/22/09, KAMRAN HAQ <khaq@i2cinc.com>
> wrote:
>
> > From: KAMRAN HAQ <khaq@i2cinc.com>
> > Subject: connect through java using group_name con
> mgr [15579]
> > To: ids@iiug.org
> > Date: Wednesday, April 22, 2009, 6:20 AM
> > Hi
> >
> > At end of this message is the information of our HDR
> > configuration at primary
> > server alongwith connection manager configuration.
> > it includes how we set environment for database and
> > connection manager, how we
> > run the connection manager and what we got in
> connection
> > managers log.
> >
> > Problem 1: connection manager log shows that it run
> > successfully but onstst
> > g cmsm command dont show the information
> about
> > other group members (we
> > defined in the group in sqlhosts file).
> >
> > Problem 2: We are able to connect through java
> application
> > using following
> > string
> >
> >
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=ids_net_primary
> >
> >
> > but unable to connect through following connection
> strings
> >
> >
> > a)
> >
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=oltp
> >
> > b)
> >
> jdbc:informix-sqli://192.168.0.16:9022/cards:informixserver=g_mach
> >
> >
> > for both a & b we get following error
> > message
> >
> > INFORMIXSERVER does not match either DBSERVERNAME or
> > DBSERVERALIASES.
> >
> > How can we connect through using group-name (g_mach)
> > And using connection manager group member (oltp)
> >
> > regards,
> > Kamran
> >
> > Primary Database Server's IP : 192.168.0.16
> > Connection manager IP : 192.168.0.16
> > Secondary Database Server IP : 192.168.0.15
> > RSS Database Server IP : 192.168.0.14
> >
> > -- sqlhosts entry
> >
> > g_mach group - - e=ids_net_RSS
> > ids_net_primary ontlitcp 192.168.0.16 sql_net_primary
> > g=g_mach
> > ids_net_secondary ontlitcp 192.168.0.15
> sql_net_secondary
> > g=g_mach
> > ids_net_RSS ontlitcp 192.168.0.14 sql_net_RSS g=g_mach
>
> > oltp onsoctcp 192.168.0.16 9991
> > report onsoctcp 192.168.0.16 9992
> > payroll onsoctcp 192.168.0.16 9993> >
> > -- /etc/services
> > sqlturbo_pri 9201/tcp
> > sql_net_primary 9202/tcp
> > sqlturbo_sec 8201/tcp
> > sql_net_secondary 8202/tcp
> > sqlturbo_RSS 9203/tcp
> > sql_net_RSS 9204/tcp
> >
> > /etc/hosts
> > 192.168.0.16 sunpak04.i2c.com sunpak04
> > 192.168.0.15 sunpak03
> > 192.168.0.14 sunpak02.i2c.com sunpak02
> >
> > -- onconfig
> > SERVERNUM 88
> > DBSERVERNAME ids_primary> > DBSERVERALIASES ids_net_primary
> > #DBSERVERALIASES g_mach
> >
> > HA_ALIAS ids_net_primary
> > #HA_ALIAS g_mach
> >
> > DRAUTO 0
> > DRINTERVAL 30
> > DRTIMEOUT 30
> > HA_ALIAS ids_net_primary
> > #HA_ALIAS g_mach
> > DRLOSTFOUND /export/informix11-50-3/etc/dr.lostfound
> > DRIDXAUTO 0
> > LOG_INDEX_BUILDS 1
> > SDS_ENABLE 0
> > SDS_TIMEOUT 20
> > SDS_PAGING> > REDIRECTED_WRITES 0
> > FAILOVER_CALLBACK
> > TEMPTAB_NOLOG 1> >
> > -- enviornment script
> > INFORMIXDIR=/export/informix11-50-3 ;export> INFORMIXDIR
> > INFORMIXSERVER=ids_primary ;export INFORMIXSERVER> > #INFORMIXSERVER=g_mach ;export INFORMIXSERVER
> > ONCONFIG=onconfig_test02 ;export ONCONFIG
> > INFORMIXSTACKSIZE=128 ;export INFORMIXSTACKSIZE> >
> >
>
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/sbin:/usr/sfw/sparc-sun-solaris2.10/bin/:/usr/local/ssl/bin:$INFORMIXDIR/bin:$I
> >
> > NFORMIXDIR/etc ; export PATH
> > INFORMIXSERVERALIAS=ids_net_primary ;export> > INFORMIXSERVERALIAS
> > #INFORMIXSERVERALIAS=g_mach ;export
> INFORMIXSERVERALIAS
> > IDSNETSERVICE=sql_net_test-9201
> > IDSSHMSERVICE=sqlturbo_test-9202
> > INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts> > ;export INFORMIXSQLHOSTS
> > ONCONFIGFILE=$INFORMIXDIR/etc/onconfig_test02 ;export
> > ONCONFIGFILE
> >
> > -- cmsm.cfg
> > NAME cm_test
> > SLA oltp=primary
> > SLA report=HDR
> > SLA payroll=RSS
> > FOC HDR+RSS,0
> > SLA_WORKERS 16
> > DEBUG 1 # debug information
> > LOGFILE /export/informix11-50-3/tmp/cmlog.log
> >
> > -- password file
> > ids_net_primary - informix password
> > ids_net_secondary - informix password
> > #ids_net_rss1_12 - informix password
> >
> > -- script to run connection manager (con_mgr_test)
> > INFORMIXDIR=/export/informix11-50-3 ;export> INFORMIXDIR
> > INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts> > ;export INFORMIXSQLHOSTS
> > INFORMIXSERVER=ids_net_primary ;export INFORMIXSERVER>
> >
> >
>
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/sbin:/usr/sfw/sparc-sun-solaris2.10/bin/:/usr/local/ssl/bin:$INFORMIXDIR/bin:$I
> >
> > NFORMIXDIR/etc ; export PATH
> >
> > -- How we started connection manager
> > oncmsm -c /export/informix11-50-3/etc/cmsm.cfg
> >
> > -- connection manager status don't show information
> about
> > RSS and secondary
> > server
> > onstat -g cmsm> >
> > -- output of above command
> > IBM Informix Dynamic Server Version 11.50.FC3 --
> On-Line
> > (Prim) -- Up 02:49:00
> > -- 328704 Kbytes
> > CM name host sla
Hi Tang, Thanks for your precious time. After making port-correction as you suggested, message is changed from 908 to 408. We used following connection strings to connect IDS: jdbc:informix-sqli://192.168.0.16:9991/cards_1015:informixserver=oltp jdbc:informix-sqli://192.168.0.16:9991/cards_1015:informixserver=oltp;SQLH_TYPE= FILE;SQLH_FILE=D:\\\\sqlhosts error message returned: An error occured while establishing the connection. Type: java.sql.SQLException Error Code: -408 SQL State: IX000 Message: com.informix.asf.IfxASFException connection manager log shows: 14:45:27 SLA oltp redirect SQLI client from 192.168.33.220 to ids_net_mcp_test02 192.168.0.16.9202 [cmsm_main.c:1247] Note: Here 192.168.33.220 is IP of my windows workstation.
your JDBC driver version? please try with 3.50.JC1 or later version. Regards
Hi Kamran
Your connection manager log showed the client was correctly redirected to your
primary at port 9202 which looked fine.
Please check your JDBC version as suggested by Jinming.
If your JDBC version is correct, you can try the following steps to isolate
the issue. You should be able to tell the issue is in application, cluster, or
cmsm.
1. With connection manager on, using dbaccess to connect to your cluster (oltp)
2. Turn off you connection manager, using dbaccess to connect to primary
server (ids_net_primary ) directly.
3. Turn off connection manager. Directly connect to your primary server
jdbc:informix-sqli://192.168.0.16:9202/cards_1015:informixserver=ids_net_primary
Thanks Jinming. Thanks Tang. The steps to examine by Tang helped me invetigate the issues. I used the jdbc version 3.5 and able to connect through my java application. There is a another question if you can suggest something on it: when i use connection string "A" application successfully connects but what if i wnt to use connection string "B": A => "jdbc:informix-sqli:/cards_1015:informixserver=oltp;user=informix;password=infor mix;SQLH_TYPE=FILE;SQLH_FILE=D:\\\\\\\\sqlhosts"; B => String url = "jdbc:informix-sqli:/cards_1015:informixserver=oltp;user=informix;password=infor mix;SQLH_TYPE=FILE;SQLH_FILE=/export/informix11-50-3/etc/sqlhosts"; Using "B", application raises the error. Might be it need to use JNDI.
Hi Kamran Could you access this file when you do "ls /export/informix11-50-3/etc/sqlhosts"? What is the content of this file and what error did you get when you ran option B? Regards,
Sorry my mistake, I am unable to access that file through java( as it is on
network ad i tried to access it without help of some web/application server).
Here is another issue I am facing.
I used following connection strings with variation in informixserver values:
A =>
"jdbc:informix-sqli:/cards_1015:informixserver=oltp;SQLH_TYPE=FILE;SQLH_FILE=D:\\\\
\\\\sqlhosts"
B =>
"jdbc:informix-sqli:/cards_1015:informixserver=report;SQLH_TYPE=FILE;SQLH_FILE=D
:\\\\\\\\sqlhosts"
C =>
"jdbc:informix-sqli:/cards_1015:informixserver=payroll;SQLH_TYPE=FILE;SQLH_FILE=
D:\\\\\\\\sqlhosts"
With A & B I got no problem but with option C I got following error message:
Error Message
-------------
SQLState: 08004
Message: Attempt to connect to database server
(com.informix.asf.IfxASFRemoteException: payroll) failed.
Error code: -908
sqlhosts
--------
ids_primary onipcshm 192.168.0.16 sqlturbo_pri
ids_secondary onipcshm 192.168.0.15 sqlturbo_sec
ids_rss onipcshm 192.168.0.14 sqlturbo_rss
oltp ontlitcp 192.168.0.16 9991
report ontlitcp 192.168.0.16 9992
payroll ontlitcp 192.168.0.16 9993
g_mach group - - e=ids_net_rss
ids_net_primary ontlitcp 192.168.0.16 sql_net_primary g=g_mach
ids_net_secondary ontlitcp 192.168.0.15 sql_net_secondary g=g_mach
ids_net_rss ontlitcp 192.168.0.14 sql_net_rss g=g_mach
cmsm.cfg
--------
# Connection Manager name
NAME cm_test
SLA oltp=PRIMARY
SLA report=HDR
SLA payroll=RSS
FOC HDR+RSS,0
SLA_WORKERS 16
DEBUG 1 # debug information
LOGFILE /export/informix11-50-3/tmp/cmlog.log
cmlog.log
---------
Mon Apr 27 21:38:54 2009
21:38:54 IBM Informix Connection Manager
21:38:54 Connection Manager name is cm_test
21:38:54 Starting Connection Manager...
21:38:56 Current max open fd is 32767
21:38:56 switch to daemon mode
21:38:56 new daemon pid is 8569 [cmsm_main.c:2525]
21:38:56 fcntl(/export/informix11-50-3/tmp/cmsm.pid.cm_test) success errno = 0
[cmsm_main.c:1781]
21:38:56 dbservername = ids_primary
21:38:56 nettype = onipcshm
21:38:56 hostname = 192.168.0.16
21:38:56 servicename = sqlturbo_pri
21:38:56 options =
21:38:56 create new thread 4 for ids_primary [cmsm_sla.c:557]
21:38:56 CONNECT to sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri
[cmsm_server.ec:123]
21:38:56 listener oltp initializing
21:38:56 listener report initializing
21:38:56 listener payroll initializing
21:38:56 Listener payroll=RSS is active with 16 worker threads
21:38:56 Listener oltp=PRIMARY is active with 16 worker threads
21:38:56 Listener report=HDR is active with 16 worker threads
21:38:56 CONNECT to sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri
SQLCODE = (0,0,) [cmsm_server.ec:139]
21:38:56 Connection Manager successfully connected to ids_primary
21:38:56 ids_primary protocols = 1 [cmsm_server.ec:1147]
21:38:56 adding ids_primary alias ids_net_primary with protocol ontlitcp 1
[cmsm_server.ec:1237]
21:38:56 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
21:38:56 Adding server ids_net_secondary [cmsm_server.ec:1572]
21:38:56 create new thread 55 for ids_net_secondary [cmsm_sla.c:557]
21:38:56 CONNECT to
sysmaster@ids_net_secondary|ontlitcp|192.168.0.15|sql_net_secondary USER
informix [cmsm_server.ec:123]
21:38:56 Adding server ids_primary [cmsm_server.ec:1572]
21:38:56 Arbitrator FOC string = HDR+RSS,0
21:38:56 Arbitrator setting primary name = ids_primary [cmsm_arb.c:518]
21:38:56 FOC[0] = HDR
21:38:56 FOC[1] = RSS
21:38:56 FOC timeout = 0
21:38:56 CONNECT to
sysmaster@ids_net_secondary|ontlitcp|192.168.0.15|sql_net_secondary SQLCODE =
(0,0,) [cmsm_server.ec:139]
21:38:56 Connection Manager successfully connected to ids_net_secondary
21:38:56 ids_net_secondary protocols = 1 [cmsm_server.ec:1147]
21:38:56 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
21:38:56 Arbitrator FOC string = HDR+RSS,0
21:38:56 Arbitrator setting primary name = ids_net_primary [cmsm_arb.c:518]
21:38:56 FOC[0] = HDR
21:38:56 FOC[1] = RSS
21:38:56 FOC timeout = 0
21:38:56 get ids_net_secondary CM_ADM event 8:3 cm_test [cmsm_server.ec:1042]
21:38:57 Connection Manager started successfully
21:39:22 SLA oltp redirect SQLI client from 192.168.33.220 to ids_net_primary
192.168.0.16.9202 [cmsm_main.c:1247]
21:39:45 SLA report redirect SQLI client from 192.168.33.220 to
ids_net_secondary 192.168.0.15.8202 [cmsm_main.c:1247]
21:39:56 Warning: no server returned for SLA payroll [cmsm_sla.c:1184]
21:39:56 SLA payroll cannot find database server for SQLI client
[cmsm_main.c:1234]
1. Please post output from "onstat -g cmsm" and "onstat -g rss"
2. First, try whether you could connect directly to "ids_net_rss" without
connection manager
--- On Mon, 4/27/09, KAMRAN HAQ <khaq@i2cinc.com> wrote:
> From: KAMRAN HAQ <khaq@i2cinc.com>
> Subject: Re: connect through java using group_name con mgr [15625]
> To: ids@iiug.org
> Date: Monday, April 27, 2009, 10:56 AM
> Sorry my mistake, I am unable to
> access that file through java( as it is on
> network ad i tried to access it without help of some
> web/application server).
> Here is another issue I am facing.
>
> I used following connection strings with variation in
> informixserver values:
>
> A =>
>
"jdbc:informix-sqli:/cards_1015:informixserver=oltp;SQLH_TYPE=FILE;SQLH_FILE=D:\\\\
\\\\sqlhosts"
>
>
> B =>
>
"jdbc:informix-sqli:/cards_1015:informixserver=report;SQLH_TYPE=FILE;SQLH_FILE=D
:\\\\\\\\sqlhosts"
>
>
> C =>
>
"jdbc:informix-sqli:/cards_1015:informixserver=payroll;SQLH_TYPE=FILE;SQLH_FILE=
D:\\\\\\\\sqlhosts"
>
>
> With A & B I got no problem but with option C I got
> following error message:
>
> Error Message
> -------------
> SQLState: 08004
> Message: Attempt to connect to database server
> (com.informix.asf.IfxASFRemoteException: payroll) failed.
> Error code: -908
>
> sqlhosts
> --------
> ids_primary onipcshm 192.168.0.16 sqlturbo_pri
> ids_secondary onipcshm 192.168.0.15 sqlturbo_sec
> ids_rss onipcshm 192.168.0.14 sqlturbo_rss
>
> oltp ontlitcp 192.168.0.16 9991
> report ontlitcp 192.168.0.16 9992
> payroll ontlitcp 192.168.0.16 9993>
> g_mach group - - e=ids_net_rss
> ids_net_primary ontlitcp 192.168.0.16 sql_net_primary
> g=g_mach
> ids_net_secondary ontlitcp 192.168.0.15 sql_net_secondary
> g=g_mach
> ids_net_rss ontlitcp 192.168.0.14 sql_net_rss g=g_mach>
> cmsm.cfg
> --------
> # Connection Manager name
> NAME cm_test
>
> SLA oltp=PRIMARY
> SLA report=HDR
> SLA payroll=RSS
> FOC HDR+RSS,0
> SLA_WORKERS 16
> DEBUG 1 # debug information
> LOGFILE /export/informix11-50-3/tmp/cmlog.log
>
> cmlog.log
> ---------
> Mon Apr 27 21:38:54 2009
> 21:38:54 IBM Informix Connection Manager
> 21:38:54 Connection Manager name is cm_test
> 21:38:54 Starting Connection Manager...
> 21:38:56 Current max open fd is 32767
> 21:38:56 switch to daemon mode
> 21:38:56 new daemon pid is 8569 [cmsm_main.c:2525]
> 21:38:56
> fcntl(/export/informix11-50-3/tmp/cmsm.pid.cm_test) success
> errno = 0
> [cmsm_main.c:1781]
> 21:38:56 dbservername = ids_primary
> 21:38:56 nettype = onipcshm
> 21:38:56 hostname = 192.168.0.16
> 21:38:56 servicename = sqlturbo_pri
> 21:38:56 options =
> 21:38:56 create new thread 4 for ids_primary
> [cmsm_sla.c:557]
> 21:38:56 CONNECT to
> sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri
> [cmsm_server.ec:123]
> 21:38:56 listener oltp initializing
> 21:38:56 listener report initializing
> 21:38:56 listener payroll initializing
> 21:38:56 Listener payroll=RSS is active with 16 worker
> threads
> 21:38:56 Listener oltp=PRIMARY is active with 16 worker
> threads
> 21:38:56 Listener report=HDR is active with 16 worker
> threads
> 21:38:56 CONNECT to
> sysmaster@ids_primary|onipcshm|192.168.0.16|sqlturbo_pri
> SQLCODE = (0,0,) [cmsm_server.ec:139]
> 21:38:56 Connection Manager successfully connected to
> ids_primary
> 21:38:56 ids_primary protocols = 1 [cmsm_server.ec:1147]
> 21:38:56 adding ids_primary alias ids_net_primary with
> protocol ontlitcp 1
> [cmsm_server.ec:1237]
> 21:38:56 fetch sysconfig_cursor sqlcode = (100,0,)
> [cmsm_server.ec:1187]
> 21:38:56 Adding server ids_net_secondary
> [cmsm_server.ec:1572]
> 21:38:56 create new thread 55 for ids_net_secondary
> [cmsm_sla.c:557]
> 21:38:56 CONNECT to
> sysmaster@ids_net_secondary|ontlitcp|192.168.0.15|sql_net_secondary
> USER
> informix [cmsm_server.ec:123]
> 21:38:56 Adding server ids_primary [cmsm_server.ec:1572]
> 21:38:56 Arbitrator FOC string = HDR+RSS,0
> 21:38:56 Arbitrator setting primary name = ids_primary
> [cmsm_arb.c:518]
> 21:38:56 FOC[0] = HDR
> 21:38:56 FOC[1] = RSS
> 21:38:56 FOC timeout = 0
> 21:38:56 CONNECT to
> sysmaster@ids_net_secondary|ontlitcp|192.168.0.15|sql_net_secondary
> SQLCODE =
> (0,0,) [cmsm_server.ec:139]
> 21:38:56 Connection Manager successfully connected to
> ids_net_secondary
> 21:38:56 ids_net_secondary protocols = 1
> [cmsm_server.ec:1147]
> 21:38:56 fetch sysconfig_cursor sqlcode = (100,0,)
> [cmsm_server.ec:1187]
> 21:38:56 Arbitrator FOC string = HDR+RSS,0
> 21:38:56 Arbitrator setting primary name = ids_net_primary
> [cmsm_arb.c:518]
> 21:38:56 FOC[0] = HDR
> 21:38:56 FOC[1] = RSS
> 21:38:56 FOC timeout = 0
> 21:38:56 get ids_net_secondary CM_ADM event 8:3 cm_test
> [cmsm_server.ec:1042]
> 21:38:57 Connection Manager started successfully
> 21:39:22 SLA oltp redirect SQLI client from 192.168.33.220
> to ids_net_primary
> 192.168.0.16.9202 [cmsm_main.c:1247]
> 21:39:45 SLA report redirect SQLI client from
> 192.168.33.220 to
> ids_net_secondary 192.168.0.15.8202 [cmsm_main.c:1247]
> 21:39:56 Warning: no server returned for SLA payroll
> [cmsm_sla.c:1184]
> 21:39:56 SLA payroll cannot find database server for SQLI
> client
> [cmsm_main.c:1234]
>
>
>
*******************************************************************************
>
> Forum Note: Use "Reply" to post a response in the
> discussion forum.
>
>
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g