可能与 147425 相关,但我新建了一个线程,因为我的情况是全新安装,而非迁移。
我在两个不同的干净 Ubuntu 18.04 实例(一个 Linode,一个 Digital Ocean)上尝试通过 Docker 脚本进行自助安装。两次都出现了相同的错误。
错误输出
== 20180917024729 RemoveSuperfluousColumns: 正在迁移 =========================
警告
-------------------------------------------------------------------------------------
在迁移过程中尝试删除或重命名列。
使用的 SQL 为:'ALTER TABLE user_profiles DROP COLUMN IF EXISTS card_image_badge_id'
请使用 `rails g post_migration` 生成一个部署后迁移脚本来删除或重命名列。
注意,为尽量减少干扰,请在您的 ActiveRecord 模型上使用 self.ignored_columns = ["列名"],大约 6 个月后可移除该设置。
此保护机制旨在防止删除当前正在被运行中的应用使用的列。
I, [2020-04-09T15:07:30.875957 #1] INFO -- : 正在终止异步进程
I, [2020-04-09T15:07:30.876041 #1] INFO -- : 向 HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 64 发送 INT 信号
2020-04-09 15:07:30.876 UTC [64] LOG: 收到快速关闭请求
I, [2020-04-09T15:07:30.876354 #1] INFO -- : 向 exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 181 发送 TERM 信号
181:signal-handler (1586444850) 收到 SIGTERM 信号,计划关闭...
181:M 09 Apr 2020 15:07:30.954 # 用户请求关闭...
181:M 09 Apr 2020 15:07:30.954 * 退出前保存最终的 RDB 快照。
181:M 09 Apr 2020 15:07:30.959 * 数据库已保存到磁盘
181:M 09 Apr 2020 15:07:30.960 # Redis 现已准备退出,再见...
2020-04-09 15:07:30.880 UTC [64] LOG: 中止所有活动事务
2020-04-09 15:07:30.886 UTC [64] LOG: 工作进程:逻辑复制启动器(PID 73)以退出代码 1 退出
2020-04-09 15:07:30.894 UTC [68] LOG: 正在关闭
2020-04-09 15:07:31.151 UTC [64] LOG: 数据库系统已关闭
失败
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' 执行失败,返回状态码 #<Process::Status: pid 12943 exit 1>
失败位置:/pups/lib/pups/exec_command.rb:112:in `spawn'
执行失败,参数为 {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
90378b39f271ddf9c4ba2628e28ceffd9ede8f3c6cdb4815b12f8b3ae5a218ac
** 引导失败 ** 请向上滚动查看更早的错误信息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。