Hangs during upgrade

AI 生成的摘要

Users in the Support category are reporting that Discourse upgrades hang, typically at the rake multisite:migrate step. user1 and others note that rolling back results in a 502 Bad Gateway error, often requiring an SSH rebuild via ./launcher rebuild app to resolve the issue 1, 10, 14, 15. Silvanus encountered a specific permission error: Failed to create the container ID file: open cids/app_bootstrap.cid: permission denied 3. zogstrip suggested checking folder permissions, but the root cause was identified as Silvanus running commands without root privileges 4, 7. After correcting this by using sudo or logging in as root, Silvanus confirmed the upgrade completed successfully 6, 9. The issue appears to affect version v1.7.0.beta7+1 10, with some users noting that attempting the upgrade via the web browser first can cause the hang, while switching to the console and restarting the rebuild process resolves it 17.

Hangs during upgrade

wwwwwwwwwww/admin/upgrade

Bundle complete! 99 Gemfile dependencies, 177 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle.
$ bundle exec rake multisite:migrate

if you can rollback the update will error
502 Bad Gateway

Constantly have to use ssh

./launcher rebuild app

This also happened to me. I think it might be related to our backup issue (cc. @sam)

I also tried upgrading today, halted at rake multisite:migrate line and currently logged in for rebuild…

Nggh. There’s a lot of problems:

Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
/usr/bin/docker: Failed to create the container ID file: open cids/app_bootstrap.cid: permission denied.
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
"docker rm" requires at least 1 argument(s).
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
rm: cannot remove ‘cids/app_bootstrap.cid’: No such file or directory
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

What to do?

/usr/bin/docker: Failed to create the container ID file: open cids/app_bootstrap.cid: permission denied.

Did you change the permissions on the cids folder by any chances?

Nope.

Folder:

drwxr-xr-x  2 root root 4.0K Aug 28 00:25 cids

Folder contents:

drwxr-xr-x  2 root root 4.0K Aug 28 00:25 .
drwxr-xr-x 11 root root 4.0K Aug 28 00:16 ..
-rw-r--r--  1 root root    0 Jun  3 09:49 .gitkeep

Hmm. Maybe I should’ve done this with sudo?

Edit: ok, that seems to be doing the trick. Yeah, sorry, I forgot the ssh root@domain part… :frowning:

You should be root to use the ./launcher.

sudo is enough instead of root, right? Or should I just login as root?

Edit: went sudo su and continued :stuck_out_tongue:

Rebuild complete. Upgrade was finished, notifications have started working, emails are being sent. Everything works fine now.

Seconded. The upgrade failed for me as well. It took a rebuild to get things working again.

@zogstrip: Take this as a headsup. This failed with the update of today: “v1.7.0.beta7 +1”

So it will hung, even after sam’s latest fix?

i just upgraded and it hung, rebuild got it going again.

same issue hangs at the same spot

Did you upgrade using the web browser or via ssh?

cd /var/discourse
git pull
./launcher rebuild app

browser first, then console, back to browser where it was still stuck, restarted that and it finished fine.