码迷,mamicode.com
首页 > 移动开发 > 详细

java.io.FileNotFoundException: /path/to/logs/my-application.log (Permission denied)

时间:2016-04-28 15:33:07      阅读:1537      评论:0      收藏:0      [点我收藏+]

标签:elkstack

问题:

# service elasticsearch start

Starting elasticsearch: log4j:ERROR setFile(null,true) call failed.

java.io.FileNotFoundException: /path/to/logs/my-application.log (Permission denied)

at java.io.FileOutputStream.open0(Native Method)

at java.io.FileOutputStream.open(FileOutputStream.java:270)

at java.io.FileOutputStream.<init>(FileOutputStream.java:213)

at java.io.FileOutputStream.<init>(FileOutputStream.java:133)

at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)

at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)

at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)

at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)

at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)

at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)

at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)

at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)

at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)

at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)

at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)

at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:128)

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:243)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)

log4j:ERROR Either File or DatePattern options are not set for appender [file].

log4j:ERROR setFile(null,true) call failed.


解决:

# chown elasticsearch.elasticsearch -R /path

java.io.FileNotFoundException: /path/to/logs/my-application.log (Permission denied)

标签:elkstack

原文地址:http://szcto.blog.51cto.com/2463527/1768598

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!