ElasticSearch启动报错RollingFileManager (/xxx/xxx) java.io.FileNotFoundException

这篇具有很好参考价值的文章主要介绍了ElasticSearch启动报错RollingFileManager (/xxx/xxx) java.io.FileNotFoundException。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

ElasticSearch启动报错如下:

2022-03-06 17:22:07,358 main ERROR RollingFileManager (/home/software/elasticsearch-7.17.1/logs/elasticsearch_server.json) java.io.FileNotFoundException: /home/software/elasticsearch-7.17.1/logs/elasticsearch_server.json (Permission denied) java.io.FileNotFoundException: /home/software/elasticsearch-7.17.1/logs/elasticsearch_server.json (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.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:746)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:716)
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:114)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:302)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:222)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:118)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:369)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
        at org.elasticsearch.cli.Command.main(Command.java:77)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)

2022-03-06 17:22:07,364 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@3e8c3cb] unable to create manager for [/home/software/elasticsearch-7.17.1/logs/elasticsearch_server.json] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@563f38c4[pattern=/home/software/elasticsearch-7.17.1/logs/elasticsearch-%d{yyyy-MM-dd}-%i.json.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=true), SizeBasedTriggeringPolicy(size=134217728)]), strategy=DefaultRolloverStrategy(min=-2147483648, max=2147483647, useMax=false), advertiseURI=null, layout=ESJsonLayout{patternLayout={"type": "server", "timestamp": "%d{yyyy-MM-dd'T'HH:mm:ss,SSSZZ}", "level": "%p", "component": "%c{1.}", "cluster.name": "${sys:es.logs.cluster_name}", "node.name": "%node_name", "message": "%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}"%notEmpty{, %node_and_cluster_id }%notEmpty{, "trace.id": "%trace_id" }%exceptionAsJson }
}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@3e8c3cb] unable to create manager for [/home/software/elasticsearch-7.17.1/logs/elasticsearch_server.json] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@563f38c4[pattern=/home/software/elasticsearch-7.17.1/logs/elasticsearch-%d{yyyy-MM-dd}-%i.json.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=true), SizeBasedTriggeringPolicy(size=134217728)]), strategy=DefaultRolloverStrategy(min=-2147483648, max=2147483647, useMax=false), advertiseURI=null, layout=ESJsonLayout{patternLayout={"type": "server", "timestamp": "%d{yyyy-MM-dd'T'HH:mm:ss,SSSZZ}", "level": "%p", "component": "%c{1.}", "cluster.name": "${sys:es.logs.cluster_name}", "node.name": "%node_name", "message": "%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}"%notEmpty{, %node_and_cluster_id }%notEmpty{, "trace.id": "%trace_id" }%exceptionAsJson }
}, filePermissions=null, fileOwner=null]]
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:116)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:302)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:222)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:118)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:369)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
        at org.elasticsearch.cli.Command.main(Command.java:77)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)

2022-03-06 17:22:07,365 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:236)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:302)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:222)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:118)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:369)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
        at org.elasticsearch.cli.Command.main(Command.java:77)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)

2022-03-06 17:22:07,460 main ERROR Null object returned for RollingFile in Appenders.
2022-03-06 17:22:07,460 main ERROR Unable to locate appender "rolling" for logger config "root"

Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory 

Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class 

这些错误都是因为之前的Permission denied引起的。

这是因为当前启用用户没有权限写入这些文件。切换到root用户重新赋权限就OK了。

解决方式:

[root@VM_0_2_centos logs]# chown elastic elasticsearch.log
[root@VM_0_2_centos logs]# chown elastic elasticsearch_server.json
 文章来源地址https://www.toymoban.com/news/detail-628903.html

