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 ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.