Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
06-25-2019 04:10 AM - last edited on 12-04-2019 09:48 AM by Ryan.Paredez
While connecting java agent with AppDynamics observed below error. please help to resolve this and connect the java agent to AppDynamics:
C:\Windows\system32> java -Xbootclasspath/a:"C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar" -jar "D:\2019\Monitoring_utilities\AppServerAgent\javaagent.jar" 4875 Attaching to VM [4875] java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.WindowsAttachProvider could not be instantiated java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:658) Caused by: com.sun.tools.attach.AttachNotSupportedException: no providers installed at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:203)
I am stuck due to this & unable to use AppDynamics for java resources.
06-25-2019 02:37 PM
Hi Rahul,
I see that you are using Dynamic Attach to connect to a live Java process. Is there any reason you can't start the process using the "-javaagent" parameter instead?
Dynamic Attach isn't really an AppDynamics feature, rather, a feature of the JVM. The JVM needs to have the correct libraries loaded in order for Dynamic Attach to be successful.
It seems that at least for this Windows system that library was not loaded and it's very tricky to get a Native library loaded once the JVM has started.
There is some information on this StackOverflow Thread:
https://stackoverflow.com/questions/11134159/how-to-load-attachprovider-attach-dll-dynamically
I recommend either starting the process with the Javaagent command line parameter and if that is not possible you need the process to be started with the correct java.library.path to the attach.dll native library.
Kind Regards,
David
06-25-2019 11:31 PM
With command line parameter application get successfully started but still shows waiting for the connection. we are referring "Getting started wizard - java".
so please provide details steps if any.
06-26-2019 05:23 AM
Hi Rahul,
Can you upload a screenshot showing the output, please?
Kind Regards,
David
06-26-2019 05:38 AM
06-26-2019 05:42 AM
I noticed in the command line you didn't specify the required properties:
C:\Windows\system32> java -Xbootclasspath/a:"C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar" -jar "D:\2019\Monitoring_utilities\AppServerAgent\javaagent.jar" 4875
Try something like this instead with all the values set:
java -Xbootclasspath/a:"C:/Program Files/Java/jdk1.8.0_151/lib/tools.jar" -jar C:/appdynamics/AppServerAgent-4.5.8.25115/javaagent.jar 14760 appdynamics.controller.hostName=somehost,appdynamics.controller.port=someport,appdynamics.controller.ssl.enabled=false,appdynamics.agent.accountAccessKey=somevalue,appdynamics.agent.applicationName=Doughuts,appdynamics.agent.tierName=DT1,appdynamics.agent.nodeName=DN1,appdynamics.agent.accountName=someaccount
Failing that, are there any logs in the following folder with any useful information?
AppServerAgent-4.x.x.xxxxx\ver4.x.x.xxxxx\logs
Kind Regards,
David
06-26-2019 06:24 AM
Hi,
I have already tried this. please check screenshot for error. also, the specified log folder is empty, no log file get generated there.
06-28-2019 03:50 AM
I have still observed the same issue, even after following the steps provided in the mail.
02-17-2020 03:57 AM
HI Rahul/David,
I am getting same error, I am not able to connect javaagent to my apache tomcat based application.
Please help me if found solution.
Thanks,
Rakhi
02-17-2020 05:45 AM
Hi Ankur,
Are you also using Dynamic Attach? Have you tried to do this using the normal method (by adding -javaagent to the startup command)?
Kind Regards,
David
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form