Код: Выделить всё
~> jcmd 15868 ManagementAgent.start jmxremote.port=45678 jmxremote.host=127.0.0.1 jmxremote.authenticate=false jmxremote.ssl=false jmxremote.rmi.port=45678
~> jcmd 15868 ManagementAgent.status
15868:
Agent: enabled
Connection Type: local
Protocol : rmi
Host : 127.0.0.1
URL : service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc3AAtVbmljYXN0UmVmMgAADDE5Mi4xNjguMC4yMwAAr09xSTzUAt4Xp2VIWiAAAAGTZAPJAYBBAHg=
Properties :
com.sun.management.jmxremote.rmi.port = 45678
com.sun.management.jmxremote.host = 127.0.0.1
com.sun.management.jmxremote.authenticate = false
com.sun.management.jmxremote.ssl.need.client.auth = false [default]
com.sun.management.jmxremote.ssl = false
com.sun.management.jmxremote.registry.ssl = false [default]
com.sun.management.jmxremote.local.only = true [default]
com.sun.management.jmxremote.password.file = jmxremote.password [default]
com.sun.management.jmxremote.access.file = jmxremote.access [default]
com.sun.management.config.file = management.properties [default]
com.sun.management.jmxremote.port = 45678
Connection Type: remote
Protocol : rmi
Host : 127.0.0.1
URL : service:jmx:rmi://127.0.0.1:/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc3AAtVbmljYXN0UmVmMgAADDE5Mi4xNjguMC4yMwAAsm7Lu/nHDfBys2VIWiAAAAGTZAPJAYBDAHg=
Properties :
com.sun.management.jmxremote.rmi.port = 45678
com.sun.management.jmxremote.host = 127.0.0.1
com.sun.management.jmxremote.authenticate = false
com.sun.management.jmxremote.ssl.need.client.auth = false [default]
com.sun.management.jmxremote.ssl = false
com.sun.management.jmxremote.registry.ssl = false [default]
com.sun.management.jmxremote.local.only = true [default]
com.sun.management.jmxremote.password.file = jmxremote.password [default]
com.sun.management.jmxremote.access
После открытия ssh-туннель с:
Код: Выделить всё
ssh HOSTNAME -L 45678:localhost:45678
Я всегда получаю:
Код: Выделить всё
Caused: java.rmi.ConnectException: Connection refused to host: 192.168.0.23; nested exception is:
java.net.ConnectException: Connection refused
Подробнее здесь: https://stackoverflow.com/questions/792 ... gent-start