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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Thanks for the Memories: .conf26 Took Learning to New Heights

Thank you, Splunk Community, for making .conf26 in Denver one for the books. From packed Splunk University ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...