I don't believe that this statement is correct.
The LOCAL_PORT can be any open port on your computer, but typically matches the REMOTE_PORT where possible.
https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-jmx.md#creating-ssh-tunnel
I think that LOCAL_PORT will need to match the REMOTE_PORT. If you change LOCAL_PORT to something different the JMX connection will succeed, but the RMI connection will fail, because it does match com.sun.management.jmxremote.rmi.port.
Ultimately it would be cool if you could set com.sun.management.jmxremote.port and com.sun.management.jmxremote.rmi.port independently, or perhaps if the build pack auto incremented com.sun.management.jmxremote.rmi.port for each app instance. That way you could access multiple instances at the same time. Ex: instance #0 on 5000, #1 on 5001, etc...
Thanks
I don't believe that this statement is correct.
https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-jmx.md#creating-ssh-tunnel
I think that
LOCAL_PORTwill need to match theREMOTE_PORT. If you changeLOCAL_PORTto something different the JMX connection will succeed, but the RMI connection will fail, because it does matchcom.sun.management.jmxremote.rmi.port.Ultimately it would be cool if you could set
com.sun.management.jmxremote.portandcom.sun.management.jmxremote.rmi.portindependently, or perhaps if the build pack auto incrementedcom.sun.management.jmxremote.rmi.portfor each app instance. That way you could access multiple instances at the same time. Ex: instance #0 on 5000, #1 on 5001, etc...Thanks