到了这里,关于ElasticSearch启动报错RollingFileManager (/xxx/xxx) java.io.FileNotFoundException的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 解决启动Elasticsearch报错——java.nio.file.NoSuchFileException \lib\dt.jar

    在启动Elasticsearch时遇到了这个报错: java.nio.file.NoSuchFileException libdt.jar 已解决: Elasticsearch正常启动: 解决办法: 搜索发现是由于本地的jdk版本升级之后,当时只改了JAVA_HOME所指的jdk安装目录,并没有考虑到由jdk8升级到jdk11之后, jdk11需要有不同的配置。 这里是jdk11的环境

    2024年04月25日
    浏览(46)
  • Elasticsearch项目启动报错:module java.base does not “opens java.math“ to unnamed module

    Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘itemEsRepository’ defined in com.ruoyi.elasticsearch.repository.ItemEsRepository defined in @EnableElasticsearchRepositories declared on ElasticsearchRepositoriesRegistrar.EnableElasticsearchRepositoriesCo

    2024年03月26日
    浏览(94)
  • elasticsearch在window下启动报错warning:ignoring JAVA_HOME=“XXXXX“; using bundled JDK

    JDK版本不对。 elasticsearch支持JDK1.8的,仅仅是7.17.3及其之前的版本。如果下的最新版本,最低JDK得17及其以上。 win7建议下载7.6.1的版本,7.17.3需要win8和最低node.js 12.0.0版本 7.17.3版本下载地址 Elasticsearch 7.17.3 | Elastic

    2024年02月11日
    浏览(38)
  • 关于Flutter运行在iOS,报错 “ld: Framework not found XXX“

    案例:flutter 项目 运行在iOS上,报错 \\\" ld: Framework not found image_picker\\\" 例如:在 pubspec.yaml 文件中,有个依赖:image_picker,使用 flutter run iOS 命令时,报以下错误;将 iOS/Runner.xcworkspace 文件 运行在 XCode 有同样的问题: ld: framework not found 在Xcode中,打开 文件夹 - Pods - TARGETS ,发现

    2024年02月06日
    浏览(58)
  • [踩坑]elasticsearch-7.12.1 启动报错could not find java in bundled JDK at /opt/elasticsearch-7.12.1/jdk/bin

    今天在虚拟机上部署elasticsearch的时候一直报 could not find java in bundled JDK at /opt/elasticsearch-7.12.1/jdk/bin/java 的错误,多方查询无果 最终发现是jdk的版本直接通过yum下载,未配环境变量导致的 具体解决如下 1.查找安装目录: which java 找到路径 在/etc/profile文件配置好即可

    2024年02月15日
    浏览(45)
  • docker启动elasticsearch——ERROR: Elasticsearch did not exit normally - check the logs at xxx

    报错信息: 解决办法: 在运行命令中添加 -e “discovery.type=single-node”

    2024年02月11日
    浏览(48)
  • Docker 启动容器报错: Error response from daemon: network XXX not found

    以上为报错信息,之前的桥接这些都是配置好的。 解决方案: 即可解决。 场景:         在做生产上线的时候,之前docker启动的gitlab,突然端口不能被访问到了,查看了对应服务器监听端口也没问题。可以ping通,telnet端口就是不通。着急上线,最后不得不重启服务器,重

    2024年02月12日
    浏览(65)
  • Elasticsearch启动报错:warning: ignoring JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191; using bundled JDK

    windows本地启动【elasticsearch-8.3.2】版本时,启动失败,并且在控制台出现失败提示: warning: ignoring JAVA_HOME=C:Program FilesJavajdk1.8.0_191; using bundled JDK 然后出现下列异常,最后控制台直接闪退。 原因:本地JDK版本与Elasticesearch版本不兼容。 案例:我本地是JDK1.8版本,安装的是e

    2024年02月11日
    浏览(38)
  • 解决启动报错Consider defining a bean of type ‘xxx‘ in your configuration.

    报错截图 解决方法:查看注解是否同时存在@AllArgsConstructor/@RequiredArgsConstructor和@Value,如果同时存在,去掉构造函数注解。给bean加上@Autowired,,给非static修饰的常量去掉final修饰。 如:

    2024年02月06日
    浏览(51)
  • 启动elasticsearch报错

    1.报错信息: main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.lo

    2024年02月15日
    浏览(52)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包