# Problem with elasticsearch on single-node cluster

**URL:** <https://discuss.elastic.co/t/problem-with-elasticsearch-on-single-node-cluster/286068>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [October 6, 2021, 8:09pm UTC](https://discuss.elastic.co/t/problem-with-elasticsearch-on-single-node-cluster/286068 "2021-10-06T20:09:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasilev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasilev/32/81983_2.png) [@vasilev](https://discuss.elastic.co/u/vasilev)\
**Post date:** [October 6, 2021, 8:09pm UTC](https://discuss.elastic.co/t/problem-with-elasticsearch-on-single-node-cluster/286068/1 "2021-10-06T20:09:19Z")

</div>

Hello,  
I have one single node Elasticsearch cluster that was working for months.  
yesterday I have restarted the virtual server and after that it has problems.  
now I have redeployed again the kubernetes configuration and got an error.

java.lang.IllegalArgumentException: node with [discovery.type] set to [single-node] must be master-eligible

this is part of the configuration:

```auto
containers:
      - image: elasticsearch:7.13.4
        env:
        - name: discovery.type
          value: single-node
        - name: cluster.initial_master_nodes
          value: null

```

configmap:

```auto
data:
  elasticsearch.yml: |-
    cluster.name: "docker-cluster"
    network.host: 0.0.0.0
    discovery.type: single-node

    node.roles: ingest

    xpack.security.enabled: true
    xpack.monitoring.collection.enabled: true
    xpack.monitoring.exporters.my_local:
      type: local
      use_ingest: false

```

I will be happy if you can help me with this 🙂  
thank you !

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 7, 2021, 4:53am UTC](https://discuss.elastic.co/t/problem-with-elasticsearch-on-single-node-cluster/286068/2 "2021-10-07T04:53:01Z")

</div>

Remove node.roles from your config map. A single node cluster must be master and data as well, not just ingest.

---

<div class="post-metadata">

**Author:** ![vasilev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasilev/32/81983_2.png) [@vasilev](https://discuss.elastic.co/u/vasilev)\
**Post date:** [October 7, 2021, 9:22am UTC](https://discuss.elastic.co/t/problem-with-elasticsearch-on-single-node-cluster/286068/3 "2021-10-07T09:22:37Z")

</div>

Thank you.  
yes, i have changed the configuration and now it is ok:

```auto
data:
  elasticsearch.yml: |-
    cluster.name: ${CLUSTER_NAME}
    node.name: ${NODE_NAME}
    discovery.seed_hosts: ${NODE_LIST}
    cluster.initial_master_nodes: ${MASTER_NODES}
    network.host: 0.0.0.0
    node.roles: [master, data, ingest]
    xpack.security.enabled: true
    xpack.monitoring.collection.enabled: true
    xpack.security.transport.ssl.enabled: true

```

---

<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:** [November 4, 2021, 9:23am UTC](https://discuss.elastic.co/t/problem-with-elasticsearch-on-single-node-cluster/286068/4 "2021-11-04T09:23:03Z")

</div>

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