Not able to remotely connect from Visual VM
I have one application deployed in one of the CF cloud providers.
My application is on https://github.com/cloudfoundry/java-buildpack.git#v4.6
I am following this post to connect visual vm to the java app
https://fabianlee.org/2017/12/09/cloudfoundry-enabling-java-jmx-rmi-access-for-remote-containers/
I enabled the JMX connection.
But when i add the JMX connection in visual vm as localhost:5000
I get "Cannot connect to localhost:5000 using service:jmx:rmi:///jndi/rmi://localhost:5000/jmxrmi"
I have also tried enabling remote debugging in my application through JDWP option and connecting as a remote host in visual vm but that also results " cannot connect" error.
Am i missing anything here ?
Has anyone connected memory profilers to cf containers ?
Best Regards,
Saurav
cloudfoundry visualvm
add a comment |
I have one application deployed in one of the CF cloud providers.
My application is on https://github.com/cloudfoundry/java-buildpack.git#v4.6
I am following this post to connect visual vm to the java app
https://fabianlee.org/2017/12/09/cloudfoundry-enabling-java-jmx-rmi-access-for-remote-containers/
I enabled the JMX connection.
But when i add the JMX connection in visual vm as localhost:5000
I get "Cannot connect to localhost:5000 using service:jmx:rmi:///jndi/rmi://localhost:5000/jmxrmi"
I have also tried enabling remote debugging in my application through JDWP option and connecting as a remote host in visual vm but that also results " cannot connect" error.
Am i missing anything here ?
Has anyone connected memory profilers to cf containers ?
Best Regards,
Saurav
cloudfoundry visualvm
add a comment |
I have one application deployed in one of the CF cloud providers.
My application is on https://github.com/cloudfoundry/java-buildpack.git#v4.6
I am following this post to connect visual vm to the java app
https://fabianlee.org/2017/12/09/cloudfoundry-enabling-java-jmx-rmi-access-for-remote-containers/
I enabled the JMX connection.
But when i add the JMX connection in visual vm as localhost:5000
I get "Cannot connect to localhost:5000 using service:jmx:rmi:///jndi/rmi://localhost:5000/jmxrmi"
I have also tried enabling remote debugging in my application through JDWP option and connecting as a remote host in visual vm but that also results " cannot connect" error.
Am i missing anything here ?
Has anyone connected memory profilers to cf containers ?
Best Regards,
Saurav
cloudfoundry visualvm
I have one application deployed in one of the CF cloud providers.
My application is on https://github.com/cloudfoundry/java-buildpack.git#v4.6
I am following this post to connect visual vm to the java app
https://fabianlee.org/2017/12/09/cloudfoundry-enabling-java-jmx-rmi-access-for-remote-containers/
I enabled the JMX connection.
But when i add the JMX connection in visual vm as localhost:5000
I get "Cannot connect to localhost:5000 using service:jmx:rmi:///jndi/rmi://localhost:5000/jmxrmi"
I have also tried enabling remote debugging in my application through JDWP option and connecting as a remote host in visual vm but that also results " cannot connect" error.
Am i missing anything here ?
Has anyone connected memory profilers to cf containers ?
Best Regards,
Saurav
cloudfoundry visualvm
cloudfoundry visualvm
asked Nov 28 '18 at 17:03
sauravsaurav
1,98172652
1,98172652
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
JMX needed to be enabled in the container by using this command and that enabled JMX connection from visualvm
cf set-env myapp JBP_CONFIG_JMX '{ enabled: true }'
add a comment |
Looks like the SSH tunneling is not working for you.
First thing you might want to try is the ssh into the application container using cf ssh <application_name>
Once you are in the container run netstat -lntu
to find the debugging port 8000
is open or not. If its open then,exit the ssh console, tunnel to the application using cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>
, and try connecting back to localhost:8000
If the debugging port is not open then set the JBP_CONFIG_DEBUG '{enabled: true}'
variable and restart the application.
Also the default debug port is 8000 and not 5000 so if you want to connect to port 5000 your ssh command should be cf ssh -N -T -L 5000:localhost:8000<APPLICATION_NAME>
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53524609%2fnot-able-to-remotely-connect-from-visual-vm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
JMX needed to be enabled in the container by using this command and that enabled JMX connection from visualvm
cf set-env myapp JBP_CONFIG_JMX '{ enabled: true }'
add a comment |
JMX needed to be enabled in the container by using this command and that enabled JMX connection from visualvm
cf set-env myapp JBP_CONFIG_JMX '{ enabled: true }'
add a comment |
JMX needed to be enabled in the container by using this command and that enabled JMX connection from visualvm
cf set-env myapp JBP_CONFIG_JMX '{ enabled: true }'
JMX needed to be enabled in the container by using this command and that enabled JMX connection from visualvm
cf set-env myapp JBP_CONFIG_JMX '{ enabled: true }'
edited Dec 4 '18 at 3:34
Shiva
5,09632751
5,09632751
answered Nov 29 '18 at 14:07
sauravsaurav
1,98172652
1,98172652
add a comment |
add a comment |
Looks like the SSH tunneling is not working for you.
First thing you might want to try is the ssh into the application container using cf ssh <application_name>
Once you are in the container run netstat -lntu
to find the debugging port 8000
is open or not. If its open then,exit the ssh console, tunnel to the application using cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>
, and try connecting back to localhost:8000
If the debugging port is not open then set the JBP_CONFIG_DEBUG '{enabled: true}'
variable and restart the application.
Also the default debug port is 8000 and not 5000 so if you want to connect to port 5000 your ssh command should be cf ssh -N -T -L 5000:localhost:8000<APPLICATION_NAME>
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
add a comment |
Looks like the SSH tunneling is not working for you.
First thing you might want to try is the ssh into the application container using cf ssh <application_name>
Once you are in the container run netstat -lntu
to find the debugging port 8000
is open or not. If its open then,exit the ssh console, tunnel to the application using cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>
, and try connecting back to localhost:8000
If the debugging port is not open then set the JBP_CONFIG_DEBUG '{enabled: true}'
variable and restart the application.
Also the default debug port is 8000 and not 5000 so if you want to connect to port 5000 your ssh command should be cf ssh -N -T -L 5000:localhost:8000<APPLICATION_NAME>
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
add a comment |
Looks like the SSH tunneling is not working for you.
First thing you might want to try is the ssh into the application container using cf ssh <application_name>
Once you are in the container run netstat -lntu
to find the debugging port 8000
is open or not. If its open then,exit the ssh console, tunnel to the application using cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>
, and try connecting back to localhost:8000
If the debugging port is not open then set the JBP_CONFIG_DEBUG '{enabled: true}'
variable and restart the application.
Also the default debug port is 8000 and not 5000 so if you want to connect to port 5000 your ssh command should be cf ssh -N -T -L 5000:localhost:8000<APPLICATION_NAME>
Looks like the SSH tunneling is not working for you.
First thing you might want to try is the ssh into the application container using cf ssh <application_name>
Once you are in the container run netstat -lntu
to find the debugging port 8000
is open or not. If its open then,exit the ssh console, tunnel to the application using cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>
, and try connecting back to localhost:8000
If the debugging port is not open then set the JBP_CONFIG_DEBUG '{enabled: true}'
variable and restart the application.
Also the default debug port is 8000 and not 5000 so if you want to connect to port 5000 your ssh command should be cf ssh -N -T -L 5000:localhost:8000<APPLICATION_NAME>
answered Nov 28 '18 at 17:16
ShivaShiva
5,09632751
5,09632751
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
add a comment |
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
thanks Shiva for the reply..i checked that remote port is opened and followed the steps mentioned by you...but getting the same error
– saurav
Nov 28 '18 at 17:22
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53524609%2fnot-able-to-remotely-connect-from-visual-vm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown