Oops 错误

我重新构建了我的网站,然后打开浏览器出现了下面的信息:

Oops
The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience.

Detailed information about the error was logged, and an automatic notification generated. We'll take a look at it.

No further action is necessary. However, if the error condition persists, you can provide additional detail, including steps to reproduce the error, by posting a discussion topic in the site's feedback category.

我记得出现这个问题之前,我点击了AI插件的配置页面。

对于containers/app.yml文件,我只是在最后面配置了:

params:
  version: esr

现在我尝试重新构建了很多次,每次刷新后都是这个错误提示。

有人遇到过这个问题吗?

log/production.log日志内容:

我在容器里面执行了 sv restart unicorn

Shutting down
Terminating quiet threads for default capsule
Scheduler exiting...
Pausing to allow jobs to finish...
Bye!
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Booted Rails 8.0.4 application in production environment
Running in ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
See LICENSE and the LGPL-3.0 for licensing details.
Upgrade to Sidekiq Pro for more features and support: https://sidekiq.org
Sidekiq 7.3.9 connecting to Redis with options {size: 5, pool_name: "default", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Sidekiq 7.3.9 connecting to Redis with options {size: 10, pool_name: "internal", host: "localhost", port: 6379, db: 1, url: nil}
Started GET "/" for 220.173.137.204 at 2026-03-31 08:28:24 +0000
Processing by ListController#latest as HTML
  Rendered layout layouts/application.html.erb (Duration: 11252.1ms | GC: 410.6ms)
Completed 500 Internal Server Error in 14209ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 560.5ms)

删除你对 app.yml 文件的修改,然后运行 ./launcher rebuild app。

你的 app.yml 文件中可能存在语法错误。

虽然我不是专家,也不清楚你在 app.yml 文件中具体做了什么,但为了尽快重新启动你的论坛,请先删除你的修改并执行 rebuild 操作。

感谢你的回答,但是应该不是app.yml的问题。因为这个app.yml我已经成功构建很多次了。

当我运行下面的命令后,网站首页恢复了,但是当我点击登录之后,再次出现了Oops错误。

redis-cli flushall

sv restart unicorn

sv reload nginx

您是否将站点从 latest 降级到了 esr?这可以解释此类错误。

也许是降级吧。我是几周前刚重新部署的这个服务器,然后我在测试部署指定版本的功能,现在我认为最佳实践是esr。然后,我就碰到了这个Oops。

但是之前正常运行了好几周时间了,刚刚突然就报错了。

如何解决这个问题呢?只能升级到latest吗?

很遗憾,不支持降级。因此,您需要要么恢复到运行 ESR 版本时的早期备份,要么继续运行 latest 版本,直到下一个 ESR 版本发布(7 月)。

你的意思是数据和代码冲突导致的问题?我只能回到跟我数据匹配的代码版本?

是的,完全正确。数据库架构会定期变更。因此,如果您的数据库架构已更新至 latest,它将无法与 ESR 上的旧代码兼容。

也就是说,如果我新安装了一台服务器,因为默认标准安装是latest,那么,这个时候如果我想再部署esr,那么就有可能出现这个问题。

如果是旧的服务器,上面的版本是3.5.0之类的,我升级到esr,这样就没问题,是吧。

或者我把数据全部删除,然后再部署esr版本,应该也是可以的吧。

是的,完全正确:+1:

1 个赞