# APM Server transport error (ECONNREFUSED): connect ECONNREFUSED 127.0.0.1:8200

**URL:** <https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693>\
**Category:** APM\
**Tags:** nodejs, server\
**Created:** [September 9, 2019, 1:33pm UTC](https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693 "2019-09-09T13:33:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tje/32/53848_2.png) [@Tje](https://discuss.elastic.co/u/Tje)\
**Post date:** [September 9, 2019, 1:33pm UTC](https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693/1 "2019-09-09T13:33:34Z")

</div>

I have installed `apm-server` and setup apm-server.yml as bellow for nodeJs Agent

```auto
output.elasticsearch:
  hosts: ["localhost:9200"]
  username: "elastic"
  password: "elastic"

```

then run service apm-server start .

configured Node side as bellow

```auto
var apm = require('elastic-apm-node').start({
    serviceName: 'MyApp',
    serverUrl: 'http://localhost:8200'
  })

```

Checked status

**APM Server status : You have correctly setup APM Server**

**Agent status : Data successfully received from one or more agents**

It's worked last night and showed charts on kibana dashboard.but now i'm getting bellow error on my Console and No services found on dashboard

`[ERROR] APM Server transport error (ECONNREFUSED): connect ECONNREFUSED 127.0.0.1:8200`

Kibana - 7.3.1  
apm-server - 7.3.1  
elasticsearch - 7.3.1

I have checked `apm-server` logs directory.but there is no any log file.

and tried `curl -i http://localhost:8200`.it's says  
`curl: (7) Failed to connect to localhost port 8200: Connection refused`.

Kindly help me on this please.

---

<div class="post-metadata">

**Author:** ![jalvz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalvz/32/45613_2.png) [@jalvz](https://discuss.elastic.co/u/jalvz)\
**Post date:** [September 9, 2019, 2:02pm UTC](https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693/2 "2019-09-09T14:02:29Z")

</div>

Hi,

Is the process running? what does `ps -ef | grep apm-server` say?

If it is not running, can you try `sudo -u apm-server apm-server -e` ? What does stdout/stderr say?

---

<div class="post-metadata">

**Author:** ![Tje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tje/32/53848_2.png) [@Tje](https://discuss.elastic.co/u/Tje)\
**Post date:** [September 10, 2019, 4:56am UTC](https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693/3 "2019-09-10T04:56:04Z")

</div>

Thank you @jalvz. `sudo -u apm-server apm-server -e` worked for me.

---

<div class="post-metadata">

**Author:** ![jalvz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalvz/32/45613_2.png) [@jalvz](https://discuss.elastic.co/u/jalvz)\
**Post date:** [September 10, 2019, 8:00am UTC](https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693/4 "2019-09-10T08:00:22Z")

</div>

Glad to hear! You initially mentioned that `service apm-server status` was showing an error. If you kill that `sudo -u apm-server apm-server -e` and try again with `server apm-server start`, does it work?  
Do you find a log file `/var/log/apm-server/apm-server` ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 1, 2019, 4:00am UTC](https://discuss.elastic.co/t/apm-server-transport-error-econnrefused-connect-econnrefused-127-0-0-1-8200/198693/5 "2019-10-01T04:00:24Z")

</div>

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