alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
28.05k stars 8.35k forks source link

springcloud2022.x 集成springcloud alibaba2022.0.0.0-RC1 无法读取配置的nacos地址 #3262

Closed airufei closed 1 year ago

airufei commented 1 year ago

1、环境: JDK 17+ Nacos 2.2.0 SpringBoot 3.x SpringCloud 2022.0.0 SpringCloud Alibaba 2022.0.0.0-RC1

2、问题 com.alibaba.nacos.common.remote.client - [d968c999-e5f8-42ef-b15e-23e274fc70b7_config-0] Try to connect to server on start up, server: {serverIp = '127.0.0.1', server main port = 8848} 2023-04-12 10:58:14 342 printIfErrorEnabled [,][main] ERROR com.alibaba.nacos.common.remote.client.grpc.GrpcClient - Server check fail, please check server 127.0.0.1 ,port 9848 is available , error ={}

3、问题截图

image

4、pom配置截图 image

steverao commented 1 year ago

You can refer to update guide to check whether there is wrong using. If everything is alright, you can refer to relevant example to find the difference.

yuluo-yx commented 1 year ago

nacos 2.2.0 has added grpc communication port. If you run nacos server on a server or docker, you need to open port 9848.

airufei commented 1 year ago

nacos 2.2.0 has added grpc communication port. If you run nacos server on a server or docker, you need to open port 9848.

nacos server is fine, other applications are normal.

airufei commented 1 year ago

You can refer to update guide to check whether there is wrong using. If everything is alright, you can refer to relevant example to find the difference.

I didn't see any special difference, but spring-cloud-alibaba-dependencies 2022.0.0.0-RC2 was used in the case, but this version cannot pull dependencies

yuluo-yx commented 1 year ago

nacos 2.2.0 has added grpc communication port. If you run nacos server on a server or docker, you need to open port 9848.

nacos server is fine, other applications are normal.

You mean that other services can connect to the server normally. Is this the only service that went wrong? Also, can you provide a complete error log?

yuluo-yx commented 1 year ago

You can refer to update guide to check whether there is wrong using. If everything is alright, you can refer to relevant example to find the difference.

I didn't see any special difference, but spring-cloud-alibaba-dependencies 2022.0.0.0-RC2 was used in the case, but this version cannot pull dependencies

2022.0.0.0-RC2 is not published in the central repository and requires its own local packaging to be used.

airufei commented 1 year ago

You can refer to update guide to check whether there is wrong using. If everything is alright, you can refer to relevant example to find the difference.

I didn't see any special difference, but spring-cloud-alibaba-dependencies 2022.0.0.0-RC2 was used in the case, but this version cannot pull dependencies

2022.0.0.0-RC2 is not published in the central repository and requires its own local packaging to be used.

It has been solved, it is the problem of spring configuration loading (import), I did not notice this matter. Thank you very much.

youngledo commented 8 months ago

请问你这个是什么原因导致的,我也遇到同样的问题。