db2 连接报错connect。 ERRORCODE=-4499, SQLSTATE=08001(转载)
Posted 浮沉一梦
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了db2 连接报错connect。 ERRORCODE=-4499, SQLSTATE=08001(转载)相关的知识,希望对你有一定的参考价值。
在使用data studio连接远程DB2数据库时报错如下:
[jcc][Thread:main][[email protected]] java.sql.SQLException
[jcc][Thread:main][[email protected]] SQL state = 08001
[jcc][Thread:main][[email protected]] Error code = -4499
[jcc][Thread:main][[email protected]] Message = [jcc][t4][2043][11550][4.13.111] 异常 java.net.ConnectException:打开端口 50,000 上服务器 192.168.1.107/192.168.1.107 的套接字时出错,消息为:Connection timed out: connect。 ERRORCODE=-4499, SQLSTATE=08001
[jcc][Thread:main][[email protected]] Stack trace follows
com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2043][11550][4.13.111] 异常 java.net.ConnectException:打开端口 50,000 上服务器 192.168.1.107/192.168.1.107 的套接字时出错,消息为:Connection timed out: connect。 ERRORCODE=-4499, SQLSTATE=08001
com.ibm.db2.jcc.am.id.a(id.java:320)
Cause:
Error 1: DB2 return code is -4499
Four problems might be the cause of this error.
1、 Firewall is not stopped
2、DB2 is stopped.
3、The wrong DB2 database listening port number is specified.
4、The wrong database name is specified.
solution:
1、Check whether firewall is stopped.
chkconfig iptables off 永久性关闭
service iptables stop 重启主机后失效
2、Check whether DB2 is started.
db2 list db directory
3、Check the DB2 listening port
db2 get dbm cfg |grep SVCENAME,查看TCP/IP服务名称和/etc/services中定义的db2服务名称是否匹配
4、Check the DB2COMM
db2set -all 检查DB2COMM是否是TCPIP
以上是关于db2 连接报错connect。 ERRORCODE=-4499, SQLSTATE=08001(转载)的主要内容,如果未能解决你的问题,请参考以下文章
MobaXterm连接报错Network error: Connection timed out
ssh连接报错:Connection refused的解决办法
JAVA编写FTP连接报错java.net.ConnectException: Connection refused: connect FTP
mysql连接报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
mysql连接报错 Lost connection to MySQL server at 'sending authentication information', system er
ssh远程连接报错ssh_exchange_identification: Connection closed by remote host