A communication error has been detected. Communication protocol being used: "TCP/IP"

Hi ALl

I am facing the below error message while connecting to DB from one DB to another.

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

It has happening after the rebooting the OS.
What could be the reason ?

Pls give your inputs.
Prardhan NAsked:
Who is Participating?
 
Kent OlsenData Warehouse Architect / DBACommented:
This strongly suggests to me that it's not a DB2 problem, but a network issue.  It could be that settings on the DB2 server are at fault or any of the network devices between systems.

From the client side, I assume you can successfully ping and tracert to the DB2 server.

Can you connect to DB2 from any other location?  A desktop client, perhaps?
0
 
Sam Simon NasserIT Support ProfessionalCommented:
http://www-01.ibm.com/support/docview.wss?uid=swg21179858
Complete the following steps to resolve solve the problem:

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
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.
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

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

db2c_db2inst1            50000/tcp
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.
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].
Verify that DB2 is started on the DB2 connect gateway:
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
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.
Once the problem is resolved, switch back to the default diaglevel. A higher diaglevel will demote the performance.
Open a new db2 command window and issue connect issue from client to server. The connection will be set up.
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi Sridhar,

This is usually a firewall issue.  Because this started immediately after a reboot, I suspect that the firewall was turned on "accidentally" (automatically) or that the rule allowing DB2 communications wasn't saved into the permanent configuration.

Either way, checking the firewall is the first step.

Good Luck!
Kent
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Prardhan NAuthor Commented:
How to confirm that it is fire wall issue ?

any command to verify that ?
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Are your servers Windows or linux/unix?
0
 
Prardhan NAuthor Commented:
LInux
0
 
Prardhan NAuthor Commented:
With this output, I can assume that ports are good.

netstat -an|grep 50000
tcp        0      0 0.0.0.0:50000           0.0.0.0:*               LISTEN
tcp        0      0 XX.XX.XX.X:50000         XX.XX.XX.14:44574        ESTABLISHED
tcp        0      0 XX.XX.XX.X:50000         XX.XX.XX.19:49248        ESTABLISHED
tcp        0      0 XX.XX.XX.X:50000         XX.XX.XX.19:49354        ESTABLISHED
tcp        0      0 XX.XX.XX.X:50000         XX.XX.XX.19:58543       ESTABLISHED
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Then you're probably using IPTABLES for your firewall.

From user root, run

> iptables -L

Look to see if there is any rule governing the DB2 port.  (You'll also need to get the DB2 port from the database configuration).
0
 
Prardhan NAuthor Commented:
I have this output in for iptables -L command

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Then the server isn't using an IPTABLES based firewall.  (Just checking, but you ran that on the server that you're trying to connect to, and not connect from, correct?)

The next step is to see if other connections to the server work normally.  Can you create a terminal session to the server (telnet or X)?  That's probably going to come out OK.
0
 
Prardhan NAuthor Commented:
Yes, I ran the command on the target server.

Local connecting are working fine.

Remote connections are not working especially inter server are not working.
0
 
Prardhan NAuthor Commented:
DB2COMM=TCPIP is already set to TCPIP

and Does this below mean tcp/ip protocol is running ?



ps -ef|grep tcp
root      2853  1410  0 Mar21 tty1     00:00:02 /usr/bin/X :0 -background none -noreset -audit 4 -verbose -auth /run/gdm/auth-for-gdm-kI2uht/database -seat seat0 -nolisten tcp vt1
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Is it only the DB2 connections that are failing?
0
 
Prardhan NAuthor Commented:
Db2 and Telnet also not working
0
 
Kent OlsenData Warehouse Architect / DBACommented:
What version of DB2 are you running?
0
 
Prardhan NAuthor Commented:
DB2 v10.5.0.7

Getting connection timed out error with telnet command...
0
 
Kent OlsenData Warehouse Architect / DBACommented:
The connection timed out error could be normal depending on your local settings.  Does it connect then timeout when idle or does it timeout before connecting?
0
 
Prardhan NAuthor Commented:
It is not connecting at all

It is getting timed out with out any connection to target server
0
 
Prardhan NAuthor Commented:
Yes, I could connect and select a table also from my DB visualizer from Desktop system.
0
 
Prardhan NAuthor Commented:
Yes, It is firewall issue with all our diagnosis,

is it not possible to verify with any networking command to check whether any issue with firewall to review the fire wall settings.
0
 
Kent OlsenData Warehouse Architect / DBACommented:
That's great news.  DB2 seems to be working normally on that server.

Next up is to make sure both DB2 servers are set up correctly (to know about each other).

Run "List database directory" and "List node directory" from the CLP on both servers.
0
 
Kent OlsenData Warehouse Architect / DBACommented:
And run a "tracert {DB_server}" command from the second server.  It may show where the message is being rejected.
0
 
Prardhan NAuthor Commented:
Thanks for inputs.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.