-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMX Docs Issue #266
Comments
While the problem is undoubtedly real, I'm not sure why it is. The JSR-160 and RMI ports always match one another, so the tunnel for one should match the tunnel for the other. I'm guessing something is doing an internal redirect causing the issue. Outside of an easy fix, I think we'll update the docs to be more clear rather than making the implementation more robust. Instance choice should be handled via the I'll do some research about tunneling JSR-160/RMI over SSH, but be prepared for a doc-only change. |
The blog at http://sykesm.mybluemix.net/posts/jmx-in-diego/ seems to document the issue in detail. John Liptak All problems in computer science can be solved by another level of indirection" – Butler Lampson From: Ben Hale [mailto:notifications@github.com] While the problem is undoubtedly real, I'm not sure why it is. The JSR-160 and RMI ports always match one anotherhttps://github.com/cloudfoundry/java-buildpack/blob/master/lib/java_buildpack/framework/jmx.rb#L42-L43, so the tunnel for one should match the tunnel for the other. I'm guessing something is doing an internal redirect causing the issue. Outside of an easy fix, I think we'll update the docs to be more clear rather than making the implementation more robust. Instance choice should be handled via the cf ssh -i argument, and I don't want to add anything additional if you can't use non-matching ports. In the end, this is not something that should be used very often so putting a ton of engineering into it isn't in line with our goals. I'll do some research about tunneling JSR-160/RMI over SSH, but be prepared for a doc-only change. — This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. |
@jhliptak That's actually an issue that we've already solved. We can make the connection just fine so long as port numbers all match. It breaks down when the port numbers don't match. So
works, while
does not. |
Docs only change is fine with me. |
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_PORT
will need to match theREMOTE_PORT
. If you changeLOCAL_PORT
to 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.port
andcom.sun.management.jmxremote.rmi.port
independently, or perhaps if the build pack auto incrementedcom.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
The text was updated successfully, but these errors were encountered: