Start a new topic

Cannot connect to remote db2 v10.1 database.

[This topic is migrated from our old forums. The original author name has been removed]

Hello, Recently our database was upgraded to db2 v10.1 (newly installed on a new server). Before that we were using db2 9.5. I had been accessing the remote db2 9.5 using the dbvisualizer 8.0.12 and more recently with 9.1.10. However, I cannot connect to db2 v10.1 database using dbvisualizer 8 or 9. I have got the firewalls checked. Telnet works. Ping server also says the server is alive. But when I try to make the connection it always gives the below error. I have tried using different versions of jdbc jar(db2jcc4.jar) - v4.13 and 4.15. But no luck. Anybody has any suggestions or ideas? This has stalled my work and I seem to have hit the dead end with this! Any help will be greatly appreciated. **** An error occurred while establishing the connection: Long Message: [jcc][t4][2030][11211][4.15.82] Bei Operationen auf dem der Verbindung zugrunde liegendem Socket, im Socketeingabedatenstrom oder Socketausgabedatenstrom ist ein Kommunikationsfehler aufgetreten. Fehlerposition: Reply.fill() - insufficient data (-1). Nachricht: Unzureichende Daten. ERRORCODE=-4499, SQLSTATE=08001 Details:    Type: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException    Error Code: -4499    SQL State: 08001 **** Thanks Regards NirajK

[This reply is migrated from our old forums.]

Re: Cannot connect to remote db2 v10.1 database.
Niraj, Thanks for giving SquirrelSQL a test. As I suspect the problem is in the environment rather than in DbVisualizer as you can connect fine without VPN. The easiest way to verify is to telnet directly to the DB server and its port. Do this in a DOS prompt window. If the server doesn't respond you will get something like this (I use port 50001 here just to show how the message looks if there is no server responding): % telnet 192.168.1.132 50001 Trying 192.168.1.132... telnet: connect to address 192.168.1.132: Connection refused telnet: Unable to connect to remote host The following show what happen if I do telnet to the correct port for DB2: % telnet 192.168.1.132 50000 Trying 192.168.1.132... Connected to 192.168.1.132. Escape character is '^]'. This is a basic test just to make sure you from the client can reach a database server (or any server process). What result do you get when telnet to your DB2 server with an without VPN? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Cannot connect to remote db2 v10.1 database.
Hi Roger, Thanks for your suggestions. I tried with jdbc driver version 4.18.60 but still getting the same error. I also installed SquirrelSQL client and tried connecting but got the same below error in SquirrelSQL as well: ************ java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][4.18.60] A communication error occurred during operations on the connection's underlying socket, socket input stream, or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001 at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection ************ It is quite puzzling now. Normally if there is a firewall or the destination port is not open then we get the connection refused error message along with ERRORCODE=-4499, SQLSTATE=08001. But here the error message (insufficient data) is a bit strange. I have double checked the database URL and login credentials. They are correctly specified. Not much info is available on internet regarding this error message: Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001 Have you come across such a case where telnet and ping to target Db2 10.1 server works but the jdbc connection doesnt? Particularly if accessing via VPN? Thanks Regards Niraj
[This reply is migrated from our old forums.]

Re: Cannot connect to remote db2 v10.1 database.
Niraj, Thanks for the info about using VPN. The database connection from a DbVisualizer and the JDBC driver (I think) perspective is transparent independent if communication with or without VPN, SSH and so on. One test you can do is to try setup a connection with for example the open source SquirrelSQL tool. It is also JDBC based and it is interesting to find out if it works connecting with it. The most recent JDBC driver version for DB2 is found here: https://www-304.ibm.com/support/docview.wss?uid=swg21363866 I suggest you use the 4.18.60 version and give the new driver a test before trying SquirrelSQL. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Cannot connect to remote db2 v10.1 database.
Hi Roger, Thanks for your response. I have tried with JDBC driver (db2jcc4.jar) v4.15. It is very recent (I think from Aug 2014). It came bundled with DbVisualizer 9.1.10 download. IBM link to download jdbc driver doesnt work anymore. Do you know where can I get the latest jdbc driver for DB2? I am trying to access the DB2 10.1 DB via VPN. My colleague who also uses dbvisualizer is able to access DB2 10.1 but he is on-campus i.e does not access via VPN. So something is not quite right accessing the DB2 10.1 via VPN using the dbvisualizer. As I mentioned earlier, strangely the telnet works via VPN. So does the ping connection! Hence the infrastructure team says firewall is not any issue. Please check your client. So I cant figure out where the problem lies. It could be the JDBC driver. But its difficult to get various versions of jdbc driver now. Its no longer easily avialable on the net. So I am relying on the bundled driver. So at the moment I am stranded! Any more clues? Thanks Regards Niraj
[This reply is migrated from our old forums.]

Re: Cannot connect to remote db2 v10.1 database.
Niraj, Have you tried with the most recent JDBC driver for DB2? The error message provided by the driver is somewhat vague but it appears there is a protocol error being reported. I suggest you try the latest DB2 driver. Regards Roger