连接nacos配置中心报错:Client not connected, current status:STARTING at com.alibaba.nacos.common.remote.clien

文章讲述了在使用阿里Nacos进行微服务注册时遇到的错误,主要关注了版本不匹配导致的问题以及Nacos2.0中gRPC通信方式对端口设置的要求。
摘要由CSDN通过智能技术生成

一、报错信息:

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:639)
	at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:619)
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:356)
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doRegisterService(NamingGrpcClientProxy.java:209)
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.registerService(NamingGrpcClientProxy.java:123)
	at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.registerService(NamingClientProxyDelegate.java:98)
	at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:152)
	at com.alibaba.cloud.nacos.registry.NacosServiceRegistry.register(NacosServiceRegistry.java:75)
	... 28 common frames omitted

在这里插入图片描述

二、原因分析

1)版本不匹配

阿里的微服务套件有版本依赖关系,首先去官网查看版本有无问题(点击链接进入查看):
在这里插入图片描述

2)端口问题引起

如版本对应正确,则有可能是端口问题硬气。
Nacos2.0版本新增了gRPC的通信方式,需要再多开放几个端口:
(与主端口偏移量1000,1001)
7848:8848-1000
9848: 8848+1000
9849: 8848+1001

  • 10
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值