Unanswered: Does DB2 (9.1) type 4 JDBC Driver support IPv6? Why can not connect to db via Ipv6
I installed the DB2 184.108.40.206 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";
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] 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