JMX调用会导致WebSphere ND 8.5的org.omg.CORBA.UNKNOWN问题

时间:2018-11-18 14:38:07

标签: java java-ee websphere jmx

我想创建一个监视应用程序,我们目前正在计划使用JMX。我们使用javax代替IBM的管理瘦客户端来创建连接。

在远程客户端和服务器之间成功建立并建立连接,并且MBean的简单queryNames调用可以正常工作。但是,在每次调用时,Websphere都会返回以下错误消息:

org.omg.CORBA.UNKNOWN: 
at com.sun.corba.se.spi.servicecontext.UEInfoServiceContext.<init>(UEInfoServiceContext.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.sun.corba.se.spi.servicecontext.ServiceContextData.makeServiceContext(ServiceContextData.java:132)
at com.sun.corba.se.spi.servicecontext.ServiceContexts.unmarshal(ServiceContexts.java:216)
at com.sun.corba.se.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:378)
at com.sun.corba.se.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:366)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:530)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:373)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:148)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:475)
at com.sun.jmx.remote.protocol.iiop.ProxyStub._invoke(Unknown Source)
at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:1020)
at custom.app.service.JMXServiceImpl.invokeMBean(JMXServiceImpl.java:115)
at custom.app.service.StatisticsServiceImpl.processStatistics(StatisticsServiceImpl.java:37)
at custom.app.controller.JMXServiceController.processStatistics(JMXServiceController.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

代码段如下:

@Override
public void connect(String hostName, String port, String userName, String password, String jndiPath) throws IOException
{
    final String serviceURL = "service:jmx:iiop://" + hostName + "/jndi/corbaname:iiop:" + hostName + ":" + port + "/" + jndiPath;
    logger.debug("Connecting to: {}", serviceURL);
    JMXServiceURL jmxUrl = new JMXServiceURL(serviceURL);

    Hashtable<String, Object> environmentProperties = new Hashtable<String, Object>();
    environmentProperties.put(JMXConnector.CREDENTIALS, new String[] { userName, password });

    JMXConnector jmxConnector = JMXConnectorFactory.connect(jmxUrl, environmentProperties);
    this.mBeanServerConnection = jmxConnector.getMBeanServerConnection();

    logger.info("JMX connection is ready");
}

invoke方法如下:

@Override
public Object invokeMBean(ObjectName objectName, Boolean recursive) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException
{
    String[] signature = new String[] { objectName.getClass().getName() };
    Object[] params = new Object[] { objectName };
    Object result = mBeanServerConnection.invoke(objectName, "getConfig", params, signature);

    return result;
}

在dmgr跟踪日志中,通常我可以看到相同的错误,但是不清楚问题出在什么地方:

[11/17/18 22:00:46:232 CET] 00006f24 CSIServerRI   3   The following exception occurred on the server, sending context error back to client: 
>> SERVER (id=144d42ac, host=remote.local.ad) TRACE START:
>>    org.omg.CORBA.NO_IMPLEMENT: No implementation found for RMI:org.apache.soap.SOAPException:09837B2ECD046021:1E4F3A38EC1D0A62  vmcid: OMG  minor code: 1 completed: Maybe
>>   at com.ibm.rmi.io.FVDCodeBaseImpl.implementation(FVDCodeBaseImpl.java:114)
>>   at com.ibm.org.omg.SendingContext.CodeBase_Tie.implementation(CodeBase_Tie.java:152)
>>   at com.ibm.org.omg.SendingContext.CodeBase_Tie._invoke(CodeBase_Tie.java:84)
>>   at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:628)
>>   at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:510)
>>   at com.ibm.rmi.iiop.ORB.process(ORB.java:607)
>>   at com.ibm.CORBA.iiop.ORB.process(ORB.java:1583)
>>   at com.ibm.rmi.iiop.Connection.doRequestWork(Connection.java:3166)
>>   at com.ibm.rmi.iiop.Connection.doWork(Connection.java:3030)
>>   at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:64)
>>   at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>>   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
>> SERVER (id=144d42ac, host=remote.local.ad) TRACE END.

由于跟踪日志中出现“ CSIServerRI”错误,我怀疑这可能是由于安全性丢失配置引起的,但是不幸的是,目前尚不清楚服务器上需要更改什么配置或需要提供什么参数客户端应用。

如果有人可以突出显示缺失的部分,我将不胜感激。有没有在这方面有经验并可以提供帮助的人?

谢谢您的帮助。

0 个答案:

没有答案