启动类com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTING
时间: 2023-10-12 22:55:36 浏览: 204
根据引用\[1\]和引用\[2\]的信息,启动类出现"com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTING"的错误是因为连接Nacos的gRpc的9848和9849端口未开放。在启动Nacos容器时,需要增加以下命令来开放端口:-p 8848:8848 -p 9848:9848 -p 9849:9849。同时,还需要确保服务器后台也开启了9848和9849端口。
此外,根据引用\[3\]的信息,这个错误也可能是由于springcloudalibaba的版本和nacos的版本不对应导致的。建议查找两者的对应关系,并更换其中一个版本,以解决这个问题。例如,将springcloudalibaba的版本更换为2.2.9.RELEASE,将nacos的版本更换为2.2.1。
综上所述,解决启动类出现"com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTING"错误的方法是开放Nacos的gRpc端口9848和9849,并确保服务器后台也开启了这两个端口。另外,还可以尝试更换springcloudalibaba和nacos的版本以解决兼容性问题。
#### 引用[.reference_title]
- *1* [nginx 集群环境项目启动报错:com.alibaba.nacos.api.exception.NacosException: Client not connected,](https://blog.csdn.net/weixin_44084452/article/details/129650316)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [【Nacos】Nacos.V2.Exceptions.NacosException: Client not connected,current status: STARTING](https://blog.csdn.net/weixin_43657300/article/details/131300529)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTING](https://blog.csdn.net/leopast/article/details/128723550)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文