Hi fellows,
I installed elasticsearch 7 on my centos 8 machine via yum following this howto: https://www.howtoforge.com/how-to-install-elastic-stack-on-centos-8/
Anything worked fine so far, but wehen I try to start elasticsearch I get the following error: Error: Could not create the Java Virtual Machine.
In elasticsearch.log I get this Error:
uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failure running machine learning native code.
So I tried this: echo "xpack.ml.enabled: false" >> /etc/elasticsearch/elasticsearch.yml
without any success.
I have to use centos8 so I reinstalled elasticsearch so jvm.options now show Xms and Xmx value 1g but when I try to start elasticsearch I get these errors:
*journalctl -xe*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.jav>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAML>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: in 'reader', line 61, column 8:*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: - name: xpack.ml.enabled*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: ^*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at [Source: (sun.nio.ch.ChannelInputStream); line: 61, column: 8]*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAML>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLP>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextTo>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.elasticsearch.common.settings.Settings.access$400(Settings.j>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStrea>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: ... 9 more*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: Caused by: mapping values are not allowed here*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: in 'reader', line 61, column 8:*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: - name: xpack.ml.enabled*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: ^*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.ja>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerIm>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.ja>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produc>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:1>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:16>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLP>*
*Jun 06 19:08:23 keyhole systemd-entrypoint[5695]: ... 14 more*
*Jun 06 19:08:23 keyhole systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE*
*Jun 06 19:08:23 keyhole systemd[1]: elasticsearch.service: Failed with result 'exit-code'.*
@uek those errors appear to be related to your YAML. The YAML you posted at https://pastebin.com/m4P5f5qy has invalid values on lines 61 & 62. You took care of that setting on line 99. Try removing those lines and let us know the result.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.