升级后无法重建应用程序 05/07/2025

我更新 discourse 到最新版本时遇到了失败。文件路径:

/etc/nginx/conf.d/outlets/server/20-https.conf

在我的 Ubuntu 24.04 虚拟实例上不存在。或者错误信息可能意味着它在 docker 镜像的 nginx 安装中丢失了。pups-1.2.1 中似乎存在一个问题。

任何帮助都将不胜感激。我没有在我的主系统上使用 nginx,因为我正在使用:

  - "templates/web.socketed.template.yml"

正如在:
https://meta.discourse.org/t/installing-discourse-behind-reverse-proxy-using-recommended-supported-installation/300191
中建议的那样。

FAILED                                                                                                            
--------------------                                                                                              
Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/nginx/conf.d/outlets/server/20-https.conf            
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/replace_command.rb:11:in `read'      
replace failed with the params {"filename"=>"/etc/nginx/conf.d/outlets/server/20-https.conf", "from"=>"/listen 443
 ssl;(\nlisten \\\[::\\\]:443 ssl;)?/", "to"=>"listen unix:/shared/nginx.https.sock ssl;\nset_real_ip_from unix:;"}
bootstrap failed with exit code 1                                                                                 
** 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.                                                                 
e3176c7debb5ed1c106765e76f5896b83dac3bb21dd3478b2ac043cbcb8032e1                                                  

我认为存在一个错误,因为:

  - "templates/web.socketed.template.yml"

希望:

10-http.conf
20-https.conf

但指令要求注释掉提供者:

  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"                                                                                   

如果我把第一个文件取消注释,web.ssl.template.yml 会删除 10-http.conf

为了使情况更复杂,当我试图避免最后一次提交:

7b042d6157

通过执行

git reset --hard HEAD^1

时,

./launcher rebuild app

会执行一次 git pull

我认为如果你运行
./launcher bootstrap app
它不会执行拉取。完成后,你可以销毁并启动应用程序。如果应用程序现在正在运行,你可能需要停止它。

我通过执行以下操作解决了问题:

git reset --hard HEAD^1
git checkout -b mybranch
./launcher rebuild app

因此,提交 7b042d6157 似乎导致了我的设置问题。

我在这里遇到了同样的错误消息。
我也在使用反向代理后的 Discourse。

通过以下方式恢复运行:

git reset --hard HEAD^1
./launcher bootstrap app
./launcher start app
2 个赞

遇到了同样的问题,尝试重新部署来升级和安装插件。我也在反向代理后面使用 Discourse。

所以,这是 Discourse 的一个 bug 吗?

1 个赞

我也遇到了同样的 bug。

2 个赞

这似乎与 @nbianca 的这次提交有关,我们正在为此设置高优先级标签,并将很快开始修复。

4 个赞

我们暂时撤销了这些更改,同时我们正在努力修复。\n\nRevert "Use Nginx config with outlets (#913)" by tgxworld · Pull Request #958 · discourse/discourse_docker · GitHub

8 个赞

感谢您的报告。我一直在努力修复,很快就会合并:

4 个赞