尝试停止容器时重建冻结

I received my first You are running an old version of the Discourse image. Upgrades via the web UI are disabled until you run the latest image message today and I think I’ve broken my installation.

I followed the instructions, running each command as sudo because my hosting provider doesn’t permit the creation of root users.

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

I then had to re-run with sudo git stash before the pull as there was an error regarding clashes.

Everything seemed to progress ok (I left it over an hour) but then my Terminal session closed (broken pipe error). To overcome, I set ClientAliveInterval on the server to 60 as this was commented out, restarted, and tried again.

When the rebuild script now runs, it crashes when it goes to stop the docker container.

I tried to get around this by running docker kill <id> before running the rebuild script, but the same crash occurs (CPU at 100% for about 15mins…then nothing for hours).

When I reboot the site still comes up, but I’m unable to update it (the UI updater still says I’m running an old Discourse image).

Any advise gratefully received.

It’s rather hard to guess without seeing the output of the build.

You might try using tmux (or similar) to keep the session open when you get disconnected (you can reconnect to the session with tmux attach).

Maybe have a look at PostgreSQL 13 update?

1 个赞

Thanks Jay, I think I’ve found the issue.

My VPS provider, webdock.io (who are great by the way) don’t support zfs because they use it at the host level; I’m advised nested zfs is a no go. They also didn’t recommend overlay2 for my install and suggested I edit launcher to include the vfs storage driver, which isn’t there by default.

171‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Storage Driver: (vfs|aufs|zfs|overlay2)
‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‏‏‎‎‏⬆️

I suspect sudo git pull overwrote this, and then I tried to rebuild with the wrong storage driver?

I’ve just rolled everything back and then re-edited launcher before running rebuild app and everything is working again.

cd /var/discourse
sudo git stash
sudo git pull
sudo nano launcher 

‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ then edit line 171 to include vfs

sudo ./launcher rebuild app

1 个赞

@ajmuir

我知道您的问题在一年前就已经解决了,但我想为这个讨论贡献我的看法,同时也为找到此帖子的新用户指明正确的方向。

Webdock(现在)建议使用 fuse-overlayfs 作为 Docker 存储驱动程序:How to change the Docker storage driver – Webdock

原因是 vfs 会产生大量的磁盘空间使用量。

但对 Docker 使用 fuse-overlayfs 会在 Discourse 启动器端产生警告或错误,因为它不是推荐的驱动程序。

我在我的博客上的这篇帖子中详细介绍了如何解决这个问题:Deploying Discourse on a Webdock server

您也可以像您那样做,将已安装的驱动程序添加到 egrep 语句中。

您为什么说 Webdock 不允许创建 root 用户?

您可以简单地使用 sudo su 切换到 root 用户,然后执行 Discourse 安装指南中的命令。