AppD Archive

Javaagent configuration issue Karaf /Fellix -----------> Invalid Agent Installation Directory

CommunityUser
Splunk Employee
Splunk Employee

Hi

Request to help me for configuration. I am facing issue for configuration of Java agent in apache karaf / fellix.

Configuration in startup script

-Dappagent.install.dir="D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent" 

-javaagent:"D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent/javaagent.jar"

-Dappdynamics.agent.applicationName=myapp1

-Dappdynamics.agent.nodeName=myjvmnode1

-Dappdynamics.agent.nodeName=mytier1

Error Log

Install Directory resolved to[D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent]
java.lang.RuntimeException: Invalid Agent Installation Directory [D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent]
    at com.singularity.ee.agent.appagent.AgentEntryPoint.addThirdPartyURLs(AgentEntryPoint.java:190)
    at com.singularity.ee.agent.appagent.AgentEntryPoint.premain(AgentEntryPoint.java:144)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
    at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)

Regards

sanjeev

0 Karma

Arun_Dasetty
Super Champion

Hi Sanjeev,

We assume that server have executable permissions to directory path D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent, is this directory exists and have executable permissions D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent ? please confirm

Also we see earlier such issues when agent directory unzipped have missing folders and files, can you provide the outout of the following at the agent directory path:

cmd> cd D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent

cmd> dir

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun
Thanks for your response. Please find my response in PPT and config-xml
1) Directory structure is OK
2) Permissions are provided as required.

Please find the background

3.) Same directory structure if i configure AppDynamicsLite, Its works fine even with OSGI setting.

4) working in the same line, I have downloded latest Eval copy of AppDynamics PRO, installed executable in DEMO Mode with single tenant .
5) Run the  DEMO CONSOLE further got link to download  javaAgent ZIP file.

6) This is on-premise instalation not saas.

7) I have problem on configuration of CONFIG-info.xml Please refer that , may i have done any mistake.


Please help me, still  am strugling for configuration

 

Regards

Sanjeev

0 Karma

Arun_Dasetty
Super Champion

Hi Sanjeev.

We see in your screenshot "conf" folder missing but this should not be an issue as i still see agent starts fine with out this empty folder conf under <agent_dir> but this missing folder raised concern whether any dirs and files are missing under <agent_dir>/ver4.0.0.0. folder, under which we expect the following files and dirs, can you check if this exists as follows:

ver4.0.0.0/
                 conf

                 external-services
                 lib
                 sdk
                 utils
                 logs
                 javaagent.jar

- If above files exists, Can you please restart JVM after the following change and see if that makes difference:

-Dappagent.install.dir="D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent/ver4.0.0.0" 

-javaagent:"D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent/ver4.0.0.0/javaagent.jar"

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Dear Arun

PLease find the CMD Execution

  • This is to confim there was no logs folder after extration of zip.
  • I have place this logs/ServerNode Directtories  by viewing yours directtory structure and comparing with older version.
  • Please find the error / exception after server startup
  • Should i have to download new agent

--------------------------------------------------------------------------------------------------------------------------

D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent>cd ver4.0.0.0

D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.0.0>dir
 Volume in drive D has no label.
 Volume Serial Number is 3661-83E1

 Directory of D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.
0.0

01/17/2015  05:00 PM    <DIR>          .
01/17/2015  05:00 PM    <DIR>          ..
01/15/2015  02:34 PM    <DIR>          conf
01/15/2015  02:34 PM    <DIR>          external-services
01/13/2015  02:08 AM            73,191 javaagent.jar
01/15/2015  02:34 PM    <DIR>          lib
01/17/2015  05:00 PM    <DIR>          logs
01/13/2015  02:08 AM             3,481 readme.txt
01/15/2015  02:34 PM    <DIR>          sdk
01/15/2015  02:34 PM    <DIR>          utils
               2 File(s)         76,672 bytes
               8 Dir(s)  192,061,853,696 bytes free

D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.0.0>cd logs

D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.0.0\logs>dir
 Volume in drive D has no label.
 Volume Serial Number is 3661-83E1

 Directory of D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.
0.0\logs

01/17/2015  05:00 PM    <DIR>          .
01/17/2015  05:00 PM    <DIR>          ..
12/31/2014  06:52 PM    <DIR>          Server Node
               0 File(s)              0 bytes
               3 Dir(s)  192,058,118,144 bytes free

D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.0.0\logs>

----------------------------------------------------------------------------------------------------------------------------

D:\Installed_software\dis_parsingsrv02\dspk\AppServerAgent\ver4.0.0.0>

JVM Configuration

