IBM Support

"Connection failed" and "Error opening socket to server...Connection refused" when trying to connect to DB2 database using "Controller Configuration" due to DB2 server misconfiguration

Troubleshooting


Problem

Administrator launches "Controller Configuration" and opens section "Database Connections". Administrator highlights relevant connection (e.g. "Default") and clicks 'test' icon (green tick button). User receives error #1. Afterwards, administrator clicks green 'play' button, then clicks 'Connect'. User receives error #2.

Symptom

Error#1
IBM Cognos Controller Configuration
Connection failed.
[OK]

Error#2


** ERROR: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2043][11550][3.59.81] Exception java.net.ConnectException: Error opening socket to server NCONTDB2/9.71.36.216 on port 50,000 with message: Connection refused: connect. ERRORCODE=-4499, SQLSTATE=08001

Cause

There are many potential causes for the same error message.

  • For more examples, see separate IBM Technote #1578244.

This technote specifically relates to the scenario where the cause is that the DB2 server is configured to not allow TCP/IP connections.

Diagnosing The Problem

On the DB2 server, find the current DB2 settings by running the following inside a command prompt:


    db2set -all

  • On a badly configured DB2 server there will not be an entry "TCPIP" (next to "DB2COMM"). For example:
  • DB2COMM=NETBIOS

  • On a good DB2 server, there will be an entry similar to:
  • DB2COMM=TCPIP

Resolving The Problem

Reconfigure the DB2 server to allow TCP/IP connections.

Steps:

  1. Obtain a short period of downtime (no users using the DB2 database(s))
  2. Logon to the DB2 server as an administrator
  3. Launch a command promopt, and run a command similar to the following (ask DB2 administrator if need more protocols than just TCPIP): db2set DB2COMM=TCPIP
  4. Restart DB2 server (for settings to take effect).

[{"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Controller","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.5.1;10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21578246