java.sql.SQLRecoverableException: IO 錯誤: Socket closed

來源:互聯網
上載者:User

標籤:

   今天weblogic的alllog日誌報了很多socket closed的錯誤。

### Cause: org.hibernate.exception.JDBCConnectionException: IO 錯誤: Socket closed

at com.gg.corm.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:95) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:59) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.sproc.core.base.dao.MyBatisDAO$6.execute(MyBatisDAO.java:241) ~[sproc-core-1.3.1-20141225.jar:1.3.1-20141225]
at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:1936) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:1933) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:211) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1954) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1940) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at com.gg.sproc.core.base.dao.MyBatisDAO.getObject(MyBatisDAO.java:236) ~[sproc-core-1.3.1-20141225.jar:1.3.1-20141225]
... 75 common frames omitted
Caused by: org.hibernate.exception.JDBCConnectionException: IO 錯誤: Socket closed
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at com.sun.proxy.$Proxy250.execute(Unknown Source) ~[na:na]
at com.gg.corm.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:56) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70) ~[gg-top-corm-3.1.2-20141209.jar:na]
at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_40]
at com.gg.corm.plugin.Plugin.invoke(Plugin.java:59) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.sun.proxy.$Proxy234.query(Unknown Source) ~[na:na]
at com.gg.corm.executor.SimpleExecutor.doQuery(SimpleExecutor.java:69) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.executor.BaseExecutor.query(BaseExecutor.java:141) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.executor.CachingExecutor.query(CachingExecutor.java:105) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.executor.CachingExecutor.query(CachingExecutor.java:81) ~[gg-top-corm-3.1.2-20141209.jar:na]
at com.gg.corm.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:101) ~[gg-top-corm-3.1.2-20141209.jar:na]
... 85 common frames omitted
Caused by: java.sql.SQLRecoverableException: IO 錯誤: Socket closed
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:897) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3594) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3695) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378) ~[ojdbc6.jar:11.2.0.3.0]
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:101) ~[weblogic.server.merged.jar:12.1.2.0.0]
at sun.reflect.GeneratedMethodAccessor695.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_40]
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122) ~[com.gg.top.thirdparty-hibernate-core-4.1.9.Final.jar:4.1.9.Final]
... 100 common frames omitted
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.7.0_40]
at java.net.SocketInputStream.read(SocketInputStream.java:152) ~[na:1.7.0_40]
at java.net.SocketInputStream.read(SocketInputStream.java:122) ~[na:1.7.0_40]
at oracle.net.ns.Packet.receive(Packet.java:300) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.net.ns.DataPacket.receive(DataPacket.java:106) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:260) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:185) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:102) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) ~[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884) ~[ojdbc6.jar:11.2.0.3.0]

... 110 common frames omitted

再檢查server日誌,發現在alllog中報socket closed錯誤的時段:

####<2015-1-5 上午11時37分22秒 CST> <Info> <JDBC> <scgg15140> <appServer> <[ACTIVE] ExecuteThread: ‘3‘ for queue: ‘weblogic.kernel.Default (self-tuning)‘> <<WLS Kernel>> <> <> <1420429042060> <BEA-001128> <Connection for pool "ggDataSource" has been closed.> 
####<2015-1-5 上午11時38分32秒 CST> <Info> <JDBC> <scgg15140> <appServer> <[ACTIVE] ExecuteThread: ‘3‘ for queue: ‘weblogic.kernel.Default (self-tuning)‘> <<WLS Kernel>> <> <> <1420429112057> <BEA-001128> <Connection for pool "ggDataSource" has been closed.> 
####<2015-1-5 上午11時38分52秒 CST> <Info> <JDBC> <scgg15140> <appServer> <[ACTIVE] ExecuteThread: ‘1‘ for queue: ‘weblogic.kernel.Default (self-tuning)‘> <<WLS Kernel>> <> <> <1420429132057> <BEA-001128> <Connection for pool "ggDataSource" has been closed.> 
####<2015-1-5 上午11時51分32秒 CST> <Info> <JDBC> <scgg15140> <appServer> <[ACTIVE] ExecuteThread: ‘13‘ for queue: ‘weblogic.kernel.Default (self-tuning)‘> <<WLS Kernel>> <> <> <1420429892057> <BEA-001128> <Connection for pool "ggDataSource" has been closed.> 


串連池關閉,有兩種可能,一種是資料庫出問題了,一種是網路問題導致連不上資料庫了。

再次檢查資料庫的alert.log,沒發現有異常,說明就是網路問題。


java.sql.SQLRecoverableException: IO 錯誤: Socket closed

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.