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.

Can't monitor remote Java web app installed on remote server

Moderators: Vladimir Kondratyev, Anton Katilin

Can't monitor remote Java web app installed on remote server

Postby abhiroop » Fri May 08, 2020 2:38 pm

I have installed YourKit Java Profiler (version: 2019.8-b138) on my Windows 7 machine (64-bit OS). My goal is to profile a Java Web application hosted in Tomcat 7, where the Tomcat is installed on a Windows Server 2008 R2 Enterprise (64-bit OS) as a Windows Service. I tried performing the following configurations:
1. Copied the yjpagent.dll from \bin\win64\ of the YourKit installed on my machine. (Also I copied the attach.dll just in case.)
2. Logged into the remote server and pasted the files in the drive where the Tomcat resides.
3. Catalina.bat is not available so I launched Tomcat7w.exe and clicked on the 'Java' tab to see the Java Options.
4. Added the following line in the Java Options
-agentpath:C:\yjpagent.dll=listen=all
5. Problem: upon restarting the Tomcat Service the Service doesn't start again.
6. Coming back to my machine, I launch the YourKit Profiler application and click on 'Profile remote Java EE server or application...'
7. Type in the Host name. Application discovery method is set to 'Simple'. Rest everything is default. I click on OK.
8. Since I failed to restart the Tomcat Service, I remove the agentpath option from Tomcat7w. Tomcat Service restarts now without any problem.
9. I come back to my machine, still YourKit fails to detect any application on the remote server.

What am I doing wrong? Please suggest.
abhiroop
 
Posts: 1
Joined: Fri May 08, 2020 2:32 pm

Re: Can't monitor remote Java web app installed on remote se

Postby Anton Katilin » Fri May 08, 2020 3:40 pm

> 4. Added the following line in the Java Options
> -agentpath:C:\yjpagent.dll=listen=all
Please check that the path is correct.
Please try to put the agent to a subdirectory of c:\ instead of the root directory, e.g. c:\yourkit\yourkit.dll
> 5. Problem: upon restarting the Tomcat Service the Service doesn't start again.
Please check Tomcat logs for the error.

> 9. I come back to my machine, still YourKit fails to detect any application on the remote server.
This is expected. It is not possible to connect to a JVM instance without the profiler agent in "Simple" mode.

Please try to find out the exact problem on step 5. Please find exact error message which tells why JVM doesn't start. For example, although you have a 64-bit JVM it is still possible that Tomcat runs on a 32-bit JVM, in which case you would need the agent from <...>/bin/win32.
Anton Katilin
 
Posts: 5947
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.