2017-06-27 5 views
0

私はPayaraサーバー4.1.1.164の問題に直面しています。Java、Glassfish、接続が閉じている

ログに、エラーが検出されました。最初に接続がリセットされ、すべての接続がエラーで使用できなくなりました。接続が閉じられています。

すべてを元に戻すにはアプリケーションを再起動する必要がありますが、そうしないと接続が再構築されません。

次はコールスタックです。申し訳ありませんが、クエリを非表示にする必要があります。

どうすればこのエラーを再生できますか、同じエラーを回避するにはどうすればよいですか?何かがデータ層(JDBC)でソケット接続に間違っているため、メッセージが発生した

domain.xmlの

<jdbc-connection-pool match-connections="true" validate-atmost-once-period-in-seconds="60" connection-creation-retry-attempts="15" statement-leak-reclaim="true" validation-table-name="dbo.UBConnectionTest" res-type="javax.sql.ConnectionPoolDataSource" connection-creation-retry-interval-in-seconds="6" max-pool-size="30" max-wait-time-in-millis="30000" datasource-classname="com.microsoft.sqlserver.jdbc.SQLServerXADataSource" idle-timeout-in-seconds="1500" name="xxxxxPool" is-connection-validation-required="true" init-sql="select 1 from UBConnectionTest"> 
    <property name="serverName" value="xxxxx.xxxxx.xxxx.xxx"></property> 
    <property name="portNumber" value="1433"></property> 
    <property name="databaseName" value="xxxx"></property> 
    <property name="user" value="xxxx"></property> 
    <property name="password" value="xxxxxxxx"></property> 
    <property name="encrypt" value="true"></property> 
    <property name="url" value="jdbc:sqlserver://xxxx.xxxxx.xxxx.xxxx:1433;database=xxxxx;user=xxxxx;password=xxxxxxxx;encrypt=true;hostNameInCertificate=*.xxx.xxxx.xxxx;loginTimeout=30;trustServerCertificate=true;"></property> 
</jdbc-connection-pool> 


[#|2017-06-06T05:40:53.597+0000|INFO|Payara 4.1|org.eclipse.persistence.session./file:/opt/payara41/glassfish/domains/domain1/applications/HEMPlatform-ear/HEMPlatform-ejb_jar/_HEMPlatformFNDPU.query|_ThreadID=25;_ThreadName=http-thread-pool(1);_TimeMillis=1496727653597;_LevelValue=800;| 
    Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.qualifier): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset 


[#|2017-06-06T05:40:53.597+0000|INFO|Payara 4.1|org.eclipse.persistence.session./file:/opt/payara41/glassfish/domains/domain1/applications/HEMPlatform-ear/HEMPlatform-ejb_jar/_HEMPlatformFNDPU.query|_ThreadID=25;_ThreadName=http-thread-pool(1);_TimeMillis=1496727653597;_LevelValue=800;| 
    Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.qualifier): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset 
Error Code: 0 
Call: SELECT xxxxxx)) 
    bind => [2 parameters bound] 
Query: ReadAllQuery(name="xxxxx))").|#] 

[#|2017-06-06T05:40:53.598+0000|INFO|Payara 4.1|org.eclipse.persistence.session./file:/opt/payara41/glassfish/domains/domain1/applications/HEMPlatform-ear/HEMPlatform-ejb_jar/_HEMPlatformFNDPU.query|_ThreadID=25;_ThreadName=http-thread-pool(1);_TimeMillis=1496727653598;_LevelValue=800;| 
    Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.qualifier): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. 
Error Code: 0 
Call: xxxxxx)) 
    bind => [2 parameters bound] 
Query: ReadAllQuery(name="xxxxxxxxxx)").|#] 

