Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Socket connection or database connection loss issue

0 views
Skip to first unread message

subbu venkat

unread,
Dec 8, 2004, 3:50:18 AM12/8/04
to
hi

i am working on an application that uses applet-servlet communication,the database connections are created in the servlet.it is on weblogic 6.1,there is no connection pooling used.

on env 1 there are 2 unix boxes.on box 1 there is the application server installed with files.on box 2 there is oracle 8i. there is a firewall between box 1 and box 2 which is open.however there is a firewall setting of 1hr.

initially there is no issue with the application.but sometimes users are not able to access the application ,no one is able to connect,they then have to restart the app server.the log message is
GC 33015K->6210K(128384K), 0.0401400 secs]
[GC 33602K->6303K(128384K), 0.0366095 secs]
[GC 33695K->6347K(128384K), 0.0478974 secs]
[GC 33739K->6371K(128384K), 0.0479187 secs]
java.sql.SQLException: Io exception: Connection reset by peer: Connection reset by peer
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:417)
at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:470)
at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:379)
at com.csg.cs.repfm.CDBCommunicator.<init>(CDBCommunicator.java:46)
at com.csg.cs.repfm.CReportingServlet.sendAndReceive(CReportingServlet.java:128)
at java.lang.reflect.Method.invoke(Native Method)
at com.csg.cs.tfw.util.http.jso.CSJsoServlet.dispatchJsoCommands(CSJsoServlet.java:193)
at com.csg.cs.tfw.util.http.jso.CSJsoServlet.doPostManaged(CSJsoServlet.java:125)
at com.csg.cs.tfw.servlet.CSServlet.doPost(CSServlet.java:747)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.csg.cs.tfw.servlet.CSServlet.service(CSServlet.java:960)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

java.lang.NullPointerException
at com.csg.cs.repfm.CDBCommunicator.selectQuery(CDBCommunicator.java:101)
at com.csg.cs.repfm.CReportingServlet.sendAndReceive(CReportingServlet.java:129)
at java.lang.reflect.Method.invoke(Native Method)
at com.csg.cs.tfw.util.http.jso.CSJsoServlet.dispatchJsoCommands(CSJsoServlet.java:193)
at com.csg.cs.tfw.util.http.jso.CSJsoServlet.doPostManaged(CSJsoServlet.java:125)
at com.csg.cs.tfw.servlet.CSServlet.doPost(CSServlet.java:747)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.csg.cs.tfw.servlet.CSServlet.service(CSServlet.java:960)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
java.sql.SQLException: Io exception: Broken pipe

please let me know whether it is a firewall issue.can this be overcome with database connection pooling?

Joe Weinstein

unread,
Dec 8, 2004, 11:17:26 AM12/8/04
to

Hi. The problem does seem to have been caused by the firewall,
and the null pointer is obviously an application code issue.
Connection pools probably wouldn't help immediately, because
it seems your application holds on to connections for an
indefinite period of time, and if you don't use them constantly
the firewall kills them. Our pools *can* be configured to
test connections, and keep them busy for the firewall, and
transparently replace any that go bad, but only while they
are in the pool between uses. That means your application
would need to adopt the style of obtaining a connection,
using it, and closing it, all within a single user invoke.
Joe
0 new messages