apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.27k stars 1.15k forks source link

[Bug] [1.5.0]Eureka does not need to be started in nacos discovery mode #5043

Closed gjy1043 closed 6 months ago

gjy1043 commented 6 months ago

Search before asking

Linkis Component

linkis-commons

Steps to reproduce

[hadoop@wds06 sbin]$ sh linkis-start-all.sh We will start all linkis applications, it will take some time, please wait <--------------------------------> Linkis manager data is being cleared mysql: [Warning] Using a password on the command line interface can be insecure. <--------------------------------> Begin to start mg-eureka Is local execution:sh /appcom/Install/LinkisInstall150_nacos/sbin/linkis-daemon.sh restart mg-eureka server mg-eureka is stopped. Start to check whether the mg-eureka is running Start server, startup script: /appcom/Install/LinkisInstall150_nacos/sbin/ext/linkis-mg-eureka =====Java Start Command===== nohup java -DserviceName=linkis-mg-eureka -Xmx512M -XX:+UseG1GC -Xloggc:/appcom/Install/LinkisInstall150_nacos/logs/linkis-mg-eureka-gc.log -cp /appcom/Install/LinkisInstall150_nacos/conf:/appcom/Install/LinkisInstall150_nacos/lib/linkis-spring-cloud-services/linkis-mg-eureka/:/appcom/Install/LinkisInstall150_nacos/lib/linkis-commons/public-module/ org.apache.linkis.eureka.SpringCloudEurekaApplication --spring.profiles.active=eureka > /appcom/Install/LinkisInstall150_nacos/logs/linkis-mg-eureka.out 2>&1 & server linkis-mg-eureka start succeeded!

cat /appcom/Install/LinkisInstall150_nacos/logs/linkis-mg-eureka.log 2023-12-14 10:42:57.107 [WARN ] [background-preinit ] o.s.h.c.j.Jackson2ObjectMapperBuilder (127) [warn] [JobId-] - For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath 2023-12-14 10:42:57.292 [INFO ] [main ] o.a.l.e.SpringCloudEurekaApplication (652) [logStartupProfileInfo] [JobId-] - The following profiles are active: eureka 2023-12-14 10:42:57.972 [WARN ] [main ] o.s.b.a.e.EndpointId (155) [logWarning] [JobId-] - Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format. 2023-12-14 10:42:58.007 [ERROR] [main ] o.s.b.SpringApplication (834) [reportFailure] [JobId-] - Application run failed java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration$EurekaServerConfigBeanConfiguration.eurekaServerConfig at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:184) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:332) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:237) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533) ~[spring-context-5.2.23.RELEASE.jar:5.2.23.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.apache.linkis.eureka.SpringCloudEurekaApplication.main(SpringCloudEurekaApplication.java:29) ~[linkis-eureka-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] Caused by: java.lang.IllegalStateException: @ConditionalOnMissingBean did not specify a bean using type, name or annotation and the attempt to deduce the bean's type failed at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.validate(OnBeanCondition.java:487) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.(OnBeanCondition.java:436) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:142) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] ... 18 more Caused by: org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanTypeDeductionException: Failed to deduce bean type for org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration$EurekaServerConfigBeanConfiguration.eurekaServerConfig at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:517) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanType(OnBeanCondition.java:506) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.(OnBeanCondition.java:429) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:142) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] ... 18 more Caused by: java.lang.ClassNotFoundException: com.netflix.eureka.EurekaServerConfig at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_192] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_192] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_192] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_192] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_192] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_192] at org.springframework.boot.autoconfigure.condition.FilteringSpringBootCondition.resolve(FilteringSpringBootCondition.java:108) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.getReturnType(OnBeanCondition.java:525) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:513) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanType(OnBeanCondition.java:506) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.(OnBeanCondition.java:429) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:142) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE] ... 18 more

Expected behavior

In NACOS mode, Eureka does not need to be started, and the startup script does not need to check the status of the Eureka service

Your environment

Anything else

No response

Are you willing to submit a PR?

github-actions[bot] commented 6 months ago

:blush: Welcome to the Apache Linkis community!!

We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context. We will be here shortly.

If you are interested in contributing to our website project, please let us know! You can check out our contributing guide on :point_right: How to Participate in Project Contribution.

Community

WeChat Assistant WeChat Public Account

Mailing Lists

Name Description Subscribe Unsubscribe Archive
dev@linkis.apache.org community activity information subscribe unsubscribe archive