[ https://issues.apache.org/jira/browse/LOG4J2-2901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17168558#comment-17168558 ]
Tamas Nemeth edited comment on LOG4J2-2901 at 7/31/20, 9:21 AM: ---------------------------------------------------------------- [~rgoers] Yes, I did. However I do not use Spring Cloud Config. I tried it with a simple java class - doing nothing, but logging at each level from _fatal_ to _trace_. log4j-api.2.13.3.jar and log4j-core.2.13.3.jar are added to the project build path (eclipse) and I pass the (simple) configuration files to java by the -Dlog4j.configurationFile argument (added to VM arguments in eclipse run configuration). I've also passed -Dlog4j2.debug to java: When both config files exist than the logging is fine. However when the second config does not exist, I've got the following exception: {{DEBUG StatusLogger Catching}} {{DEBUG StatusLogger Catching java.io.FileNotFoundException: /home/medsrv/Develop/EclipseWorkspace/SandBox/src/logconfigC.xml (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:213) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:155) at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromString(ConfigurationFactory.java:371) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:506) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:492) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:405) at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:687) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:602) at sandBox.LogTest.main(LogTest.java:10)}} {{ERROR StatusLogger Failed to created configuration at /home/medsrv/Develop/EclipseWorkspace/SandBox/src/logconfigC.xml}} {{ERROR StatusLogger Reconfiguration failed: No configuration found for '5bc2b487' at 'null' in 'null'}} The log entries added to the console indicate The strange thing is that I can also reproduce it with older log4j2 versions, too. So it seems I was wrong about this was working with older versions. was (Author: nemethom): [~rgoers] Yes, I did. However I do not use Spring Cloud Config. I tried it with a simple java class - doing nothing, but logging at each level from _fatal_ to _trace_. log4j-api.2.13.3.jar and log4j-core.2.13.3.jar are added to the project build path (eclipse) and I add pass the (simple) configuration files to java by the -Dlog4j.configurationFile argument (added to VM arguments in eclipse run configuration). I've also passed -Dlog4j2.debug to java: When both config files exist than the logging is fine. However when the second config does not exist, I've got the following exception: {{DEBUG StatusLogger Catching}} {{DEBUG StatusLogger Catching java.io.FileNotFoundException: /home/medsrv/Develop/EclipseWorkspace/SandBox/src/logconfigC.xml (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:213) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:155) at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromString(ConfigurationFactory.java:371) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:506) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:492) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:405) at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:687) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:602) at sandBox.LogTest.main(LogTest.java:10)}} {{ERROR StatusLogger Failed to created configuration at /home/medsrv/Develop/EclipseWorkspace/SandBox/src/logconfigC.xml}} {{ERROR StatusLogger Reconfiguration failed: No configuration found for '5bc2b487' at 'null' in 'null'}} The log entries added to the console indicate The strange thing is that I can also reproduce it with older log4j2 versions, too. So it seems I was wrong about this was working with older versions. > Reconfiguration failed during backend server startup > ---------------------------------------------------- > > Key: LOG4J2-2901 > URL: https://issues.apache.org/jira/browse/LOG4J2-2901 > Project: Log4j 2 > Issue Type: Bug > Components: API, Core > Affects Versions: 2.13.3 > Reporter: Dejan > Priority: Blocker > > I upgraded both components from log4j-api an log4j-core from 2.11.2 to 2.13.3 > and started getting weird errors during the startup of our backend services: > ERROR StatusLogger Reconfiguration failed: No configuration found for > '2aae9190' at 'null' in 'null' > As soon I switch back to 2.11.2 it starts working, and logs are created. The > error occurs during bootstrapping phase so it does not look like it is bound > to any other framework. > log4j2 configuration is present and configured correctly as a properties > file. It is bootstrapped with -Dlog4j.configuration property. > -- This message was sent by Atlassian Jira (v8.3.4#803005)