boot版接入cloud报错

Blade 已结 1 763
gtfhao
gtfhao 剑尊 2022-12-12 13:23

一、该问题的重现步骤是什么?

1. blade-boot接入colud

2. 按照文档步骤进行

3.启动报错


二、你期待的结果是什么?实际看到的又是什么?

期待结果:正常接入nacos

实际结果:启动报错,logback的错


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

企业版,3.0.1,windows10系统

四、请提供详细的错误堆栈信息,这很重要。

"C:\Program Files\Java\jdk8u332-b09\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" -javaagent:F:\software\ideaIU-2022.3.win\lib\idea_rt.jar=56936:F:\software\ideaIU-2022.3.win\bin -Dfile.encoding=UTF-8 -classpath F:\software\ideaIU-2022.3.win\lib\idea_rt.jar com.intellij.rt.execution.CommandLineWrapper C:\Users\gtf\AppData\Local\Temp\idea_classpath1794274522 org.springblade.Application

----启动中,读取到的环境变量:[dev],jar地址:[/E:/idea19_workspace/flexibilestaffing-server/target/classes/]----

2022-12-12 13:18:49.954  INFO 16484 --- [kground-preinit] o.h.validator.internal.util.Version      : HV000001: Hibernate Validator 6.2.3.Final

Logging system failed to initialize using configuration from 'classpath:log/logback-dev.xml'

java.lang.IllegalStateException: Logback configuration error detected: 

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - 'File' option has the same value "C:\Users\gtf\logs/nacos/config.log" as that given for appender [CONFIG_LOG_FILE] defined earlier.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - 'File' option has the same value "C:\Users\gtf\logs/nacos/naming.log" as that given for appender [NAMING_LOG_FILE] defined earlier.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - 'File' option has the same value "C:\Users\gtf\logs/nacos/remote.log" as that given for appender [REMOTE_LOG_FILE] defined earlier.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - 'File' option has the same value "C:\Users\gtf\logs/nacos/config.log" as that given for appender [CONFIG_LOG_FILE] defined earlier.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - 'File' option has the same value "C:\Users\gtf\logs/nacos/naming.log" as that given for appender [NAMING_LOG_FILE] defined earlier.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - 'File' option has the same value "C:\Users\gtf\logs/nacos/remote.log" as that given for appender [REMOTE_LOG_FILE] defined earlier.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)

at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)

at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)

at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132)

at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:316)

at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:282)

at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:240)

at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)

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.util.ArrayList.forEach(ArrayList.java:1259)

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:344)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:302)

at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:50)

at org.springblade.Application.main(Application.java:34)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:64)

2022-12-12 13:18:52.125 ERROR 16484 --- [           main] o.s.boot.SpringApplication               : Application run failed


五、若有更多详细信息,请在下面提供。

1、2.9.1版本按文档步骤正常接入;

2、3.0.1版本,删掉boot工程下的logback-xxx.xml,可以正常启动;

3、怀疑是springboot2.7.1版本引起的logback版本不兼容;

1条回答
  •  admin
    admin (最佳回答者)
    2022-12-12 23:42

    logback配置文件顶部修改一下配置就可以了

    把原来的

    <configuration scan="true" scanPeriod="60 seconds">

    改成

    <configuration scan="false" debug="false">


    0 讨论(1)
提交回复