DB2 jdbc连接错误连接被拒绝。 ERRORCODE = -4499,SQLSTATE = 08001 [英] DB2 jdbc connection error Connection refused. ERRORCODE=-4499, SQLSTATE=08001
问题描述
我有一个新的DB2服务器(v10.5.0.3),我可以在本地连接到数据库。
当尝试从远程连接服务器使用JDBC我得到连接拒绝,ERRORCODE = -4499,SQLSTATE = 08001错误。根据此处发现的信息, https://www-304.ibm.com/ support / docview.wss?uid = swg21403644 我已经确认
[db2inst1 @ db2〜] $ db2set - 全部
[i] DB2COMM = TCPIP
[i] DB2AUTOSTART = YES
[g] DB2SYSTEM = db2.xxxx.com
[g] DB2INSTDEF = db2inst1
[ g] DB2ADMINSERVER = xxxxxx
和
[db2inst1 @ db2〜] $ db2获取数据库管理器配置| grep -i svce
TCP / IP服务名称(SVCENAME)= 50001
SSL服务名称(SSL_SVCENAME)=
与这些JDBC连接值
driver = com.ibm.db2.jcc.DB2Driver
url = jdbc:db2://db2.xxxxx.com:50001 / TESTGEN
username = XXXXXXXX
password = XXXXXXX
我已经验证了两台服务器上的防火墙已经打开了端口50000和50001.我已经用尽了,任何帮助都非常感谢。
我有同样的麻烦...它是由IPV6引起的...
URL连接点到localhost,解析为:: 1 (本地主机的IPV6地址)和DB2服务器不列出IPV6协议。我通过修改c:\windows\system32\driver\etc\host文件解决:我取消注释行127.0.0.1 locahost强制ipv4 locahost的分辨率名称...它的作品。
我希望有帮助。 (抱歉我的英文)
I have a new DB2 server (v10.5.0.3), and I can connect to the database locally just fine.
When trying to connect from a remote server using JDBC I am getting the "Connection refused. ERRORCODE=-4499, SQLSTATE=08001" error. Based on information found here https://www-304.ibm.com/support/docview.wss?uid=swg21403644 I have confirmed that
[db2inst1@db2 ~]$ db2set -all
[i] DB2COMM=TCPIP
[i] DB2AUTOSTART=YES
[g] DB2SYSTEM=db2.xxxx.com
[g] DB2INSTDEF=db2inst1
[g] DB2ADMINSERVER=xxxxxx
and
[db2inst1@db2 ~]$ db2 get database manager configuration | grep -i svce
TCP/IP Service name (SVCENAME) = 50001
SSL service name (SSL_SVCENAME) =
with these JDBC connection values
driver=com.ibm.db2.jcc.DB2Driver
url=jdbc:db2://db2.xxxxx.com:50001/TESTGEN
username=XXXXXXXX
password=XXXXXXX
I have verified that the firewall on the both servers have opened ports 50000 and 50001. I've run out of ideas, any help is greatly appreciated.
I had the same trouble... Its was caused by IPV6... The URL connection point to localhost, resolved as ::1 (the IPV6 address of localhost) and DB2 server doens't listing IPV6 protocol.
I resolved by modify the c:\windows\system32\driver\etc\host file : I uncomment the line 127.0.0.1 locahost to force ipv4 resolution name of locahost... and it's works.
I hope that helps. (sorry for my English)
这篇关于DB2 jdbc连接错误连接被拒绝。 ERRORCODE = -4499,SQLSTATE = 08001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!