Docker容器18.12升级20.x问题

回贴
回帖数 26
阅读数 23844
发表时间 2024-09-02 09:41:08
🍿
不要命的火锅 楼主

100
Actions
 
 
 
      
 09:39:42.22 
 09:39:42.22 Welcome to the Easysoft ZenTao 18.12 container
 09:39:42.22 Subscribe to project updates by watching https://www.zentao.net
 09:39:42.22 Submit issues and feature requests at https://www.zentao.net/ask.html
 09:39:42.22 
 09:39:42.23 INFO  ==> Prepare persistence directories.
 09:39:42.40 INFO  ==> Render php.ini with environment variables.
 09:39:42.41 INFO  ==> Check zentao data owner...
 09:39:45.67 INFO  ==> Render apache sites config with envionment variables.
 09:39:45.69 INFO  ==> Prepare custom extensions.
 09:39:45.71 INFO  ==> Check whether the MySQL is available.
 09:39:45.73 INFO  ==> Check whether the Apache is available.
[INFO] RoadRunner server started; version: 2023.3.4, buildtime: 2023-11-09T16:28:16+0000
[INFO] sdnotify: not notified
2024-09-02T01:39:46+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	INFO	service     	service was started	{"name": "cron_scheduler", "command": "php scheduler.php"}
 09:39:46.72 INFO  ==> Apache: MySQL is ready.
 09:39:46.73 WARN  ==> Sentry: Waiting Apache 1 seconds
httpd: Syntax error on line 83 of /opt/zbox/etc/apache/httpd.conf: Can't locate API module structure `php7_module' in file /opt/zbox/run/apache/modules/libphp.so: /opt/zbox/run/apache/modules/libphp.so: undefined symbol: php7_module
stop signal received, grace timeout is: 30 seconds
2024-09-02T01:39:46+0000	DEBUG	lock        	received stop signal, acquiring lock/release mutexes
2024-09-02T01:39:46+0000	DEBUG	lock        	acquired stop mutex
2024-09-02T01:39:46+0000	DEBUG	lock        	signal sent to all resources
2024-09-02T01:39:46+0000	ERROR	service     	wait	{"error": "signal: interrupt"}
2024-09-02T01:39:46+0000	INFO	service     	service was stopped	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	ERROR	service     	wait	{"error": "signal: interrupt"}
2024-09-02T01:39:46+0000	INFO	service     	service was stopped	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	ERROR	service     	wait	{"error": "signal: interrupt"}
2024-09-02T01:39:46+0000	INFO	service     	service was stopped	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	ERROR	service     	wait	{"error": "signal: interrupt"}
2024-09-02T01:39:46+0000	INFO	service     	service was stopped	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:46+0000	ERROR	service     	wait	{"error": "signal: interrupt"}
2024-09-02T01:39:46+0000	INFO	service     	service was stopped	{"name": "cron_scheduler", "command": "php scheduler.php"}
[INFO] RoadRunner server started; version: 2023.3.4, buildtime: 2023-11-09T16:28:16+0000
[INFO] sdnotify: not notified
2024-09-02T01:39:47+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:47+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:47+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:47+0000	INFO	service     	service was started	{"name": "cron_consumer", "command": "php consumer.php"}
2024-09-02T01:39:47+0000	INFO	service     	service was started	{"name": "cron_scheduler", "command": "php scheduler.php"}
s6-supervise 03-roadrunner: warning: finish script lifetime reached maximum value - sending it a SIGKILL
 09:39:52.30 
 09:39:52.30 Welcome to the Easysoft ZenTao 18.12 container
 09:39:52.30 Subscribe to project updates by watching https://www.zentao.net
 09:39:52.30 Submit issues and feature requests at https://www.zentao.net/ask.html
 09:39:52.30 
 09:39:52.31 INFO  ==> Prepare persistence directories.

换成20.x任何版本镜像都报错无法启动

10个回复
于涛 沙发

您好,使用的镜像具体是哪一个方便提供下吗,看logs是对于镜像里apache配置文件有个module模块的错误httpd: Syntax error on line 83 of /opt/zbox/etc/apache/httpd.conf: Can't locate API module structure `php7_module' in file /opt/zbox/run/apache/modules/libphp.so: /opt/zbox/run/apache/modules/libphp.so: undefined symbol: php7_module

可以尝试替换下这个镜像看下 hub.zentao.net/app/zentao:20.6-20240830

2024-09-02 09:51:02 于涛 回帖
🍿
不要命的火锅 板凳
2024-09-02 10:37:04 不要命的火锅 回帖
🍿
不要命的火锅 #3

      
 10:37:53.86 
 10:37:53.86 Welcome to the Easysoft ZenTao 18.12 container
 10:37:53.86 Subscribe to project updates by watching https://www.zentao.net
 10:37:53.87 Submit issues and feature requests at https://www.zentao.net/ask.html
 10:37:53.87 
 10:37:53.88 INFO  ==> Prepare persistence directories.
 10:37:54.04 INFO  ==> Render php.ini with environment variables.
 10:37:54.05 INFO  ==> Check zentao data owner...
 10:37:56.55 INFO  ==> Render apache sites config with envionment variables.
 10:37:56.56 INFO  ==> Prepare custom extensions.
 10:37:56.59 INFO  ==> Check whether the MySQL is available.
