• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2275
  • Last Modified:

COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket. SQLSTATE=08S01

i want to connect with remote DB2 and have following error
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E  Error opening socket. SQLSTATE=08S01

code using for connection
serverIp="192.168.0.1";
            port="50000";
            db_name = "ARBINDEX";
            sc_name = "NULLID";
            user_name = "DB2ADMIN";
            pass = "oracle123";

Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
            con = DriverManager.getConnection("jdbc:db2://"+this.serverIp+":"+this.port+"/"+this.db_name,this.user_name,this.pass);

0
MuhammadAdil
Asked:
MuhammadAdil
1 Solution
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
Are you sure with the port address???

check if it gets listed if you use netstat -an command in the command line.

or check if your port address is 6789.

else if every thing seems correct try connecting to the sample database provided by IBM itself.

Thank You.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Also check if the server has been firewalled and the port is no longer open.
0
 
hoomanvCommented:
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0401chong/

according to this site

1) You may need to start the DB2 JDBC Applet Server using db2jstrt <port number>
2) You may have specified a wrong port number, or an incorrect hostname/IP Address
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Any reason for the B grade?
0
 
DamithaCommented:
try with com.ibm.db2.jcc.DB2Driver driver. Its comes with db2jcc.jar
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now