logApplication启动报错找不到nacos

Blade 未结 1 901
monkey
monkey 2022-01-12 11:35

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

1. 启动logApplication报错,提示localhost:8848注册失败

2. 

3.


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

        注册到指定的nacos上,非本地,我有修改

String NACOS_DEV_ADDR = "192.168.0.14:8848";

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

商业版 Windows

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

2022-01-12 11:24:16.601  WARN 22060 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-admin-dev.yaml] & group[DEFAULT_GROUP]

2022-01-12 11:24:16.601  INFO 22060 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-admin-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-admin.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-admin,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml,DEFAULT_GROUP'}]

2022-01-12 11:24:16.606  INFO 22060 --- [           main] org.springblade.admin.AdminApplication   : The following profiles are active: dev

2022-01-12 11:24:17.236  WARN 22060 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2022-01-12 11:24:17.248  WARN 22060 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

2022-01-12 11:24:17.336  INFO 22060 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=773442ab-43d4-3873-b32c-b6a9761358c1

2022-01-12 11:24:17.339  INFO 22060 --- [           main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.

2022-01-12 11:24:17.339  INFO 22060 --- [           main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.

2022-01-12 11:24:17.468  INFO 22060 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2022-01-12 11:24:17.469  INFO 22060 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactiveLoadBalancerConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactiveLoadBalancerConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2022-01-12 11:24:17.470  INFO 22060 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'deferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2022-01-12 11:24:17.697  WARN 22060 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2022-01-12 11:24:17.697  INFO 22060 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2022-01-12 11:24:17.700  WARN 22060 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2022-01-12 11:24:17.700  INFO 22060 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2022-01-12 11:24:17.801  WARN 22060 --- [           main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)

2022-01-12 11:24:27.999  INFO 22060 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 21 endpoint(s) beneath base path '/actuator'

2022-01-12 11:24:28.071  INFO 22060 --- [           main] o.s.s.c.ThreadPoolTaskScheduler          : Initializing ExecutorService 'Nacos-Watch-Task-Scheduler'

2022-01-12 11:24:29.076  INFO 22060 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : Inconsistent constructor declaration on bean with name 'org.springblade.core.launch.server.ServerInfo': single autowire-marked constructor flagged as optional - this constructor is effectively required since there is no default constructor to fall back to: public org.springblade.core.launch.server.ServerInfo(org.springframework.boot.autoconfigure.web.ServerProperties)

2022-01-12 11:24:29.154  WARN 22060 --- [           main] s.o.SpringCloudSecurityAutoConfiguration : All Spring Cloud Security modules and starters are deprecated. They will be moved to individual projects in the next major release.

2022-01-12 11:24:29.864 ERROR 22060 --- [           main] c.a.cloud.nacos.discovery.NacosWatch     : namingService subscribe failed, properties:NacosDiscoveryProperties{serverAddr='localhost:8848', endpoint='', namespace='', watchDelay=30000, logName='', service='blade-admin', weight=1.0, clusterName='DEFAULT', group='DEFAULT_GROUP', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.0.81', networkInterface='', port=-1, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, failFast=true}


com.alibaba.nacos.api.exception.NacosException: Request nacos server failed: 

at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:279) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doSubscribe(NamingGrpcClientProxy.java:227) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.subscribe(NamingGrpcClientProxy.java:212) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.subscribe(NamingClientProxyDelegate.java:147) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.nacos.client.naming.NacosNamingService.subscribe(NacosNamingService.java:393) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.cloud.nacos.discovery.NacosWatch.start(NacosWatch.java:134) ~[spring-cloud-starter-alibaba-nacos-discovery-2.2.7.RELEASE.jar:2.2.7.RELEASE]

at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:895) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) [spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]

at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:62) [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.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:50) [blade-core-launch-2.9.0.RELEASE.jar:na]

at org.springblade.admin.AdminApplication.main(AdminApplication.java:34) [classes/:na]

Caused by: com.alibaba.nacos.api.exception.NacosException: Client not connected,current status:STARTING

at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:655) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:635) ~[nacos-client-2.0.3.jar:na]

at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:269) ~[nacos-client-2.0.3.jar:na]

... 20 common frames omitted


2022-01-12 11:24:30.208 ERROR 22060 --- [ask-Scheduler-1] c.a.c.n.discovery.NacosDiscoveryClient   : get service name from nacos server fail,

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

image.png

1条回答
  •  monkey
    monkey (楼主)
    2022-01-12 13:16

    找到问题了是修改了common包名,pom没有添加引入version则没有提示报错消息导致。

    0 讨论(0)
提交回复