如果是用docker安装的nacos ,在2.x版本可能会报如下错误

panic:read contig trom both server and cache fail, err=read cache file contig Encrypted Data key talled. cause Tile doesnt exist,file path:tmp/nacos/cache /config/user-srv.yaml@@dev@@84c38977-815-4492-a906-23e74116673d.:file not exist,dataId=user-srv.yaml,group=dev,namespaceId=84c38977-815-4492-a906-23e74166730

原因是升级nacos2.x后的原因,文档中有如下说明

所以启动docker时需要暴露端口如下

docker run --name nacos-standalone -e MODE=standalone -e JVM_XMS=512m -e JVM_XMX=512m -e JVM_XMN=256m -p 8848:8848 -p 9848:9848 -p 9849:9849 -d nacos/nacos-server:latest --restart=always

就可以了

Logo

一站式 AI 云服务平台

更多推荐