1 Reply Latest reply on Sep 18, 2003 7:01 AM by John

    Connection reset by peer: socket write error

    John Newbie


      Hi,

      I am using jboss-3.0.4_tomcat-4.1.12 and connecting to Oracle 8.1.7.

      Every once in a while I get the following exception when performing database operations (add/update/select):

      2003-09-17 10:53:00,322 ERROR [STDERR] java.sql.SQLException: Io exception: Connection reset by peer: socket write error
      2003-09-17 10:53:00,322 ERROR [STDERR] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
      2003-09-17 10:53:00,322 ERROR [STDERR] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
      2003-09-17 10:53:00,322 ERROR [STDERR] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
      2003-09-17 10:53:00,338 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:417)
      2003-09-17 10:53:00,338 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:432)
      2003-09-17 10:53:00,338 ERROR [STDERR] at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:182)
      2003-09-17 10:53:00,338 ERROR [STDERR] at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:165)

      I've configured my datasource connection as follows with the classes12.zip in the server/default/lib folder.

      <!-- ORACLE DB Configuration Begins Here -->



      <depends optional-attribute-name="ManagedConnectionFactoryName">


      ConnectDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@localhost:1521:canopy</config-property>
      <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <config-property name="UserName" type="java.lang.String">canopy</config-property>
      <config-property name="Password" type="java.lang.String">canopy</config-property>




      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



      <depends optional-attribute-name="ManagedConnectionPool">

      0
      500
      5000
      15
      ByContainer



      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      jboss.jca:service=RARDeployer



      <!-- ORACLE DB Configuration Ends Here -->

      It looks like the socket to the oracle server was closed. I'm not sure whether the oracle server killed my database connection or if I have not configured my mbean configuration is not correct (above). I asked the DBA what the oracle connection timeout was set to and was told it was set to unlimited so that the oracle server would never kill the connections. I was going to play around with IdleTimeoutMinutes parameter to see if this had any influence...

      Any thoughts?

      John

        • 1. Re: Connection reset by peer: socket write error
          John Newbie

          Somehow, the connection objects in the connection pool have become invalid... I checked with the DBA and the database was not shutdown. If the connections are invalid, I would need to try and create new connections in order to reconnect to the database. Does JBoss' implementation of connection pooling (org.jboss.resource.connectionmanager.JBossManagedConnectionPool) handle this? I'm thinking that the connection pool should only return me valid connections...