Not Able to connect my apm-agent to my apm -server hosted on different aws servers

Hi Team,

I have hosted an apm-server on one of my servers with host as localhost:8200.
I am using a java application via tomcat and I have provided -Delastic.apm.server_url=http://apm-server-ip:8200

But the java application provides the below error

ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at http://...:8200/intake/v2/events. Some details about SSL configurations corresponding the current connection are logged at INFO level.
2021-08-18 19:49:42,956 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: Connection refused (Connection refused)
2021-08-18 19:49:42,956 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 0 seconds (+/-10%)
2021-08-18 19:49:43,154 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at http://...:8200/intake/v2/events. Some details about SSL configurations corresponding the current connection are logged at INFO level.
2021-08-18 19:49:43,154 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: Connection refused (Connection refused)
2021-08-18 19:49:43,154 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 1 seconds (+/-10%)
2021-08-18 19:49:44,385 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at http://...:8200/intake/v2/events. Some details about SSL configurations corresponding the current connection are logged at INFO level.
2021-08-18 19:49:44,386 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: Connection refused (Connection refused)
2021-08-18 19:49:44,386 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 4 seconds (+/-10%)

When I set up the APM -server and APM-agent on the same server it works fine but if it's on a separate box I am getting the above error

can someone guide me how to solve this

Hi, can you please fire this link http://apm-server-ip:8200 and share output, but use command line or internet browser. If you are using Linux OS, you can fire this command: curl "http://apm-server-ip:8200".

Hi Ramon

I was able to sort out the problem.
Thanks for the help :slight_smile:

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