Error: Server is DOWN now,please try again later!

Problem description

The Spring Boot application failed to connect to Nacos during startup, and the following error was reported:

com.alibaba.nacos.api.exception.NacosException: Failed to the req API: / nacos/v1 / ns/instance after all the servers ([127.0.0.1:8848]) tried: ErrCode:503, ErrMsg:server is DOWN now, please try again later! At com.alibaba.nacos.client.naming.net.NamingProxy.reqApi NamingProxy. Java: (552) ~ [nacos - the client - 1.3.3. Jar: na] the at Com.alibaba.nacos.client.naming.net.NamingProxy.reqApi NamingProxy. Java: (491) ~ [nacos - the client - 1.3.3. Jar: na] the at Com.alibaba.nacos.client.naming.net.NamingProxy.reqApi NamingProxy. Java: (486) ~ [nacos - the client - 1.3.3. Jar: na]

To solve

Delete the Data /protocol directory in the NACOS directory and restart the NACOS service.

CD nacos/data # Delete protocol directory rm -rf protocol/ # Restart sh startup.sh -m standalone