[Seasar-user:20850] Re: コネクションプーリングを使っている環境で不定期に「Connection timed out」が発生します
unica中西英樹
[E-MAIL ADDRESS DELETED]
2011年 7月 12日 (火) 09:43:15 JST
お世話になっております。中西と申します。
下記件につきまして、自己レスですが結果をご報告しておきます。
当環境では「SSG140」というFireWallをAPサーバの前段に配置していたのですが、それを、別の「SSG140」に入れ替えたところ当現象は発生しなくなりました。
※エラーが起きていたときに使っていたのは「新品のSSG140」でして、「今まで稼動実績のあるSSG140」に戻したら当現象が発生しなくなった、という事になります。
現在メーカーにログ提出して調査中ですが、Seasarとは無関係の問題と思われますので念のためお知らせいたします。
お騒がせいたしました。
以上、よろしくお願いいたします。
2011年7月5日21:21 unica中西英樹 <[E-MAIL ADDRESS DELETED]>:
> お世話になっております。中西と申します。
>
> Seasarのコネクションプーリングの仕掛けを使ってOracleにDB接続させるアプリケーションで、
> 通常は問題なく動作するのですが、たまに下記の様なエラーが発生する場合があります。
>
> ※「たまに」というところがポイントなのですが、どういう時にエラーが発生するのか規則性がつかめず困っています。
>
> 長くなり恐縮ですが以下に環境やログ等記載いたしますので、
> もしも同じような現象に遭遇した方などいらっしゃれば、何か手がかりなど頂ければ幸いです。
>
> お忙しいところ申し訳ありませんが、どうぞよろしくお願いいたします。
>
> ※当方の環境は次の通りです。=========================================
> ・APサーバ
> Windows2003Server・・・WebSphere7.0.0.17
> s2-framework-2.4.8.jar
> s2-dao-1.0.40.jar
> s2-extension-2.4.8.jar
>
> ・DBサーバ
> Windows2003Server・・・Oracle10g(10.2.0.3)
>
> ※エラー時のスタックトレースは次の通りです===================================
> ERROR 2011-07-05 12:01:48,015 [WebContainer : 1 ]
> FwkCommonCheckFilter - RequestUri=[/xxxx/xxxx]
> RemoteHost=[127.0.0.1] RemoteAddr=[127.0.0.1] HttpMethod=[POST]
> ErrMsgId=[xxxx] ErrMsg=[想定外のエラーが発生しました。エラー番号:xxxx]
> ErrDetail=[[ESSR0071]SQLで例外(ErrorCode=20,
> SQLState=61000)が発生しました。理由はjava.sql.SQLException: The Network Adapter
> could not establish the connection]
> fwk.exception.FwkSystemException:
> org.seasar.framework.exception.SQLRuntimeException:
> [ESSR0071]SQLで例外(ErrorCode=20,
> SQLState=61000)が発生しました。理由はjava.sql.SQLException: The Network Adapter
> could not establish the connection
> at fwk.interceptor.FwkThrowableInterceptor.handleThrowable(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:69)
> at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(NestedMethodInvocation.java:43)
> at org.seasar.framework.aop.interceptors.InterceptorAdapter.invoke(InterceptorAdapter.java:54)
> at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(NestedMethodInvocation.java:43)
> at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:59)
> at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(NestedMethodInvocation.java:43)
> at org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:40)
> at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(NestedMethodInvocation.java:43)
> at org.seasar.framework.aop.interceptors.InterceptorChain.invoke(InterceptorChain.java:42)
> at fwk.bizlogic.status.logic.CheckOpStatusLogicImpl$$EnhancedByS2AOP$$38e138e1$$MethodInvocation$$execute0.proceed(MethodInvocationClassGenerator.java)
> at fwk.bizlogic.status.logic.CheckOpStatusLogicImpl$$EnhancedByS2AOP$$38e138e1.execute(CheckOpStatusLogicImpl$$EnhancedByS2AOP$$38e138e1.java)
> at fwk.ui.filter.FwkCommonCheckFilter.isOperationStatusAvailable(Unknown
> Source)
> at fwk.ui.filter.FwkCommonCheckFilter.doFilter(Unknown Source)
> at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
> at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
> at fwk.ui.filter.FwkSetCharacterEncodingFilter.doFilter(Unknown Source)
> at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
> at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
> at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:63)
> at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
> at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
> at fwk.ui.filter.FwkProcessTimeFilter.doFilter(Unknown Source)
> at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
> at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
> at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
> at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
> at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
> at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
> at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
> at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
> at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
> at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
> at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
> at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
> at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
> at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
> at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
> Caused by:
> org.seasar.framework.exception.SQLRuntimeException:
> [ESSR0071]SQLで例外(ErrorCode=20,
> SQLState=61000)が発生しました。理由はjava.sql.SQLException: The Network Adapter
> could not establish the connection
> at org.seasar.extension.jdbc.util.DataSourceUtil.getConnection(DataSourceUtil.java:38)
> at org.seasar.extension.jdbc.impl.BasicHandler.getConnection(BasicHandler.java:88)
> at org.seasar.extension.jdbc.impl.BasicSelectHandler.execute(BasicSelectHandler.java:118)
> at org.seasar.dao.impl.SelectDynamicCommand.execute(SelectDynamicCommand.java:60)
> at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(S2DaoInterceptor.java:53)
> at xxxx.bizlogic.db.dao.manager.UserManageDaoManager$$EnhancedByS2AOP$$64596459$$MethodInvocation$$soleMatch5.proceed(MethodInvocationClassGenerator.java)
> at xxxx.bizlogic.db.dao.manager.UserManageDaoManager$$EnhancedByS2AOP$$64596459.soleMatch(UserManageDaoManager$$EnhancedByS2AOP$$64596459.java)
> at fwk.bizlogic.status.logic.CheckOpStatusLogicImpl.getOpStatusFromUserId(Unknown
> Source)
> at fwk.bizlogic.status.logic.CheckOpStatusLogicImpl.execute(Unknown Source)
> at fwk.bizlogic.status.logic.CheckOpStatusLogicImpl$$EnhancedByS2AOP$$38e138e1.$$execute$$invokeSuperMethod$$(CheckOpStatusLogicImpl$$EnhancedByS2AOP$$38e138e1.java)
> at fwk.bizlogic.status.logic.CheckOpStatusLogicImpl$$EnhancedByS2AOP$$38e138e1$$MethodInvocation$$execute0.proceed(MethodInvocationClassGenerator.java)
> at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(NestedMethodInvocation.java:45)
> at org.seasar.framework.aop.impl.NestedMethodInvocation.proceed(NestedMethodInvocation.java:45)
> at org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:64)
> ... 44 more
> Caused by:
> java.sql.SQLException: The Network Adapter could not establish the connection
> at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
> at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
> at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
> at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
> at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
> at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
> at java.sql.DriverManager.getConnection(DriverManager.java:322)
> at java.sql.DriverManager.getConnection(DriverManager.java:358)
> at org.seasar.extension.dbcp.impl.XADataSourceImpl.getXAConnection(XADataSourceImpl.java:95)
> at org.seasar.extension.dbcp.impl.XADataSourceImpl.getXAConnection(XADataSourceImpl.java:85)
> at org.seasar.extension.dbcp.impl.ConnectionPoolImpl.createConnection(ConnectionPoolImpl.java:200)
> at org.seasar.extension.dbcp.impl.ConnectionPoolImpl.checkOut(ConnectionPoolImpl.java:162)
> at org.seasar.extension.dbcp.impl.DataSourceImpl.getConnection(DataSourceImpl.java:46)
> at org.seasar.extension.jdbc.util.DataSourceUtil.getConnection(DataSourceUtil.java:36)
> ... 57 more
> Caused by:
> oracle.net.ns.NetException: The Network Adapter could not establish
> the connection
> at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:328)
> at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:421)
> at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:630)
> at oracle.net.ns.NSProtocol.connect(NSProtocol.java:206)
> at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
> at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
> ... 69 more
> Caused by:
> java.net.ConnectException: Connection timed out: connect
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:383)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:245)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:232)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
> at java.net.Socket.connect(Socket.java:539)
> at java.net.Socket.connect(Socket.java:488)
> at java.net.Socket.<init>(Socket.java:385)
> at java.net.Socket.<init>(Socket.java:199)
> at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:127)
> at oracle.net.nt.ConnOption.connect(ConnOption.java:126)
> at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:306)
> ... 74 more
>
> ※jdbc.diconは次の通りです。=======================================
> <component name="dataSource"
> class="org.seasar.extension.dbcp.impl.DataSourceImpl" >
> <arg>connectionPool</arg>
> </component>
> <component name="connectionPool"
> class="org.seasar.extension.dbcp.impl.ConnectionPoolImpl" >
> <property name="transactionManager">jta.TransactionManager</property>
> <property name="XADataSource">xaDataSource</property>
> <property name="timeout">600</property>
> <property name="maxPoolSize">30</property>
> <property name="allowLocalTx">true</property>
>
> <!-- transactionIsolationLevel = TRANSACTION_READ_COMMITTED -->
> <property name="transactionIsolationLevel">2</property>
> <destroyMethod name="close" ></destroyMethod>
> </component>
>
> <component name="xaDataSource"
> class="org.seasar.extension.dbcp.impl.XADataSourceImpl" >
> <!-- for Oracle -->
> <property name="driverClassName">"oracle.jdbc.OracleDriver"</property>
> <!-- env_real -->
> <property name="URL">"jdbc:oracle:thin:@xxxxxxxx:xxxx:xxxx"</property>
> <property name="user">"xxxxxxxx"</property>
> <property name="password">"xxxxxxxx"</property>
> </component>
>
Seasar-user メーリングリストの案内