HenryQW / Awesome-TTRSS

🐋 Awesome TTRSS, a powerful Dockerised all-in-one RSS solution.
http://ttrss.henry.wang
MIT License
2.4k stars 499 forks source link

[BUG]从原docker迁移数据库文件报错 #463

Closed sums2001 closed 6 months ago

sums2001 commented 1 year ago

Bug 描述 因为更换了nas,需要把原来的内容迁移到新的nas上。导出旧数据库后,顺利导入新nas,但是登录时候提示 “数据库更新管理器 数据库需要升级到最新版(147 到 146 )”,点击更新列表后报错:正在更新版本 146 One of migrations failed. Either retry the process or perform updates manually。

你谷歌/百度了吗? 已经使用,但是没有结果。

部署方法

部署环境

复现步骤 导出后再次导入,还是提示数据库错误

预期结果 简洁明了地描述正确的预期结果该是怎样的。

截屏 如果可以提供截屏将有助于 bug 修复。

错误日志 [03:00:14/31] Child process with PID 3017 reaped. [03:00:14/31] Received SIGCHLD, 0 active tasks left. [03:01:08/31] 0 active tasks, next spawn at 60 sec. [03:02:08/31] 0 active tasks, next spawn at 0 sec. [03:02:09/31] Spawned child process with PID 3027 for task 0. [03:02:09/31] Spawned child process with PID 3029 for task 1.

