Java apm agent is throwing exception errors

I have a java apm agent running along the java application.I can see in the application logs the following error message quite often:

2020-01-29 09:17:39.709 [apm-remote-config-poller] ERROR co.elastic.apm.agent.report.HttpUtils - Exception when closing input stream of HttpURLConnection.
2020-01-29 09:17:39.709 [apm-remote-config-poller] ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Connection refused (Connection refused)

Any idea where this comes from?

Hi Peter,

Those exceptions indicate that Elastic Java agent is not able to reach apm server while querying remote configuration.

Agent polls server from time to time in order to apply configuration updates, if you don't use remote configuration there is no impact outside of this error message.

From the error message Connection refused it looks like the APM server is down or not reachable.

When this happens, could you try from the host where the agent runs the following command curl -v http://your-apm-server-host:8200/ where your-apm-server-host is the host running the APM server, and 8200 the port used for HTTP connections on this server ?

It should normally reply with 200 status code.

I had one of the apm servers down. Stupid me should've though about that. Thanks anyways.

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