[INFO] RoadRunner server started; version: 2023.3.12, buildtime: 2024-03-11T00:37:41+0000
[INFO] sdnotify: not notified
 10:37:56.59 INFO  ==> Check whether the Apache is available.
 10:37:57.59 INFO  ==> Apache: MySQL is ready.
 10:37:57.60 WARN  ==> Sentry: Waiting Apache 1 seconds
httpd: Syntax error on line 83 of /opt/zbox/etc/apache/httpd.conf: Can't locate API module structure `php7_module' in file /opt/zbox/run/apache/modules/libphp.so: /opt/zbox/run/apache/modules/libphp.so: undefined symbol: php7_module
stop signal received, grace timeout is: 30 seconds
[INFO] RoadRunner server started; version: 2023.3.12, buildtime: 2024-03-11T00:37:41+0000
[INFO] sdnotify: not notified
s6-supervise 03-roadrunner: warning: finish script lifetime reached maximum value - sending it a SIGKILL
 10:38:03.15 
 10:38:03.15 Welcome to the Easysoft ZenTao 18.12 container
 10:38:03.16 Subscribe to project updates by watching https://www.zentao.net
 10:38:03.16 Submit issues and feature requests at https://www.zentao.net/ask.html
 10:38:03.16 
 10:38:03.17 INFO  ==> Prepare persistence directories.

用你提供的镜像也同样报错

2024-09-02 10:39:00 不要命的火锅 回帖
🍿
不要命的火锅 #4 回复#1

不行啊

2024-09-02 11:41:43 不要命的火锅 回帖
于涛 #5 回复#4

使用docker run启动的镜像还是docker compose?检查下持久化的目录里有没有把运行环境zbox做了持久化,新版的镜像PHP版本是81,如果持久化了老的环境 ,PHP版本是不同的

2024-09-02 13:07:31 于涛 回帖
🍿
不要命的火锅 #6

/data 映射到了宿主机 , 只映射/data/zentao就行了是吧

2024-09-02 13:14:47 不要命的火锅 回帖

是的,只需要做数据的持久化,代码无需持久化,如果直接更换镜像还是不行,可以考虑尝试新启一个镜像,成功运行后,将老版本的数据库SQL手动导入,附件(zentao/www/data/upload/1)手动拷贝一份,做下迁移升级看看。

2024-09-02 13:19:48 于涛 回帖
🍿
不要命的火锅 #8

用的docker run 。只映射/data/zentao 要么启动失败要么会进入安装界面而不是升级界面,并且由于dockerfile中指定了 /data 也会默认映射出一个volume来

2024-09-02 14:03:43 不要命的火锅 回帖
于涛 #9 回复#8

不好意思,之前的回复可能没有表述清楚,如果是进入了安装界面,应该是数据持久化的不对,缺少运行文件导致触发了重新安装。禅道现在新版的镜像都已经把需要持久化的都放到/data目录下我的,如果是docker run 可以直接映射容器内的/data目录,dockerfile中如果拉镜像是用的内置数据库那么映射一个/data的volume也可以,如果是再单独拉MySQL服务的话,还需要单独对/var/lib/mysql做持久化。关于docker部署这里有个手册可以看下,现在可以先尝试解决docker部署成功启动访问,然后再考虑是升级或者迁移的方案。

https://www.zentao.net/book/zentaopms/docker-1111.html

2024-09-02 14:09:14 于涛 回帖
🍿
不要命的火锅 #10
docker run -d --restart=always --privileged=true --name=zentao -p 16120:80 --network=svc  \
-e MYSQL_INTERNAL=false \
-e ZT_MYSQL_HOST=mysql \
-e ZT_MYSQL_PORT=12306 \
-e ZT_MYSQL_USER=zentao \
-e ZT_MYSQL_PASSWORD=zentao \
-e ZT_MYSQL_DB=zentao \
-v /etc/localtime:/etc/localtime:ro -v /opt/docer_data/zentao:/data -e MYSQL_INTERNAL=false hub.zentao.net/app/zentao:20.0.beta1

这没毛病啊 , 之前升级18系列的时候只改tag版本号就行了,现在升级20.x 改了就会报一楼得错误。应该是还缺少了哪里的更改

2024-09-02 14:12:26 不要命的火锅 回帖
联系人
徐亚京/高级客户经理
电话(微信)
17663982076
QQ号码
2679672214
联系邮箱
xuyajing@chandao.com
返回顶部
徐亚京
高级客户经理
17663982076
2679672214
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。 问题反馈反馈点击这里,让我们聆听您的建议与反馈。