Topic
No replies
yangwtao
yangwtao
1 Post
ACCEPTED ANSWER

Pinned topic SQL30081N error in client connect to DB2 server

‏2013-10-27T02:15:38Z |

I am a new comer to DB2. The problem
DB2 v10.5 express-c installed on both server and client. OS are Enterprise Linux 5.  catalog node and DB both completed successfully.
catalog DB2 server node on client
db2 catalog tcpip node db2node remote DB2-EL5 server 50000 ostype linux
catalog Database on client:
db2 catalog db mydb at node db2node

Anybody can help with my problem. Thanks!

Problem discription:
[db2adm@oc0386348167 ~]$ db2 connect to mydb user db2adm using rootroot
SQL30081N  A communication error has been detected. Communication protocol
being used: "TCP/IP".  Communication API being used: "SOCKETS".  Location
where the error was detected: "192.168.122.129".  Communication function
detecting the error: "connect".  Protocol specific error code(s): "113", "*",
"*".  SQLSTATE=08001
[db2adm@oc0386348167 ~]$

Analysis:
DB2 server configuration (192.168.122.129):
[db2inst1@DB2-EL5 ~]$ hostname
DB2-EL5
[db2inst1@DB2-EL5 ~]$ db2 list db directory

System Database Directory

Number of entries in the directory = 2

Database 1 entry:

Database alias                       = MYDB
Database name                        = MYDB
Local database directory             = /home/db2inst1
Database release level               = 10.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0
Alternate server hostname            =
Alternate server port number         =

Database 2 entry:

Database alias                       = SAMPLE
Database name                        = SAMPLE
Local database directory             = /home/db2inst1
Database release level               = 10.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0
Alternate server hostname            =
Alternate server port number         =

[db2inst1@DB2-EL5 ~]$
[db2inst1@DB2-EL5 ~]$ db2set -all
DB2COMM=TCPIP
DB2AUTOSTART=YES
[g] DB2_COMPATIBILITY_VECTOR=MYS
[g] DB2SYSTEM=DB2-EL5
[g] DB2INSTDEF=db2inst1
[g] DB2ADMINSERVER=db2as
[db2inst1@DB2-EL5 ~]$
[db2inst1@DB2-EL5 ~]$ db2 get dbm cfg |grep "SVCENAME"
TCP/IP Service name                          (SVCENAME) = db2c_db2inst1
SSL service name                         (SSL_SVCENAME) =
[db2inst1@DB2-EL5 ~]$ tail -1 /etc/services
db2c_db2inst1   50000/tcp                       #DB2 connection service
[db2inst1@DB2-EL5 ~]$ netstat -an |grep 50000
tcp        0      0 0.0.0.0:50000               0.0.0.0:*                   LISTEN      
[db2inst1@DB2-EL5 ~]$ tail -2 /etc/hosts
192.168.122.1           c0386348167.ibm.com
192.168.122.129         DB2-EL5
[db2inst1@DB2-EL5 ~]$

DB2 client configuration(192.168.122.1):
[db2adm@oc0386348167 ~]$ hostname
oc0386348167.ibm.com
[db2adm@oc0386348167 ~]$ db2 list node directory

Node Directory

Number of entries in the directory = 1

Node 1 entry:

Node name                      = DB2NODE
Comment                        =
Directory entry type           = LOCAL
Protocol                       = TCPIP
Hostname                       = DB2-EL5
Service name                   = 50000

[db2adm@oc0386348167 ~]$ ping DB2-EL5
PING DB2-EL5 (192.168.122.129) 56(84) bytes of data.
64 bytes from DB2-EL5 (192.168.122.129): icmp_seq=1 ttl=64 time=0.366 ms
64 bytes from DB2-EL5 (192.168.122.129): icmp_seq=2 ttl=64 time=0.328 ms
64 bytes from DB2-EL5 (192.168.122.129): icmp_seq=3 ttl=64 time=0.261 ms
^C
--- DB2-EL5 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2376ms
rtt min/avg/max/mdev = 0.261/0.318/0.366/0.045 ms
[db2adm@oc0386348167 ~]$ telnet 192.168.122.129 50000
Trying 192.168.122.129...
telnet: connect to address 192.168.122.129: No route to host
[db2adm@oc0386348167 ~]$