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

Questions about YourKit Java Profiler
Post Reply
abhiroop
Posts: 1
Joined: Fri May 08, 2020 2:32 pm

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

Post by abhiroop »

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.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

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

Post by Anton Katilin »

> 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.
Post Reply