Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2011
    Posts
    10

    Unanswered: Connection manager problem

    Hello

    I am trying to set up a connection manager , I have two informix servers one called infx_server1 and the other infx_server2.
    In the infx_server1 I have a sqlhosts file with the next information:

    cluster_1 group - - i=10
    infx_server1 onsoctcp mycompany.com 2020 g=cluster_1
    infx_server2 onsoctcp mycompany.com 2828 g=cluster_1

    In the infx_server2 I have a sqlhosts file with the next informiation:

    infx_server1 onsoctcp mycompany.com 2020 g=cluster_1
    infx_server2 onsoctcp mycompany.com 2828 g=cluster_1


    In the infx_server1 I have a connection manager configuration file with the next info:

    NAME cm_example
    SLA infx_server1=primary
    SLA infx_server2=HDR
    DEBUG 0
    LOGFILE cmlog
    FOC infx_server1+infx_server2,10

    When I run my connection manager :
    oncmsm -c cmconfig


    I get the next log messages:

    Mon Apr 16 18:14:38 2012
    18:14:38 IBM Informix Connection Manager
    18:14:38 SLA infx_server1 listener mode REDIRECT
    18:14:38 SLA infx_server2 listener mode REDIRECT
    18:14:38 Connection Manager name is cm_example
    18:14:38 Starting Connection Manager...
    18:14:38 the current maximum number of file descriptors is 32767
    18:14:38 dbservername = cluster_1
    18:14:38 nettype =
    18:14:38 hostname = -
    18:14:38 servicename = -
    18:14:38 options = i=10
    18:14:38 switch to daemon mode
    18:14:38 listener infx_server1 initializing
    18:14:38 listener infx_server2 initializing
    18:14:38 Warning: Cannot start listener infx_server1, network error -25572
    18:14:38 Warning: Cannot start listener infx_server1, network error -25572
    18:14:38 Connection Manager successfully connected to develop_net
    18:14:38 Arbitrator FOC string = develop_net+jamie_net,10
    18:14:38 FOC[0] = develop_net
    18:14:38 FOC[1] = jamie_net
    18:14:38 FOC timeout = 10
    18:14:38 Arbitrator is active on CM = cm_example
    18:14:39 Error: SLA listener failed, Connection Manager shut down

    I am following the instruction in the informix online manua IBM Informix 11.50 information center

    What am I doing wrong???

    In the informix's manual there is one example (see the link above) about how to set up the configuration manager, I noticed that the have 3 informix servers : ifx, ifx_hdr, and ifx_sds , and also they have 3 services: oltp, report and payroll.
    In understand what the 3 server are, I think it is the equivalent to my 2 servers, but what are those 3 services???

    If we had a java application that is connecting to informix and I am using the url=jdbc:informix-sqli://mycompany.com:2020/ccaiprod:INFORMIXSERVER=data_server1;user=informix ;password=informix

    Is this data_server1 one of the servers that I have to specify on the connection manager configuration file, or it would be one of the services???? I am a little confused about the relation servers - services .

    Thanks in advance

  2. #2
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Hi,

    you have a number of things to check:
    * in the sqlhosts files, check that hostname column (3rd column) contents is exactly the same as what the 'hostname' command returns (full hostname with domain) on each machine
    * in the sqlhosts files check that the 4th columns contents (service name), exists in the /etc/services files on each machine

    I think you have a mess effectively between hostnames, informixservers and services.

    As a starting point, here is the relationship path:
    in your onconfig file, each value of DBSERVERNAME and DBSERVERALIASES must have an entry in the $INFORMIXDIR/etc/sqlhosts ( or $INFORMIXSQLHOSTS ) file.
    this entry must be set this way:
    1 column=same as DBSERVERNAME or DBSERVERALIASES
    2 column= protocol. for replication or cluster, must be onsoctcp
    3 column = full hostname of the host (ex: mydomain.infx_server1 )
    4 column= service name. Value must be as first column in the /etc/services file entry. just a port number is accepted, but using service name + name it in /etc/services is safer.

    Connection between infx_server1 and infx_server2 should be secure ( I think you need s=6 in the sqlhosts line) and servers must be mutually authenticated with an entry in the $INFORMIXDIR/etc/hosts.equiv file, also with full hostnames

    In general, you should first check your connection with dbaccess /connect option.
    If you cannot connect with dbaccess, you wont do it with the connection manager.

    Check this chapter from start to end in the IBM manual, it deals with an old version but it is well explained and step by step. I didn't find equivalent in the 11.50 doc, but the information is still actual.

    Hope this helps
    Eric

  3. #3
    Join Date
    Aug 2011
    Posts
    10
    Thanks Eric

    I already verified the sqlhosts file, the host column is exactly the same name that I get the 'hostname' command in both servers, also the service name exist in the services file.

    Also I already verified the DBSERVERNAME variable in the onconfig file has the same server name that is in my sqlhosts file.

    I already tested the connectivity between the two database servers, using dbaccess, and I was able to connect from infx_server1 to infx_server2 and vice-versa.

    I don't have the file hosts.equiv in the path $INFORMIXDIR/etc/hosts.equiv I have it in the path /etc/ Could this be a problem?????

    As far as I understand Connection Manager is one way to achieve high availability and scalability, Enterprise Replication and Cluster would be other different ways
    The 2 servers that I have are standard servers , Do I have to make them HDR or put the into cluster or Enterprise replication before try to run the Connection Manager???

    One more thing, in both servers I changed the variable INFORMIXSERVER=cluster_1 (like the group I specified in my sqlhosts file) instead the previous values that they had infx_server1, and infx_server2. Should I keep the old values or so I need to have the same value on both servers?????
    Last edited by fernando guerrero; 04-17-12 at 17:52.

  4. #4
    Join Date
    Aug 2011
    Posts
    10
    According to the informix manual I need to specify a group in my sqlhosts (I am using cluster_1) and I need to change my INFORMIXSERVER VARIABLE to the group name instead the DBSERVERNAME value.

    When I run the command:
    $onstat -l

    I get the next: message:

    shared memory not initialized for INFORMIXSERVER 'cluster_1'

    If in my onconfig file I have one value for DBSERVERNAME, but in the INFORMIXSERVER variable i need to have the group name, How can I check the statistics for my server??? could this be part of the problem that I have when I try to run the Connection Manager ???

  5. #5
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    I think your are mixing names somewhere.
    please send me onconfig files, /etc/services /etc/hosts $INFORMIXDIR/etc/sqlhosts files
    for both servers

  6. #6
    Join Date
    Aug 2011
    Posts
    10
    For my infx_server1 these are the files:

    inside my /etc/hosts I have :
    127.0.0.1 localhost.localdomain localhost
    196.128.180.105 mycompany.com mycompany
    196.128.179.104 my-other-company.com my-other-company

    As in my hosts file I am specifying the port number, I am not using a name that has been specified in the file /etc/services

    inside my $INFORMIXDIR/etc/sqlhosts I have:
    cluster_1 group - - i=10
    infx_server1 onsoctcp mycompany.com 2020 g=cluster_1
    infx_server2 onsoctcp my-other-company.com 2020 g=cluster_1


    inside my onconfig file I have the next variables-values relations:

    ROOTNAME rootdbs
    ROOTPATH /ifxslices/rootdbs
    ROOTOFFSET 0
    ROOTSIZE 2000000
    MIRROR 0
    MIRRORPATH
    MIRROROFFSET 0

    PHYSFILE 100000
    PLOG_OVERFLOW_PATH $INFORMIXDIR/tmp
    PHYSBUFF 128

    LOGFILES 18
    LOGSIZE 2000
    DYNAMIC_LOGS 2
    LOGBUFF 64

    SERVERNUM 197
    DBSERVERNAME infx_server1
    DBSERVERALIASES infx_server1_net
    FULL_DISK_INIT 0
    NETTYPE ipcshm,1,50,CPU
    LISTEN_TIMEOUT 60
    MAX_INCOMPLETE_CONNECTIONS 1024


    If you need any other variable from onconfig just tell me and I will post their value.

    Also in this server I am running the connection manager, This is my connection manager configuration file:

    NAME cm_example
    SLA infx_server1=primary
    SLA infx_server2=HDR
    DEBUG 0
    LOGFILE cmlog
    FOC infx_server1+infx_server2,10


    I know that in my onconfig file I have DBSERVERNAME infx_server1 and the variable INFORMIXSERVER should be INFORMIXSERVER=infx_server1 for this server, but according to the informix manual, I have to change the environment variable to match the cluster name, so the INFORMIXSERVER variable in this server is INFORMIXSERVER=cluster_1 (as specified in my sqlhost file)

    --------------------------------------------------------------------------------------------------

    For my server infx_server2 I have these files


    inside my /etc/hosts I have :
    127.0.0.1 localhost.localdomain localhost
    196.128.179.104 my-other-company.com my-other-company
    196.128.180.105 mycompany.com mycompany

    As in my sqlhosts file I am specifying the port number, I am not using a name that has been specified in the file /etc/services

    inside my $INFORMIXDIR/etc/sqlhosts I have:
    infx_server1 onsoctcp mycompany.com 2020
    infx_server2 onsoctcp my-other-company.com 2020


    inside my onconfig file I have the next variables-values relations:
    ROOTNAME rootdbs
    ROOTPATH /spool/db/rootdbs
    ROOTOFFSET 2
    ROOTSIZE 1000002

    PHYSDBS rootdbs
    PHYSFILE 100000

    LOGFILES 100
    LOGSIZE 4096

    SERVERNUM 0
    DBSERVERNAME infx_server2
    DBSERVERALIASES infx_server2net

    NETTYPE ipcshm,1,10,NET
    NETTYPE soctcp,1,50,NET
    DEADLOCK_TIMEOUT 60
    RESIDENT 1

    If you need any other variable from onconfig just tell me and I will post their value.

    In this sever my INFOMIXSERVER variable is INFORMIXSERVER=infx_server2




    Thanks for the help

  7. #7
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Your files seem to be OK, excepting that the group cluster_1 does not seem to be defined in the infx_server2 sqlhosts file.

    I think that infx_server2 is not infx_server1's HDR secondary server, this is why connection manager cannot establish the initial connections.
    Can you check this?

    next steps:
    1) check connectivity between informixservers as explain above, with dbaccess.
    If not ok, recheck all hosts, sqlhosts etc. Check also your firewall and $INFORMIX/etc/hosts.equiv
    If ok, proceed
    2) start infx_server1 as primary then server2 as a secondary with the onmode command
    check both msgpath log files whether the HDR connection is established
    3) once the HDR is OK, you can retest the connection manager.
    As far as I know, the connection manager is a connection manager, not a cluster
    manager. It serves to define SLAs between MACH11 elements, loadbalance the clients
    connections and redirerect in case of failure.

    To manager your cluster, you can use Open Admin Tools
    Last edited by begooden-it; 04-19-12 at 04:47.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •