Topic
  • 14 replies
  • Latest Post - ‏2017-03-06T10:18:57Z by andreasl
SystemAdmin
SystemAdmin
1143 Posts

Pinned topic informix 11.70 - Can't connect to a remote informix server

‏2012-05-02T22:00:52Z |
I installed Informix 11.70 on Linux and created a server instance, ol_informix1170 and created a database demodb.

I can connect to it through the dbaccess, but when I tried to connect to it from the JDBC client (local and remote), I can't connect to it. I can ping the machine from a remote machine. Actually, I can not connect to it from a local JDBC client. Is it related to a protocol issue?

I am getting this error.

com.informix.asf.IfxASFException: Attempt to connect to database server (ol_informix1170) failed.

I can't figure it out why.

Could anybody help me debug this?

Thanks.
Updated on 2012-05-03T02:39:48Z at 2012-05-03T02:39:48Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-02T22:20:47Z  
    Can you post your SQLHOSTS entry for ol_informix1170 and Java connection URL string here?
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-02T22:24:58Z  
    Can you post your SQLHOSTS entry for ol_informix1170 and Java connection URL string here?
    1. To create an entry for a group, put a group name in the dbservername field,
    2. the word group in the nettype field, a hyphen in both the hostname and the
    3. servicename fileds, and i=<group identifier> in the options field.
    #
    1. For additional information on the parameters, see the IBM Informix
    2. Administrator's Guide.
    #**************************************************************************
    1. IANA (www.iana.org) assigned port number/service names for Informix:
    2. sqlexec 9088/tcp
    3. sqlexec-ssl 9089/tcp

    demo_on onipcshm on_hostname on_servername
    ol_informix1170 olsoctcp localhost ol_informix1170
    connection url: jdbc:informix-sqli://192.168.154.128:9088/demodb:INFORMIXSERVER=ol_informix1170
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-02T22:35:52Z  
    1. To create an entry for a group, put a group name in the dbservername field,
    2. the word group in the nettype field, a hyphen in both the hostname and the
    3. servicename fileds, and i=<group identifier> in the options field.
    #
    1. For additional information on the parameters, see the IBM Informix
    2. Administrator's Guide.
    #**************************************************************************
    1. IANA (www.iana.org) assigned port number/service names for Informix:
    2. sqlexec 9088/tcp
    3. sqlexec-ssl 9089/tcp

    demo_on onipcshm on_hostname on_servername
    ol_informix1170 olsoctcp localhost ol_informix1170
    connection url: jdbc:informix-sqli://192.168.154.128:9088/demodb:INFORMIXSERVER=ol_informix1170
    In the /etc/services file, is ol_informix1170 defined to use port 9088? If so, does the followng URL work?

    jdbc:informix-sqli://localhost:9088/demodb:INFORMIXSERVER=ol_informix1170

    By the way, did you see any error code when the connection failed?
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-02T22:39:55Z  
    In the /etc/services file, is ol_informix1170 defined to use port 9088? If so, does the followng URL work?

    jdbc:informix-sqli://localhost:9088/demodb:INFORMIXSERVER=ol_informix1170

    By the way, did you see any error code when the connection failed?
    Now, I can connect to it only from the local jdbc client, but it doesn't work from a remote jdbc client. I am getting the same error, but no error code.
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-02T22:47:53Z  
    Now, I can connect to it only from the local jdbc client, but it doesn't work from a remote jdbc client. I am getting the same error, but no error code.
    You need to change your SQLHOSTS entry to use the name or IP address of the host and then restar your Informix server.
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T01:32:56Z  
    You need to change your SQLHOSTS entry to use the name or IP address of the host and then restar your Informix server.
    I change to this line. The ip address of the machine where the informix server is installed is 192.168.154.128.

    ol_informix1170 olsoctcp 192.168.154.128 ol_informix1170
    I restarted the informix server, but I am getting the same error.
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T02:01:20Z  
    I change to this line. The ip address of the machine where the informix server is installed is 192.168.154.128.

    ol_informix1170 olsoctcp 192.168.154.128 ol_informix1170
    I restarted the informix server, but I am getting the same error.
    What do you see if you run "netstat -an |grep 9088" on the Informix host?
    How about running "telnet 192.168.154.128 9088" from the remote machine?
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T02:05:27Z  
    What do you see if you run "netstat -an |grep 9088" on the Informix host?
    How about running "telnet 192.168.154.128 9088" from the remote machine?
    I see like this.

    tcp 0 0 127.0.0.1:9088 0.0.0.0:* LISTEN
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T02:13:32Z  
    I see like this.

    tcp 0 0 127.0.0.1:9088 0.0.0.0:* LISTEN
    I forgot mentioning that I can telnet to 192.168.154.128 from a remote machine.
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T02:17:47Z  
    I see like this.

    tcp 0 0 127.0.0.1:9088 0.0.0.0:* LISTEN
    The Informix server is still listening to 9088 on the localhost (127.0.0.1).

    Can you try the following SQLHOSTS entry and restart the server (onmode -ky then oninit)?

    ol_informix1170 olsoctcp *192.168.154.128 ol_informix1170
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T02:31:57Z  
    The Informix server is still listening to 9088 on the localhost (127.0.0.1).

    Can you try the following SQLHOSTS entry and restart the server (onmode -ky then oninit)?

    ol_informix1170 olsoctcp *192.168.154.128 ol_informix1170
    I tried it, but it still doesn't work.

    Here is the setup.

    I have windows 7 and created a VM inside the windows 7 and I installed the Ubuntu linux on the VM. The informix 11.70 is installed on the Ubuntu linux. So I am trying to connect the informix server from Windows 7 through the JDBC client.

    I can ping and telnet to the linux from the windows 7, but I can't connect to it.
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2012-05-03T02:39:48Z  
    I tried it, but it still doesn't work.

    Here is the setup.

    I have windows 7 and created a VM inside the windows 7 and I installed the Ubuntu linux on the VM. The informix 11.70 is installed on the Ubuntu linux. So I am trying to connect the informix server from Windows 7 through the JDBC client.

    I can ping and telnet to the linux from the windows 7, but I can't connect to it.
    It works. I mapped 192.168.154.128 to localhost. This made it work. I know that the local ip address changes often, but at least I can proceed.

    Thank you for your help.
  • ManoharSrinivasan
    ManoharSrinivasan
    1 Post

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2017-03-01T10:26:13Z  
    It works. I mapped 192.168.154.128 to localhost. This made it work. I know that the local ip address changes often, but at least I can proceed.

    Thank you for your help.

    Hi,

     

    I am running Informix 12.10 in Windows 7.0.  I am facing the similar issue in the localhost itself.  My server instance name is InformixSvr and my machine name is WLW7-MANOHARS.  Content of my SQLHosts file is:

     

    InformixSvr olsoctcp WLW7-MANOHARS InformixSvr 
    dr_InformixSvr drsoctcp WLW7-MANOHARS dr_InformixSvr 
    lo_InformixSvr olsoctcp 127.0.0.1 lo_InformixSvr 

     

    My port number for Informix is 9091.

    Any help is highly appreciated!!

     

    Thanks

    Manohar

     

  • andreasl
    andreasl
    401 Posts

    Re: informix 11.70 - Can't connect to a remote informix server

    ‏2017-03-06T10:18:57Z  

    Hi,

     

    I am running Informix 12.10 in Windows 7.0.  I am facing the similar issue in the localhost itself.  My server instance name is InformixSvr and my machine name is WLW7-MANOHARS.  Content of my SQLHosts file is:

     

    InformixSvr olsoctcp WLW7-MANOHARS InformixSvr 
    dr_InformixSvr drsoctcp WLW7-MANOHARS dr_InformixSvr 
    lo_InformixSvr olsoctcp 127.0.0.1 lo_InformixSvr 

     

    My port number for Informix is 9091.

    Any help is highly appreciated!!

     

    Thanks

    Manohar

     

    Hello,

    still having problems?  If so, I guess more details would be needed.  What exactly works, what not, what errors you're seeing?

    On Windows, the sqlhosts file (%informixsqlhosts%) is used by the server and the dbaccess utility, other clients still would look at the registry instead (use setnet32 utility for editing).

    Andreas