2 Replies Latest reply on Aug 26, 2015 7:01 AM by ninjasftw

    RHQ connecting to Websphere

    ninjasftw

      Hi,

       

      I was hoping to find anyone out there that has successfully managed to connect to a running Websphere (6.1 or 8+) instance over jmx.

       

      I am doing a JMX resource import from the inventory and selecting the Websphere template and using the following values

       

      Type: Websphere

      Connector Address:  service:jmx:iiop://127.0.0.1:11002/jndi/JMXConnector  (I have confirmed that the 11002 is the correct port and can use jconsole to connect to it.)

      Install URI: /opt/was/ws8.5/inst01

      Additional Class Path Entries: /apps/was/ws8.5/inst01/runtimes/com.ibm.ws.admin.client_8.5.0.jar

       

      I get the error message from the agent log at the bottom.

       

      JMX is enabled as I can connect through using jconsole etc. 

      The node agent is running using the JVM provided with Websphere (although have tried with the Oracle one as well).

      I'm not sure if there is an extra library I need to include in the class path.

       

      Are there extra debug statements that can be enabled on the agent to see what string its trying to pass to Websphere?

       

      2015-08-25 16:40:50,001 ERROR [WorkerThread#0[10.107.1.169:49425]] (rhq.core.pc.inventory.InventoryManager)- Manual add failed for resource of type [JMX Server] and parent resource id [11071]

      java.lang.reflect.UndeclaredThrowableException

              at com.sun.proxy.$Proxy79.discoverResource(Unknown Source)

              at org.rhq.core.pc.inventory.InventoryManager.discoverResource(InventoryManager.java:510)

              at org.rhq.core.pc.inventory.InventoryManager.manuallyAddResource(InventoryManager.java:955)

              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.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184)

              at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

              at java.lang.reflect.Method.invoke(Method.java:611)

              at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:69)

              at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

              at java.lang.reflect.Method.invoke(Method.java:611)

              at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:272)

              at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:106)

              at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:40)

              at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:220)

              at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:132)

              at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:276)

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:847)

              at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:783)

              at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:286)

              at com.sun.proxy.$Proxy2.execute(Unknown Source)

              at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:286)

              at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:180)

              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)

              at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:798)

              at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:751)

              at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)

              at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      Caused by: java.lang.Exception: Discovery component invocation failed.

              at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:309)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)

              at java.util.concurrent.FutureTask.run(FutureTask.java:149)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

              at java.lang.Thread.run(Thread.java:784)

      Caused by: java.lang.RuntimeException: Failed to connect to JVM with connector address [service:jmx:iiop://127.0.0.1:11002/jndi/JMXConnector].

              at org.rhq.plugins.jmx.JMXDiscoveryComponent.discoverResource(JMXDiscoveryComponent.java:243)

              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.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:305)

              ... 5 more

      Caused by: org.mc4j.ems.connection.EmsConnectException: Could not connect [service:jmx:iiop://127.0.0.1:11002/jndi/JMXConnector] java.lang.NullPointerException

              at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:106)

              at org.rhq.plugins.jmx.JMXDiscoveryComponent.discoverResource(JMXDiscoveryComponent.java:236)

              ... 10 more

      Caused by: java.lang.NullPointerException

              at java.util.Hashtable.put(Hashtable.java:877)

              at java.util.Properties.setProperty(Properties.java:681)

              at org.mc4j.ems.impl.jmx.connection.support.providers.WebsphereConnectionProvider.doConnect(WebsphereConnectionProvider.java:139)

              at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:101)

              ... 11 more

        • 1. Re: RHQ connecting to Websphere
          pathduck

          Hello Karl,

          generally speaking, from my experience enabling JMX in WAS is not the way to go. WAS does not expose a lot of information over JMX anyway, even if you manage to actually connect after a lot of hassle and guesswork. Needless to say this is not well-documented from IBM.

           

          I think a better solution would be a custom plugin, and turns out someone's already made one that seems to work. Unable to copy+paste the URL but search google for rhq-websphere-plugin on code.google.com.

           

          We have quite a number of WAS installations, and have been thinking about using RHQ/JON to monitor them (instead of Tivoli).

           

          Now, if Redhat would create an official WAS plugin that would be awesome (hint, hint )

          • 2. Re: RHQ connecting to Websphere
            ninjasftw

            Hi Stian,

             

            I did have a look at the plugin but had some trouble getting it working with WS8.5.  Will continue looking into it but I suspect it may require a fair amount of redesign