cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Java (Java Agent, Installation, JVM, and Controller Installation)

Can't attach AppDynamics java agent with Jenkins

Bikramaditya.Dhar
New Poster

Can't attach AppDynamics java agent with Jenkins

   I  am getting an error when attaching appdynamics java agent with Jenkins. I am using the SaaS controller and installed java agent in AWS-ec2 where Jenkins is running, app agent is showing in the SaaS controller but no data is showing as we are unable to attach the java agent. 

   Kindly help to resolve the below error.

 

[root@ip-192-168-0-209 jenkins]# java -Xbootclasspath/a:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.amzn2.0.1.x86_64/lib/tools.jar -jar /opt/appdynamics/appagent/ver20.8.0.30686/javaagent.jar 3367 appdynamics.controller.hostName=[Redacted].saas.appdynamics.com ,appdynamics.controller.port=443,appdynamics.controller.ssl.enabled=true,appdynamics.agent.applicationName=jenkins,appdynamics.agent.tierName=dynalean,appdynamics.agent.nodeName=jenkins
Attaching to VM [3367]


java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.LinuxAttachProvider not found
        at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1211)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
        at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
        at jdk.attach/com.sun.tools.attach.spi.AttachProvider.providers(AttachProvider.java:258)
        at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:200)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1127)
agent path >>>/opt/appdynamics/appagent/ver20.8.0.30686/javaagent.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.singularity.ee.agent.appagent.AgentEntryPoint (file:/opt/appdynamics/appagent/ver20.8.0.30686/javaagent.jar) to method sun.tools.attach.HotSpotVirtualMachine.loadAgent(java.lang.String,java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.singularity.ee.agent.appagent.AgentEntryPoint
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1137)
Caused by: com.sun.tools.attach.AgentInitializationException: Agent JAR loaded but agent failed to initialize
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:165)
        ... 5 more
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1141)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:1137)
Caused by: com.sun.tools.attach.AgentInitializationException: Agent JAR loaded but agent failed to initialize
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:165)
        ... 5 more

 

=========================================================================

agent properties in SaaS controller

 

 

Agent
 
Configure
Reset
Properties
Version Server Agent #20.8.0.30686 v20.8.0 GA compatible with 4.4.1.0 rcaedb006dc46dddce17bc7540c4bed10fa52536e master
JVM Version OpenJDK 64-Bit Server VM 11.0.7 Oracle Corporation
Last Agent Restart 09/03/20 2:09:43 PM
Reporting
 

 

Uptime 0 %
Install Directory /opt/appdynamics/appagent/ver20.8.0.30686
Install Date/Time 08/30/20 3:04:28 AM
Process ID 9792
IP Addresses
[Redacted]
[Redacted]

 

^ Post edited by @Ryan.Paredez to redact the Saas Controller URL and IP addresses. Please do not share your Controller URL or IP addresses on community posts for security and privacy reasons.

By replying you agree to the Terms and Conditions of the AppDynamics Community.
Can't attach AppDynamics java agent with Jenkins
2 REPLIES 2
Bikramaditya.Dhar
New Poster

Sure next time i can follow the rule.

 

kindly assist i wont get any help the link provided earlier

Ryan.Paredez
Community Manager

Hi @Bikramaditya.Dhar,

 

Thanks for letting me know that content did not work. Let's see if the community can jump in and provide information. 


Thanks,
Ryan, AppDynamics Community Manager



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.