nacos报错Client not connected,current status:STARTING,StatusRuntimeException
nacos 2.0的nacos-client连接操作 9848 grpc连接错误
nacos server2.0后
Nacos2.0版本相比1.X新增了gRPC的通信方式,因此需要增加2个端口。新增端口是在配置的主端口(server.port)基础上,进行一定偏移量自动生成。 端口 与主端口的偏移量 描述 9848 1000 客户端gRPC请求服务端端口,用于客户端向服务端发起连接和请求 9849 1001 服务端gRPC请求服务端端口,用于服务间同步等
nacos client2.0后通过grpc连接 不能使用nacos server 2.0以下版本
serverInfo.getServerPort() + rpcPortOffset() 端口偏移1000 进行serverCheck 操作 报错: java.util.concurrent.ExecutionException: com.alibaba.nacos.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception 引起报错:RpcClient的currentConnection为null Caused by: ErrCode:-401, ErrMsg:Client not connected,current status:STARTING
解决方式:使用低版本的nacos-client