-
1. Re: Version 2.1.1 and Remote JMX
jmesnil Jul 15, 2010 4:32 AM (in response to johnnysoccer)That's strange: I don't remember anything that changed between 2.0.0 and 2.1.1 for remote management.
This is handled directly by the JVM and HornetQ does not have any code to deal with that...
That may help: http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/guide/management/faq.html#linux1
-
2. Re: Version 2.1.1 and Remote JMX
johnnysoccer Jul 16, 2010 11:20 AM (in response to jmesnil)Still no dice. previous versions of HornetQ and other java apps are accessible remotely via JMX, but not HornetQ 2.1.1 I tried changing port numbers, installing on a different machine, windows and linux, and no luck.
Has anyone else successfully connected remotely? (nothings special, no ssl, no passwords)
-
3. Re: Version 2.1.1 and Remote JMX
mcleanl Jul 18, 2010 8:41 PM (in response to johnnysoccer)We connect all the time to version 2.1.0 remotely (using both jconsole and Hyperic). Have not upgraded to 2.1.1. I cannot find the release documentation to explain why 2.1.1 is even released. Could someone elucidate please?
-
4. Re: Version 2.1.1 and Remote JMX
johnnysoccer Jul 19, 2010 12:39 PM (in response to mcleanl)I have tested on several machines. I am able to get a connection with 2.0.0.GA, and other java applications. 2.1.0.Final and 2.1.1.Final I am not able to connect to using the exact same run.sh file that I use with 2.0.0.GA. jconsole gives me a "Connection Failed" pop us screen.
I realize this seems like it should be a JVM type of issue, but 2.1.x of hornetq is the only application I am not able to connect to. At this point, I am trying to connect to the distribution without any changes to the configuration prior to startup.
-
5. Re: Version 2.1.1 and Remote JMX
timfox Jul 19, 2010 12:49 PM (in response to johnnysoccer)I've been using jconsole to connect to a remote HQ 2.1.1.final instance all day with no problems.
You need to make sure the HornetQ server JVM is started with the following params (I have disabled authentication since I don't need it)
-D
com.sun.management.jmxremote.port=<portNumber>
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Then I simply type jconsole from the remote machine, then specify <host name>:portNumber when prompted to connect
This is just standard remote JMX stuff, nothing specific to HornetQ
The following link explains this in more detail:
http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/guide/management/agent.html#remote -
6. Re: Version 2.1.1 and Remote JMX
johnnysoccer Jul 19, 2010 1:31 PM (in response to johnnysoccer)I ended up changing the information in the hornetq-beans.xml file to point to the actual ip address instead of localhost, and now I can connect. Seems mildly unrelated, but that did the trick.
-
7. Re: Version 2.1.1 and Remote JMX
peterox Sep 6, 2010 12:15 AM (in response to johnnysoccer)I am having the exact same problem. What settings did you change in hornetq-beans.xml?
-
8. Re: Version 2.1.1 and Remote JMX
peterox Sep 6, 2010 12:17 AM (in response to johnnysoccer)Figured it out. Commenting out the JNDIServer fixed the problem.
Can anyone from Hornet comment on this?
-
9. Re: Version 2.1.1 and Remote JMX
timfox Sep 6, 2010 3:23 AM (in response to peterox)As I mentioned in my previous post this works fine if you follow the instructions for remote JMX access (above) - this is not specific to HornetQ. The JMX server used is not part of HornetQ - it's just the standard JMX server from the JDK, HornetQ has no control over how connections are made to it.
Clearly you need to make sure you don't have different services e.g. JNDI and JMX listening on the same port as that would cause a port conflict, and if you want people to connect from remote machines the server can't be listening on localhost, since that of course will only be accessible from the local machine.
-
10. Re: Version 2.1.1 and Remote JMX
hughbragg Sep 13, 2010 9:20 PM (in response to timfox)If you load/start a fresh version and try what John describes, you would see he is correct.
The problem occurs when using JNDI (enabled by default in 2.1.1). If you switch that off then you can connect remotely and locally.
This has nothing to do with JNDI or JMX. It's because the developer has assumed that the JNDI host settings also apply to the JMX host.
Your answer can't be correct. If I enable JNDI and also want to connect to JMX locally by defining a -Dcom.sun.management.jmxremote.port=6000 (clearly a different port), this doesn't work.
-
11. Re: Version 2.1.1 and Remote JMX
jaikiran Sep 14, 2010 3:02 AM (in response to hughbragg)Hugh Bragg wrote:
If you load/start a fresh version and try what John describes, you would see he is correct.
The problem occurs when using JNDI (enabled by default in 2.1.1). If you switch that off then you can connect remotely and locally.
This has nothing to do with JNDI or JMX. It's because the developer has assumed that the JNDI host settings also apply to the JMX host.
I don't see what the JNDI host and JMX host things have to do with JConsole not able to connect. Have you tried it with 2.1.2? It too by default has JNDI server and I was able to successfully connect JConsole while running HornetQ server. I used the following JVM args:
-Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
Hugh Bragg wrote:
Your answer can't be correct. If I enable JNDI and also want to connect to JMX locally by defining a -Dcom.sun.management.jmxremote.port=6000 (clearly a different port), this doesn't work.
What doesn't work? Where exactly did you specify that port? And what exact error do you get in JConsole?
-
12. Re: Version 2.1.1 and Remote JMX
timfox Sep 14, 2010 3:06 AM (in response to hughbragg)This works fine for me by simply following the Sun JMX instructions which I posted on an earlier post.
Like I said, the Sun JMX Server is not part of HornetQ. I suspect you simply haven't configured it for remote access properly, e.g. failed to specify a host or port for JMX (don't confuse this with JNDI!)
-
13. Re: Version 2.1.1 and Remote JMX
hughbragg Sep 14, 2010 8:16 PM (in response to timfox)I read that before and there is no
com.sun.management.jmxremote.host property.
Try this. With a fresh install of Hornet 2.1.2 make sure jndi is enabled with hostname localhost. Start hornet with -Dcom.sun.management.jmxremote.port=6000. for the sake of the example say your lan address resolves to ipaddress which is different to localhost.
run jconsole from another computer and connect to ipaddress:6000. This doesn't work
stop hornet and set your jndi host to whatever you ipaddress is. start hornet again.
run jconsolefrom another computer and connect to ipaddress:6000. This works
stop hornet and disable jndi. start hornet again.
run jconsole from another computer and connect to ipaddress:6000. This works
Why the inconsistency?
why does setting the jndi jnp.host to localhost disable jmx connections from another computer?
-
14. Re: Version 2.1.1 and Remote JMX
timfox Sep 15, 2010 2:58 AM (in response to hughbragg)As we mentioned in previous posts, did you also specify: ?
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false