nacos: Server check fail, please check server localhost ,port 9848 is available , error ={}

学习nacos 创建的springboot项目启动客户端的时候发现报错了

[ main] c.a.n.c.remote.client.grpc.GrpcClient    : Server check fail, please check server localhost ,port 9848 is available , error ={}


java.util.concurrent.TimeoutException: Waited 3000 milliseconds (plus 15 milliseconds, 118500 nanoseconds delay) for com.alibaba.nacos.shaded.io.grpc.stub.ClientCalls$GrpcFuture@291373d3[status=PENDING, info=[GrpcFuture{clientCall={delegate={delegate=ClientCallImpl{method=MethodDescriptor{fullMethodName=Request/request, type=UNARY, idempotent=false, safe=false, sampledToLocalTracing=true, requestMarshaller=com.alibaba.nacos.shaded.io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller@58ba5b30, responseMarshaller=com.alibaba.nacos.shaded.io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller@4dba773d, schemaDescriptor=com.alibaba.nacos.api.grpc.auto.RequestGrpc$RequestMethodDescriptorSupplier@1d9bd4da}}}}}]]

是因为版本不兼容 以前学习下载的nacos版本是1.4.1版本
本地springboot是2.7.5 spring-cloud-alibaba-dependencies的版本是2021.0.4.0 切换到2.2.0版本之后启动就成功了

下载可以去github 2.2.0-BETA或者码云克隆然后按照nacos官网 配置
我是在码云克隆2.2.0-BETA分支 然后进入项目输入

mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U

然后再distribution\target目录生成nacos-server-2.2.0-SNAPSHOT.zip

解压之后配置单机模式之后启动服务 注册成功

nacos: Server check fail, please check server localhost ,port 9848 is available , error ={}_第1张图片
nacos: Server check fail, please check server localhost ,port 9848 is available , error ={}_第2张图片

你可能感兴趣的:(java,spring)