james goooseling
james goooseling

Reputation: 791

Error when trying to connect to DB2 Server

I'm encountering this error when trying to gain connection to a External DB...

om.ibm.db2.jcc.b.DisconnectException: A communication error has been detected. Communication protocol being used: Reply.fill(). Communication API being used: InputStream.read(). Location where the error was detected: Connection reset. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS   DB2ConnectionCorrelator: null
        at com.ibm.db2.jcc.c.a.a(a.java:373)
        at com.ibm.db2.jcc.c.gb.b(gb.java:191)
        at com.ibm.db2.jcc.c.gb.c(gb.java:238)
        at com.ibm.db2.jcc.c.gb.c(gb.java:353)
        at com.ibm.db2.jcc.c.gb.v(gb.java:1362)
        at com.ibm.db2.jcc.c.hb.a(hb.java:43)
        at com.ibm.db2.jcc.c.b.e(b.java:1389)
        at com.ibm.db2.jcc.c.b.b(b.java:1264)
        at com.ibm.db2.jcc.c.b.s(b.java:1036)
        at com.ibm.db2.jcc.c.b.b(b.java:744)
        at com.ibm.db2.jcc.c.b.a(b.java:730)
        at com.ibm.db2.jcc.c.b.<init>(b.java:331)
        at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:165)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at com.interblocks.common.db.ConnectionFactory.getCon(ConnectionFactory.java:282)
        at com.interblocks.common.db.ConnectionFactory.getConnection(ConnectionFactory.java:203)
        at com.interblocks.common.db.ConnectionFactory.getDataBasePlatform(ConnectionFactory.java:1073)
        at com.interblocks.common.sequence.c.<clinit>(Const.java:60)
        at com.interblocks.common.sequence.Sequence.<init>(Sequence.java:207)
        at irecon.Servlet_ReconTxnMgmt.<init>(Servlet_ReconTxnMgmt.java:121)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:134)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

I have no idea if its a code error or a network problem or DB error , please I do want to know why this exception triggered..and what are the things to consider to prevent encountering this?? Thanks

Upvotes: 1

Views: 2418

Answers (1)

AngocA
AngocA

Reputation: 7693

Ping is used to check if a server is alive. Telnet, normally allows to use the telnet service, but it can be used to check if a port is open (firewall) for remote connections.

You should check connectivity from the client

telnet db2serverName db2Port

For example

telnet 192.168.0.1 50000

Once you have checked that the DB2 port is open for your client, you should establish the connection or receive a different error message.

Upvotes: 3

Related Questions