Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-15297

Error when restarting EAP 5.2 with JMX poller

XMLWordPrintable

    • Hide

      1. Add EAP 5.2 server (I used the noauth distro, but rhopp used the normal one with same result)
      2. In server view, double-click the server to open the server editor.
      3. Make sure Startup poller is set to JMX and Shutdown poller is set to Web port
      4. Save the editor and start the server - server will start fine, no exceptions in error log
      5. When the server is started, restart it from the server view
      6. Wait a couple of seconds and you will see this error in the Error view:

      org.jboss.tools.jmx.core.JMXException: Error connecting to remote JMX. Please ensure your server is properly configured for JMX access.
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:156)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:127)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:116)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connectToStartedServer(JBossServerConnection.java:239)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection$1.run(JBossServerConnection.java:231)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
      Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
      	java.net.ConnectException: Connection refused]
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:886)
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
      	at javax.naming.InitialContext.lookup(InitialContext.java:411)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.createConnection(JBossServerConnection.java:170)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:143)
      	... 5 more
      Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
      	java.net.ConnectException: Connection refused
      	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
      	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
      	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
      	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
      	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
      	at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
      	at com.sun.proxy.$Proxy14.lookup(Unknown Source)
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:753)
      	... 9 more
      Caused by: java.net.ConnectException: Connection refused
      	at java.net.PlainSocketImpl.socketConnect(Native Method)
      	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
      	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      	at java.net.Socket.connect(Socket.java:579)
      	at java.net.Socket.connect(Socket.java:528)
      	at java.net.Socket.<init>(Socket.java:425)
      	at java.net.Socket.<init>(Socket.java:208)
      	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
      	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
      	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
      	... 16 more
      

      Also, the server will be shown as Started in the server view well before the starting has finished

      Show
      1. Add EAP 5.2 server (I used the noauth distro, but rhopp used the normal one with same result) 2. In server view, double-click the server to open the server editor. 3. Make sure Startup poller is set to JMX and Shutdown poller is set to Web port 4. Save the editor and start the server - server will start fine, no exceptions in error log 5. When the server is started, restart it from the server view 6. Wait a couple of seconds and you will see this error in the Error view: org.jboss.tools.jmx.core.JMXException: Error connecting to remote JMX. Please ensure your server is properly configured for JMX access. at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:156) at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:127) at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:116) at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connectToStartedServer(JBossServerConnection.java:239) at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection$1.run(JBossServerConnection.java:231) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:886) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713) at javax.naming.InitialContext.lookup(InitialContext.java:411) at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.createConnection(JBossServerConnection.java:170) at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:143) ... 5 more Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148) at com.sun.proxy.$Proxy14.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:753) ... 9 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.<init>(Socket.java:425) at java.net.Socket.<init>(Socket.java:208) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613) ... 16 more Also, the server will be shown as Started in the server view well before the starting has finished

      When you have EAP 5.2 set up to use JMX for startup poller and Web Port for Shutdown poller, when you start and then restart the server, you get this error:

      org.jboss.tools.jmx.core.JMXException: Error connecting to remote JMX. Please ensure your server is properly configured for JMX access.
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:156)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:127)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:116)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connectToStartedServer(JBossServerConnection.java:239)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection$1.run(JBossServerConnection.java:231)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
      Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
      	java.net.ConnectException: Connection refused]
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:886)
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
      	at javax.naming.InitialContext.lookup(InitialContext.java:411)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.createConnection(JBossServerConnection.java:170)
      	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:143)
      	... 5 more
      Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
      	java.net.ConnectException: Connection refused
      	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
      	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
      	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
      	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
      	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
      	at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
      	at com.sun.proxy.$Proxy14.lookup(Unknown Source)
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:753)
      	... 9 more
      Caused by: java.net.ConnectException: Connection refused
      	at java.net.PlainSocketImpl.socketConnect(Native Method)
      	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
      	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      	at java.net.Socket.connect(Socket.java:579)
      	at java.net.Socket.connect(Socket.java:528)
      	at java.net.Socket.<init>(Socket.java:425)
      	at java.net.Socket.<init>(Socket.java:208)
      	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
      	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
      	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
      	... 16 more
      

      This is a common error indicating you don't have the credentials right, but it's not the case here - on the first start everything was ok.
      In this case when the server is restarting, it is shown in the server view as Started before it actually is started and maybe that's the problem - the tooling then tries to connect via JMX prematurely and fails.

              rob.stryker Rob Stryker (Inactive)
              exd-mmalina Martin Malina
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: