升级错误,求指导


(独唱者) #1

FAILED

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 10660 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn’
exec failed with the params {“cd”=>"$home", “hook”=>“bundle_exec”, “cmd”=>[“su discourse -c ‘bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4’”, “su discourse -c ‘bundle exec rake db:migrate’”, “su discourse -c ‘bundle exec rake assets:precompile’”]}
f6d20ac94eaa8f0aa59e13ecb17308aa67efbde92c4d7b29dc4b0063d468c5c7
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one


(独唱者) #2

求助啊!请指导帮忙!非常感谢!!


(Schrödinger's Corgi) #3

:thinking:
你好,
凭借我的经验和你所提供的信息,无法推断产生问题的原因。如果有可能,请你将以下信息分享出来:

  • 搭建的环境(Ubuntu / CentOS + Docker?)
  • 不含有敏感信息的错误日志(在standalone 然后寻找…/log文件夹下最新的log日志)
  • 升级时的环境(从哪个版本升级的,怎么升级的?网页后端升级还是命令行rebuild?安装了哪些插件?)

暂时能给出建议(假设Ubuntu+Docker):

  1. 重启物理或虚拟主机→rebuild 重建容器
  2. 记录或查找log,检查 cd /var/www/discourse/containers 下的设置文件app.yml,关闭非官方插件
  3. rebuild 重建容器

祝好运!


(独唱者) #4

谢谢,不知道咋回事,还是没用。

我的是Centos

从 .2.18升级到2.22
没有安装插件。


(Marguerite Su) #5

你能进容器手动执行下:

RAILS_ENV=production /usr/bin/bundler exec /usr/bin/rake db:migrate —trace 

吗?现在最重要的信息没出来,出来的报错都是 pups 报错的


(独唱者) #6

Your Docker installation is not using a supported storage driver. If we were to proceed you may have a broken install.
aufs is the recommended storage driver, although zfs/btrfs/overlay and overlay2 may work as well.
Other storage drivers are known to be problematic.
You can tell what filesystem you are using by running “docker info” and looking at the ‘Storage Driver’ line.

If you wish to continue anyway using your existing unsupported storage driver,
read the source code of launcher and figure out how to bypass this check.


(Schrödinger's Corgi) #7

搜索了下 发现了这两则讨论,不知有没有帮助。另外动手前注意系统备份:wrench:


(独唱者) #8

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 10719 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn’
exec failed with the params {“cd”=>"$home", “hook”=>“bundle_exec”, “cmd”=>[“su discourse -c ‘bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4’”, “su discourse -c ‘bundle exec rake db:migrate’”, “su discourse -c ‘bundle exec rake assets:precompile’”]}
fceeb6b0c655efae3b57c7af441b267a6b733a09f38eb16dc30e5017dc06c862
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

会不会跟我还在备案有关系?


(Marguerite Su) #9

数据库迁移失败跟备案有什么关系?


(独唱者) #10

备案期间网站域名链接不到网站的,app.yml 里

TODO: The domain name this Discourse instance will respond to

DISCOURSE_HOSTNAME: www.dutype.com
跟这个有关系吗


(Marguerite Su) #11

那关系就大了,我没用 docker 安装,直接装的 openSUSE 包,所以数据库地址可以设 127.0.0.1。你docker 设置的可能是域名,那样连不上数据库


(独唱者) #12

我等几天备案过了再尝试更新下,如果还有问题再说


(独唱者) #13

备案通过了,但是还是失败

FAILED

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 17115 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn’
exec failed with the params {“cd”=>"$home", “hook”=>“bundle_exec”, “cmd”=>[“su discourse -c ‘bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4’”, “su discourse -c ‘bundle exec rake db:migrate’”, “su discourse -c ‘bundle exec rake assets:precompile’”]}
e73089923808298695ad7640fcd5ad29de64b8ac7071e346572b65c2420ebb8a
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one


(Marguerite Su) #14

看下你的 mini_sql 这个 gem 的版本吧,我升到 2.3.0.beta2 时候被这个搞过一次。只有最新版才能 pg 后端。

我对 docker 不熟悉,告诉不了你怎么直接运行 db:migrate 命令,现在这个命令的 debug 输出都被 pups 这些东西给压制了


(Marguerite Su) #15

你看看这个,能直接在运行中的 docker 里执行 rake db:migrate


(Marguerite Su) #16

把这个放到 dbmigrate.sh 里:

#!/bin/sh
cd /var/www/discourse
bundle exec rake db:migrate

然后试试这样把 docker 跑起来然后运行脚本:

docker run -it -d docker名 /bin/bash
docker exec -it docker名 /bin/bash -c ./dbmigrate.sh

行不行


(Schrödinger's Corgi) #17

有个细节值得注意的是》从2.1升到2.2+的时候 默认设置文件app.yml 有些许的变动, 如果你的设置文件由于某些原因没有正确设置的话,Discourse docker 是无法初始化的。

你可以将隐去敏感信息的app.yml设置文件发出来 也许会有人找出问题的所在
操作方法见下面的链接