Hi everyone, I have this issue with elasticsearch after installing successfully on fresh ubuntu 20.04 server,
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch
I keep getting this message
"Job for elasticsearch.service failed because the control process exited with error code.
See “systemctl status elasticsearch.service” and “journalctl -xe” for details.’
my local PC/webserver has 4GB xeon cpu 120GB SSD and of ram I have tried editing the file /etc/elasticsearch/elasticsearch.ymlnetwro changing network. To host local host or 0.0.0.0 port 9200 same results even editing /etc/elasticsearch/jvm.options -Xms1g -Xmx1g values changing to 2G same thing.
firewall port 9200 is opened. what have I missed? journalctl -u elasticsearch.service
journalctl -xe
Aug 30 10:44:40 webserver elasticsearch[4912]: in 'reader', line 66, column 2:
Aug 30 10:44:40 webserver elasticsearch[4912]: The default list of hosts is ["1 ...
Aug 30 10:44:40 webserver elasticsearch[4912]: ^
Aug 30 10:44:40 webserver elasticsearch[4912]: at [Source: sun.nio.ch.ChannelInputStream@1df8da7a; line: 55, column: 27]
Aug 30 10:44:40 webserver elasticsearch[4912]: at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException.from(MarkedYAMLException.>
Aug 30 10:44:40 webserver elasticsearch[4912]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:343)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:645)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:620)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.elasticsearch.common.settings.Settings.access$400(Settings.java:82)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1093)
Aug 30 10:44:40 webserver elasticsearch[4912]: ... 9 more
Aug 30 10:44:40 webserver elasticsearch[4912]: Caused by: while parsing a block mapping
Aug 30 10:44:40 webserver elasticsearch[4912]: in 'reader', line 17, column 1:
Aug 30 10:44:40 webserver elasticsearch[4912]: cluster.name: my-application
Aug 30 10:44:40 webserver elasticsearch[4912]: ^
Aug 30 10:44:40 webserver elasticsearch[4912]: expected , but found Scalar
Aug 30 10:44:40 webserver elasticsearch[4912]: in 'reader', line 66, column 2:
Aug 30 10:44:40 webserver elasticsearch[4912]: The default list of hosts is ["1 ...
Aug 30 10:44:40 webserver elasticsearch[4912]: ^
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:569)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157)
Aug 30 10:44:40 webserver elasticsearch[4912]: at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:167)
Aug 30 10:44:40 webserver elasticsearch[4912]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:340)
Aug 30 10:44:40 webserver elasticsearch[4912]: ... 14 more
Aug 30 10:44:40 webserver 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.
Aug 30 10:44:40 webserver 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'.
Aug 30 10:44:40 webserver 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 1962 and the job result is failed.
Aug 30 10:44:40 webserver sudo[4909]: pam_unix(sudo:session): session closed for user root
Aug 30 10:44:41 webserver sshd[5004]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=112.85.42.88 user=root
Aug 30 10:44:43 webserver sshd[5004]: Failed password for root from 112.85.42.88 port 50194 ssh2
Aug 30 10:44:48 webserver sshd[5004]: Failed password for root from 112.85.42.88 port 50194 ssh2