0

My organization asked our team to use this new tool AppDynamics for better performance testing results and reports.

For that I have to attach javaagent with running jvm, on their community this step

java -Xbootclasspath/a:<path_to_jdk>/lib/tools.jar -jar 
/<agent_home>/javaagent.jar <jvm_process_id>
is given to attach the javaagent with running jvm. 

However when I run the same I get following result on cmd (Using windows-8 64 bit)

>Attaching to VM [6616]    

java.lang.reflect.InvocationTargetException Caused by: java.io.IOException: no such process Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException Caused by: java.lang.reflect.InvocationTargetException Caused by: java.io.IOException: no such process

This is the link of their documentation.

  • Code lines should be tagged with the `{}` symbol above the edit box or indented with four spaces. Mark the beginning of an error message with a `>` –  May 18 '17 at 09:54

1 Answers1

0

The problem with this approach is you'll have to manually do that each time. I would highly recommend just configuring your app server to automatically load the AppDynamics agent. Another option is using the universal agent, which does auto-attach: https://docs.appdynamics.com/display/PRO43/Install+the+Universal+Agent Doing this one off attach is never really a good idea, as you'll have to get the PID each time.

The error indicates that you are probably not running the attach as the same user the JVM is running under, but it could also be permissions or something else as well, hence I would use the methods that work all the time :)

Jonah Kowall
  • 577
  • 2
  • 7