Problem description
Spring cloud Alibaba micro service architecture is used, and Nacos is used in the service discovery and configuration center
At the beginning, Nacos was started locally, and everything was normal,
After Nacos is migrated to the cloud, change the Nacos address in the configuration file
The gateway service reports an error java.net.connectexception: no available server
, because it is always connected to localhost:8848
.
The console outputs the following screenshot:
Cause location
Because the parent POM dependency is imported:
spring-cloud-starter-Alibaba-Nacos-config
and spring-cloud-starter-Alibaba-Nacos-discovery
In local development, items such as testing, registration and discovery are configured in application.yml
, the central configuration file bootstrap.properties
is not created
Springboot automation configuration defaults to localhost:8848
, so there is no problem with the local environment.
Solution:
Remove useless dependencies (if nacos-config is not used, remove spring-cloud-starter-alibaba-nacos-config dependencies)
Read More:
- spring cloud 2020 gateway Error 503 [How to Solve]
- [Solved] nacos Error: com.alibaba.nacos.api.exception.NacosException: failed to req API:/nacos/v1/ns/instance
- [Solved] Spring Cloud Use Ribbon Error: No instances available for XXX
- Spring Cloud Hoxton.SR9 gateway and reactor-netty 0.9.0.RELEASE is Incompatible [How to Solve]
- springcloud alibaba Integrating nacos reports errors: create config service error!properties=NacosConfigPropertie
- How to Solve nacos Startup Error and Connect to MYSQL
- Hystrix fuse of spring cloud system
- Spring cloud Netflix hystrix/acutor/hystrix.stream Error ut005023
- [Solved] Openfegn Remote Call Error: java.lang.NullPointerException: null
- [Solved] Spring cloud zuul Error: com.netflix.zuul.exception.ZuulException
- Frequent log swiping after Nacos client starts [How to Solve]
- [Solved] Nacos offline service error: errCode: 500
- [Solved] nacos Startup Error: Unable to start embedded Tomcat
- Nacos boot error, unable to find Java_HOME [How to Solve]
- [Solved] Nacos1.3.2 Startup Error: Unable to start embedded Tomcat
- [Solved] nacos Error: Client not connected,current status:STARTING,StatusRuntimeException
- How to Solve Spring integrate Seata startup error
- [Solved] Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfigura
- [Solved] nacos Startup Error: Please set the JAVA_HOME variable in your environment
- [Solved] Nacos Startup Error: Error creating bean with name ‘authFilter‘