cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connection to host failed: Read time out

Anonymous
Not applicable

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

2 REPLIES 2

Severin.Neumann
AppDynamics Team

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...

Anonymous
Not applicable

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)

 

 

Ask the Experts Session: Hybrid Application Monitoring Deployment

Join us on Feb 26 to explore Splunk AppDynamics deployment strategies, SaaS models, agent rollout plans, and expert best practices.


Register Now

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here