|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
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(DbAccess.java:167) at com.cyanea.common.dbtest.DBTest.testDBConnection(DBTest.java:61) at com.cyanea.common.dbtest.DBTest.main(DBTest.java:185) 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 |
|
#2
|
||||
|
||||
|
Quote:
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
|||
|
|||
|
IPV6 support for DB2
The JDBC driver does support IPv6, but currently only DB2 for z/OS V9 has the server support required to handle IPv6 messages. DB2 for Linux is working on IPv6 server support as a possible enhancement for the release after DB2 9.
Regards, Curt Cotner Quote:
|
|
#4
|
|||
|
|||
|
IPv6 support for DB2
My coworkers tell me that IPv6 is supported in DB2 LUW 9 after all (my appologies for giving you misinformation).
One possibility would be a firewall that is refusing the connection. If you find it still doesn't work with the firewall temporarily disabled, I would recommend opening a PMR to have IBM service help you diagnose the problem. Your symptoms indicate that the JDBC driver is sending the request, but either the server or the firewall are refusing the connection. |
|
#5
|
|||
|
|||
|
IPv6 support for DB2
The problem may be with the JRE.... there was a problem in earlier 1.4 JREs when connecting to machines that support IPV6 and IPv4. The problem was eventually fixed in JRE 1.4.2. I would give 1.4.2 a try.
|
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > Does DB2 (9.1) type 4 JDBC Driver support IPv6? Why can not connect to db via Ipv6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|