If I open jvisualvm
and go to File >> Add Remote Host
I am prompted to create a new remote server entry. I enter a host name of myapp01.example.org
, and then I see that server show up under the Remote
section of the Applications
tree on the left-hand side. When I right-click that server, and click Add JMX Connection
, I see the following dialog:
Let's say I have a Java app (WAR deployed to Tomcat) running on myapp01.example.org:8443
. To SSH into the server, I use username skroob
and a password of 12345
(hey, that's the combination on my luggage!):
ssh skroob@myapp01.example.org
skroob@myapp01.example.org's password: 12345
When I fill out the dialog as follows:
- Connection:
myapp01.example.org:8443
- Username:
skroob
- Password:
12345
I get the following error:
Cannot connect to skroob@myapp01.example.org:8443 using service:jmxLrmi:///jndi/rmi://myapp01.example.org:8443/jmxrmi
I believe this may be because I'm not configuring JMX to be exposed on Tomcat itself. Or maybe I'm just entering the wrong info. Maybe both. Either way:
- What do I need to do to configure this with proper JMX info?
- What do I need to do to configure this properly for
jstatd
?