[#|2017-06-06T05:40:56.320+0000|INFO|Payara 4.1|com.hand.glassfish.security.oauth2.OAuth2AuthModule|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656320;_LevelValue=800;| 
    token is Bearer 2fb378a7-2a33-3986-a288-35c97d358bac,userPrincipal is :null,remoteName is null|#] 

[#|2017-06-06T05:40:56.321+0000|INFO|Payara 4.1|com.hand.glassfish.security.oauth2.OAuth2AuthModule|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656321;_LevelValue=800;| 
    token is Bearer 2fb378a7-2a33-3986-a288-35c97d358bac|#] 

[#|2017-06-06T05:40:56.321+0000|INFO|Payara 4.1|com.hand.glassfish.security.oauth2.OAuth2AuthModule|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656321;_LevelValue=800;| 
    requestToke is 2fb378a7-2a33-3986-a288-35c97d358bac,sessionToken is 2fb378a7-2a33-3986-a288-35c97d358bac|#] 

[#|2017-06-06T05:40:56.321+0000|INFO|Payara 4.1|com.hand.glassfish.security.oauth2.OAuth2AuthModule|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656321;_LevelValue=800;| 
    requestToken is same from the sessionToke|#] 

[#|2017-06-06T05:40:56.321+0000|INFO|Payara 4.1|com.hand.glassfish.security.oauth2.OAuth2AuthModule|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656321;_LevelValue=800;| 
    after deal the defaultGroup length is 3|#] 

[#|2017-06-06T05:40:56.321+0000|INFO|Payara 4.1|com.hand.glassfish.security.oauth2.OAuth2AuthModule|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656321;_LevelValue=800;| 
    after deal the defaultGroup token is 2fb378a7-2a33-3986-a288-35c97d358bac|#] 

[#|2017-06-06T05:40:56.322+0000|INFO|Payara 4.1|org.eclipse.persistence.session./file:/opt/payara41/glassfish/domains/domain1/applications/HEMPlatform-ear/HEMPlatform-ejb_jar/_HEMPlatformFNDPU.query|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656322;_LevelValue=800;| 
    Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.qualifier): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. 
Error Code: 0 
Call: xxxxxxxxx) 
    bind => [2 parameters bound] 
Query: ReadAllQuery(name=xxxxxxx").|#] 

[#|2017-06-06T05:40:56.323+0000|INFO|Payara 4.1|org.eclipse.persistence.session./file:/opt/payara41/glassfish/domains/domain1/applications/HEMPlatform-ear/HEMPlatform-ejb_jar/_HEMPlatformFNDPU.query|_ThreadID=27;_ThreadName=http-thread-pool(3);_TimeMillis=1496727656323;_LevelValue=800;| 
    Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.qualifier): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. 
Error Code: 0 
Call:xxxxxxx)) 
    bind => [2 parameters bound] 
Query: ReadAllQuery(name="xxxxxxxxxxxx)").|#] 

[#|2017-06-06T05:40:58.596+0000|INFO|Payara 4.1|org.eclipse.persistence.session./file:/opt/payara41/glassfish/domains/domain1/applications/HEMPlatform-ear/HEMPlatform-ejb_jar/_HEMPlatformFNDPU.query|_ThreadID=25;_ThreadName=http-thread-pool(1);_TimeMillis=1496727658596;_LevelValue=800;| 
    Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.qualifier): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. 

答えて

0

。アプリケーションサーバーで使用可能な接続が不十分である場合は接続プールを調べ、アプリケーションサーバーとデータベースサーバーでSSLを使用している場合はTLSバージョンも確認してください。

0

GlassFishでJDBC接続エラーが発生しないようにするには、まず最初に接続プールタイムアウトを増やすことができます。あなたのDBは非常に忙しく、特定の時間内にGlassFishリクエストに応答できないため、接続が正しく処理されないことがあります。 DBサーバーが稼動しており、十分なリソース(RAM、CPU、接続)​​があることを確認してください。

第2に、接続プールで使用する前に接続プールを検証し、接続プールでも構成できます。

管理コンソールでJDBC接続プールの属性を設定するには、「リソース」>「JDBC」>「接続プール」>「PoolName」の順に選択します。

タイムアウト設定 2つのタイムアウト設定があります。 - マックスは時間を待ちます。 - アイドルタイムアウト。

接続検証設定が trueの場合、プールは、アプリケーションにそれらを提供する前に、(彼らが使用可能かどうかを調べるためにチェック)の接続を検証します。ただし、接続の検証を必要とするという欠点は、プールが接続を返すたびに検証アルゴリズムを適用する必要があり、getConnection()の待ち時間にオーバーヘッドが加わることです。

関連する問題