Link to home
Start Free TrialLog in
Avatar of Prardhan N
Prardhan NFlag for India

asked on

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.
SOLUTION
Avatar of Sam Simon Nasser
Sam Simon Nasser
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of Prardhan N

ASKER

How to confirm that it is fire wall issue ?

any command to verify that ?
Are your servers Windows or linux/unix?
LInux
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
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).
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
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.
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.
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
Is it only the DB2 connections that are failing?
Db2 and Telnet also not working
What version of DB2 are you running?
DB2 v10.5.0.7

Getting connection timed out error with telnet command...
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?
It is not connecting at all

It is getting timed out with out any connection to target server
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, I could connect and select a table also from my DB visualizer from Desktop system.
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.
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.
And run a "tracert {DB_server}" command from the second server.  It may show where the message is being rejected.
Thanks for inputs.