본문 바로가기
트러블슈팅/MW

[웹로직] WLST Exception, CompatabilityMBeanServer is disabled via the JMXMBean

by sangyeon 2021. 8. 9.
728x90

WebLogic 12c 버전에서 WLST로 인스턴스 정보 조회 시에 아래와 같이 Exception이 떨어졌다.

[weblogic@sydev bin]$ pwd
/home/weblogic/wls12213/oracle_common/common/bin
[weblogic@sydev bin]$ ./wlst.sh
 
Initializing WebLogic Scripting Tool (WLST) ...
 
Welcome to WebLogic Server Administration Scripting Shell
 
Type help() for help on available commands

 

wls:/offline> connect('weblogic','weblogic1','192.168.56.106:10011')
Connecting to t3://192.168.56.106:10011 with userid weblogic ...

The CompatabilityMBeanServer is not initialized properly. 
This might happen if the CompatabilityMBeanServer is 
disabled via the JMXMBean.
 
To view the root cause exception use dumpStack()
java.io.IOException: While trying to lookup 'weblogic.management.mbeanservers.domainruntime' didn't find subcontext 'management'. Resolved 'weblogic'
at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:237)
at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:120)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:369)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at weblogic.management.scripting.WLSTHelper.lookupMBeanServerConnection(WLSTHelper.java:683)
at weblogic.management.scripting.WLSTHelper.initDomainRuntimeServerConnection(WLSTHelper.java:431)
at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:315)
at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:200)
at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:67)
at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx7.connect$1(<iostream>:13)
at org.python.pycode._pyx7.call_function(<iostream>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx23.f$0(<console>:1)
at org.python.pycode._pyx23.call_function(<console>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Unknown Source)
at org.python.core.Py.exec(Unknown Source)
at org.python.util.PythonInterpreter.exec(Unknown Source)
at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at weblogic.management.scripting.utils.WLSTInterpreter.runsource(WLSTInterpreter.java:910)
at weblogic.management.scripting.WLST.main(WLST.java:217)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at weblogic.WLST.main(WLST.java:29)
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.management.mbeanservers.domainruntime' didn't find subcontext 'management'. Resolved 'weblogic' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'weblogic.management.mbeanservers.domainruntime' didn't find subcontext 'management'. Resolved 'weblogic']; remaining name 'management/mbeanservers/domainruntime'
at weblogic.utils.StackTraceDisabled.unknownMethod()
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.management.mbeanservers.domainruntime' didn't find subcontext 'management'. Resolved 'weblogic'

-> "The CompatabilityMBeanServer is not initialized properly" Occurs when run WLST (Doc ID 2514329.1)

오라클 문서 확인 결과, 

원인은 Different version of WebLogic binaries used on the client side to connect to remote WebLogic server.

 

예를 들어, WebLogic 기동은 12.2.1.3 버전으로 기동하고 WebLogic 12.1.3(다른 버전)의 엔진의 binary 파일인 wlst를 실행하여 인스턴스 정보를 가져오려고 할 때 발생하는 에러 메시지 이다.

 

아마 고객사에서 WL_HOME이 엉뚱한 버전의 WL_HOME으로 잡힌 상태에서 wlst 스크립트를 돌려서 발생한 에러이지 싶다.

 

그래서 웬만하면 위와 같은 에러가 발생할 경우 홈 경로를 절대경로로 잡고 실행하는 것이 안전하다고 생각한다.

 

728x90