IBM Support

DB2® Connect : A remote client fails to connect to a DB2 Connect gateway

Question & Answer


Question

I tried to connect to a remote DB2 server, and received the following error message: "SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "connect". Protocol specific error code(s): "79", "*", "*". SQLSTATE=08001"

Cause

The following error occurs when a remote client fails to connect to DB2 Connect gateway:


    SQL30081N  A communication error has been detected.  Communication protocol being used: "TCP/IP".  Communication API being used: "SOCKETS".  Location where the error was detected: "".  Communication function detecting the error: "connect".  Protocol specific error code(s): "79", "*", "*". SQLSTATE=08001

Answer

Complete the following steps to resolve solve the problem:

  1. Verify that the DB2COMM profile variable is set to tcpip on the DB2 Connect gateway by entering the following on a DB2 command line:

    db2set
  2. Verify that the entries in the TCP/IP services files on the client and gateway machines match the following settings. There might be a mismatch between the TCP/IP service name and/or the port number specifications on the DB2 client and the DB2 Connect gateway.
    1. Open a DB2 command window on the DB2 server, and enter:

      db2 get dbm cfg | grep
      SVCENAME

      For example, if TCP/IP Service name (SVCENMAE) = db2c_db2inst1, then you would enter:

      db2 get dbm cfg | grep db2c_db2inst1

    2. Open the services file from /etc, and get the port number for this service. For example:

      db2c_db2inst1            50000/tcp
    3. Open a DB2 command window on the client machine, and enter:

      db2 list node directory


      Make sure that the service name is set to the correct port number listed in the services directory for the DB2 instance.
    4. If the port number in the client side does not match with the server, you must uncatalog the node from client machine:

      db2 uncatalog node
      node_name
      Recatalog node to the proper port value:

      db2 catalog tcpip node node_name remote [hostname | ip_address] server [svcename | port_number].
  3. Verify that DB2 is started on the DB2 connect gateway:
    1. On the gateway machine, set the Database Manager Configuration diaglevel to 4. Open a DB2 command window and enter:

      db2 update dbm cfg using diaglevel 4
    2. After stopping and restarting DB2, look in the db2diag.log file to check that DB2 TCP/IP communications have started. You should see output similar to the following:

      1998-02-03-12.41.04.861119   Instance:svtdbm2   Node:00
      PID:86496(db2sysc)   Appid:none
      common_communication  sqlcctcp_start_listen   Probe:80
      DIA3000I "TCPIP" protocol support was successfully started.
    3. Once the problem is resolved, switch back to the default diaglevel. A higher diaglevel will demote the performance.
  4. Open a new db2 command window and issue connect issue from client to server. The connection will be set up.

[{"Product":{"code":"SSRS7Z","label":"IBM Content Manager Enterprise Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"DB2 Information Integrator for Content","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.1;8.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSRS7Z","label":"IBM Content Manager Enterprise Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Usage","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"","label":"UNIX"},{"code":"","label":"Windows 2000"},{"code":"","label":"Windows NT"}],"Version":"8.1;8.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
06 July 2019

UID

swg21179858