Controller (SaaS, On Premise)

cancel
Showing results for 
Search instead for 
Did you mean: 

Java agent not able to connect to the Controller

Wanderer

Java agent not able to connect to the Controller

I just installed the Java agent for AppDynamics, version 4.4.2.22394 in our Tomcat 7.0.52 server running on Java 1.8.0_144 on an Ubuntu 14.04 AWS instance. When I do a ps, I can see that the additional JAVA_OPTS from setenv.sh indeed made it into the command line that kicks off the underlying JVM. However, in the AppDynamics Web UI, I still see "Waiting for Connection...", so, to me, it looks like the agent is unable to connect to the controller.

I have checked connectivity from the server system to the controller, and both nslookup and curl confirm that the server should be able to reach the controller.

I can see a number of interesting items in the console log, most notably:

12:59:50,724  INFO [Thread-0] XMLConfigManager - Keystore file /var/lib/tomcat7/appdynamics/ver4.4.2.22394/conf/cacerts.jks was not found
12:59:51,625  WARN [Thread-0] AgentConfigWatchdog - Error in initializing from app-agent-config.xml
java.lang.NullPointerException
	at com.singularity.ee.agent.appagent.kernel.config.xml.a.a(a.java:474)
	at com.singularity.ee.agent.appagent.kernel.config.xml.a.d(a.java:432)
	at com.singularity.ee.agent.appagent.kernel.config.xml.a.doOnChange(a.java:123)
	at com.singularity.util.org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:87)
	at com.singularity.util.org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:59)
	at com.singularity.ee.agent.appagent.kernel.config.xml.a.<init>(a.java:101)
	at com.singularity.ee.agent.appagent.kernel.config.xml.e.d(e.java:369)
	at com.singularity.ee.agent.appagent.kernel.config.xml.e.<init>(e.java:168)
	at com.singularity.ee.agent.appagent.kernel.m.start(m.java:112)
	at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:510)
	at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:308)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.singularity.ee.agent.appagent.AgentEntryPoint$1.run(AgentEntryPoint.java:647)

The conf/cacerts.jks file is indeed not present, but I just followed the standard setup instructions, which suggest that the agent ZIP file that I downloaded is already fully pre-configured.

 

Am I missing a step here? What else can I do to troubleshoot this type of agent connectivity issue?

 

Java agent not able to connect to the Controller
4 REPLIES
Architect

Re: Java agent not able to connect to the Controller

Did you configure the controller-info.xml under the conf folder to point to your controller?

Also, have you set ssl enabled to true in that file?

Wanderer

Re: Java agent not able to connect to the Controller

Thanks for the prompt response, @gurmitsa.

 

The URL in the controller-info.xml matches the one that is shown in the web UI; I did not manually change that file, but it looks like the custom download did contain the correct configuration already prepackaged. I did select "Use SSL" on the download page, and config file contains 

<controller-ssl-enabled>true</controller-ssl-enabled> as well as 

<controller-port>443</controller-port>, which seems to be consistent with using HTTPS/TLS.

 

Is there any additional configuration that I'm missing?

Architect

Re: Java agent not able to connect to the Controller

Are you able to curl the appdynamics host and port from the server you have your agent on?

the agent first checks for valid certificate under the server local store and then looks for it under the conf directory, do you see the certificate under <agent_home>/conf instead?

 

Thanks,

Gurmit.

Wanderer

Re: Java agent not able to connect to the Controller

As I stated in my original post, I was able to verify connectivity via curl.

 

I eventually managed to connect to the agent successfully, there was just a pretty significant time delay for the the connection to be established. So, basically I just had to wait a little bit longer. Also, the initial page where you download the agent suggests that it would update once the connection is established, but that doesn't work (i.e., even after I had already connected via a different browser window that page still said "Waiting for connection...").

 

Anyway, thanks for the support! Initial connectivity is solved, now I just need AD to make sense of our mainly WebSocket-based application, but I posted different topics for that.