Splunk AppDynamics

Tomcat Installation - Waiting for Connection

CommunityUser
Splunk Employee
Splunk Employee

I am trying to get the APM set up with Tomcat. I can see from the Tomcat logs that it is finding the agent:

2017-07-27 05:29:11 Commons Daemon procrun stdout initialized Full Agent Registration Info Resolver using selfService [true] Full Agent Registration Info Resolver using selfService [true] Full Agent Registration Info Resolver using application name [null] Full Agent Registration Info Resolver using tier name [unknown] Full Agent Registration Info Resolver using node name [null] Install Directory resolved to[C:\apache-tomcat7-8086-stcdemosaf\appdynamics] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[DEBUG]: AgentInstallManager - Full Agent Registration Info Resolver is running [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using selfService [true] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using selfService [true] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using application name [null] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using tier name [null] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using node name [null] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[DEBUG]: AgentInstallManager - Full Agent Registration Info Resolver finished running [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Agent runtime directory set to [C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: AgentInstallManager - Agent node directory set to [STC-DEMOS] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Using Java Agent Version [Server Agent v4.3.3.4 GA #15258 r7589b120c9edcff2fc8a4e714ef35d4c35cfb787 3600-4.3.3.next-analytics] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Running IBM Java Agent [No] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Java Agent Directory [C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Java Agent AppAgent directory [C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - #################################################################################### [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Java Agent Directory [C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Java Agent AppAgent directory [C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - Using Java Agent Version [Server Agent v4.3.3.4 GA #15258 r7589b120c9edcff2fc8a4e714ef35d4c35cfb787 3600-4.3.3.next-analytics] [Thread-0] Thu Jul 27 05:29:13 PDT 2017[INFO]: JavaAgent - All agent classes have been pre-loaded [Thread-0] Thu Jul 27 05:29:13 PDT 2017[DEBUG]: JavaAgent - Using Java Version [JAVA_18] for AppDynamics Java Agent Running obfuscated agent Started AppDynamics Java Agent Successfully. [Thread-0] Thu Jul 27 05:29:18 PDT 2017[INFO]: JavaAgent - Started AppDynamics Java Agent Successfully.

There is no agent log file - the logs directory is empty. I have checked the permissions on the javaagent.jar and logs directory and everything is okay there. The controller just shows waiting for connection and is never picking up the application.

Thanks in advance.

Labels (1)
0 Karma
1 Solution

Peter_Holditch
Builder

Are you absolutely certain that the C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4\logs directory is writeable by the user id that is running to tomcat?

What happens if you run

java -Dappdynamics.agent.applicationName=MyApp -Dappdynamics.agent.tierName=MyTier -Dappdynamics.agent.nodeName=MyNode -javaagent:C:\apache-tomcat7-8086-stcdemosaf\appdynamics\javaagent.jar -version

Does that sucessfully initialise the agent and connect to the controller?  Do you see log files from that?

It does appear from the log that you posted that the node name and tier name have not been set for this tomcat instance.  Can you verify that?

View solution in original post

Peter_Holditch
Builder

Are you absolutely certain that the C:\apache-tomcat7-8086-stcdemosaf\appdynamics\ver4.3.3.4\logs directory is writeable by the user id that is running to tomcat?

What happens if you run

java -Dappdynamics.agent.applicationName=MyApp -Dappdynamics.agent.tierName=MyTier -Dappdynamics.agent.nodeName=MyNode -javaagent:C:\apache-tomcat7-8086-stcdemosaf\appdynamics\javaagent.jar -version

Does that sucessfully initialise the agent and connect to the controller?  Do you see log files from that?

It does appear from the log that you posted that the node name and tier name have not been set for this tomcat instance.  Can you verify that?

CommunityUser
Splunk Employee
Splunk Employee
The problem was that I didn't have the Tier and Node defined in the XML file. I added that and it is now working. Thanks for your help.
0 Karma
Get Updates on the Splunk Community!

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...