0

I'm trying to run a jstatd on a remote server. According to the documentation I created a policy file and startet the deamon with the following command:

jstatd -p 1199 -J-Djava.security.policy=<path-to-policy>

In the following posts I read that there are 2 ports I must open in my firewall: jps can't connect to a remote jstatd

After opening these 2 ports everything works fine (including connection to my remote Java-Applications via VisualVM). Now I've read that 1199 port is fix, but the second one is a random port at each startup of the jstatd (Using VisualVM to connect to a remote jstatd instance through a firewall). That makes my firewall ruling quite complicated. Is there any possibility to set the port to a fixed value? My problem is that I can't change the firewall every time the jstatd is (re)started.

Thanks in advance for your help and best regards, AnarchoEnte

Community
  • 1
  • 1
AnarchoEnte
  • 558
  • 4
  • 20

1 Answers1

0

I guess the best solution is to use ssh tunnel with SOCKS proxy created via ssh -D. Once you have it, set the SOCKS proxy in VisualVM preferences. See this article at DZone for detailed info.

Tomas Hurka
  • 6,723
  • 29
  • 38