David's Technical Note

[WebLogic Administration] JDBC connection Error 로 인한 WebLogic Server instance가 Admin mode로 빠지는 현상 본문

Product Engineering/2. Oracle Weblogic

[WebLogic Administration] JDBC connection Error 로 인한 WebLogic Server instance가 Admin mode로 빠지는 현상

David Joo 2012. 6. 20. 16:00

 

1. 테스트 구성 환경

1.1 WAS: WebLogic Server 9.2 MP3

     - 도메인1에 Single Server Instance 구성

     - 도메인2에 Server Clustering 구성

1.2 DB: Oracle Database 11g R2

1.3 OS: Linux  2.6.18-194.32.1.el5 #1  x86_64 x86_64 x86_64 GNU/Linux

1.4 Application Deployment는 없음

 

2.  테스트 목적

도메인별 Single instance와 Server Clustering이 DB와 Connection이 fail 되면 각 서버가 재기동시 정상적으로 기동하는가?

 

3. 테스트 방법

1. 각 도메인 별 single Server Instance 와 Server Clustering 구성

2. JDBC connection Pool을 이용하여 DB에 연결

3. DB 서버 shutdown 시킴

4. WebLogic Server  재기동 시킨다.

5. 각 구성 별(single Server Instance 와 Server Clustering ) stdout 로그 확인

 

4. 테스트 결과

 

4.1 single Server  구성에서 서버 재기동시 DB connection이 fail상태를 보이는 로그는 보여주나 서버는 RUNNING 상태로 기동됨

<2012. 6. 20 오후 3시 35분 48초 KST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'jdbc_base1' due to error weblogic.application.ModuleException: .
weblogic.application.ModuleException:
        at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:268)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
        Truncated. see log file for complete stacktrace
weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
127.0.0.1:1521:orcl

        at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:237)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1096)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1020)
        at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:206)
        at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1186)
        Truncated. see log file for complete stacktrace
>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2012. 6. 20 오후 3시 35분 48초 KST> <Warning> <Server> <BEA-002611> <Hostname "WEBWAS", maps to multiple IP addresses: 210.133.233.333, 127.0.0.1>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 210.133.233.333:16000 for protocols iiop, t3, ldap, http.>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:16000 for protocols iiop, t3, ldap, http.>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "base1_domain" running in Development Mode>
<2012. 6. 20 오후 3시 35분 48초 KST> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 210.133.233.333, 127.0.0.1>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<2012. 6. 20 오후 3시 35분 48초 KST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

 

 

4.2 Server Clustering 구성에서 서버 재기동시  Admin mode로 시작함

==============================================================================

 <2012. 6. 19 오후 4시 50분 57초 KST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'JDBC Data Source-0' due
to error weblogic.application.ModuleException: .
weblogic.application.ModuleException:
        at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:268)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
        Truncated. see log file for complete stacktrace
weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception wa
s: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
127.0.0.1:1521:orcl

        at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:237)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1096)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1020)
        at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:206)
        at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1186)
        Truncated. see log file for complete stacktrace
>
<2012. 6. 19 오후 4시 50분 57초 KST> <Emergency> <Deployer> <BEA-149259> <Server 'M1' in cluster 'clusterM' is being brought up in a
dministration state due to failed deployments.>
<2012. 6. 19 오후 4시 50분 57초 KST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster succe
ssfully. Log messages will now be broadcasted to the domain log.>
<2012. 6. 19 오후 4시 50분 57초 KST> <Notice> <Cluster> <BEA-000138> <Listening for announcements from cluster clusterM on 239.192.1
.1:7001.>
<2012. 6. 19 오후 4시 50분 57초 KST> <Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of clusterM.
>
<2012. 6. 19 오후 4시 51분 27초 KST> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 210.133.233.333, 127.0.0.1>
<2012. 6. 19 오후 4시 51분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:8401 for pro
tocols iiop, t3, ldap, http.>
<2012. 6. 19 오후 4시 51분 27초 KST> <Warning> <Server> <BEA-002611> <Hostname "WEBWAS", maps to multiple IP addresses: 210.133.233.333, 127.0.0.1>
<2012. 6. 19 오후 4시 51분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 210.133.233.333:8401 for p
rotocols iiop, t3, ldap, http.>
<2012. 6. 19 오후 4시 51분 27초 KST> <Notice> <WebLogicServer> <BEA-000332> <Started WebLogic Managed Server "M1" for domain "cluste
r_domain" running in Development Mode>
<2012. 6. 19 오후 4시 51분 27초 KST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster succe
ssfully. Log messages will now be broadcasted to the domain log.>
<2012. 6. 19 오후 4시 51분 28초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2012. 6. 19 오후 4시 51분 28초 KST> <Notice> <WebLogicServer> <BEA-000360> <Server started in ADMIN mode>

=================================================================================

 

5. Admin mode -> Running mode로 변경하는 방법

DB connection 상태에 관계없이 WebLogic Server를 Admin mode -> Running mode로 강제로 변경하고자 한다면 WebLogic Admin Console 화면에서 Servers > ${해당서버인스턴스} > control > Resume 버튼을 누르면 아래와 같은 추가 로그와 함께 RUNNING 상태로 변경됨

<2012. 6. 19 오후 4시 58분 22초 KST> <Alert> <WebLogicServer> <BEA-000396> <Server unlock has been requested by weblogic>
<2012. 6. 19 오후 4시 58분 22초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2012. 6. 19 오후 4시 58분 22초 KST> <Notice> <Cluster> <BEA-000102> <Joining cluster clusterM on 239.192.1.1:7001>
<2012. 6. 19 오후 4시 58분 22초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>