Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
12 replies Latest Post - ‏2012-05-03T02:39:48Z by SystemAdmin
SystemAdmin
SystemAdmin
1143 Posts
ACCEPTED ANSWER

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
    ACCEPTED ANSWER

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

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

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

      ‏2012-05-02T22:24:58Z  in response to SystemAdmin
      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
        ACCEPTED ANSWER

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

        ‏2012-05-02T22:35:52Z  in response to SystemAdmin
        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
          ACCEPTED ANSWER

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

          ‏2012-05-02T22:39:55Z  in response to SystemAdmin
          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
            ACCEPTED ANSWER

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

            ‏2012-05-02T22:47:53Z  in response to SystemAdmin
            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
              ACCEPTED ANSWER

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

              ‏2012-05-03T01:32:56Z  in response to SystemAdmin
              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
                ACCEPTED ANSWER

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

                ‏2012-05-03T02:01:20Z  in response to SystemAdmin
                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
                  ACCEPTED ANSWER

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

                  ‏2012-05-03T02:05:27Z  in response to SystemAdmin
                  I see like this.

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

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

                    ‏2012-05-03T02:13:32Z  in response to SystemAdmin
                    I forgot mentioning that I can telnet to 192.168.154.128 from a remote machine.
                  • SystemAdmin
                    SystemAdmin
                    1143 Posts
                    ACCEPTED ANSWER

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

                    ‏2012-05-03T02:17:47Z  in response to SystemAdmin
                    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
                      ACCEPTED ANSWER

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

                      ‏2012-05-03T02:31:57Z  in response to SystemAdmin
                      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
                        ACCEPTED ANSWER

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

                        ‏2012-05-03T02:39:48Z  in response to SystemAdmin
                        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.