last day i shut down my virtual machine and next day i open my virtual machine and run Elasticsearch it is not running and it shows this error
sudo service elasticsearch status
× elasticsearch.service - Elasticsearch
Loaded: loaded (/etc/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/elasticsearch.service.d
└─startup-timeout.conf
Active: failed (Result: exit-code) since Mon 2022-05-30 19:09:03 EDT; 6min ago
Docs: https://www.elastic.co
Process: 2871 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elast>
Main PID: 2871 (code=exited, status=1/FAILURE)
CPU: 3.000s
May 30 19:09:03 elkmaster-Vm systemd-entrypoint[2871]: at org.elasticsearch.xcontent.js>
May 30 19:09:03 elkmaster-Vm systemd-entrypoint[2871]: at org.elasticsearch.common.sett>
May 30 19:09:03 elkmaster-Vm systemd-entrypoint[2871]: at org.elasticsearch.common.sett>
May 30 19:09:03 elkmaster-Vm systemd-entrypoint[2871]: at org.elasticsearch.common.sett>
May 30 19:09:03 elkmaster-Vm systemd-entrypoint[2871]: at org.elasticsearch.common.sett>
May 30 19:09:03 elkmaster-Vm systemd-entrypoint[2871]: ... 9 more
May 30 19:09:03 elkmaster-Vm systemd[1]: elasticsearch.service: Main process exited, code=exite>
my log
[2022-05-30T07:09:02,548][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [master-1] [controller/6128] [Main.cc@174] ML controller exiting
[2022-05-30T07:09:02,638][INFO ][o.e.x.m.p.NativeController] [master-1] Native controller process has stopped - no new native processes can be started
[2022-05-30T07:09:02,848][INFO ][o.e.x.w.WatcherService ] [master-1] stopping watch service, reason [shutdown initiated]
[2022-05-30T07:09:03,035][INFO ][o.e.x.w.WatcherLifeCycleService] [master-1] watcher has stopped and shutdown
[2022-05-30T07:09:04,461][INFO ][o.e.n.Node ] [master-1] stopped
[2022-05-30T07:09:04,463][INFO ][o.e.n.Node ] [master-1] closing ...
[2022-05-30T07:09:04,817][INFO ][o.e.i.g.DatabaseReaderLazyLoader] [master-1] evicted [0] entries from cache after reloading database [/tmp/elasticsearch-17810843837948280669/geoip-databases/UU8hIcHeTvWQr9kqd6AHsA/GeoLite2-Country.mmdb]
[2022-05-30T07:09:04,820][INFO ][o.e.i.g.DatabaseReaderLazyLoader] [master-1] evicted [0] entries from cache after reloading database [/tmp/elasticsearch-17810843837948280669/geoip-databases/UU8hIcHeTvWQr9kqd6AHsA/GeoLite2-ASN.mmdb]
[2022-05-30T07:09:04,820][INFO ][o.e.i.g.DatabaseReaderLazyLoader] [master-1] evicted [0] entries from cache after reloading database [/tmp/elasticsearch-17810843837948280669/geoip-databases/UU8hIcHeTvWQr9kqd6AHsA/GeoLite2-City.mmdb]
[2022-05-30T07:09:04,871][INFO ][o.e.n.Node ] [master-1] closed
i used 1 master and 2 nodes, it shows status
I tried all the commands and it doesn't work
when i run this command it shows me this
sudo systemctl restart elasticsearch
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.
I checked my jvm.options and also used 512mb because i used 1gb ram so last day it works fine
run journalctl -xeu elasticsearch.service
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:91)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:82)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.cli.Command.main(Command.java:77)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'cluster.name'
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at [Source: (sun.nio.ch.ChannelInputStream); line: 97, column: 13]
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at com.fasterxml.jackson.core.json.JsonReadContext._checkDup(JsonReadContext.java:204)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:399)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:73)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:706)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:675)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.common.settings.Settings.access$400(Settings.java:75)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1185)
May 30 19:47:59 elk1-Vm systemd-entrypoint[12253]: ... 9 more
May 30 19:47:59 elk1-Vm systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: 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.
May 30 19:47:59 elk1-Vm systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.
May 30 19:47:59 elk1-Vm systemd[1]: Failed to start Elasticsearch.
░░ Subject: A start job for unit elasticsearch.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit elasticsearch.service has finished with a failure.
░░
░░ The job identifier is 5152 and the job result is failed.
May 30 19:47:59 elk1-Vm systemd[1]: elasticsearch.service: Consumed 3.762s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit elasticsearch.service completed and consumed the indicated resources.