# How my config file should be on publish mode with a single node?

**URL:** <https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034>\
**Category:** Elasticsearch\
**Created:** [July 5, 2019, 7:38am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034 "2019-07-05T07:38:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![emrealtan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrealtan/32/49268_2.png) [@emrealtan](https://discuss.elastic.co/u/emrealtan)\
**Post date:** [July 5, 2019, 7:38am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/1 "2019-07-05T07:38:32Z")

</div>

Hello,

I'm trying to setup Elasticsearch on our porduction server. Initially, we'll use only one server, which means we'll have only one node. But I couldn't figure out how the configuration should be on a production server with a single node. I've tried some combinations which I described [here](https://discuss.elastic.co/t/188508) but no luck.

So basically, can you give me an example for the yml configuration file for publish mode with a single node?

Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 5, 2019, 9:18am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/2 "2019-07-05T09:18:18Z")

</div>

Should be ok with:

```auto
network.host: 0.0.0.0

```

---

<div class="post-metadata">

**Author:** ![emrealtan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrealtan/32/49268_2.png) [@emrealtan](https://discuss.elastic.co/u/emrealtan)\
**Post date:** [July 5, 2019, 11:13am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/3 "2019-07-05T11:13:26Z")

</div>

Hi @dadoonet and thanks for helping. When I set the network host only it says:  
`[2019-07-05T14:10:52,582][INFO][o.e.b.BootstrapChecks] [] bound or publishing to a non-loopback address, enforcing bootstrap checks`  
and  
`[2019-07-05T14:10:52,598][ERROR][o.e.b.Bootstrap] [] node validation exception [1] bootstrap checks failed [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured`  
in the log file.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 5, 2019, 4:05pm UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/4 "2019-07-05T16:05:18Z")

</div>

Please read [https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html)

---

<div class="post-metadata">

**Author:** ![emrealtan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrealtan/32/49268_2.png) [@emrealtan](https://discuss.elastic.co/u/emrealtan)\
**Post date:** [July 8, 2019, 7:59am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/5 "2019-07-08T07:59:34Z")

</div>

Hi,

I've read that wiki page before and I've set discovery.type to single-node but then it said:

`cannot start with [discovery.type] set to [single-node] when local node does not have quorum in voting configuration VotingConfiguration`

We've lost two weeks already.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 8, 2019, 8:12am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/6 "2019-07-08T08:12:29Z")

</div>

This means that this node previously was part of a larger cluster, and doesn't necessarily have the latest cluster state, so can't become a one-node cluster since that would risk losing data. You'll need to join it back to the larger cluster and then [follow the instructions for removing half or more of the master-eligible nodes](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-adding-removing-nodes.html#modules-discovery-removing-nodes) so that you end up in a position where this node is certain to have the latest cluster state.

---

<div class="post-metadata">

**Author:** ![emrealtan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrealtan/32/49268_2.png) [@emrealtan](https://discuss.elastic.co/u/emrealtan)\
**Post date:** [July 8, 2019, 8:35am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/7 "2019-07-08T08:35:13Z")

</div>

Hi David and thanks for the fast reply.  
Actually I don't understand, I've just installed the Elasticsearch and tried to run the service. I didn't create another cluster before. I don't have any data in that server, I just want to run the Elasticsearch service which I installed recently. My config file is so basic:

`path.data: C:\ProgramData\Elastic\Elasticsearch\data`  
`path.logs: C:\ProgramData\Elastic\Elasticsearch\logs`  
`discovery.type: single-node`

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 8, 2019, 8:43am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/8 "2019-07-08T08:43:06Z")

</div>

Can you share the logs from this node from when it starts until it emits the `local node does not have quorum` message? Also you've deleted something from this message, I think, but the thing that you've deleted is important, so could you put it back?

---

<div class="post-metadata">

**Author:** ![emrealtan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrealtan/32/49268_2.png) [@emrealtan](https://discuss.elastic.co/u/emrealtan)\
**Post date:** [July 8, 2019, 9:02am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/9 "2019-07-08T09:02:54Z")

</div>

Full Log File:

> **[log.txt](https://yadi.sk/d/ur5nNg4IfZImqQ)**
>
> Посмотреть и скачать с Яндекс.Диска

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 8, 2019, 9:26am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/10 "2019-07-08T09:26:28Z")

</div>

```auto
[2019-07-08T10:52:03,376][INFO][o.e.n.Node] [ServerNameHere] node name [ServerNameHere], node ID [S1tdE5hQTCeXwElJUyqBXw], cluster name [elasticsearch]
...
[2019-07-08T10:52:25,925][INFO][o.e.c.c.Coordinator] [ServerNameHere] cluster UUID [W8qXkNWnSlab2CavcJNFQw]
...
[2019-07-08T10:52:25,932][ERROR][o.e.b.Bootstrap] [ServerNameHere] Exception
java.lang.IllegalStateException: cannot start with [discovery.type] set to [single-node] when local node {ServerNameHere}{S1tdE5hQTCeXwElJUyqBXw}{eGTcEUv2RuqfOhlGv-WOUA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=17179398144, xpack.installed=true, ml.max_open_jobs=20} does not have quorum in voting configuration VotingConfiguration{Q7UjKuM3QimcL4pCKmUB6w}

```

Yes, this node has definitely belonged to a cluster previously, and there was at least one other node with node ID `Q7UjKuM3QimcL4pCKmUB6w` in this cluster. That's not this node, because this node's unique ID is `S1tdE5hQTCeXwElJUyqBXw` instead.

If there's no data in this node then the simplest thing to do is delete the contents of `C:\ProgramData\Elastic\Elasticsearch\data` and let it start again from scratch.

---

<div class="post-metadata">

**Author:** ![emrealtan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrealtan/32/49268_2.png) [@emrealtan](https://discuss.elastic.co/u/emrealtan)\
**Post date:** [July 8, 2019, 9:42am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/11 "2019-07-08T09:42:09Z")

</div>

Yes, finally 😀

Deleting the data has solved my problem! Thank you very much David, I'm grateful.

---

<div class="post-metadata">

**Author:** ![Jeniffer](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@Jeniffer](https://discuss.elastic.co/u/Jeniffer)\
**Post date:** [July 8, 2019, 10:31am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/12 "2019-07-08T10:31:41Z")

</div>

Hey,  
I am also having problems with my single node, I built elasticsearch on a test machine  
i started configuring the security,enabled xpach and discovery type to single node.  
When i try to set the built-in users i get

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21d8b553f4f5267e095937ad85d452488115635c.png) so then i tried this:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9ff86abdc9fd19ad99cf65244767b76abcd3e460.png)  
Does anyone know whats my problem?  
When i tried to configure the passwords without the discovery.type single node it did allow me, but i need the discovery.type  
Thanks

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 8, 2019, 11:10am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/13 "2019-07-08T11:10:59Z")

</div>

Hi @Jeniffer, that looks like an unrelated issue, I suggest you open another thread about it. Also please don't post screenshots of text, they're difficult to search and are unreadable to those of us using screen-readers.

---

<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:** [August 5, 2019, 11:11am UTC](https://discuss.elastic.co/t/how-my-config-file-should-be-on-publish-mode-with-a-single-node/189034/14 "2019-08-05T11:11:08Z")

</div>

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