If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Does DB2 (9.1) type 4 JDBC Driver support IPv6? Why can not connect to db via Ipv6

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-06, 03:39
batigolsg batigolsg is offline
Registered User
 
Join Date: Dec 2006
Posts: 1
Question Does DB2 (9.1) type 4 JDBC Driver support IPv6? Why can not connect to db via Ipv6

I installed the DB2 9.1.0.0 on RedHat Linux AS(release 4) server which has both IPv4 and IPv6 addresses. I have a simple connection test program that tried to connect to this DB2 dababase from the same machine by using the JDBC Driver type 4 that comes with DB2 9.1 but I could not make it work. When I tried the IPv4 address it worked fine. I could ping to this address by using ping6 command.
I was using the code as below.
String url = "jdbc:db2://ms.cn.ibm.com:50001/dbname";
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection con = DriverManager.getConnection(url, userID, passwd);

The JDBC Driver jar file that I used in the class path:
db2jcc.jar, sqlj.jar, db2jcc_license_cu.jar from /home/db2inst1/sqllib/java directory.

The version of the JDK I used: JDK 1.4

I got below error messages:
Exception in thread "main" java.sql.SQLException: [ibm][db2][jcc][t4][2043][11550] Exception java.net.ConnectException: Error opening socket to server ms.cn.ibm.com/2001:251:1a05:0:0:0:0:7 on port 50,001 with message: Connection refused.
at com.cyanea.common.database.DbAccess.getDbConn(DbAc cess.java:167)
at com.cyanea.common.dbtest.DBTest.testDBConnection(D BTest.java:61)
at com.cyanea.common.dbtest.DBTest.main(DBTest.java:1 85)

However, the port 50001 is listening:
[root@ms bin]# netstat -na| grep 50001
tcp 0 0 0.0.0.0:50001 0.0.0.0:* LISTEN

Does anybody know why this is not working or did I miss any configuration to the DB2? Any help will be greatly appreciated
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On