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
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
/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
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
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.
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
Hi Brain,
How can we verify if tomcat can write to agent logs directory?
Im running tomcat, agent, controller all on same host under my user still cant see agent on controller and logs arent been written.
Regards
Narita
Hi Narita,
The tomcat user needs to be able to write the $AGENT_HOME/<version>/logs/ and $AGENT_HOME/<version>/conf/ directory.
You can verify that by checking the tomcat user and the permissions on those directories, or you can make those directories writable by all.
If tomcat, agent, controller all all running on the same host as your user, then permissions is not the problem.
It's most likely that the tomcat startup does not include the agent correctly. Please compare your configuration with the documentation at: https://docs.appdynamics.com/display/PRO43/Apache+Tomcat+Startup+Settings
Regards,
Brian
Google:
"linux find user running process"
"linux who owns folder"
Regards,
Brian Wheeldon
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
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
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
Hi I am having the same issue.
I downloaded the java agent from teh controller. copied to linux vm via winscp.
unzipped the installer.zip in the appd folder
i did all the above as the appd user.
Then as tomcat user, i created a setenv.sh file . added export CATALINA_OPTS=
"$CATALINA_OPTS -javaagent:/home/appdt/javaagent.jar"
and restared the tomcat(catalina.sh start and catalina.sh run)
I got an error :
Error opening zip file or JAR manifest missing : /home/appd/javaagent.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /home/appd/javaagent.jar
Error occurred during initialization of VM
agent library failed to init: instrument
i went and as appd user
chmod 755 javaagent.jar
retstarted tomcat agin. No result.
No agent success logs
More than a few times, I've seen Unix files corrupted when copied from Windows to Linux via WinSCP.
If the copy is not explicitely "binary", Unix end-of-iines are converted to Windows end-of-lines and the file won't work.
I'm not saying that's definitely what happened in your case, but the error messages are consistent with that kind of file corruption.
Regards,
Brian Wheeldon
i guess that can be an issue. This is the only way i can copy the bits from a windows server to the linux VM.
Also I see that the javaagent.jar and log folders do not show todays date. even after i got the agent install success message after tomcat restart.
is there a solution to this? that is the only i can work on this. copy from a windows machine .
can i skip winscp all togther and use the linux command scp get and put ?
I am uninstalling right now. I will delete the setnev,sh file. delete the zip folder
and restrts the tomcat .
and what user do you recommend tp use while installing?
The best practice is to install the Java Agent as the same user that runs the app server you want to monitor.
Brian
I am confused here. Because my undertsanding was that if we isntall as root , we are not messing with changing permissions for any user. I work in a client env. there are regulations here, the application user( they have the sole rights to restart the JVMs/instances) and the server admins are dofferent team( they have root on app servers, hence they install the agent). Hence we always install as root. What teh advantages of installing as the same user like you suggested?
You may install the agent as root, but it's not required or recommended.
It's necessary that the application server user can write the $AGENT_HOME/<version>/logs/ and $AGENT_HOME/<version>/conf/ directories. If you install the agent as root and don't make those directories writable by the app server user, then the agent startup will fail.
Doc reference: https://docs.appdynamics.com/display/PRO43/Install+the+Java+Agent