I am trying to run the yjpagent on a Tomcat server at a Linux i686 machine. The LD_LIBRARY_PATH has been updated with the correct path. The following lines are found in my Tomcat log:
[YourKit ... build 610] Using JVMPI
[YourKit ... build 610] *** HINT ***: we recommend using Java 5.0 and JVMTI when possible!
[YourKit ... build 610] cannot start: No such file or directory
After that nothing happens. What file could be missing? The agentlib are clearly found...
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:828)
at com.yourkit.runtime.Core.init(Core.java:201)
The problem is that the profiler agent fails to create an empty file named <user home>/.yjp/.agentQQQQ, where QQQQ - used port number. An attempt to create .yjp directory is made if it does not exist.
Probably this is an issue with permissions.
Are there any special permissions set in the home directory of the user under which you run the profiled application? What do "ls -la ~" and "ls -la ~/.yjp" print?
The /etc/init.d/tomcat4 startup script starts Tomcat with a faked user (tomcat4) with home directory /usr/share/tomcat4. Only root had write access to this directory, and when I changed permissions the agent started without errors.