WeBankPartners/we-cmdb

we-cmdb:v1.5.3容器启动报错:/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory

xuli2020-web opened this issue · 6 comments

描述您遇到的bug
we-cmdb启动报错:/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory

如何重现
git clone https://github.com/WeBankPartners/we-cmdb.git ---生产的目录是/data/we-cmdb
但是又要在/data/wecmdb里生成log

预期行为

截图

附加

[root@devops-cmdb build]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e1558204f08a we-cmdb:v1.5.3 "/bin/sh -c /scripts…" 10 minutes ago Restarting (1) 1 second ago build_wecmdb-app_1
2734edbccbeb cmdb-db:dev "docker-entrypoint.s…" 10 minutes ago Up 10 minutes 0.0.0.0:3306->3306/tcp build_wecmdb-mysql_1
[root@devops-cmdb build]# docker logs e1558204f08a
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory
/scripts/start.sh: line 15: can't create /data/wecmdb/log/wecmdb-core.log: nonexistent directory

生成的目录是/data/we-cmdb
git clone https://github.com/WeBankPartners/we-cmdb.git
但是又要在/data/wecmdb里生成log

没有重现这个问题,目前docker数据路径映射都是/data/wecmdb,请问哪个文档和什么情况下生成/data/we-cmdb目录使用呢

我这也出现了,步骤大致如下

  1. 下载release包v1.5.3,导入镜像we-cmdb:dev
  2. 数据库镜像使用代码build目录里面的dockerfile打的
  3. 使用install.sh启动

我这修改start.sh最后一行,跳过这个错误
${CUSTOM_PARAM} @>>/log/wecmdb-core.log

没有重现这个问题,目前docker数据路径映射都是/data/wecmdb,请问哪个文档和什么情况下生成/data/we-cmdb目录使用呢

好的,我们修改一下这个配置。
这是因为CMDB存在独立版和插件版打包的差别

最新Release已修复