APM server is not available (connection refused)

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

Kibana version: 7.8.0

Elasticsearch version: 7.8.0

APM Server version: 7.8.0

APM Agent language and version: Java agent version 1.17.0

Browser version:
chrom Version 83.0.4103.61

Original install method (e.g. download page, yum, deb, from source, etc.) and version:
using curl command on linux

Fresh install or upgraded from other version? Fresh

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I am able to connect to APM server via APM java agent with both running on localhost but when i try to connect to APM server from a remote machine via java agent it says APM server is not available. I have enable rum.enabled = true.

Steps to reproduce:

  1. Install APM server, elastic search and kibana on the same machine and start all of them.
  2. Try running a spring boot application with APM java agent from a different machine where APM server is running .

Errors in browser console (if relevant): NA

Provide logs and/or server output (if relevant):
2020-07-10 14:06:54,766 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.17.0 as textsearch on Java 11.0.7 (Amazon.com Inc.) Linux 4.14.181-140.257.amzn2.x86_642020-07-10 14:06:54,798 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state2020-07-10 14:06:54,932 [elastic-apm-server-healthcheck] WARN co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server http://himanshu.ws:8200/ is not available (Connection refused (Connection refused))2020-07-10 14:06:54,935 [elastic-apm-remote-config-poller] ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Connection refused (Connection refused)

Hi and welcome to the forum!
Please check out the common problems and other sections in the Troubleshooting section of our documentation.


I was able to fix it by replacing host:localhost with host:ip in apm-server.yml.


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