Very stange Behavior with JMX remote

Hi

I've an application written with Spring. JMX support works good locally bu I'm unable to connect from remote computer.

I'm starting with :

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=4099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

When I launch jconsole on the same computer I connect and I see all my Mbean working perfectly

If I try to connect from other computer with Jconsole I get "connection failed"

There is no firewall issue I'm on the same vlan, and on dev machine without any firewall installed.

Thanks for any help

[652 byte] By [richiegra] at [2007-11-26 19:35:26]
# 1

Hi,

When you connect from the same computer, do you connect

'localy' (using the process PID) or 'remotely' (using host and port 4099)?

You may also want to switch on the JMX traces, see

http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole

Hope this helps,

-- daniel

JMX, SNMP, Java, etc...

http://blogs.sun.com/jmxetc

dfuchsa at 2007-7-9 22:10:13 > top of Java-index,Core,Monitoring & Management...
# 2
Hellocan you try an telnet on your server in 4099 port.else try to remove the first option -Dcom.sun.management.jmxremoteby.
lbaudeta at 2007-7-9 22:10:13 > top of Java-index,Core,Monitoring & Management...
# 3
I succeed to telnet port 4099 however I just connect but not receive any extra char when connectingI've already tried to remove -Dcom.sun.management.jmxremote and just define port it's doesn't help
richiegra at 2007-7-9 22:10:13 > top of Java-index,Core,Monitoring & Management...
# 4

Hi,

If I connect from the same machine even by using ip:port it's working. It's only not working from other physical computer

I've run the jconsole with trace I get this:

FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:

///jndi/rmi://xxx.xxx.xxx.xxx:4099/jmxrmi] failed to connect: java.rmi.ConnectExcep

tion: Connection refused to host: 127.0.0.1; nested exception is:

java.net.ConnectException: Connection refused: connect

Now I'm very confused because why it use 127.0.0.1 instead of using the real ip

richiegra at 2007-7-9 22:10:13 > top of Java-index,Core,Monitoring & Management...
# 5
Hi,I'm afraid the server JVM must set -Djava.rmi.server.hostname=127.0.0, or an RMI server socket factory that binds the sockets to 127.0.0.1 or maybe the configuration of your /etc/hosts file.Regards,Luis
lmalventa at 2007-7-9 22:10:13 > top of Java-index,Core,Monitoring & Management...
# 6
hi,I use spring too, with no JMX problems.If you have a access.properties or/and password.properties remove it.Good luke.
lbaudeta at 2007-7-9 22:10:13 > top of Java-index,Core,Monitoring & Management...