APM agent could not connect to APM server

Hi, I have installed APM Java agent(elastic-apm-agent-1.25.0) and instrumented IBM Websphere JVM, however I see the following error in the agent log

2021-09-07 15:40:58,900 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at http://mifrd14243.glicus.com:8200/intake/v2/events. Some details about SSL configurations corresponding the current connection are logged at INFO level.
2021-09-07 15:40:58,900 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: connect timed out
2021-09-07 15:40:58,900 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Event handling failure
java.net.SocketTimeoutException: connect timed out
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:236) ~[?:1.8.0]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:218) ~[?:1.8.0]
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183) ~[?:1.8.0]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[?:1.8.0]
	at java.net.Socket.connect(Socket.java:682) ~[?:1.8.0]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:187) ~[?:1.8.0]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:494) ~[?:1.8.0]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:589) ~[?:1.8.0]
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:256) ~[?:1.8.0]
	at sun.net.www.http.HttpClient.New(HttpClient.java:360) ~[?:1.8.0]
	at sun.net.www.http.HttpClient.New(HttpClient.java:378) ~[?:1.8.0]
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1238) ~[?:1.8.0]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1174) ~[?:1.8.0]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1068) ~[?:1.8.0]
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1002) ~[?:1.8.0]
	at co.elastic.apm.agent.report.AbstractIntakeApiHandler.startRequest(AbstractIntakeApiHandler.java:104) ~[?:?]
	at co.elastic.apm.agent.report.IntakeV2ReportingEventHandler.startRequest(IntakeV2ReportingEventHandler.java:145) ~[?:?]
	at co.elastic.apm.agent.report.IntakeV2ReportingEventHandler.handleEvent(IntakeV2ReportingEventHandler.java:87) [?:?]
	at co.elastic.apm.agent.report.IntakeV2ReportingEventHandler.onEvent(IntakeV2ReportingEventHandler.java:65) [?:?]
	at co.elastic.apm.agent.report.IntakeV2ReportingEventHandler.onEvent(IntakeV2ReportingEventHandler.java:36) [?:?]
	at co.elastic.apm.agent.shaded.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:168) [?:?]
	at co.elastic.apm.agent.shaded.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125) [?:?]
	at java.lang.Thread.run(Thread.java:818) [?:2.9 (11-06-2019)]
2021-09-07 15:40:58,900 [elastic-apm-server-reporter] INFO  co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)

Hi and thanks for your question.

Looks like a connection issue.
Check out this troubleshooting guide: Troubleshooting | APM Java Agent Reference [1.x] | Elastic.

Let us know if that helped. If it didn't, please update this thread with whatever you've found out along the way.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.