已解决 docker禅道开源版不挂载镜像可以启动,挂载镜像后mysql无法启动

docker禅道启动镜像时,不挂载目录可以正常启动,

docker run -d -p 8080:80 -p 3306:3306 -e USER="admin" -e PASSWD="123456" -e BIND_ADDRESS="false" --name zentao-server idoop/zentao:latest

挂载目录后mysql无法正常启动

docker run -d -p 8080:80 -p 3306:3306 -e USER="admin" -e PASSWD="123456" -e BIND_ADDRESS="false" -v E:\docker\docker_volumes\zbox:/opt/zbox --name zentao-server idoop/zentao:latest

查看mysql日志

2020-07-15  1:55:19 0 [Note] Using unique option prefix 'innodb-locks' is error-prone and can break in the future. Please use the full name 'innodb-locks-unsafe-for-binlog' instead.

2020-07-15  1:55:19 0 [Note] Using unique option prefix 'innodb-cmp' is error-prone and can break in the future. Please use the full name 'innodb-cmp-per-index-enabled' instead.

2020-07-15  1:55:19 0 [Note] Using unique option prefix 'innodb-cmp-per-index' is error-prone and can break in the future. Please use the full name 'innodb-cmp-per-index-enabled' instead.

2020-07-15  1:55:19 0 [Note] Plugin 'InnoDB' is disabled.

2020-07-15  1:55:19 0 [Note] Using unique option prefix 'innodb-sys-tables' is error-prone and can break in the future. Please use the full name 'innodb-sys-tablestats' instead.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_CMPMEM' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_FT_DELETED' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_CMP_RESET' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_LOCK_WAITS' is disabled.

2020-07-15  1:55:19 0 [Note] Using unique option prefix 'innodb-buffer-page' is error-prone and can break in the future. Please use the full name 'innodb-buffer-page-lru' instead.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_BUFFER_PAGE_LRU' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_SYS_FIELDS' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'FEEDBACK' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_SYS_COLUMNS' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled.

2020-07-15  1:55:19 0 [Note] Using unique option prefix 'innodb-sys-foreign' is error-prone and can break in the future. Please use the full name 'innodb-sys-foreign-cols' instead.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_SYS_FOREIGN_COLS' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_BUFFER_POOL_STATS' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_TRX' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_FT_CONFIG' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_METRICS' is disabled.

2020-07-15  1:55:19 0 [Note] Plugin 'INNODB_SYS_INDEXES' is disabled.

2020-07-15  1:55:19 0 [Warning] /opt/zbox/run/mysql/mysqld: unknown variable 'loose-innodb-ft-inserted=0'

2020-07-15  1:55:19 0 [Note] Server socket created on IP: '0.0.0.0'.

2020-07-15  1:55:19 0 [ERROR] Can't start server : Bind on unix socket: Input/output error

2020-07-15  1:55:19 0 [ERROR] Do you already have another mysqld server running on socket: /opt/zbox/tmp/mysql/mysql.sock ?

2020-07-15  1:55:19 0 [ERROR] Aborting


禅道版本 12.3.3 源码包
操作系统 CentOS
客户端浏览器 Chrome

提问者: 又见炊烟 悬赏: 5 日期: 2020-07-15 10:59:21 答案:1 点击:112
设置备注
答案列表
2020/07/15
  1. idoop这个镜像是第三方镜像,自动升级逻辑有些问题。

  2. 建议使用禅道官方的镜像。


步骤:

1. 操作之前备份禅道,停止服务,备份 /data/zbox/整个目录。
2. 确认idoop/zentao环境禅道的版本小于等于12.3.1版本。
3. 安装12.3.1版本的官方版本的docker环境: spacer.gifhttp://www.zentao.net/book/zentaopmshelp/405.html
参考命令:
sudo docker run --name zentao -p 87:80 --network=zentaonet --ip  spacer.gif172.172.172.172 --mac-address 02:42:ac:11:00:00 -v /app/zentaopms:/app/zentaopms -v /app/mysqldata:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d easysoft/zentao:12.3.1
4. 停止两套docker容器
5. 迁移附件的物理文件,将/data/zbox/app/zentao/www/data/upload/1/目录下的文件,迁移到/app/zentaopms/www/data/upload/1/目目录下
6. 将/app/mysqldata/zentao/目录下的数据库物理文件删除
7. 迁移数据库物理文件,将/data/zbox/data/zentao/目录下的文件,迁移到/app/mysqldata/zentao/目录下,并且执行 chmod -R 660 /app/mysqldata/zentao/
8. 启动容器,访问禅道,如果跳转到upgrade.php页面,可以群文件下载upgrade.php文件,放到/app/zentaopms/www/目录下,访问执行升级


有其他疑问,可以联系官网顶部商务QQ,邀请加入技术交流群,群里沟通下。