# Setting multinode elk cluster

**URL:** <https://discuss.elastic.co/t/setting-multinode-elk-cluster/335165>\
**Category:** Elasticsearch\
**Created:** [June 4, 2023, 1:43pm UTC](https://discuss.elastic.co/t/setting-multinode-elk-cluster/335165 "2023-06-04T13:43:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajeshri/32/121826_2.png) [@rajeshri](https://discuss.elastic.co/u/rajeshri)\
**Post date:** [June 4, 2023, 1:43pm UTC](https://discuss.elastic.co/t/setting-multinode-elk-cluster/335165/1 "2023-06-04T13:43:41Z")

</div>

cluster.name: my-cluster  
node.name: master-1  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: 172.31.82.55  
http.port: 9200  
discovery.seed\_hosts: ["172.31.82.55", "172.31.86.217"]  
cluster.initial\_master\_nodes: ["master-1", "master-2"]  
but when I restart the elasticsearch it gives me an error  
Job for elasticsearch.service failed because the control process exited with error code.  
See "systemctl status elasticsearch.service" and "journalctl -xeu elasticsearch.service" for details.  
my instance size is cpu:4 and ram : 8 gb  
systemctl status elasticserch  
^C  
root@ip-172-31-82-55:/var/log/elasticsearch# systemctl status elasticsearch.service  
× elasticsearch.service - Elasticsearch  
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)  
Active: failed (Result: exit-code) since Sun 2023-06-04 09:07:17 UTC; 3min 12s ago  
Docs: [https://www.elastic.co](https://www.elastic.co)  
Process: 1728 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID\_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)  
Main PID: 1728 (code=exited, status=1/FAILURE)  
CPU: 28.882s

journalctl -xeu elasticsearch.service

See "systemctl status elasticsearch.service" and "journalctl -xeu elasticsearch.service" for details.  
root@ip-172-31-82-55:/etc/elasticsearch# journalctl -xeu elasticsearch.service  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:727)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1229)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: ... 7 more  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'cluster.initial\_master\_nodes'  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at [Source: (ByteArrayInputStream); line: 109, column: 29]  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at com.fasterxml.jackson.core.json.JsonReadContext.\_checkDup(JsonReadContext.java:243)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:237)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:482)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at com.fasterxml.jackson.core.JsonParser.nextFieldName(JsonParser.java:1091)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: at org.elasticsearch.xcontent.provider.json.JsonXContentParser.nextFieldName(JsonXContentParser.java:69)  
Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: ... 10 more  
Jun 04 08:57:00 ip-172-31-82-55 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE  
░░ Subject: Unit process exited  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ An ExecStart= process belonging to unit elasticsearch.service has exited.  
░░  
░░ The process' exit code is 'exited' and its exit status is 1.  
Jun 04 08:57:00 ip-172-31-82-55 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.  
░░ Subject: Unit failed  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.  
Jun 04 08:57:00 ip-172-31-82-55 systemd[1]: Failed to start Elasticsearch.  
░░ Subject: A start job for unit elasticsearch.service has failed  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ A start job for unit elasticsearch.service has finished with a failure.  
░░  
░░ The job identifier is 1578 and the job result is failed.  
Jun 04 08:57:00 ip-172-31-82-55 systemd[1]: elasticsearch.service: Consumed 2.014s CPU time.  
░░ Subject: Resources consumed by unit runtime  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ The unit elasticsearch.service completed and consumed the indicated resources.  
Jun 04 09:07:02 ip-172-31-82-55 systemd[1]: Starting Elasticsearch...  
░░ Subject: A start job for unit elasticsearch.service has begun execution  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ A start job for unit elasticsearch.service has begun execution.  
░░  
░░ The job identifier is 1744.  
Jun 04 09:07:17 ip-172-31-82-55 systemd-entrypoint[1728]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/my-cluster.log  
Jun 04 09:07:17 ip-172-31-82-55 systemd-entrypoint[1728]: ERROR: Elasticsearch exited unexpectedly  
Jun 04 09:07:17 ip-172-31-82-55 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE  
░░ Subject: Unit process exited  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ An ExecStart= process belonging to unit elasticsearch.service has exited.  
░░  
░░ The process' exit code is 'exited' and its exit status is 1.  
Jun 04 09:07:17 ip-172-31-82-55 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.  
░░ Subject: Unit failed  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.  
Jun 04 09:07:17 ip-172-31-82-55 systemd[1]: Failed to start Elasticsearch.  
░░ Subject: A start job for unit elasticsearch.service has failed  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ A start job for unit elasticsearch.service has finished with a failure.  
░░  
░░ The job identifier is 1744 and the job result is failed.  
Jun 04 09:07:17 ip-172-31-82-55 systemd[1]: elasticsearch.service: Consumed 28.882s CPU time.  
░░ Subject: Resources consumed by unit runtime  
░░ Defined-By: systemd  
░░ Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)  
░░  
░░ The unit elasticsearch.service completed and consumed the indicated resources.

root@ip-172-31-82-55:/var/log/elasticsearch# tail -f elasticsearch.log  
[2023-06-04T08:45:06,042][INFO][o.e.n.Node] [ip-172-31-82-55] stopping ...  
[2023-06-04T08:45:06,043][INFO][o.e.c.f.AbstractFileWatchingService] [ip-172-31-82-55] shutting down watcher thread  
[2023-06-04T08:45:06,044][INFO][o.e.c.f.AbstractFileWatchingService] [ip-172-31-82-55] watcher service stopped  
[2023-06-04T08:45:06,046][INFO][o.e.x.m.p.l.CppLogMessageHandler] [ip-172-31-82-55] [controller/860] [Main.cc@176] ML controller exiting  
[2023-06-04T08:45:06,046][INFO][o.e.x.m.p.NativeController] [ip-172-31-82-55] Native controller process has stopped - no new native processes can be started  
[2023-06-04T08:45:06,048][INFO][o.e.x.w.WatcherService] [ip-172-31-82-55] stopping watch service, reason [shutdown initiated]  
[2023-06-04T08:45:06,049][INFO][o.e.x.w.WatcherLifeCycleService] [ip-172-31-82-55] watcher has stopped and shutdown  
[2023-06-04T08:45:06,353][INFO][o.e.n.Node] [ip-172-31-82-55] stopped  
[2023-06-04T08:45:06,354][INFO][o.e.n.Node] [ip-172-31-82-55] closing ...  
[2023-06-04T08:45:06,375][INFO][o.e.n.Node] [ip-172-31-82-55] closed

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 4, 2023, 3:41pm UTC](https://discuss.elastic.co/t/setting-multinode-elk-cluster/335165/2 "2023-06-04T15:41:50Z")

</div>

The error is in the log, you need to check your configuration file.

> Jun 04 08:57:00 ip-172-31-82-55 systemd-entrypoint[1671]: Caused by: com.fasterxml.jackson.core.JsonParseException: **Duplicate field**'cluster.initial\_master\_nodes'

It says that you have a duplicate line for `cluster.initial_master_nodes`.

---

<div class="post-metadata">

**Author:** ![rajeshri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajeshri/32/121826_2.png) [@rajeshri](https://discuss.elastic.co/u/rajeshri)\
**Post date:** [June 10, 2023, 6:05am UTC](https://discuss.elastic.co/t/setting-multinode-elk-cluster/335165/3 "2023-06-10T06:05:25Z")

</div>

Thanks @leandrojmp

---

<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:** [July 8, 2023, 6:06am UTC](https://discuss.elastic.co/t/setting-multinode-elk-cluster/335165/4 "2023-07-08T06:06:04Z")

</div>

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