Hi, im currently doing some poc about add node to elasticsearch cluster with multiple machine. The master node should be x.x.x.246 and the data node that i want to add is x.x.x.99. Running the latest elasticsearch 7.6. I've make sure that both elastic are on the same version.
Here is my config file for master node.
cluster.name : elasticsearch
node.name : Node_master
node.master : true
node.data : false
network.host : 10.64.2.246
http.port : 9200
transport.tcp.port: 9300
discovery.seed_hosts:
- x.x.x.246:9300
- x.x.x.99:9301
cluster.initial_master_nodes:
- x.x.x.246:9300
- x.x.x.99:9301
here is my config for data node
cluster.name : elasticsearch
node.name : Node-1
node.master : false
node.data : true
network.host : 10.64.2.99
http.port : 9201
transport.tcp.port: 9301
discovery.seed_hosts:
- x.x.x.246:9300
- x.x.x.99:9301
cluster.initial_master_nodes:
- x.x.x.246:9300
- x.x.x.99:9301
here is the error returned when i restart elasticsearch on master node :
[root@localhost elasticsearch]# service elasticsearch start
Starting elasticsearch (via systemctl): Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[FAILED]
systemctl view on master node:
[root@localhost elasticsearch]# systemctl status elasticsearch.service -l
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2020-03-13 11:37:44 WIB; 2min 20s ago
Docs: http://www.elastic.co
Process: 127072 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 127072 (code=exited, status=1/FAILURE)
Mar 13 11:37:43 localhost.localdomain elasticsearch[127072]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
Mar 13 11:37:43 localhost.localdomain elasticsearch[127072]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
Mar 13 11:37:43 localhost.localdomain elasticsearch[127072]: at org.elasticsearch.cli.Command.main(Command.java:90)
Mar 13 11:37:43 localhost.localdomain elasticsearch[127072]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
Mar 13 11:37:43 localhost.localdomain elasticsearch[127072]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Mar 13 11:37:43 localhost.localdomain elasticsearch[127072]: For complete error details, refer to the log at /var/log/elasticsearch/elasticsearch.log
Mar 13 11:37:44 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Mar 13 11:37:44 localhost.localdomain systemd[1]: Failed to start Elasticsearch.
Mar 13 11:37:44 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Mar 13 11:37:44 localhost.localdomain systemd[1]: elasticsearch.service failed.
here is the error returned when i restart elasticsearch on data node :
[root@dev elasticsearch]# service elasticsearch restart
Restarting elasticsearch (via systemctl): Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[FAILED]
[root@dev elasticsearch]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2020-03-13 10:29:21 WIB; 16s ago
Docs: http://www.elastic.co
Process: 10474 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 10474 (code=exited, status=1/FAILURE)
systemctl view on data node:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2020-03-13 10:29:21 WIB; 15min ago
Docs: http://www.elastic.co
Process: 10474 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 10474 (code=exited, status=1/FAILURE)
Mar 13 10:29:21 dev.int.cbn.net.id elasticsearch[10474]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
Mar 13 10:29:21 dev.int.cbn.net.id elasticsearch[10474]: at org.elasticsearch.cli.Command.main(Command.java:90)
Mar 13 10:29:21 dev.int.cbn.net.id elasticsearch[10474]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
Mar 13 10:29:21 dev.int.cbn.net.id elasticsearch[10474]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Mar 13 10:29:21 dev.int.cbn.net.id elasticsearch[10474]: Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: while scanning a simple key
Mar 13 10:29:21 dev.int.cbn.net.id elasticsearch[10474]: in 'reader', line 25, column 1:
Mar 13 10:29:21 dev.int.cbn.net.id systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Mar 13 10:29:21 dev.int.cbn.net.id systemd[1]: Failed to start Elasticsearch.
Mar 13 10:29:21 dev.int.cbn.net.id systemd[1]: Unit elasticsearch.service entered failed state.
Mar 13 10:29:21 dev.int.cbn.net.id systemd[1]: elasticsearch.service failed.
any answer or explanation will be appreciated so much. Thank you