[jbosstools-issues] [JBoss JIRA] (JBIDE-23130) JMX connection to remote server does not work (fs operations, runtime)

Martin Malina (JIRA) issues at jboss.org
Thu Nov 10 10:02:00 EST 2016


    [ https://issues.jboss.org/browse/JBIDE-23130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13320430#comment-13320430 ] 

Martin Malina commented on JBIDE-23130:
---------------------------------------

As I said in the description, if I expose management port, I hit JBIDE-20108 - fails to authenticate. But it turns out it was wrong server setup on my part:
{quote}
So, after much struggling and pain, it turns out that I was missing one magical ingredient: When you add your admin user (using $SERVER_HOME/bin/add-user.sh on the remote host), you will be asked this question:
Is this new user going to be used for one AS process to connect to another AS process? 
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
I always answered no as I thought that I didn't need this. It turns out that if I answer yes, remote jmx actually works as expected.
{quote}

And to answer this question:
{quote}
Anyway, I think we didn't need to expose the management port in the past. Or did we?
{quote}
Rob says:
{quote}
[3:58 PM] Rob Stryker: ong ago we didnt bc it was always exposing mgmt port
[3:58 PM] Rob Stryker: and that was kinda wrong to do
[3:58 PM] Rob Stryker: i mean we would always make it expose mgmt
[3:58 PM] Rob Stryker: by default
{quote}

I'm fine with this and we should close this issue.

> JMX connection to remote server does not work (fs operations, runtime)
> ----------------------------------------------------------------------
>
>                 Key: JBIDE-23130
>                 URL: https://issues.jboss.org/browse/JBIDE-23130
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jmx
>    Affects Versions: 4.4.1.Final
>            Reporter: Martin Malina
>            Assignee: Rob Stryker
>             Fix For: 4.4.2.Final
>
>
> This is basically a follow up of JBIDE-22741.
> It turns out even if I have a local runtime, jmx connection to a remote fs server still doesn't work for me.
> 1. Set up a remote WildFly 8.2 server over ssh (use fs operations, local runtime)
> 2. Make sure the user is set up correctly both on the server and in server editor in Eclipse
> 3. Start the remote server
> 4. Try to connect to the server in JMX Navigator
> You'll get this in the error log view:
> {code}
> Error connecting to jmx for server WildFly  8.2 marvin
> org.jboss.tools.jmx.core.JMXException: There was an error connecting to WildFly  8.2 marvin via JMX.  Please ensure your server is up and exposes its management ports via the -Djboss.bind.address.management=yourwebsite.com launch arguments
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBoss71ServerConnection.createConnection(JBoss71ServerConnection.java:98)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:211)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:162)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connectToStartedServer(JBossServerConnection.java:341)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connect(JBossServerConnection.java:76)
> 	at org.jboss.tools.jmx.core.ConnectJob.run(ConnectJob.java:29)
> 	at org.jboss.tools.jmx.ui.internal.actions.DoubleClickAction$1.run(DoubleClickAction.java:71)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
> 	at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)
> 	at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
> 	at ...asynchronous invocation...(Unknown Source)
> 	at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)
> 	at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253)
> 	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351)
> 	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:335)
> 	at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:232)
> 	at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:151)
> 	at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:102)
> 	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBoss71ServerConnection.createConnection(JBoss71ServerConnection.java:84)
> 	... 7 more
> {code}
> {code}
> There was an error connecting to WildFly  8.2 marvin via JMX.  Please ensure your server is up and exposes its management ports via the -Djboss.bind.address.management=yourwebsite.com launch arguments
> java.net.ConnectException: Connection refused
> 	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> 	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
> 	at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)
> 	at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
> 	at ...asynchronous invocation...(Unknown Source)
> 	at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)
> 	at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253)
> 	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351)
> 	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:335)
> 	at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:232)
> 	at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:151)
> 	at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:102)
> 	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBoss71ServerConnection.createConnection(JBoss71ServerConnection.java:84)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:211)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:162)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connectToStartedServer(JBossServerConnection.java:341)
> 	at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connect(JBossServerConnection.java:76)
> 	at org.jboss.tools.jmx.core.ConnectJob.run(ConnectJob.java:29)
> 	at org.jboss.tools.jmx.ui.internal.actions.DoubleClickAction$1.run(DoubleClickAction.java:71)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {code}
> So it tells me that I need to expose the managerment port. But we never did that for fs operations, no? And indeed it's not exposed:
> {code}
>  2810 pts/1    Sl     0:06              \_ java -Dprogram.name=JBossTools: WildFly  8.2 marvin -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/home/rasp/jbossqa/runtimes/wildfly-8.2.0.Final/standalone/log/boot.log -Dlogging.configuration=file:/home/rasp/jbossqa/runtimes/wildfly-8.2.0.Final/standalone/configuration/logging.properties -Djboss.home.dir=/home/rasp/jbossqa/runtimes/wildfly-8.2.0.Final -Dorg.jboss.logmanager.nocolor=true -jar /home/rasp/jbossqa/runtimes/wildfly-8.2.0.Final/jboss-modules.jar -mp /home/rasp/jbossqa/runtimes/wildfly-8.2.0.Final/modules -jaxpmodule javax.xml.jaxp-provider -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b 0.0.0.0 --server-config=standalone.xml -Djboss.server.base.dir=/home/rasp/jbossqa/runtimes/wildfly-8.2.0.Final/standalone
> {code}
> But even if I do expose the management port, it still won't work - then I hit JBIDE-20108 .
> Anyway, I think we didn't need to expose the management port in the past. Or did we?



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jbosstools-issues mailing list