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.
02-21-2020 04:10 AM
Hi David,
I am running below command in windows command prompt and getting error:
C:\Program Files\Java\jdk1.8.0_191>java -Xbootclasspath/a:lib\tools.jar -jar C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\javaagent.jar 18552
Attaching to VM [18552]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1144)
Caused by: java.io.IOException: no such process
at sun.tools.attach.WindowsVirtualMachine.openProcess(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:56)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
... 5 more
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1158)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1144)
Caused by: java.io.IOException: no such process
at sun.tools.attach.WindowsVirtualMachine.openProcess(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:56)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
... 5 more
Thanks,
Rakhi
02-21-2020 04:42 AM - last edited on 05-20-2020 02:59 PM by Ryan.Paredez
Hi David,
Plz help to correct below command:
C:\Program Files\Java\jdk1.8.0_191>java -Xbootclasspath/a:lib\tools.jar -jar C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\javaagent.jar 18552
I want to run on Windows OS only this Java agent. My Java applivation is running on tomcat server.
on windows. I tried Machine agent, it worked fine on my windows system.
Thank,
Rakhi
02-21-2020 06:54 AM - last edited on 05-20-2020 02:59 PM by Ryan.Paredez
Hi there, I see the following message:
"Caused by: java.io.IOException: no such process"
Are you sure you have the right process id in the command? on windows you can find the process id using the "tasklist" command.
Kind Regards,
David
02-21-2020 09:44 AM - last edited on 05-20-2020 02:59 PM by Ryan.Paredez
Hi David,
C:\Program Files\Java\jdk1.8.0_191>java -Xbootclasspath/a:lib\tools.jar -jar C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\javaagent.jar 1432
Attaching to VM [1432]
agent path >>>C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\javaagent.jar
C:\Program Files\Java\jdk1.8.0_191>
Above is Working for me now, I started my tomcat where my application is running,
C:\apache-tomcat-8.5.51\bin>startup.bat restart
Using CATALINA_BASE: "C:\apache-tomcat-8.5.51"
Using CATALINA_HOME: "C:\apache-tomcat-8.5.51"
Using CATALINA_TMPDIR: "C:\apache-tomcat-8.5.51\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_191"
Using CLASSPATH: "C:\apache-tomcat-8.5.51\bin\bootstrap.jar;C:\apache-tomcat-8.5.51\bin\tomcat-juli.jar"
C:\apache-tomcat-8.5.51\bin>
I could see a new window for tomcat, and there it is showing:
Started AppDynamic Java Agent Successfully. message as below:
[Thread-9] Fri Feb 21 22:54:57 IST 2020[INFO]: JavaAgent - Java Agent AppAgent directory [C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\ver4.5.18.29239]
Agent logging directory set to [C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\ver4.5.18.29239\logs]
[Thread-9] Fri Feb 21 22:54:57 IST 2020[INFO]: JavaAgent - Agent logging directory set to [C:\Data\AppDynamics\AppServerAgent-4.5.18.29239\ver4.5.18.29239\logs]
Registered app server agent with Node ID[13314] Component ID[12071] Application ID [7613]
Started AppDynamics Java Agent Successfully.
Now in UI i.e. https://bruce202001142354425.saas.appdynamics.com/controller/#/location=SETTINGS_AGENTS&timeRange=la...
I want to see my application and monitor the same. which I am unable to see anything. I tried searching with NodeID too, didnt got. Please help for same.
Thanks and regards,
Rakhi
02-21-2020 10:12 AM - last edited on 05-20-2020 03:00 PM by Ryan.Paredez
Great thanks, you're missing a crutical argument (after the process id), see below:
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
Kind Regards,
David
User | Count |
---|---|
2 | |
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