elasticsearchException:Failed to load logging configuration Caused by: java.nio.file.NoSuchFileExcep

来源:http://blog.csdn.net/hearain528/article/details/50747655


由于我是直接安装的yum包,所以可能会出现这个问题

[java]  view plain  copy
 print ?
  1. /usr/share/elasticsearch# ./bin/elasticsearch  
  2. Failed to configure logging...  
  3. org.elasticsearch.ElasticsearchException: Failed to load logging configuration  
  4.     at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:139)  
  5.     at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:89)  
  6.     at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:100)  
  7.     at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:184)  
  8.     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)  
  9. Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config  
  10.     at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)  
  11.     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
  12.     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
  13.     at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)  
  14.     at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)  
  15.     at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:97)  
  16.     at java.nio.file.Files.readAttributes(Files.java:1686)  
  17.     at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:109)  
  18.     at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)  
  19.     at java.nio.file.Files.walkFileTree(Files.java:2602)  
  20.     at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:123)  
  21.     ... 4 more  
  22. log4j:WARN No appenders could be found for logger (node).  
  23. log4j:WARN Please initialize the log4j system properly.  
  24. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.  

解决办法:直接运行这个命令即可

[java]  view plain  copy
 print ?
  1. /etc/init.d/elasticsearch start  
[java]  view plain  copy
 print ?
  1. /etc/init.d/elasticsearch //运行后可查看后面跟的命令名称  
问题原因:

I'm guessing that you installed Elasticsearch as an RPM, in which case your config files are elsewhere.

我猜你将Elasticsearch安装为RPM,在这种情况下你的配置文件在别的地方。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值