I have a tomcat application on a remote host and I need to connect it to JConsole. The application starts with the parameters:
IP=`ifconfig eth0 | grep 'inet addr:' | cut -d ':' -f2 | cut -d ' ' -f1` -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=$IP -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
Port 9999 is open, the IP
value is valid, I checked it. I can access it through telnet ( telnet <my_host> <my_port>
). Netstat:
netstat -a | grep LISTEN tcp 0 0 *:9999 *:* LISTEN
But I can not connect it through jconsole, I always get the same error:
Connection Failed: Retry?
But netstat -a
shows that the connection is ESTABLISHED
I tried different addresses:
<my_host>:<my_port> service:jmx:rmi://<my_host>:<my_port>/jndi/rmi://<my_host>:<my_port>/jmxrmi service:jmx:rmi:///jndi/rmi://<my_host>:<my_port>/jmxrmi
I also tried adding the files .../conf/remote.users
and .../remote.acl
and writing patches to these files in the versions -Dcom.sun.management.jmxremote.password.file
and -Dcom.sun.management.jmxremote.access.file
, but this did not affect.
When I deploy this application on my local machine, I can connect to it in "localhost:9999"
Help someone what might be the problem?
source share