# Error fetching data for metricset logstash.node\_stats: error making http request: Get \\"http://localhost:9600/\\": dial tcp 127.0.0.1:9600: connect: connection refused

**URL:** <https://discuss.elastic.co/t/error-fetching-data-for-metricset-logstash-node-stats-error-making-http-request-get-http-localhost-9600-dial-tcp-127-0-0-1-connect-connection-refused/321005>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 12, 2022, 8:12am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-logstash-node-stats-error-making-http-request-get-http-localhost-9600-dial-tcp-127-0-0-1-connect-connection-refused/321005 "2022-12-12T08:12:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxxl](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@maxxl](https://discuss.elastic.co/u/maxxl)\
**Post date:** [December 12, 2022, 8:12am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-logstash-node-stats-error-making-http-request-get-http-localhost-9600-dial-tcp-127-0-0-1-connect-connection-refused/321005/1 "2022-12-12T08:12:53Z")

</div>

3 logstash node works fine

 ![изображение](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c1186f2714f1edf07a1a4741c167984354e74772.png)

i`m add 4th node

configs the sames

/etc/metricbeat/modules.d/logstash-xpack.yml

```auto
# Module: logstash
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/main/metricbeat-module-logstash.html

- module: logstash
  xpack.enabled: true
  period: 10s
  hosts: ["localhost:9600"]
  #username: "user"
  #password: "secret"
  metricsets: ["node", "node_stats"]
  period: 10s
  ssl.enabled: true
  ssl.certificate_authorities: ["/etc/metricbeat/http_ca.crt"]

```

/etc/metricbeat/metricbeat.yml |grep -v '#'

```auto
metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression

setup.kibana:
  host: "xxx:5601"

output.elasticsearch:
  hosts: ["https://xxx1:9200", "https://xxx2:9200", "https://xxx3:9200"]
  protocol: "https"
  username: "elastic"
  password: "pass"
  ssl.certificate_authorities: ["/etc/metricbeat/http_ca.crt"]

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

logging.level: info
logging.to_files: true
logging.files:
  path: /var/log/metricbeat
  name: metricbeat
  keepfiles: 7
  permissions: 0640

logging.selectors: ["*"]

```

error log

```auto
{"log.level":"error","@timestamp":"2022-12-12T11:16:23.493+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node_stats: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-12-12T11:16:23.496+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-12-12T11:16:33.494+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node_stats: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-12-12T11:16:33.494+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}

```

---

<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:** [January 9, 2023, 10:13am UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-logstash-node-stats-error-making-http-request-get-http-localhost-9600-dial-tcp-127-0-0-1-connect-connection-refused/321005/2 "2023-01-09T10:13:33Z")

</div>

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