Hey folks,

I'm trying to expose an activemq broker via jmx across a network. i.e.
activemq broker on box1, jconsole on box2.

Here's the config I've been playing with:
In the bin/activemq shell script:

          SUNJMX="-Dcom.sun.management.jmxremote 
                        #-Djava.rmi.server.hostname=?.?.?.?"
                        #-Dcom.sun.management.jmxremote.port=60606 
                        #-Dcom.sun.management.jmxremote.authenticate=false 
                        #-Dcom.sun.management.jmxremote.ssl=false               
        

where I've tried both with and without the currently commented entries.
The hostname I've tried variously as 0.0.0.0, 127.0.0.1, localhost, the
network Ip and the network name of the server.

For the broker config:

<broker xmlns="http://activemq.apache.org/schema/core"; 
   ...
   useJmx="true">

       <managementContext>
            <managementContext 
                useMBeanServer="???" 
                createMBeanServer="???"
                createConnector="???"
                connectorHost="?.?.?.?" 
                connectorPort="60606" 
                connectorPath="/activemq"/>
        </managementContext>

</broker>

Where I've tried all combinations of the true/false variables (e.g.
createMBeanServer and createConnector) and the same or different
combinations of connectorHost as I mentioned for the shell script vmargs
config.

So, I can get the jmx to expose locally with the following setup:
 SUNJMX="-Dcom.sun.management.jmxremote 
                        -Djava.rmi.server.hostname=127.0.0.1"
                        #-Dcom.sun.management.jmxremote.port=60606 
                        #-Dcom.sun.management.jmxremote.authenticate=false 
                        #-Dcom.sun.management.jmxremote.ssl=false       
       
      <managementContext>
            <managementContext 
                useMBeanServer="true" 
                createMBeanServer="false"
                createConnector="true"
                connectorHost="127.0.0.1" 
                connectorPort="60606" 
                connectorPath="/activemq"/>
        </managementContext>

Any other configuration either gives me a NullPointer for a non-existent
MBeanServer (e.g. with too many false values) or this:

WARN | Failed to start jmx connector: Cannot bind to URL
[rmi://127.0.0.1:60606/activemq]: javax.naming.NoPermissionException [Root
 exception is java.rmi.ServerException: RemoteException occurred in server
thread; nested exception is: 
        java.rmi.AccessException: Cannot modify this registry]

The only semi-relevant reference I found on this is 4 years old and didn't
get me anywhere either:
http://forum.springsource.org/archive/index.php/t-26140.html. 

All told, this is beginning to really pee me off quite a bit. I've been at
this for 2 days patiently going through the config combinations and online
doco. So... any thoughts, suggestions, fixes or workarounds very much
appreciated

Cheers
Alastair








-- 
View this message in context: 
http://old.nabble.com/JMR-remoting-issue-tp28096104p28096104.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to