Splunk AppDynamics

Connection to host failed: Read time out

CommunityUser
Splunk Employee
Splunk Employee

Hi,

my Java appagent have trouble to connect to the controller. It starts up just fine (2017-06-02 11:48:01.371::INFO: Started AppDynamics Java Agent Successfully.) but after a while i got following exception in the agent log.

[AD Thread Pool-Global1] 02 Jun 2017 11:51:55,352 ERROR ConfigurationChannel - Exception: Connect to loki:8090 [loki/172.16.50.38] failed: Read timed out 
org.apache.http.conn.ConnectTimeoutException: Connect to loki:8090 [loki/172.16.50.38] failed: Read timed out
        at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:134)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
        at com.singularity.ee.util.httpclient.m.a(m.java:290)
        at com.singularity.ee.util.httpclient.m.a(m.java:205)
        at com.singularity.ee.rest.d.D(d.java:387)
        at com.singularity.ee.rest.d.C(d.java:340)
        at com.singularity.ee.rest.controller.request.b.C(b.java:111)
        at com.singularity.ee.rest.controller.request.c.a(c.java:35)
        at com.singularity.ee.agent.appagent.kernel.config.xml.k.a(k.java:1320)
        at com.singularity.ee.agent.appagent.kernel.config.xml.k.a(k.java:110)
        at com.singularity.ee.agent.appagent.kernel.config.xml.r.a(r.java:629)
        at com.singularity.ee.agent.appagent.kernel.config.xml.k.a(k.java:409)
        at com.singularity.ee.agent.appagent.kernel.config.xml.B.run(B.java:612)
        at com.singularity.ee.util.javaspecific.scheduler.n.run(n.java:122)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at com.singularity.ee.util.javaspecific.scheduler.y.e(y.java:335)
        at com.singularity.ee.util.javaspecific.scheduler.a.b(a.java:152)
        at com.singularity.ee.util.javaspecific.scheduler.b.a(b.java:119)
        at com.singularity.ee.util.javaspecific.scheduler.b.b(b.java:206)
        at com.singularity.ee.util.javaspecific.scheduler.b.run(b.java:236)
        at com.singularity.ee.util.javaspecific.scheduler.i.a(i.java:694)
        at com.singularity.ee.util.javaspecific.scheduler.i.run(i.java:726)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:170)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
        at sun.security.ssl.InputRecord.read(InputRecord.java:503)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
        at com.singularity.ee.util.httpclient.c.createLayeredSocket(c.java:148)
        at com.singularity.ee.util.httpclient.c.connectSocket(c.java:193)
        at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125)
        ... 29 more

 I also checkt the connection to the controller with "telnet loki 8090". Connection OK

Thanks in advanced

Labels (1)
0 Karma

Severin_Neumann
Explorer

One possible root cause might be that you have enabled SSL in your configuration but you are talking to the default non-SSL port. Can you double-check your configuration if SSL is disabled? For mor details, have a look into the documentation:

https://docs.appdynamics.com/display/PRO43/Java+Agent+Configuration+Properties#JavaAgentConfiguratio...

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

So I double-checked (both sides, controller and appagent) my controller-info.xml and the " <controller-ssl-enabled> " was default set to false. I restarted my Java Application and added the javaagent.jar with " java -Xbootclasspath/a:/<path to java>/java/lib/tools.jar -jar /<path to appDynamics>/appagent/javaagent.jar <PID>" to the running JVM, but still the same exception.

I can't explain it but somehow it worked after i reinstalled the appagent on my mashine. (configfile did not changed)

Tags (1)
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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...