引起:java.lang.NoSuchMethodError:org.elasticsearch.rest.BaseRestHandler

时间:2014-11-26 06:04:30

标签: elasticsearch

我使用“yum”将“elasticsearch”从1.3更新为1.4,我看到此错误信息显示出来。 您认为原因是什么?

[root@www3073gk elasticsearch]# ./bin/elasticsearch
Failed to configure logging...
org.elasticsearch.ElasticsearchException: Failed to load logging configuration
        at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:125)
        at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:81)
        at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:94)
        at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:178)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
        at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
        at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:97)
        at java.nio.file.Files.readAttributes(Files.java:1686)
        at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:109)
        at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)
        at java.nio.file.Files.walkFileTree(Files.java:2602)
        at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:115)
        ... 4 more

2

{1.4.0}: Initialization Failed ...
1) NoSuchMethodError[org.elasticsearch.rest.BaseRestHandler.<init>(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/client/Client;)V]
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoSuchMethodError: org.elasticsearch.rest.BaseRestHandler.<init>(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/client/Client;)V
  at org.codelibs.elasticsearch.reindex.rest.ReindexRestAction.<init>(Unknown Source)
  while locating org.codelibs.elasticsearch.reindex.rest.ReindexRestAction

3

Caused by: java.lang.NoSuchMethodError: org.elasticsearch.rest.BaseRestHandler.<init>(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/client/Client;)V
    at org.codelibs.elasticsearch.reindex.rest.ReindexRestAction.<init>(ReindexRestAction.java:30)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

1 个答案:

答案 0 :(得分:0)

这可能与您正在运行的elasticsearch版本的任何已安装的elasticsearch插件(在弹性搜索目录中的plugins文件夹下检查)不兼容。尝试使用

删除插件
$ sudo bin/plugin remove <plugin-name>