3 Replies Latest reply on Jul 12, 2012 10:18 PM by NEFTALY GARCIA

    Connection timed out

    liangfa lei Newbie

      Hi all,

      I hava a cluster with two nodes just call them node1 and node2.And it runs fine,but sometimes there are some warn messages in server.log.I found all of them are the same as following:

      2009-06-17 15:09:54,096 WARN [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.OracleConnection@1facb39
      java.sql.SQLException: Io Exception: Connection timed out
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
       at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:389)
       at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:772)
       at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:712)
       at org.jboss.resource.adapter.jdbc.CheckValidConnectionSQL.isValidConnection(CheckValidConnectionSQL.java:55)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:458)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:240)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:200)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:211)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:348)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:403)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:850)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:90)
       at com.sinosoft.utility.DBConn.getJBossPoolConnection(DBConn.java:557)
       at com.sinosoft.utility.DBConn.createConnection(DBConn.java:152)
       at com.sinosoft.utility.DBConnPool.getConnection(DBConnPool.java:56)
       at com.sinosoft.lis.db.LDSysVarDB.query(LDSysVarDB.java:376)
       at com.sinosoft.lis.aml.AntiInit.getValueFromSysvar(AntiInit.java:107)
       at com.sinosoft.lis.aml.AntiInit.init(AntiInit.java:62)
       at org.apache.jsp.logon.main_jsp._jspService(main_jsp.java:62)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:34)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
       at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:381)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      2009-06-17 15:09:54,096 WARN [org.jboss.resource.connectionmanager.TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1076d19[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@3420b7 handles=0 lastUse=1245220799274 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubject@daf109 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@693a5 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@4fd6b0 txSync=null]
      java.sql.SQLException: Io 异常: Connection timed out
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
       at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:389)
       at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:772)
       at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:712)
       at org.jboss.resource.adapter.jdbc.CheckValidConnectionSQL.isValidConnection(CheckValidConnectionSQL.java:55)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:458)
       at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:240)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:200)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:211)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:348)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:403)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:850)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:90)
       at com.sinosoft.utility.DBConn.getJBossPoolConnection(DBConn.java:557)
       at com.sinosoft.utility.DBConn.createConnection(DBConn.java:152)
       at com.sinosoft.utility.DBConnPool.getConnection(DBConnPool.java:56)
       at com.sinosoft.lis.db.LDSysVarDB.query(LDSysVarDB.java:376)
       at com.sinosoft.lis.aml.AntiInit.getValueFromSysvar(AntiInit.java:107)
       at com.sinosoft.lis.aml.AntiInit.init(AntiInit.java:62)
       at org.apache.jsp.logon.main_jsp._jspService(main_jsp.java:62)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:34)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
       at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:381)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      2009-06-17 15:09:54,096 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Destroying connection that could not be successfully matched: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1076d19[state=DESTROYED mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@3420b7 handles=0 lastUse=1245220799274 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubject@daf109 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@693a5 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@4fd6b0 txSync=null]
      


      oracle-ds.xml
      ......
      <min-pool-size>10</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>
      <new-connection-sql>SELECT COUNT(*) FROM dual</new-connection-sql>
      <check-valid-connection-sql>SELECT COUNT(*) FROM dual</check-valid-connection-sql>
      ......
      


      workers.properties

      ......
      worker.node1.connection_pool_timeout=30
      ......
      worker.node2.connection_pool_timeout=30
      ......
      


      server.xml

      <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
       emptySessionPath="true" enableLookups="false" redirectPort="8443" connectionTimeout="30000" />
      


      I have tried to update the BlockingTimeoutMillis param by 5000 to 60000(1 minutes) in jmx-console,but it seems no work,there where still warn message as above.

      Does anyboby have some idea with this?Your suggestions will be most appreciated.

        • 1. Re: Connection timed out
          Frank Henry Novice

          Not directly an answer or maybe even helpful but have you looked into the Oracle specific JDBC Handlers that are available?

          They might give more clarity.

          Oracle handlers in the jboss-common-jdbc-wrapper.jar

          org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
          org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
          org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter
          


          f.i. using the OracleExceptionSorter:
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
          


          HTH

          • 2. Re: Connection timed out
            liangfa lei Newbie

             

            "FrankTheTank" wrote:

            f.i. using the OracleExceptionSorter:
            <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
            



            Thanks,but I have a question that how can I do after defining this in oracle-ds.xml? Or how can I monitor?More details?

            Your suggestion will by most appreciated.

            • 3. Re: Connection timed out
              NEFTALY GARCIA Newbie

              I have the same problem did you resolved it?