-
1. Re: How to connect to MBean Server in JBoss 7.1.0
dlofthouse Mar 16, 2012 11:48 AM (in response to nestorjb)The provider for the remoting-jmx URL should be located automatically by searchign the classpath but FYI the provider is 'org.jboss.remoting3.jmx.RemotingConnectorProvider'.
Regarding the classes, if you just want a single jar then {jboss.home}/bin/client/jboss-client.jar should be sufficient.
For a maven dependency you need : -
However please note that from 7.1.1.Final this will change to: -
The provider then becomes 'org.jboss.remotingjmx.RemotingConnectorProvider'
-
2. Re: How to connect to MBean Server in JBoss 7.1.0
nestorjb Mar 16, 2012 12:13 PM (in response to dlofthouse)WOW Thanks a lot
I added the library and got that It couldn't find a XNIO provider so I added xnio-nio.jar and it worked. But now I'm getting:
Authentication failed: all available authentication mechanisms failed
In JBoss 6.1.0 the connection was open. Which authencation must I set to make it work?
Regards,
Néstor Boscán
-
3. Re: How to connect to MBean Server in JBoss 7.1.0
dlofthouse Mar 16, 2012 1:00 PM (in response to nestorjb)You are connecting to port 9999 so I assume this is standalone mode (let me know if this is not correct)
This means you will need to specify the username and password of a user in the management realm - if you have not already added one you can use the add-user.sh script in the bin folder of the AS installation.
What is the actual client you are using to connect? At the moment the username / password handling is modelled on how jconsole supply these when establishing a connection.
-
4. Re: How to connect to MBean Server in JBoss 7.1.0
nestorjb Mar 16, 2012 4:32 PM (in response to dlofthouse)Yes I did that with this code:
env.put(JMXConnector.CREDENTIALS, new String[] { username, password });
jmxConnector = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
But I'm still getting the same error. The user and password was created using add-user.sh and it works with the Administration Console.
-
5. Re: How to connect to MBean Server in JBoss 7.1.0
nestorjb Mar 18, 2012 8:55 PM (in response to nestorjb)I changed the code from:
jmxConnector = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
jmxConnector.connect();
to
jmxConnector = JMXConnectorFactory.connect(serviceUrl, env);And I think it passes the login fase but now I'm getting:
Operation failed with status WAITING
Somewhere I read that I should change in standalone.xml any reference to 127.0.0.1 to the IP of the server but I'm still getting the same error.
-
6. Re: How to connect to MBean Server in JBoss 7.1.0
nestorjb Mar 22, 2012 11:01 PM (in response to nestorjb)I fix the URL. I had to take out the /jmxri at the end. Now I'm getting:
RuntimeException: Could not find a marshaller factory for river marshalling strategy
This looks like a library is missing
-
7. Re: How to connect to MBean Server in JBoss 7.1.0
dlofthouse Mar 23, 2012 8:05 AM (in response to nestorjb)The easiest jar to use would be the one under bin/client of your AS7 installation as that should contain everything you need - alternatively it sounds like you are missing the jboss-marshalling-river-1.3.11.GA.jar which can be found within the modules structure.
-
8. Re: How to connect to MBean Server in JBoss 7.1.0
nestorjb Mar 23, 2012 8:12 AM (in response to dlofthouse)Yes with that library worked. So to this are the dependencies that I had to use to make the connection work:
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.remoting3</groupId>
<artifactId>remoting-jmx</artifactId>
<version>1.0.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
<version>3.0.0.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling-river</artifactId>
<version>1.3.7.GA</version>
<scope>provided</scope>
</dependency>
Regards,
Néstor Boscán
-
9. Re: How to connect to MBean Server in JBoss 7.1.0
dlofthouse Mar 23, 2012 8:20 AM (in response to nestorjb)I have created the following Jira issue: -
https://issues.jboss.org/browse/REMJMX-38
For something like this it probably would make more sense for clients to just have a single Remoting JMX dependency without needing to add additional dependencies.