Replies: 1 comment 2 replies
-
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/opt/logs/100003171/apollo-assembly.log] |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
问题描述
在本地执行Quick Start 2.1使用 H2 内存数据库,自动初始化命令时出现了与#5104 类似的问题
第一次执行按照原命令报错显示5695错误码:
ERROR 5969 --- [ main] o.s.boot.SpringApplication [starting:common] : Application run failed
第二次删除了auth变量显示同样报错信息,错误码变成6366
复现
通过如下步骤可以复现:
export SPRING_PROFILES_ACTIVE="github,database-discovery,auth"
unset SPRING_SQL_CONFIG_INIT_MODE
unset SPRING_SQL_PORTAL_INIT_MODE
java -jar apollo-all-in-one.jar
额外的细节和日志
13:27:43,843 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
13:27:43,844 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/classes!/logback.xml]
13:27:43,847 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
13:27:43,847 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/apollo-portal-2.3.0-SNAPSHOT.jar!/logback.xml]
13:27:43,847 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/classes!/logback.xml]
13:27:43,847 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/apollo-configservice-2.3.0-SNAPSHOT.jar!/logback.xml]
13:27:43,847 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/apollo-adminservice-2.3.0-SNAPSHOT.jar!/logback.xml]
13:27:43,898 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@29ca901e - URL [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/classes!/logback.xml] is not of type file
13:27:43,992 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
13:27:44,011 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@5649fd9b - Adding [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/spring-boot-2.7.11.jar!/org/springframework/boot/logging/logback/defaults.xml] to configuration watch list.
13:27:44,011 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@29ca901e - URL [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/spring-boot-2.7.11.jar!/org/springframework/boot/logging/logback/defaults.xml] is not of type file
13:27:44,013 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word clr with class [org.springframework.boot.logging.logback.ColorConverter]
13:27:44,013 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wex with class [org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter]
13:27:44,013 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wEx with class [org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter]
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.catalina.startup.DigesterFactory] to ERROR
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.catalina.util.LifecycleBase] to ERROR
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.coyote.http11.Http11NioProtocol] to WARN
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.sshd.common.util.SecurityUtils] to WARN
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.tomcat.util.net.NioSelectorPool] to WARN
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.eclipse.jetty.util.component.AbstractLifeCycle] to ERROR
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate.validator.internal.util.Version] to WARN
13:27:44,015 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.boot.actuate.endpoint.jmx] to WARN
13:27:44,016 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@5649fd9b - Adding [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/spring-boot-2.7.11.jar!/org/springframework/boot/logging/logback/file-appender.xml] to configuration watch list.
13:27:44,016 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@29ca901e - URL [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/spring-boot-2.7.11.jar!/org/springframework/boot/logging/logback/file-appender.xml] is not of type file
13:27:44,018 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
13:27:44,034 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
13:27:44,049 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:27:44,174 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@112061925 - setting totalSizeCap to 0 Bytes
13:27:44,181 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@112061925 - Archive files will be limited to [10 MB] each.
13:27:44,188 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@112061925 - Will use gz compression
13:27:44,191 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@112061925 - Will use the pattern /var/folders/cr/8549mbs92v32ncl_qz_yqzy80000gn/T//apollo-assembly.log.%d{yyyy-MM-dd}.%i for the active file
13:27:44,195 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2d928643 - The date pattern is 'yyyy-MM-dd' from file name pattern '/var/folders/cr/8549mbs92v32ncl_qz_yqzy80000gn/T//apollo-assembly.log.%d{yyyy-MM-dd}.%i.gz'.
13:27:44,195 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2d928643 - Roll-over at midnight.
13:27:44,201 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2d928643 - Setting initial period to Tue May 28 13:16:50 ADT 2024
13:27:44,218 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: /var/folders/cr/8549mbs92v32ncl_qz_yqzy80000gn/T//apollo-assembly.log
13:27:44,218 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [/var/folders/cr/8549mbs92v32ncl_qz_yqzy80000gn/T//apollo-assembly.log]
13:27:44,220 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@5649fd9b - Adding [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/spring-boot-2.7.11.jar!/org/springframework/boot/logging/logback/console-appender.xml] to configuration watch list.
13:27:44,220 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@29ca901e - URL [jar:file:/Users/sofiajia/Documents/GitHub/apollo-quick-start/apollo-all-in-one.jar!/BOOT-INF/lib/spring-boot-2.7.11.jar!/org/springframework/boot/logging/logback/console-appender.xml] is not of type file
13:27:44,222 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
13:27:44,228 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
13:27:44,228 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:27:44,236 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
13:27:44,479 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
13:27:44,480 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
13:27:44,480 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
13:27:44,481 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@5025a98f - Registering current configuration as safe fallback point
2024-05-28 13:27:44.510 INFO --- [ main] c.c.f.apollo.assembly.ApolloApplication [starting:common] : commonContext starting...
Logging system failed to initialize using configuration from 'null'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/opt/logs/100003171/apollo-assembly.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/opt/logs/100003171/apollo-assembly.log,true) call failed. java.io.FileNotFoundException: /opt/logs/100003171/apollo-assembly.log (No such file or directory)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:329)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:298)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:301)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
at com.ctrip.framework.apollo.assembly.ApolloApplication.main(ApolloApplication.java:53)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
2024-05-28 13:27:45.411 ERROR 5969 --- [ main] o.s.boot.SpringApplication [starting:common] : Application run failed
java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/opt/logs/100003171/apollo-assembly.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/opt/logs/100003171/apollo-assembly.log,true) call failed. java.io.FileNotFoundException: /opt/logs/100003171/apollo-assembly.log (No such file or directory)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:344)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:298)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:301)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
at com.ctrip.framework.apollo.assembly.ApolloApplication.main(ApolloApplication.java:53)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/opt/logs/100003171/apollo-assembly.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/opt/logs/100003171/apollo-assembly.log,true) call failed. java.io.FileNotFoundException: /opt/logs/100003171/apollo-assembly.log (No such file or directory)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:329)
... 23 common frames omitted
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/opt/logs/100003171/apollo-assembly.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/opt/logs/100003171/apollo-assembly.log,true) call failed. java.io.FileNotFoundException: /opt/logs/100003171/apollo-assembly.log (No such file or directory)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:344)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:298)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:301)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
at com.ctrip.framework.apollo.assembly.ApolloApplication.main(ApolloApplication.java:53)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 5 more
Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/opt/logs/100003171/apollo-assembly.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/opt/logs/100003171/apollo-assembly.log,true) call failed. java.io.FileNotFoundException: /opt/logs/100003171/apollo-assembly.log (No such file or directory)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:329)
... 23 more
Beta Was this translation helpful? Give feedback.
All reactions