出现前所未有的意外错误 500(缺少 S3 存储桶名称)

你好!我在 DigitalOcean 上运行 Discourse(Docker)已有三年,期间问题不多。

今天,在更改了一些与图片大小相关的设置后,整个网站出现了 500 错误,并显示以下消息:


注意:抱歉,我只能看到西班牙语版本,不知道在这种情况下如何获取英语版本。

我尝试重新构建应用但未成功。日志中也没有任何清晰的线索,至少对我来说如此。

由于我从未见过此错误,我将提供几条可能相关(也可能不相关)的信息:

  • 图片存储在 S3 上。我没有修改任何与 AWS/S3 配置相关的内容。
  • 论坛使用 Let’s Encrypt 运行。
  • 我可以正常通过 rails console 进入应用。

我尝试在论坛中搜索过,但由于该消息是西班牙语,我找不到对应的英语版本:thinking:

注意:也许这是一个好主意,即使消息已翻译,也应在该消息中包含一个错误代码,以便日后在论坛中作为参考使用。

Can you load the logs (http://yoursiteurl.com/logs) ?

Yes! I don’t know how I forget it! (I never had this kind of problem in 3 years with Discourse, sorry).

Seems like it is related to S3 :thinking: it’s at least a clue, something where to start debugging

Looks like your setting s3_bucket is empty/missing somehow…

Are you running latest Discourse?

No, I updated the forum around 2 months ago or so.

You hit the nail on the head, IDK how it happened :facepalm: this is kind of crazy.
I’m restoring the bucket name from the console and let’s see if works.

@Falco it works. I’m ashamed, the lack of practice debugging Discourse blocked me :facepalm: thank you so much for you quick response.

I will update the title now that I know the error.

Thanks!