Hello,

I am unable to connect database using connection manger, setting for connection manager is as follows.


Values in password file.
------------------------
ids_net_mcp_test02 - informix informix
ids_net_mcp_test_rep02 - informix informix
ids_net_mcp_rss1 - informix informix

Values in configuration file
----------------------------
INFORMIXDIR=/export/informix11-50-3 ;export INFORMIXDIR
INFORMIXSQLHOSTS=/export/informix11-50-3/etc/sqlhosts ;export INFORMIXSQLHOSTS
INFORMIXSERVER=ids_net_mcp_test02 ;export INFORMIXSERVER

Values in Connection Manager Configuration file
-----------------------------------------------
#************************************************* *************************
# Title: cmsm.cfg
# Description: Test Connection Manager Configuration file.
#************************************************* *************************
# Connection Manager name
NAME cm_test
# re-route Informix clients to the primary for transaction processing
SLA oltp=primary

# re-route Informix clients to any secondary node for reporting
SLA report=HDR

# Failover Configuration
#FOC SDS+HDR+RSS,0
FOC HDR+RSS,0

# worker threads for each SLA listener, default is 8
SLA_WORKERS 16
DEBUG 1 # debug information
# Connection Manager message file
LOGFILE /export/informix11-50-3/tmp/cmlog.log

Values in sqlhost file
----------------------
# Primary ################################
ids_mcp_test02 onipcshm 192.168.0.16 sqlturbo_mcp_test02
ids_net_mcp_test02 ontlitcp 192.168.0.16 sql_net_mcp_test02
# Secondary ##############################
ids_mcp_test_rep02 onipcshm 192.168.0.15 sqlturbo_mcp_test_rep02
ids_net_mcp_test_rep02 ontlitcp 192.168.0.15 sql_net_mcp_test_rep02
# RSS ####################################
ids_mcp_rss1 onipcshm 192.168.0.14 sqlturbo_mcp_rss1
ids_net_mcp_rss1 ontlitcp 192.168.0.14 sql_net_mcp_rss1
########### Entries for Connection Manager ##############################
oltp onsoctcp 192.168.0.16 9991
report onsoctcp 192.168.0.16 9992
payroll onsoctcp 192.168.0.16 9993


Command used for starting Connection Manager.
----------------------------------------------
oncmsm -c /export/informix11-50-3/etc/cmsm.cfg


