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

Unable to get service running on remote machine

Moderators: Vladimir Kondratyev, Anton Katilin

Unable to get service running on remote machine

Postby lkhosh » Mon Oct 31, 2016 6:29 pm

Hello Moderators!

I am having a hard time to connect to Youkit on my remove Ubuntu from local YourKit Client.
I can only connect to this Ubuntu via terminal, and the authentication is a private key.

The application I need to profile is running on Ubuntu via Tomcat.
1. I connect to Ubuntu.
2. Install/unpack Yourkit
wget https://www.yourkit.com/download/yjp-20 ... ux.tar.bz2
Unpack: tar xfj yjp-2016.02-b43-linux.tar.bz2
3. switch to YourKit directory
cd /home/user/yjp-2016.02/bin
4. sudo ./yjp.sh -integrate
Going through the options: chose Tomcat server, provided <TOMCAT_HOME>/bin/startup.sh
All other option configurations I picked option 2 for now (which is 'No')
Service is running on PRODUCTION
5. After selecting all options, got positive result:
Startup script to be used for profiling has been successfully created:
/usr/share/tomcat/bin/startup_with_yjp.sh

============================================
Now, I tried few options here and not sure if any are correct.
============================================
OPTION 1) Stopped the tomcat, restearted it with /usr/share/tomcat/bin/startup_with_yjp.sh
tomcat's PID changed and when running ps -ef | grep tomcat
UID changed from tomcat to root
instead of : tomcat 31889 1 0 Oct27 + all teh details about tomcat
I get : root 990 + all the details about tomcat
Supposedly NOW the service is running with the profiler, but I am not able to connect from YourKit UI on my client machine.
If try to connect without specifying PORT - connection times out - cant find profiled application
To specify port I need to look in teh following directory <user home>/.yjp/log/<session name>-<PID>.log , but there is no such directory created in my home directory.

OPTION 2) /bin/yjp.sh -attach <PID>
~/yjp-2016.02/bin$ sudo ./yjp.sh -attach 31889 =========> run command
=====got error==========
Attaching to process 31889 using default options
[YourKit Java Profiler 2016.02-b43] Log file: /root/.yjp/log/yjp-8401.log
com.yourkit.runtime.PresentableException: com.sun.tools.attach.AttachNotSupportedException: Unable to open so cket file: target process not responding or HotSpot VM not loaded
at com.yourkit.f.a.a(a:99)
at com.yourkit.f.b.attach(a:133)
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.Main$5.run(a:8)

Attach to a running JVM failed."
Questions:
1. Am i NOT supposed to unpack yjp-2016.02-b43-linux.tar.bz2 before I try integrate or attach?
<directory with unpacked content>/bin/yjp.sh -integrate
<directory with unpacked content>/bin/yjp.sh -attach <PID>
2. If I want to attach Profiler to a running app, do I run directly -attach and skip -integrate?
---------------------------------------------------------------------------------------------
I have a Project with the deadline to develop a procedure of determining a Memory Leak of our services with the help of YourKit Java Profiler. Please help!

Thank you for your time.
lkhosh
 
Posts: 1
Joined: Mon Oct 31, 2016 5:51 pm

Re: Unable to get service running on remote machine

Postby Anton Katilin » Tue Nov 01, 2016 7:28 am

You should replace your existing /usr/share/tomcat/bin/startup.sh with the (content of) generated /usr/share/tomcat/bin/startup_with_yjp.sh and the restart Tomcat normally.

The log file should be created inside the home directory of the user under which you run Tomcat.

More on remote profiling troubleshooting:
https://www.yourkit.com/docs/java/help/ ... leshooting
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 14 guests