coze-dev / coze-dev/coze-studio

数据库容器启动报错:workflow_version table not found, retrying in 2 seconds...

Open
#1,979 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
21.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

**UPDATE**
已经解决了,解决步骤:
- 把 docker/volumes/mysql 的所有文件的权限设置为 644
```
chmod 644 volumes/mysql/schema.sql
chmod 644 volumes/mysql/sql_init.sql
```
- 删除 docker/data 下的所有文件(**IMPORTANT**)
- 重启 docker compose 就恢复了

*以下是原内容*
**Describe the bug**

按照官方文档的 docker compose up -d 部署,会发现 web 无法启动

Image

经排查,发现是数据库的容器启动报错,日志为:
```bash
workflow_version table not found, retrying in 2 seconds...
```

详细的启动日志为:
```bash
coze-mysql | Waiting for MySQL to start...
coze-mysql | 2025-09-03 03:29:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.5-1.el9 started.
coze-mysql | MySQL is starting...
coze-mysql | 2025-09-03 03:29:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
coze-mysql | 2025-09-03 03:29:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.5-1.el9 started.
coze-mysql | 2025-09-03 03:29:01+00:00 [Note] [Entrypoint]: Initializing database files
coze-mysql | 2025-09-03T03:29:01.325860Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
coze-mysql | 2025-09-03T03:29:01.327175Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.4.5) initializing of server in progress as process 84
coze-mysql | 2025-09-03T03:29:01.344621Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
coze-mysql | MySQL is starting...
coze-mysql | 2025-09-03T03:29:03.194955Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
coze-mysql | MySQL is starting...
coze-mysql | 2025-09-03T03:29:06.012807Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
coze-mysql | MySQL is starting...
coze-mysql | MySQL is starting...
coze-mysql | 2025-09-03T03:29:09.889620Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
coze-mysql | 2025-09-03 03:29:09+00:00 [Note] [Entrypoint]: Database files initialized
coze-mysql | 2025-09-03 03:29:09+00:00 [Note] [Entrypoint]: Starting temporary server
coze-mysql | 2025-09-03T03:29:09.981154Z 0 [System] [MY-015015] [Server] MySQL Server - start.
coze-mysql | 2025-09-03T03:29:10.269003Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.5) starting as process 137
coze-mysql | 2025-09-03T03:29:10.301000Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
coze-mysql | MySQL is starting...
coze-mysql | 2025-09-03T03:29:10.965777Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
coze-mysql | 2025-09-03T03:29:11.574398Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
coze-mysql | 2025-09-03T03:29:11.574422Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
coze-mysql | 2025-09-03T03:29:11.586082Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
coze-mysql | 2025-09-03T03:29:11.604416Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
coze-mysql | 2025-09-03T03:29:11.604503Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.5' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
coze-mysql | 2025-09-03 03:29:11+00:00 [Note] [Entrypoint]: Temporary server started.
coze-mysql | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
coze-mysql | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
coze-mysql | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
coze-mysql | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
coze-mysql | Waiting for workflow_version table to exist...
coze-mysql | workflow_version table not found, retrying in 2 seconds...
coze-mysql | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
coze-mysql | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
coze-mysql | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
coze-mysql | 2025-09-03 03:29:13+00:00 [Note] [Entrypoint]: Creating database opencoze
coze-mysql | 2025-09-03 03:29:13+00:00 [Note] [Entrypoint]: Creating user coze
coze-mysql | 2025-09-03 03:29:13+00:00 [Note] [Entrypoint]: Giving user coze access to schema opencoze
coze-mysql |
coze-mysql | 2025-09-03 03:29:13+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init.sql
coze-mysql | /usr/local/bin/docker-entrypoint.sh: line 75: /docker-entrypoint-initdb.d/init.sql: Permission denied
coze-mysql | workflow_version table not found, retrying in 2 seconds...
coze-mysql | workflow_version table not found, retrying in 2 seconds...
coze-mysql | workflow_version table not found, retrying in 2 seconds...
coze-mysql | workflow_version table not found, retrying in 2 seconds...
coze-mysql | workflow_version table not found, retrying in 2 seconds...
```

**To Reproduce**

按照官方的安装文档用 docker 启动即可复现

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.