0
votes

While trying to connect to a remote DB2 database I am getting following exception

SQL30081N A communication error has been detected.

Communication protocol being used 'TCP/IP'. Communication API being used 'SOCKETS'. Location where error was detected "192.168.1.200'. Communication function detecting the error 'SelectForConnectTimeout'. Protocol specific error code '0','',''. SQLSTATE=08001

i am using following connection string

let conn= await ibmdb.open("Driver={IBM DB2 ODBC DRIVER - DB2V11};DATABASE=DBInstance;UID=username;PWD=password;HOSTNAME=hostname;port=446;");
result = await conn.query(sql_Query);
1
Is the reported IP address that of the database host? Why is it port 446? The standard for Db2 on Linux / Windows is 5000.data_henrik
Configuration question ( not programming). This is frequently asked question. Follow basic troubleshooting advice in www-01.ibm.com/support/docview.wss?uid=swg21164785mao
@data_henrik I am using '60030' port number , which can be able to connect it from data studio manually. Do we need any extra settings i am using ibmdb depandancy in package.jsonanusha
Your provided code says port=446.data_henrik
No, I am using 60030 and mistakenly provided 446 port.anusha

1 Answers

0
votes

According to the Db2 manual below, it is typically outside the Db2 software:

Protocol-specific error codes for the SQL30081N message
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.messages.doc/doc/r0052008.html


The cause of the SQL30081N message is typically outside the Db2 software and actual error codes are protocol-specific.


And the message tells that the issue was detected at "192.168.1.200". Generally speaking, the IP address "192.168.1.200" may be a virtual IP which can be assigned to other devices. So it is suggested to try a real IP address instead to see if the problem persists or not.

Hope this helps.