./launcher 重建旧版 1.6 discourse 应用不起作用

这是我最后的拼图碎片

我刚刚将旧论坛迁移到了新位置,但我仍然需要访问它。我编辑了 app.yml 来更改域名,然后运行了 ./launcher/ rebuild app --skip-prereqs 来更新它,但失败了

Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
2.0.20230116-0051: Pulling from discourse/base
e01f084ee363: Already exists 
db2fb8a75c87: Already exists 
6e789f3cf3a6: Already exists 
afa15f3b4f49: Already exists 
bd9a8f354aab: Already exists 
7492e41ba139: Already exists 
17620c643046: Already exists 
24a2215b994e: Already exists 
3119b33deb35: Already exists 
32a8b7f7c0e8: Already exists 
2dbcf46b2450: Already exists 
bdc228d4887d: Already exists 
914f28af582f: Already exists 
4a67c541b202: Already exists 
d3fc17f1b671: Already exists 
77b3d250e54b: Already exists 
9329aa462aa8: Already exists 
daeee236a97d: Already exists 
b7746b7c02a0: Already exists 
5c28ac2537d4: Already exists 
56d3ef9b7e39: Already exists 
3bb00ba1ec5a: Already exists 
1f758f6d6132: Already exists 
374c5f9048f9: Already exists 
0259a5d2f899: Already exists 
3ad74725ef87: Already exists 
f61c04c40065: Already exists 
1917d29aeb87: Already exists 
6bf5a4e9b5be: Already exists 
0f99e9c433c1: Already exists 
5c757ebc11e3: Already exists 
eb1d61649fc0: Already exists 
b3fce4a2403d: Already exists 
2252a5634a08: Already exists 
3b67775f0e8d: Already exists 
fb7e87c0cabf: Already exists 
f0ba17f026a5: Already exists 
aa579fdb2c50: Already exists 
9b282f6a881a: Already exists 
e60b39d46409: Already exists 
4e9e640a98df: Already exists 
0d2ba21fdd7e: Already exists 
5871f9f51cef: Already exists 
2a25ca72ae61: Already exists 
a6b1f035e2fa: Already exists 
4f13760fda63: Already exists 
856119d0afd5: Already exists 
0d289e5416ba: Already exists 
7ee9fa0f4507: Already exists 
aa6751fe4791: Already exists 
a586d833efb5: Already exists 
769ebf485619: Already exists 
701cfc339927: Already exists 
Digest: sha256:xxx
Status: Image is up to date for discourse/base:2.0.20230116-0051
/usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
flag provided but not defined: --shm-size
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
bootstrap failed with exit code 2
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
Container name cannot be empty

DISCOURSE DOCTOR Tue Jan 24 13:46:45 GMT 2023
OS: Linux xxxx01 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=forumsold.xxxxx.com
SMTP_ADDRESS=smtp.xxxxx.com # (mandatory)
DEVELOPER_EMAILS=xxxxxx
SMTP_PASSWORD=xxxxx # (optional)
SMTP_PORT=25 # (optional)
SMTP_USER_NAME=xxxxx # (optional)
LETSENCRYPT_ACCOUNT_EMAIL=

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 1.7.0, build 0baf609

DOCKER PROCESSES (docker ps -a)

CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                      PORTS               NAMES
456040e68bec        local_discourse/app   “/sbin/boot”        6 years ago         Exited (5) 52 minutes ago                       app                 
91834fc0d913        hello-world           “/hello”            7 years ago         Exited (0) 7 years ago                          ecstatic_poitras    

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
ERROR: Docker version 1.7.0 not supported, please upgrade to at least 17.03.1, or recommended 17.06.2
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to xxxx.xxxxxx.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . . 
ERROR: Docker version 1.7.0 not supported, please upgrade to at least 17.03.1, or recommended 17.06.2
Failed to restart the container.

==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-solved.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at xxxx.xxxx.com: NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
RAM (MB): 4048

            total       used       free     shared    buffers     cached
Mem:          3953       2058       1894          0         13       1811
-/+ buffers/cache:        233       3719
Swap:         2047        134       1913

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        79G   66G  9.5G  88% /

==================== DISK INFORMATION ====================

WARNING: GPT (GUID Partition Table) detected on '/dev/vda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/vda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start         End      Blocks   Id  System
/dev/vda1               1   167772159    83886079+  ee  GPT

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [xxxxxx]: n
Mail test skipped.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================

如果您移动了整个安装,在尝试升级之前是否尝试过直接启动容器?

如果您有备份,为什么不将其恢复到全新安装?

您正尝试从 1.6 版本重建,这应该可行,但会带来更多麻烦。

为什么要跳过先决条件?既然您正在重建,这并不会跳过更新,只会跳过检查,从而避免了更难排查的错误消息。

您是否可以同时更新 Docker?

1 个赞

我已经升级到 3.1,现在运行正常。
我正试图让旧的论坛(未动过)重新上线进行开发。

跳过先决条件是因为我无法在不跳过的情况下使用启动器的重建命令——需要 docker 运行 v1.7 和 v1.8——但也许这就是问题所在,我现在就尝试更新它。
有点困惑,因为我没有更新这些论坛,所以我不知道为什么重建不起作用,因为我没有更改任何依赖项等。

我唯一更改的是 app.yml 以更新主机名并尝试运行重建,但如果没有跳过先决条件,它将无法工作。

最新的启动器和 Docker 镜像与 Discourse 1.6 不兼容。您需要签出旧版本的 discourse_docker。类似 git checkout 2ec550f 的命令可能有效……

1 个赞

您的操作系统也可能已过支持期限,但无论如何,我都建议您进行备份,在新虚拟机上创建新安装,然后将备份恢复到新虚拟机。这还将为您节省一些更改域名或重命名 Discourse 所需的步骤。

我现在无法再这样做了,因为我无法重新启动应用程序了

如果您有旧文件夹的备份,您可以随时将其恢复并尝试启动。\n\n问题在于您升级了基础 Discourse 镜像。

然后,我将使用 rsync/var/discourse/shared 目录同步到新服务器。

如果我在新服务器上使用较新的 Discourse 版本,它会起作用吗?

1 个赞

请说明您在这里期望的结果。

您当前的实例是 1.6 版,但您的标题表明您希望运行重建,这也会升级它——是这样吗?如果是这样,那么是的,恢复到全新的安装会更省事。

如果您只是想启动 1.6 实例而不是升级,那么建议会有所不同。如果不涉及主机名更改,您通常只需将 /var/discourse 的内容复制到服务器之间。只要目标机器安装了 Docker,就可以使用 ./launcher start 启动它。

1 个赞

我只想访问旧论坛,因为有些帖子没有迁移到新安装(备份有点过时)。
我想通知那些用户,但我无法恢复 1.6 版本——我不想更新它,但即使更新了也没关系,我只需要访问即可。

但如果主机名更改,我该怎么做?

是的,应该可行。

1 个赞