Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Cannot connect JVM which running on AWS EC2

Moderators: Vladimir Kondratyev, Anton Katilin

Cannot connect JVM which running on AWS EC2

Postby muthu » Thu Apr 05, 2018 10:19 am

Hi YourKit experts,

Recently I want to utilize YourKit to remotely monitor Tomcat which is running on an AWS EC2 server. But when run the following command i got the following result. How to overcome this issue. I have googled and not found the related answer

Name | PID| Status
-------------------------------- |------|--------------------------------
Tomcat | 22378| Ready for attach

Enter PID of the application you want to attach (0 to exit) and press Enter:
>22378
Please specify comma-separated list of startup options, or press Enter for default options (recommended):
>
Attaching to process 22378 using options
com.yourkit.util.bf: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at com.yourkit.b.f.a(a:97)
at com.yourkit.b.c.attach(a:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.yourkit.h.run(a:2)

Attach to a running JVM failed.

With Regards,
-Muthu
muthu
 
Posts: 2
Joined: Thu Apr 05, 2018 10:15 am

Re: Cannot connect JVM which running on AWS EC2

Postby Anton Katilin » Thu Apr 05, 2018 10:25 am

Hi Muthu

Please try the Early Access version:
https://www.yourkit.com/eap/

It allows remote attach directly from the profiler UI's Welcome screen.

If it neither works, could you please send the profiler log files from ~/.yjp/log to support@yourkit.com

Please also note that if attaching the profiler agent to a running process doesn't work, you may start it with the profiler agent instead.

Best regards,
Anton
Anton Katilin
 
Posts: 5816
Joined: Wed Aug 11, 2004 8:37 am

Re: Cannot connect JVM which running on AWS EC2

Postby muthu » Thu Apr 05, 2018 11:55 am

Hi Anton,

As per your response i just used the YourKit-JavaProfiler-2018.04-b48 and tried to attach the tomcat. But it is not working. Hence i have started the profiler agent instead attach to running process also it requires tomcat startup script and my bad luck, we do not have that. We use only startup service. Any other solutions..

Best regards,
Muthu
muthu
 
Posts: 2
Joined: Thu Apr 05, 2018 10:15 am

Re: Cannot connect JVM which running on AWS EC2

Postby Anton Katilin » Thu Apr 05, 2018 1:27 pm

Hello Muthu,

Could you please send us the logs, as I suggested in my previous post. Without the logs it is difficult to investigate why attach fails in your case.

To start Tomcat with the profiler agent, you should specify appropriate Java option -agentpath. Please use the remote wizard's option "Generic server" to produce it; see https://www.yourkit.com/docs/java/help/ ... remote.jsp

Best regards,
Anton
Anton Katilin
 
Posts: 5816
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot] and 16 guests