嘿~ 今天天气不错嘛

ubuntu17.04安装elasticsearch后启动报错YAMLException

Elasticsearch | 作者 beiben | 发布于2017年05月28日 | 阅读数:5048

ubuntu17.04成功安装elasticsearch最新的稳定版后,启动时报YAMLException,请大神们帮忙看一下:
/usr/share/elasticsearch/bin$ ./elasticsearch
Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/common/jackson/dataformat/yaml/snakeyaml/error/YAMLException
at org.elasticsearch.common.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:426)
at org.elasticsearch.common.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:327)
at org.elasticsearch.common.xcontent.yaml.YamlXContent.createParser(YamlXContent.java:90)
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)
at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:982)
at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromUrl(ImmutableSettings.java:969)
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:110)
at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:144)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:215)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.jackson.dataformat.yaml.snakeyaml.error.YAMLException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 11 more
已邀请:

zaqweb

赞同来自:

你是tar包解压安装的,还是仓库方式安装的?

beiben

赞同来自:

deb包和apt-get install方式都试过了,tar gz包没试过

zaqweb

赞同来自:

那你需要已服务方式启动:

sudo /bin/systemctl daemon-reload 
sudo /bin/systemctl enable elasticsearch.service

sudo systemctl start elasticsearch.service (启动)
 
sudo systemctl stop elasticsearch.service(停止)
 
 
 
参考:https://www.elastic.co/guide/e ... stemd

要回复问题请先登录注册