-Dappagent.install.dir="D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent/ver4.0.0.0" -javaagent:"D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent/ver4.0.0.0/javaagent.jar"

Error

Install Directory resolved to[D:/Installed_software/dis_parsingsrv02/dspk/AppServerAgent/ver4.0.0.0]
java.lang.NoSuchFieldError: useASM501
    at com.singularity.ee.agent.appagent.kernel.JavaAgent.<clinit>(JavaAgent.java:102)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.Class.newInstance(Class.java:374)
    at com.singularity.ee.agent.appagent.AgentEntryPoint.premain(AgentEntryPoint.java:151)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
    at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)

Regards

Sanjeev

0 Karma

Arun_Dasetty
Super Champion

Hi Sanjeev,

We see the latest error ""java.lang.NoSuchFieldError: useASM501" is different and we see this could be related corrupted fine, We request you to download afresh agent artifact from our download again and make sure checksum/mdf5 value matches with new downloaded artifact and see how it goes after providing executable permissions to the latest agent directory.

Keep us posted how it goes after jvm restart with new agent directory downloaded.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Dear Arun

As sugested i have downloded file from CONSOLE / I have not found to very MD5.

Plesae find following in ppt

1) Screen short of console

2) Internal directory structure.of agent

3 Please find the config xml [ Changed to txt format extention for attcahment]

Error

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
Install Directory resolved to[D:/Installed_software/dis_parsingsrv02/dspk/AppSer
verAgent/ver4.0.0.0]
java.lang.NoSuchFieldError: useASM501
        at com.singularity.ee.agent.appagent.kernel.JavaAgent.<clinit>(JavaAgent
.java:102)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:374)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.premain(AgentEntryP
oint.java:151)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Instrumenta
tionImpl.java:382)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Instrument
ationImpl.java:397)

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Dear Arun

Please find few more observation

AppDynamics Lite [ The older version 3.x with Lite viewer]

a) working  fine with Tomcat

      Chage the startup script

b)  Working fine with Karaf / Felix  [ AppDynamics  Instalation step in karaf is as under ]

  1.  Configure the jaavaagent jar in startup script[ Refering to actual agent home director ie NON-OSGI Version]
  2.  Configure the org.osgi.framework.bootdelegation=com.sun.* com.singularity.*
  3.  Convert the  javagent jar along with dependencies other jars in appdynamics agant folder  into OSGI compatable jar
  4.  Place them into deploy folder of Karaf/felix.

3) LiteViewer Instalation

My observation

STEP 1  This start the agent and gives messg " Agent started sucesssfully"

STEP 2 Gives the OSGI Framework information to load singularity.* classes.

STEP3  This is the required to load classes required by OSGI framework [ Otherwise this will through Class not found exception]

This is working fine giving results in console

-------------------------------------------------------------------------------------------------------------------------------------------------------------

AppDynamics Pro( Eval copy) [ The older version 4.x]

a) With Tomcat javaagent jar is wirking fine

b) For Karaf / Felix

          Wehave followed same step as mentioned with [ para B]

           Error in STEP1 is no-way related to OSGI Compatable Jar

[ java.lang.NoSuchFieldError: useASM501]

 Observation         

We can find there are multiple jar with same name "javaagent"

AppServerAgent\ver4.0.0.0\utils\threadprofiler\javaagent.jar

AppServerAgent\ver4.0.0.0\javaagent.jar

Arun, I  have just brief you the full background Let us solve the STEP 1  Error First. Then we can go ahead.

Please keep posted.

          

Regards

sanjeev

    

     

      

0 Karma

Arun_Dasetty
Super Champion

Hi Sanjeev,

Can you try the following agent which is 3.9.6 version of agent and if issue persists,  Can you raise help ticket at help.appdynamics.com Or email to help@appdynamics.com so that we can involve exports review Or file internal bug to debug further. Hope that is fine with you.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Dear Arun

Thanks for sending zip file. The error stands same, Sending mail.

Regards

Sanjeev 

0 Karma

Arun_Dasetty
Super Champion

Hi Sanjeev,

Sure please feel free to file help ticket so that we can involve our experts team for to assist you further. We see earlier same case and the error raised due to corrupted file downloaded, before you file ticket check md5/checksum , you can use utility like to check the same: http://www.microsoft.com/en-in/download/details.aspx?id=11533 with value at popup on clicking link "checksums" in download.appdynamics.com.

Regards,

Arun

0 Karma
Get Updates on the Splunk Community!

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Community Feedback

We Want to Hear from You! Share Your Feedback on the Splunk Community   The Splunk Community is built for you ...

Manual Instrumentation with Splunk Observability Cloud: Implementing the ...

In our observability journey so far, we've built comprehensive instrumentation for our Worms in Space ...