Tuesday, February 4, 2014

JProfiler connection through SSH Tunnel

If you don't want to open a firewall for JProfiler, here is a simple trick:
- on the monitored server, run the startManagedWebLogic_jprofiler.sh
- make sure the port 8849 is being listened to (netstat -an | grep 8849)
- open putty
- open a connection to your monitored server, using this setting for SSH tunnel:

(the obscured hostname is the FQDN of the monitored server)

you will notice that on your laptop, BEFORE the connection you have nothing on port 8849, while AFTER you have a LOCAL port open, and being forwarded to the remote host:

netstat -an | find "8849"
  TCP              LISTENING
  TCP    [::1]:8849             [::]:0                 LISTENING

netstat -an | find ""

( is the remote IP, is the local IP... you see several connections, one is my putty open, the others are Tunnel)

You can now open your JProfiler session, but make it point to localhost:8849, not to the remotehost:8849. It works!

No comments: