nacos-group / nacos-k8s

This project contains a Nacos Docker image meant to facilitate the deployment of Nacos on Kubernetes using StatefulSets.
578 stars 468 forks source link

nacos-mysql-sql-init configmap is empty, resulting in cluster initialization failure #424

Open zhangdejin-tom opened 1 year ago

zhangdejin-tom commented 1 year ago

查看nacos pod信息,验证是否正常运行 kubectl geet po -o wide --all-namespaces|grep nacos

image

查看nacos集群,验证集群状态 kubectl get nacos -n test

image

踩坑经历: nacos-mysql-sql-init任务失败: 原因分析如下: 容器未读取到nacos-mysql.sql,配置,导致mysql脚本执行是出现"mysql: option ‘-e’ requires an argument"。一真在纠结这个问题来回折腾了很久,下载过源码看了一遍sql脚本文件在源码中也存在,也视图通过页面修改配置内容,修改后字符串又立即还原为空。大致原因应该是初始化容器时未读取到sql文件配置内容值被覆盖了。初始化sql异常不会影响集群部署,至于具体怎么解决暂时未找到原因

image

无法读取nacos-mysql.sql导致“option ‘-e’ requires an argument”异常,异常截图如下:

image

因数据库未创建数据库出现"No DataSource set"异常,异常信息如下:

image
bongmu commented 10 months ago

我也遇到了这个问题,请问有解决吗