Exception while creating PDO object:SQLSTATE[08006] [7] connection to server at "database.postgres" (172.20.0.2), port 5432 failed: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
Exception while creating PDO object:SQLSTATE[08006] [7] connection to server at "database.postgres" (172.20.0.2), port 5432 failed: FATAL:  the database system is shutting down
[03:02:10/31] Child process with PID 3027 seems active but lockfile is unlocked. [03:02:10/31] Child process with PID 3029 reaped. [03:02:10/31] Received SIGCHLD, 0 active tasks left. [03:02:10/31] Received SIGCHLD, 0 active tasks left. [03:03:09/31] 0 active tasks, next spawn at 60 sec. [03:04:09/31] 0 active tasks, next spawn at 0 sec. [03:04:10/31] Spawned child process with PID 3039 for task 0. [03:04:10/31] Spawned child process with PID 3040 for task 1.
Exception while creating PDO object:SQLSTATE[08006] [7] connection to server at "database.postgres" (172.20.0.2), port 5432 failed: FATAL:  database "ttrss" does not exist
Exception while creating PDO object:SQLSTATE[08006] [7] connection to server at "database.postgres" (172.20.0.2), port 5432 failed: FATAL:  database "ttrss" does not exist
[03:04:11/31] Child process with PID 3039 reaped. [03:04:11/31] Child process with PID 3040 reaped. [03:04:11/31] Received SIGCHLD, 0 active tasks left. [03:05:10/31] 0 active tasks, next spawn at 60 sec. [03:06:10/31] 0 active tasks, next spawn at 0 sec. [03:06:11/31] Spawned child process with PID 3053 for task 0. [03:06:11/31] Spawned child process with PID 3055 for task 1.
Exception while creating PDO object:SQLSTATE[08006] [7] could not translate host name "database.postgres" to address: Name does not resolve
Exception while creating PDO object:SQLSTATE[08006] [7] could not translate host name "database.postgres" to address: Name does not resolve
[03:06:12/31] Child process with PID 3053 reaped. [03:06:12/31] Child process with PID 3055 reaped. [03:06:12/31] Received SIGCHLD, 0 active tasks left. [03:06:12/31] Received SIGCHLD, 0 active tasks left. [03:07:11/31] 0 active tasks, next spawn at 60 sec. [03:08:11/31] 0 active tasks, next spawn at 0 sec. [03:08:12/31] Spawned child process with PID 3063 for task 0. [03:08:12/31] Spawned child process with PID 3065 for task 1.
Exception while creating PDO object:SQLSTATE[08006] [7] could not translate host name "database.postgres" to address: Name does not resolve
Exception while creating PDO object:SQLSTATE[08006] [7] could not translate host name "database.postgres" to address: Name does not resolve
[03:08:13/31] Child process with PID 3063 reaped. [03:08:13/31] Child process with PID 3065 reaped. [03:08:13/31] Received SIGCHLD, 0 active tasks left. [03:09:12/31] 0 active tasks, next spawn at 60 sec. [03:10:12/31] 0 active tasks, next spawn at 0 sec. [03:10:13/31] Spawned child process with PID 3079 for task 0. [03:10:13/31] Spawned child process with PID 3081 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:10:15/31] Child process with PID 3079 reaped. [03:10:15/31] Child process with PID 3081 reaped. [03:10:15/31] Received SIGCHLD, 0 active tasks left. [03:11:13/31] 0 active tasks, next spawn at 60 sec. [03:12:13/31] 0 active tasks, next spawn at 0 sec. [03:12:14/31] Spawned child process with PID 3100 for task 0. [03:12:14/31] Spawned child process with PID 3102 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:12:15/31] Child process with PID 3100 reaped. [03:12:15/31] Child process with PID 3102 reaped. [03:12:15/31] Received SIGCHLD, 0 active tasks left. [03:13:14/31] 0 active tasks, next spawn at 60 sec. [03:14:14/31] 0 active tasks, next spawn at 0 sec. [03:14:15/31] Spawned child process with PID 3106 for task 0. [03:14:15/31] Spawned child process with PID 3108 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:14:16/31] Child process with PID 3106 reaped. [03:14:16/31] Child process with PID 3108 reaped. [03:14:16/31] Received SIGCHLD, 0 active tasks left. [03:15:15/31] 0 active tasks, next spawn at 60 sec. [03:16:15/31] 0 active tasks, next spawn at 0 sec. [03:16:16/31] Spawned child process with PID 3120 for task 0. [03:16:16/31] Spawned child process with PID 3122 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:16:17/31] Child process with PID 3120 reaped. [03:16:17/31] Child process with PID 3122 seems active but lockfile is unlocked. [03:16:17/31] Received SIGCHLD, 0 active tasks left. [03:16:17/31] Received SIGCHLD, 0 active tasks left. [03:17:16/31] 0 active tasks, next spawn at 60 sec. [03:18:16/31] 0 active tasks, next spawn at 0 sec. [03:18:17/31] Spawned child process with PID 3129 for task 0. [03:18:17/31] Spawned child process with PID 3131 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:18:18/31] Child process with PID 3129 seems active but lockfile is unlocked. [03:18:18/31] Child process with PID 3131 reaped. [03:18:18/31] Received SIGCHLD, 0 active tasks left. [03:18:18/31] Received SIGCHLD, 0 active tasks left. [03:19:17/31] 0 active tasks, next spawn at 60 sec. [03:20:17/31] 0 active tasks, next spawn at 0 sec. [03:20:18/31] Spawned child process with PID 3140 for task 0. [03:20:18/31] Spawned child process with PID 3142 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:20:19/31] Child process with PID 3140 reaped. [03:20:19/31] Child process with PID 3142 reaped. [03:20:19/31] Received SIGCHLD, 0 active tasks left. [03:21:18/31] 0 active tasks, next spawn at 60 sec. [03:22:18/31] 0 active tasks, next spawn at 0 sec. [03:22:19/31] Spawned child process with PID 3147 for task 0. [03:22:19/31] Spawned child process with PID 3149 for task 1. Schema version is wrong, please upgrade the database (--update-schema). Schema version is wrong, please upgrade the database (--update-schema). [03:22:20/31] Child process with PID 3147 seems active but lockfile is unlocked. [03:22:20/31] Child process with PID 3149 reaped. [03:22:20/31] Received SIGCHLD, 0 active tasks left. [03:22:20/31] Received SIGCHLD, 0 active tasks left. **其他** 任何有助于 bug 修复的信息。
lmmsoft commented 9 months ago

+1 同样的问题

docker-compose 显示 ttrss | Schema version is wrong, please upgrade the database.

网页登录后,显示

Database Updater
Performing updates to version 146
One of migrations failed. Either retry the process or perform updates manually.

我的解法,使用旧的镜像 docker pull wangqiru/ttrss:nightly-2023-01-01 然后修改 docker-compose 文件即可

参考解决方案:https://lmmsoft.github.io/downgrade_ttrss/

zjm54321 commented 9 months ago

实测latest-2023-12-18的镜像任然是正常的,可以用这个

banjuer commented 7 months ago

lastest又出现了这种问题

退回到ttrss:latest-2024-02-28正常,搜索了下这种问题已经出现过好多次

JoJoJoinme commented 6 months ago

我今天也遇到了类似的问题,我检查了下,我的服务器部署在腾讯云上,使用docker-compose部署ttrss,并配置自动更新。 但是!我的docker registry 用的阿里云,而阿里云的镜像中ttrss:latest 镜像却是两年前的!(我换成腾讯的镜像源就好了)

或者懒一点指定版本ttrss:specific--version这样 也可以指定sha256拉取镜像,例如 ttrss:latest@sha256:xxxxxxxxxxxx (这里的sha256值需和docker hub中保持一致)