DB2 connection error Connect. errorcode=-4499, sqlstate=08001 (reprint)

Source: Internet
Author: User
Tags db2 db2 return code stack trace iptables
The following error is reported when using data studio to connect to a remote DB2 database:
[jcc][Thread:main][SQLException@5b775b77] java.sql.SQLException
[jcc][Thread:main][SQLException@5b775b77] SQL state = 08001
[jcc][Thread:main][SQLException@5b775b77] Error code = -4499
[jcc][Thread:main][SQLException@5b775b77] Message = [jcc][t4][2043][11550][4.13.111] Exception java.net.ConnectException: Open port 50,000 on server 192.168.1.107/192.168. An error occurred during the 1.107 socket, and the message was: Connection timed out: connect. ERRORCODE=-4499, SQLSTATE=08001
[jcc][Thread:main][SQLException@5b775b77] Stack trace follows
com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2043][11550][4.13.111] Exception java.net.ConnectException: Open the set of server 192.168.1.107/192.168.1.107 on port 50,000 An error occurred while connecting, and the message was: 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 permanently off
service iptables stop fails after restarting the host
2. Check whether DB2 is started.
db2 list db directory
3. Check the DB2 listening port
db2 get dbm cfg |grep SVCENAME, check whether the TCP/IP service name matches the db2 service name defined in /etc/services
4. Check the DB2COMM
db2set -all check whether DB2COMM is TCPIP
db2 connection error connect. ERRORCODE=-4499, SQLSTATE=08001 (reproduced)

Tag: err grep cto wal ace span space comm open port

Original address: http://www.cnblogs.com/jjzd/p/6372908.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.