[jboss-dev-forums] [JBoss AS7 Development] - Re: Remote JMX connector for AS7

Thomas Diesler do-not-reply at jboss.com
Tue Oct 19 05:48:16 EDT 2010


Thomas Diesler [http://community.jboss.org/people/thomas.diesler%40jboss.com] created the discussion

"Re: Remote JMX connector for AS7"

To view the discussion, visit: http://community.jboss.org/message/567113#567113

--------------------------------------------------------------
We are still having a hard time to get this to work, which is a prerequisite for all remote OSGi testing (e.g. our Arquillian Hudson integration)

I modifid the JMXConnectorService such that it is more explicit in the URL and also setup a test case that checks the JSR160 connection

 http://github.com/jbosgi/jboss-as/commit/78dc6049fd64389ff2e1a9a50e78e6edb213a0ea http://github.com/jbosgi/jboss-as/commit/78dc6049fd64389ff2e1a9a50e78e6edb213a0ea

> [tdiesler at tdvaio jmx]$ mvn -Dtest=JMXConnectorTestCase test
> 
> Running org.jboss.as.jmx.JMXConnectorTestCase
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.278 sec

The above sets up the JMXConnectorServer in @BeforeClass and checks whether the MBeanServer can be obtained through the connection.

However, in the remote schenario with AS running I get

> [tdiesler at tdvaio jmx]$ mvn -Djmx.remote=true -Dtest=JMXConnectorTestCase test
> 
> java.rmi.ConnectException: Connection refused to host: 192.168.0.101; nested exception is: 
>      java.net.ConnectException: Connection refused
>      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
>      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
>      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
>      at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
>      at sun.rmi.registry.RegistryImpl_Stub.list(Unknown Source)
>      at org.jboss.as.jmx.JMXConnectorTestCase.beforeClass(JMXConnectorTestCase.java:71) 

The issue seems to be that remote access of the RMI registry fails already.

>             // Check if the RMI registry is running. With AS started this should succeed.
>             Registry registry = LocateRegistry.getRegistry(host.getHostAddress(), rmiPort);
>             String[] objectNames = registry.list();
>             assertNotNull("Registered RMI objects", objectNames);

Any idea, why a remote client cannot access the registry that AS exports?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/567113#567113]

Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101019/0afe522d/attachment.html 


More information about the jboss-dev-forums mailing list