# Connection could not be made because the target machine actively refused it

**URL:** <https://discuss.elastic.co/t/connection-could-not-be-made-because-the-target-machine-actively-refused-it/126111>\
**Category:** Elasticsearch\
**Created:** [March 29, 2018, 3:10pm UTC](https://discuss.elastic.co/t/connection-could-not-be-made-because-the-target-machine-actively-refused-it/126111 "2018-03-29T15:10:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaishali1](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vaishali1](https://discuss.elastic.co/u/vaishali1)\
**Post date:** [March 29, 2018, 3:10pm UTC](https://discuss.elastic.co/t/connection-could-not-be-made-because-the-target-machine-actively-refused-it/126111/1 "2018-03-29T15:10:04Z")

</div>

Hi,  
I am facing some issue with metricbeats connection  
Failed to connect: Get [http://ipaddress:9200](http://ipaddress:9200): proxy connect tcp: dial tcp 127.0.0.1:3128: connectex: No connection could be made because the target machine actively refused it.

**Metricbeat**

```auto
metricbeat.modules:
- module: system
  metricsets:
    - cpu
    - filesystem
    - memory
    - network
    - process
  enabled: true
  period: 5s
  processes: ['.*']
  cpu_ticks: false

output.elasticsearch:
  hosts: ["http://ipaddress:9200"]

```

**Elasticsearch:** in elasticsearch.yml

```auto
network.host: ipaddress
http.port: 9200

```

---

<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:** [April 26, 2018, 3:10pm UTC](https://discuss.elastic.co/t/connection-could-not-be-made-because-the-target-machine-actively-refused-it/126111/2 "2018-04-26T15:10:04Z")

</div>

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