正常项目, spring-cloud-alibaba 组件升级2023.0.1.3或以上版本, 报错
springboot3.5.0 + jdk21 + gradle + nacos2.4构建项目, spring-cloud-alibaba 采用 2023.0.1.3 到 2023.0.3.3 的所有版本都报以下类似错误, 退回2023.0.1.2后正常. 项目引入的组件:
dependency group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-config', version: '2023.0.3.3' dependency group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-discovery', version: '2023.0.3.3' dependency group: 'com.alibaba.cloud', name: 'spring-cloud-alibaba-sentinel-gateway', version: '2023.0.3.3'
报错: 15:54:59,787 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - 'File' option has the same value "C:\Users\Administrator/logs/nacos/config.log" as that given for appender [CONFIG_LOG_FILE] defined earlier. 15:54:59,787 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting. 15:54:59,787 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - For more information, please visit https://logback.qos.ch/codes.html#earlier_fa_collision 15:54:59,788 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - 'File' option has the same value "C:\Users\Administrator/logs/nacos/naming.log" as that given for appender [NAMING_LOG_FILE] defined earlier. 15:54:59,788 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting. 15:54:59,788 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - For more information, please visit https://logback.qos.ch/codes.html#earlier_fa_collision 15:54:59,789 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - 'File' option has the same value "C:\Users\Administrator/logs/nacos/remote.log" as that given for appender [REMOTE_LOG_FILE] defined earlier. 15:54:59,789 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting. 15:54:59,789 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - For more information, please visit https://logback.qos.ch/codes.html#earlier_fa_collision 25-06-08 15:55:01.531 [main] WARN o.m.s.m.ClassPathMapperScanner - [warn,44] - No MyBatis mapper was found in '[com.eeye.**.mapper]' package. Please check your configuration. 25-06-08 15:55:02.627 [main] INFO io.undertow.servlet - [log,372] - Initializing Spring embedded WebApplicationContext 15:55:04,603 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - 'File' option has the same value "C:\Users\Administrator/logs/nacos/config.log" as that given for appender [CONFIG_LOG_FILE] defined earlier. 15:55:04,603 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting. 15:55:04,603 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - For more information, please visit https://logback.qos.ch/codes.html#earlier_fa_collision 15:55:04,605 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - 'File' option has the same value "C:\Users\Administrator/logs/nacos/naming.log" as that given for appender [NAMING_LOG_FILE] defined earlier. 15:55:04,605 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting. 15:55:04,605 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[NAMING_LOG_FILE] - For more information, please visit https://logback.qos.ch/codes.html#earlier_fa_collision 15:55:04,606 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - 'File' option has the same value "C:\Users\Administrator/logs/nacos/remote.log" as that given for appender [REMOTE_LOG_FILE] defined earlier. 15:55:04,606 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting. 15:55:04,606 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - For more information, please visit https://logback.qos.ch/codes.html#earlier_fa_collision 15:55:04,610 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Attempted to append to non started appender [CONFIG_LOG_FILE]. 15:55:04,610 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Attempted to append to non started appender [CONFIG_LOG_FILE]. 15:55:04,610 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Attempted to append to non started appender [CONFIG_LOG_FILE]. 15:55:04,610 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Attempted to append to non started appender [CONFIG_LOG_FILE]. 15:55:04,612 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Attempted to append to non started appender [CONFIG_LOG_FILE]. 15:55:04,612 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[CONFIG_LOG_FILE] - Attempted to append to non started appender [CONFIG_LOG_FILE]. 15:55:04,655 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Attempted to append to non started appender [REMOTE_LOG_FILE]. 15:55:04,655 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Attempted to append to non started appender [REMOTE_LOG_FILE]. 15:55:04,655 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Attempted to append to non started appender [REMOTE_LOG_FILE]. 15:55:04,655 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Attempted to append to non started appender [REMOTE_LOG_FILE]. 15:55:04,655 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Attempted to append to non started appender [REMOTE_LOG_FILE]. 15:55:04,655 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[REMOTE_LOG_FILE] - Attempted to append to non started appender [REMOTE_LOG_FILE]. 且部分服务报错后, debug模式能启动成功, 部分服务直接启动失败.
+1
排除 nacos 所依赖的日志组件,就可以解决,如下:
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos-client.version}</version>
<exclusions>
<exclusion>
<groupId>com.alibaba.nacos</groupId>
<artifactId>logback-adapter</artifactId>
</exclusion>
<exclusion>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-log4j2-adapter</artifactId>
</exclusion>
<exclusion>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-logback-adapter-12</artifactId>
</exclusion>
</exclusions>
</dependency>
这样做的后果是,nacos 相关日志会输出应用中
不知道alibaba在搞什么鬼。。。 现在大部分人的版本都被控制在了2023.0.1.2上了。
不知道alibaba在搞什么鬼。。。 现在大部分人的版本都被控制在了2023.0.1.2上了。
人家忙着搞 AI,没 KPI 管社区
This issue has been open 30 days with no activity. This will be closed in 7 days.
没人回复吗?
This issue has been open 30 days with no activity. This will be closed in 7 days.
This issue has been automatically marked as stale because it hasn't had any recent activity.If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Sping Cloud Alibaba Community.
没人回复呢