开发者社区 > 云原生 > 微服务 > 正文

本地IDEA启动nacos后,服务注册的时候报错怎么办?

有没有大佬本地IDEA启动nacos后,遇到过同样的问题,本地IDEA源码启动后,服务注册的时候报错
```2024-02-02 12:15:47.024 ERROR 9900 [] [main] com.alibaba.nacos.common.remote.client Connection is unregistered, switch server, connectionId = 1706847342345_xxxx_57162, request = SubscribeServiceRequest
2024-02-02 12:15:47.024 INFO 9900 [] [com.alibaba.nacos.client.remote.worker] com.alibaba.nacos.common.remote.client [f2199a1e-6949-4aa8-961f-a54e9e8b29eb] Try to reconnect to a new server, server is not appointed, will choose a random server.
2024-02-02 12:15:47.129 ERROR 9900 [] [com.alibaba.nacos.client.naming.updater.0] com.alibaba.nacos.common.remote.client Send request fail, request = ServiceQueryRequest{headers={accessToken=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJuYWNvcyIsImV4cCI6MTcwNjg2NTM0Mn0.dWQQLfpJwfdd5JD-d8Dm14YtADuWOe8AE8AIGrurBdY, app=unknown}, requestId='null'}, retryTimes = 0, errorMessage = Client not connected, current status:UNHEALTHY
2024-02-02 12:15:47.129 ERROR 9900 [] [main] com.alibaba.nacos.common.remote.client Send request fail, request = SubscribeServiceRequest{headers={}, requestId='null'}, retryTimes = 0, errorMessage = Connection is unregistered.
2024-02-02 12:15:47.136 ERROR 9900 [] [main] com.alibaba.cloud.nacos.discovery.NacosWatch namingService subscribe failed, properties:NacosDiscoveryProperties{serverAddr='xxxx:8848', username='nacos', password='nacos', endpoint='', namespace='vecs-v2-dev-qjx', watchDelay=30000, logName='', service='xxxx', weight=1.0, clusterName='DEFAULT', group='DEFAULT_GROUP', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD, management.endpoints.web.base-path=/monitor, management.context-path=/vecs-monitor}, registerEnabled=true, ip='10.2.76.101', networkInterface='', port=-1, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, instanceEnabled=true, ephemeral=true, failureToleranceEnabled=false}, 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:290)
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doSubscribe(NamingGrpcClientProxy.java:230)
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.subscribe(NamingGrpcClientProxy.java:215)
at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.subscribe(NamingClientProxyDelegate.java:147)
at com.alibaba.nacos.client.naming.NacosNamingService.subscribe(NacosNamingService.java:393)
at com.alibaba.cloud.nacos.discovery.NacosWatch.start(NacosWatch.java:132)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
at cn.enn.vecs.resource.VecsResourceApplication.main(VecsResourceApplication.java:15)
Caused by: com.alibaba.nacos.api.exception.NacosException: Connection is unregistered.
at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:669)
at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:630)
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:280)
... 20 common frames omitted
```

4ad00eaa23a65c81c28352c1347e7ac1.png

展开
收起
你鞋带开了~ 2024-02-06 15:23:42 183 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:

为微服务建设降本增效,为微服务落地保驾护航。

相关电子书

更多
workshop专场-微服务专场-开发者动手实践营-微服务-使用Nacos进行服务的动态发现和流量调度 立即下载
蚂蚁金服高级开发工程师萧恺:IDEA 插件开发入门教程 立即下载
Nacos 启航,发布第一个版本, 云原生时代助力用户微服务平台建设 立即下载