# Heartbeat showing 1/2 of my nodes down

**URL:** <https://discuss.elastic.co/t/heartbeat-showing-1-2-of-my-nodes-down/271680>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [April 29, 2021, 4:21pm UTC](https://discuss.elastic.co/t/heartbeat-showing-1-2-of-my-nodes-down/271680 "2021-04-29T16:21:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marone/32/87145_2.png) [@marone](https://discuss.elastic.co/u/marone)\
**Post date:** [April 29, 2021, 4:21pm UTC](https://discuss.elastic.co/t/heartbeat-showing-1-2-of-my-nodes-down/271680/1 "2021-04-29T16:21:40Z")

</div>

Hey I have two nodes of elasticsearch running in two separate VMs in azure, I set up SSL + https for my cluster and secured kibana too running in VM1. I used self signed certificates following this [doc](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html). I used the file `elasticsearch-ca.pem` generated in the [Encrypt HTTP client communications for Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html#encrypt-http-communication) in my `heartbeat.yml` file.

I installed heartbeat in VM1 and VM2, for VM1 heartbeat showing a status of Up, whereas for VM2 showing down with the following error:

> Get "[https://localhost:9200](https://localhost:9200)": http: server gave HTTP response to HTTPS client]

my heartbeat.yml for vm2 (similar to my conf in vm1):

```yml
heartbeat.config.monitors:
  # Directory + glob pattern to search for configuration files
  path: ${path.config}/monitors.d/*.yml
  # If enabled, heartbeat will periodically check the config.monitors path for changes
  reload.enabled: false
  # How often to check for changes
  reload.period: 5s

# Configure monitors inline
heartbeat.monitors:
- type: http
  # ID used to uniquely identify this monitor in elasticsearch even if the config changes
  id: monitor-node2
  # Human readable display name for this service in Uptime UI and elsewhere
  name: Monitor node2
 # List or urls to query
  urls: ["https://localhost:9200"]
  username: "elastic"
  password: "${ES_PWD}"
  # Configure task schedule
  schedule: '@every 10s'
  # Total test connection and data exchange timeout
  #timeout: 16s
  # Name of corresponding APM service, if Elastic APM is in use for the monitored service.
  #service.name: my-apm-service-name
  ssl:
    certificate_authorities: ['/etc/heartbeat/config/certs/elasticsearch-ca.pem']
    verification_mode: none
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression

setup.kibana:
        host: "https://nodeName.regionName.cloudapp.azure.com:5601"
        ssl.enabled: true
        ssl.verification_mode: none

output.elasticsearch:
  # Array of hosts to connect to.
        hosts: ["node1:9200", "node2:9200"]
        username: "elastic"
        password: "${ES_PWD}"
        protocol: "https"
        ssl.verification_mode: none

processors:
  - add_observer_metadata:

```

`heartbeat.yml` for vm1:

```yml
heartbeat.config.monitors:
  # Directory + glob pattern to search for configuration files
  path: ${path.config}/monitors.d/*.yml
  # If enabled, heartbeat will periodically check the config.monitors path for changes
  reload.enabled: false
  # How often to check for changes
  reload.period: 5s

# Configure monitors inline
heartbeat.monitors:
- type: http
  # ID used to uniquely identify this monitor in elasticsearch even if the config changes
  id: monitor-demo-elastic-node1
  # Human readable display name for this service in Uptime UI and elsewhere
  name: Monitor node1
  # List or urls to query
  urls: ["https://localhost:9200"]
  username: "elastic"
  password: "${ES_PWD}"
  # Configure task schedule
  schedule: '@every 10s'
  ssl:
    certificate_authorities: ['/etc/heartbeat/config/certs/elasticsearch-ca.pem']
    verification_mode: none
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
setup.kibana:
        host: "localhost:5601"
        ssl.enabled: true
        ssl.verification_mode: none

output.elasticsearch:
  # Array of hosts to connect to.
        hosts: ["node1:9200", "node2:9200"]
        username: "elastic"
        password: "${ES_PWD}"
        protocol: "https"
        ssl.verification_mode: none
processors:
  - add_observer_metadata:

```

one thing to mention that I have the same error in metricbeat for vm2 (aka node2):

> metricbeat[12848]: 2021-04-29T16:19:13.321Z ERROR [publisher\_pipeline\_output] pipeline/output.go:154 Failed to connect to backoff(elasticsearch([https://node2:9200](https://node2:9200))): Get "[https://node2:9200](https://node2:9200)": http: server gave HTTP response to HTTPS client

I don't know what's wrong is it a problem related to `elasticsearch-ca.pem` file ?

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [April 29, 2021, 8:43pm UTC](https://discuss.elastic.co/t/heartbeat-showing-1-2-of-my-nodes-down/271680/2 "2021-04-29T20:43:51Z")

</div>

It seems like ES is not setup to use TLS based on that error. Have you confirmed that using curl or a browser ES is actually setup to use TLS?

---

<div class="post-metadata">

**Author:** ![marone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marone/32/87145_2.png) [@marone](https://discuss.elastic.co/u/marone)\
**Post date:** [April 29, 2021, 9:20pm UTC](https://discuss.elastic.co/t/heartbeat-showing-1-2-of-my-nodes-down/271680/3 "2021-04-29T21:20:20Z")

</div>

yes @Andrew_Cholakian1 thanks for your comment, as you said I checked my `elasticsearch.yml` in vm2 and found that the following two lines were commented:

```auto
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: /etc/elasticsearch/config/certs/http.p12

```

after uncommenting the above lines problem resolved! 😀

---

<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:** [May 27, 2021, 11:20pm UTC](https://discuss.elastic.co/t/heartbeat-showing-1-2-of-my-nodes-down/271680/4 "2021-05-27T23:20:37Z")

</div>

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