Not able to Connect a Remote Host to the VisualVM

后端 未结 5 1560
执念已碎
执念已碎 2021-01-31 18:59

I am new to Java and I\'m facing a problem in connecting a Remote Host to the JVisualVM.

I\'ve searched the Internet and followed all the steps mentioned th

5条回答
  •  时光取名叫无心
    2021-01-31 19:42

    I encountered similar problems when connecting to Glassfish application server. See solutions that worked for me as they can be same for You:

    • Try setting on your application:

      -Djava.rmi.server.hostname=*Remote_Server_External_IP_Address*

    The mentioned IP address should be server external IP (may sound silly but it worked for me). The main problem in my case was JMX pointing to the localhost and looping. In config files the exact IP address should be set to the remote host. I described it as 'Problem 2' In my blog: handling connection problems

    • If Firewall block is an issue then I recommend trying XMing with SSH tunnel (which is simple to set). Here is instruction, if You encounter problems setting it:
      Remote use of VisualVM with Xming (my blog) Biggest advantage of using XMing is that it will work almost always when SSH is enabled. You just have to place VisualVM files on the remote host and run it from command line. XWindow will show VisualVM Window on Your local computer.

    • There is a chance that it is VisualVM issue - try using some other tool just to verify what is wrong. I recommend JConsole. It works similar to VisualVM and I also described details on my blog

提交回复
热议问题