Output of cmsm log file
-----------------------
#--------------------------- Start -------------------------------#
Wed Dec 24 20:04:20 2008
20:04:20 IBM Informix Connection Manager
20:04:20 Connection Manager name is cm_test
20:04:20 Starting Connection Manager...
20:04:22 Current max open fd is 32767
20:04:22 switch to daemon mode
20:04:22 new daemon pid is 9033 [cmsm_main.c:2525]
20:04:22 fcntl(/export/informix11-50-3/tmp/cmsm.pid.cm_test) success errno = 0 [cmsm_main.c:1781]
20:04:22 dbservername = ids_net_mcp_test02
20:04:22 nettype = ontlitcp
20:04:22 hostname = 192.168.0.16
20:04:22 servicename = sql_net_mcp_test02
20:04:22 options =
20:04:22 create new thread 3 for ids_net_mcp_test02 [cmsm_sla.c:557]
20:04:22 CONNECT to sysmaster@ids_net_mcp_test02|ontlitcp|192.168.0.16 |sql_net_mcp_test02 USER informix [cmsm_server.ec:123]20:04:22
listener oltp initializing
20:04:22 listener report initializing
20:04:22 Listener report=HDR is active with 16 worker threads
20:04:22 Listener oltp=primary is active with 16 worker threads
20:04:22 CONNECT to sysmaster@ids_net_mcp_test02|ontlitcp|192.168.0.16 |sql_net_mcp_test02 SQLCODE = (0,0,) [cmsm_server.ec:139]
20:04:22 Connection Manager successfully connected to ids_net_mcp_test02
20:04:22 ids_net_mcp_test02 protocols = 1 [cmsm_server.ec:1147]
20:04:22 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
20:04:22 Adding server ids_mcp_test02 [cmsm_server.ec:1572]
20:04:22 create new thread 38 for ids_mcp_test02 [cmsm_sla.c:557]
20:04:22 CONNECT to sysmaster@ids_mcp_test02|onipcshm|192.168.0.16|sql turbo_mcp_test02 [cmsm_server.ec:123]
20:04:22 Arbitrator FOC string = HDR+RSS,0
20:04:22 Arbitrator setting primary name = ids_mcp_test02 [cmsm_arb.c:518]
20:04:22 FOC[0] = HDR
20:04:22 FOC[1] = RSS
20:04:22 FOC timeout = 0
20:04:22 Adding server ids_net_mcp_rss1 [cmsm_server.ec:1572]
20:04:22 create new thread 39 for ids_net_mcp_rss1 [cmsm_sla.c:557]
20:04:22 CONNECT to sysmaster@ids_net_mcp_rss1|ontlitcp|192.168.0.14|s ql_net_mcp_rss1 USER informix [cmsm_server.ec:123]
20:04:22 Adding server ids_net_mcp_test_rep02 [cmsm_server.ec:1572]
20:04:22 create new thread 40 for ids_net_mcp_test_rep02 [cmsm_sla.c:557]
20:04:22 CONNECT to sysmaster@ids_net_mcp_test_rep02|ontlitcp|192.168. 0.15|sql_net_mcp_test_rep02 USER informix [cmsm_server.ec:123]
20:04:22 CONNECT to sysmaster@ids_mcp_test02|onipcshm|192.168.0.16|sql turbo_mcp_test02 SQLCODE = (0,0,) [cmsm_server.ec:139]
20:04:22 Connection Manager successfully connected to ids_mcp_test02
20:04:22 ids_mcp_test02 protocols = 1 [cmsm_server.ec:1147]
20:04:22 get ids_net_mcp_test02 CM_ADM event 8:3 cm_test [cmsm_server.ec:1042]
20:04:22 Arbitrator received CM event, subtype=3, cm=cm_test [cmsm_arb.c:533]
20:04:22 Arbitrator reinitialized CM names [cmsm_arb.c:479]
20:04:22 Arbitrator added CM name = cm_test [cmsm_arb.c:418]
20:04:22 Arbitrator is active on CM = cm_test
20:04:22 adding ids_mcp_test02 alias ids_net_mcp_test02 with protocol ontlitcp 1 [cmsm_server.ec:1237]
20:04:22 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
20:04:22 CONNECT to sysmaster@ids_net_mcp_test_rep02|ontlitcp|192.168. 0.15|sql_net_mcp_test_rep02 SQLCODE = (0,0,) [cmsm_server.ec:139]
20:04:22 Connection Manager successfully connected to ids_net_mcp_test_rep02
20:04:22 ids_net_mcp_test_rep02 protocols = 1 [cmsm_server.ec:1147]
20:04:22 Adding server ids_mcp_test02 [cmsm_server.ec:1572]
20:04:22 Adding server ids_net_mcp_rss1 [cmsm_server.ec:1572]
20:04:22 Adding server ids_net_mcp_test_rep02 [cmsm_server.ec:1572]
20:04:22 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
20:04:22 Arbitrator FOC string = HDR+RSS,0
20:04:22 Arbitrator setting primary name = ids_net_mcp_test02 [cmsm_arb.c:518]
20:04:22 FOC[0] = HDR
20:04:22 FOC[1] = RSS
20:04:22 FOC timeout = 0
20:04:22 CONNECT to sysmaster@ids_net_mcp_rss1|ontlitcp|192.168.0.14|s ql_net_mcp_rss1 SQLCODE = (0,0,) [cmsm_server.ec:139]
20:04:22 Connection Manager successfully connected to ids_net_mcp_rss1
20:04:22 ids_net_mcp_rss1 protocols = 1 [cmsm_server.ec:1147]
20:04:22 get ids_net_mcp_test_rep02 CM_ADM event 8:3 cm_test [cmsm_server.ec:1042]
20:04:22 fetch sysconfig_cursor sqlcode = (100,0,) [cmsm_server.ec:1187]
20:04:22 get ids_net_mcp_rss1 CM_ADM event 8:3 cm_test [cmsm_server.ec:1042]
20:04:23 Connection Manager started successfully

#--------------------------- End -------------------------------#

Output of onstat -g cmsm
-------------------------
CM name host sla define foc flag connections
cm_test 192.168.0.16 oltp primary HDR+RSS,0 3 0
cm_test 192.168.0.16 report HDR HDR+RSS,0 3 0

I am using following syntax for connecting using JDBC Driver
jdbc:informix-sqli://192.168.0.16:9991/demo_db:informixserver=oltp

Please let me know that where i am wrong, and how i could connect my application with the connection manager, so that i could test the HA feature.

We are using IDS 11.50 FC3.

Thanks in advance for your anticipation.

Regards,
Omer Saeed Khan