cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Installing Java Agent

tiagomacul
New Poster

I'm following the 

https://docs.appdynamics.com/display/PRO43/Java+Agent

 

I'm using  CENTOS

 

01. 

<>/controller/#/location=GETTING_STARTED_JAVA&timeRange=last_15_minutes.BEFORE_NOW.-1.-1.15

 

02. JVM i select SUN/Rockit (Is this right?)

 

03. Configure - allready configured is SaaS

 

04. Download

 

05. Install Agent

05.a unzip

05.b Set the value of -javaagent to the path to the Java Agent JAR file.

 

06. 

$TOMCAT_HOME/bin/catalina.sh

 

 

I make some mistake, but how can i find this error?

 

Regards

 

 

 

 

 

22 REPLIES 22

Brian.Wheeldon
AppDynamics Team (Retired)

Step 2 is correct.

 

After step 5a, did you follow the instructions at https://docs.appdynamics.com/display/PRO43/Apache+Tomcat+Startup+Settings to add the "-javaagent:<agent_home>/javaagent.jar" term to the JVM startup?

 

That should work.

 

Regards,

Brian Wheeldon

 

Brian Wheeldon, Solution Engineer, NYC




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

tiagomacul
New Poster

HI, 

 

Tks for answering...

 

Hi put, Is here soomething wrong?

 

 

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/tmp/appd/javaagent.jar"

 

after that i restarted the tomcat and my application doesnt works, 

 

Regards

Brian.Wheeldon
AppDynamics Team (Retired)

The -javaagent term looks OK, but there is not enough information here to determine what went wrong.

Did you check that the path /tmp/appd/javaagent.jar is correct and javaagent.jar is readable by the user that runs Tomcat?

 

Did Tomcat start? If so, there should be an error message in the Tomcat logs.

Was the agent started? If so, you'll see messages in the Tomcat startup and agent logs in /tmp/appd/<version>/logs/<nodename>/

 

Regards,

Brian Wheeldon

 

Brian Wheeldon, Solution Engineer, NYC




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

Hi Brian,

 

  You was right, before your tip about rights, i could get started: My Application, but i cannot see my app on AppDynamics, therefore i did a trace like you said:

 

The -javaagent term looks OK, but there is not enough information here to determine what went wrong.

tmp_directory.png

Did you check that the path /tmp/appd/javaagent.jar is correct and javaagent.jar is readable by the user that runs Tomcat?

 

I runed "chmod -R 755 appd" for tomcat user but cannot check using "ls -ld"

 

 

 

Did Tomcat start? If so, there should be an error message in the Tomcat logs.

Yes, It's started, i can see my application right now.

 

 

Was the agent started?

I don't know. how can i check if is it my agent start?

 

 

If so, you'll see messages in the Tomcat startup and agent logs in /tmp/appd/<version>/logs/<nodename>/

/tmp/appd/<version>/logs/ -  It's empty

log_directory.png

 

 

Regards,

Tiago

 

tiagomacul
New Poster

 

 

/opt/tomcat/apache-tomcat-8.0.30/logs/catalina.out

 

[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: AgentInstallManager - Agent runtime directory set to [/tmp/appd/ver4.3.1.0]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: AgentInstallManager - Agent node directory set to [Java101Template.localdomain]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Using Java Agent Version [Server Agent v4.3.1.0 GA #15057 r867530f5c748a55ce75851534ad0942226c06d8b 45-4.3.1.next-analytics]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Running IBM Java Agent [No]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Java Agent Directory [/tmp/appd/ver4.3.1.0]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Java Agent AppAgent directory [/tmp/appd/ver4.3.1.0]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - ####################################################################################
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Java Agent Directory [/tmp/appd/ver4.3.1.0]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Java Agent AppAgent directory [/tmp/appd/ver4.3.1.0]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - Using Java Agent Version [Server Agent v4.3.1.0 GA #15057 r867530f5c748a55ce75851534ad0942226c06d8b 45-4.3.1.next-analytics]
[Thread-0] Wed May 31 18:39:28 UTC 2017[INFO]: JavaAgent - All agent classes have been pre-loaded
[Thread-0] Wed May 31 18:39:28 UTC 2017[DEBUG]: JavaAgent - Using Java Version [JAVA_18] for AppDynamics Java Agent
Running obfuscated agent
Started AppDynamics Java Agent Successfully.
[Thread-0] Wed May 31 18:39:35 UTC 2017[INFO]: JavaAgent - Started AppDynamics Java Agent Successfully.
 Started AppDynamics Java Agent Successfully

Is it means the agent works?

 

Regards

 

Brian.Wheeldon
AppDynamics Team (Retired)

Yes. 

Started AppDynamics Java Agent Successfully

Indicates that the agent is running and should be collecting metrics from your application.

The agent log files should be present below /tmp/appd/ver4.3.1.0/logs/

You should be able to see the application, tier and Tomcat node in the AppDynamics UI.

 

Brian

Brian Wheeldon, Solution Engineer, NYC




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

Hi Brian,

 

Thank You. The right answer for the firts question was; rights.

 

Do I see it here at application TAB? i have not seen yet. Can i looking for where is my new mistake? Where?

 

Wow works the Appd communication? Appdynamics agent is pushing to server?

 

I believe this configuration is at controller-info.xml file.


I tried to run netstat looking for traffic, but i couldn't see.

 

appd_application.png

Brian.Wheeldon
AppDynamics Team (Retired)

The agent will report metrics to the Controller.

The Controller will create the application named by the agent if it doesn't exist.

 

There is a mismatch in the information provided. The Tomcat catalina.out log suggests the agent was started correctly, but the Controller UI does not agree.

Do you see agent logs below /tmp/appd/ver4.3.1.0/logs/ ?

If so, the agent log should indicate the problem. 

If not, then verify that the Tomcat user can write that directory (and also  /tmp/appd/ver4.3.1.0/conf/).

 

Regards,

Brian Wheeldon

Brian Wheeldon, Solution Engineer, NYC




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

Hi Brian,

 

   Thank You, I appreciate your help and support.

 

 My secound solution was update the controller-info.xml with the correct <controller-host>.

 

Regards

Tiago