开启服务发现报错:
com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTING
获取配置出警告:
Ignore the empty nacos configuration and get it based on dataId[xxx-server] & group[DEFAULT_GROUP]
浪费半天时间,发现是nacos端口少了两个,见大佬贴:传送门
附上我的 compose 配置供参考:
version: "3.8"
services:
nacos:
image: nacos/nacos-server:v2.0.4
container_name: nacos
environment:
- MODE=standalone
- JVM_XMS=512m
- JVM_XMX=512m
- JVM_XMN=256m
- NACOS_AUTH_ENABLE=true
volumes:
- /root/bald-space/nacos/logs:/home/nacos/logs
- /root/bald-space/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8848:8848"
- "9848:9848"
- "9849:9849"
restart: always