您好,我正在使用 3.2.0.beta4-dev 版本(自托管),在此提交。更新后,用户开始在 UI 中收到重复/三倍的通知。(我指的是 Discourse UI,而不是电子邮件等)
即使您点击并阅读后,通知有时也会再次出现。我也遇到了这些问题。我不知道如何排查此问题或提供有用的日志。我想分享一下,看看这是否是一个普遍问题,或者仅存在于我的实例中?
您好,我正在使用 3.2.0.beta4-dev 版本(自托管),在此提交。更新后,用户开始在 UI 中收到重复/三倍的通知。(我指的是 Discourse UI,而不是电子邮件等)
即使您点击并阅读后,通知有时也会再次出现。我也遇到了这些问题。我不知道如何排查此问题或提供有用的日志。我想分享一下,看看这是否是一个普遍问题,或者仅存在于我的实例中?
我怀疑是内存问题,您的 Discourse 实例有多少内存?
我猜您指的是“Discourse UI”?
但是这个服务器已经运行了将近两个月了,这个问题以前没有出现过。现在我的服务器有 4GB 内存,其中一半是空的。2GB 的交换空间也空着。
我想可能是更新导致了这个问题,但也可能是扩展导致的。我不确定。我想下一步我会禁用所有扩展,看看是否有帮助。
是的,我在第一个帖子里包含了一张图片。我说的是 Discourse UI 通知。
我已经禁用了许多扩展程序,但问题仍然存在。有什么想法吗,或者我可以降级到 3.2.0.beta3-dev 版本吗?谢谢。
大家好,我知道没有人必须提供帮助,这是一个社区论坛,当然我不是付费客户,但这个错误让我和用户都感到非常沮丧。我们两个月前在 Discourse 的帮助下创建了一个社区,我们有 458 名活跃月用户。但自从这个错误发生(20 天前)以来,我已经尝试了我能做的一切。这对用户体验非常糟糕,现在我正在寻找脚本迁移到 Flarum 或其他论坛平台。看看这个:

用户一遍又一遍地收到相同的通知。他们会收到 20 天前、5 天前或任何时候的通知。即使您关闭了所有通知,几个小时后您仍然会收到相同的通知,而且没有办法解决这个问题!
再次,我知道我的处境,这是一个社区平台。我无权抱怨,但如果在这篇文章之后没有人提供帮助,即使这意味着我们所有以前的帖子和主题都将被删除(1.2 千个主题和 12.7 个帖子),我们也只能去别处了……
顺便说一句,我曾是 Discourse 的倡导者。我曾在我的 YouTube 频道上制作过关于它的视频。土耳其社区通常使用过时的论坛,我以前使用 Discourse 的经验很好,所以在开设自己的论坛后,我想让人们了解这个软件。
总之,我真的不想失去我们当前论坛上所有其他人的解决方案和工作。所以,我再次恳请您的帮助。谢谢。
出于好奇,你能找出那些有重复通知的帖子有什么共同之处吗?
据我所知,这因用户而异。但它们会重复。在我的账户上,我一遍又一遍地收到相同的通知。尽管这在 21 天前的帖子中没有发生,我们当时进行了 3.2.0beta4 更新,并且我还为我们的论坛添加了扩展。
起初我以为是扩展触发了这个问题,所以我禁用了所有扩展,但问题仍然存在。顺便说一句,也许我应该删除它们并完全重建?我不知道。
然后我以为是因为 beta4。然后我降级到 beta3,当时我们没有这个问题,但它仍然存在。
抱歉,我们没有收到其他关于此问题的报告,因此很难确定您网站上发生的情况。您是否进行了标准安装?
您的 /logs 或 /sidekiq 页面是否有任何可能提供更多信息的内容?
是的。禁用可能无法完全消除问题所在。但是您最近安装了哪些插件?我们或许可以知道是否有插件曾被报告有问题。
是的,我明白这很难 pinpoint。所以我曾希望过一段时间它会自动消失,但它并没有。
我认为我遇到了和这个问题一样的情况:Users getting notifictations from long ago
是的,我使用的是标准安装,唯一的区别是我位于 Cloudflare 之后。您可能认为这是 Cloudflare 导致的,但在此之前我们从未遇到过此类问题。我不认为这很可能是原因。
我找不到与通知相关的任何内容,但我不是这方面的专家,所以让我分享一些日志片段,也许您能从中发现些什么。
警告:
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
发送推送通知失败:WebPush::Unauthorized : 主机:fcm.googleapis.com, #<Net::HTTPForbidden 403 Forbidden readbody=true> 正文:授权头中的 VAPID 凭据不匹配
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
异常应用中间件处理异常失败:ArgumentError : 传递了空属性列表
异常应用中间件处理异常失败:ArgumentError : 传递了空属性列表
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
DiscoTOC 主题/组件抛出错误:TypeError: Cannot read properties of null (reading 'en')
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
异常应用中间件处理异常失败:ArgumentError : 传递了空属性列表
发送推送通知失败:WebPush::Unauthorized : 主机:updates.push.services.mozilla.com, #<Net::HTTPUnauthorized 401 Unauthorized readbody=true> 正文:{"code":401,"errno":109,"error":"Unaut
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
异常应用中间件处理异常失败:ActiveRecord::RecordNotUnique : PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_topic_tags_on_topic_id_and_t
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
处理劫持响应失败:EOFError : 到达文件末尾
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
弃用通知:`SiteSetting.anonymous_posting_min_trust_level` 已被弃用。请改用 `SiteSetting.anonymous_posting_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/disc
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
发送推送通知失败:WebPush::ResponseError : 主机:web.push.apple.com, #<Net::HTTPBadRequest 400 Bad Request readbody=true> 正文:{"reason":"VapidPkHashMismatch"}
discourse-gifs 主题/组件抛出错误:TypeError: Cannot read properties of null (reading 'en')
DiscoTOC 主题/组件抛出错误:TypeError: Cannot read properties of null (reading 'en')
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
发送推送通知失败:WebPush::Unauthorized : 主机:updates.push.services.mozilla.com, #<Net::HTTPUnauthorized 401 Unauthorized readbody=true> 正文:{"code":401,"errno":109,"error":"Unaut
Sidekiq 消耗过多内存(使用:558.27M)用于 'btt.community',正在重启
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
发送推送通知失败:WebPush::PushServiceError : 主机:updates.push.services.mozilla.com, #<Net::HTTPBadGateway 502 Bad Gateway readbody=true> 正文:{"code":502,"errno":903,"error":"Bad
弃用通知:`SiteSetting.min_trust_level_for_here_mention` 已被弃用。请改用 `SiteSetting.here_mention_allowed_groups`。(将在 Discourse 3.3 中移除)位于 /var/www/discourse/
弃用通知:Jobs::Chat::NotifyMentioned 被入队时携带的参数值无法干净地序列化为 JSON。这意味着该任务将以略有不同的值运行。
弃用通知:Jobs::Chat::NotifyWatching 被入队时携带的参数值无法干净地序列化为 JSON。这意味着该任务将以略有不同的值运行。
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) 未找到:No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
弃用通知:Jobs::Chat::NotifyMentioned 被入队时携带的参数值无法干净地序列化为 JSON。这意味着该任务将以略有不同的值运行。
弃用通知:Jobs::Chat::NotifyWatching 被入队时携带的参数值无法干净地序列化为 JSON。这意味着该任务将以略有不同的值运行。
错误:
作业异常:Net::ReadTimeout
作业异常:Net::ReadTimeout
作业异常:Net::SMTPAuthenticationError
作业异常:Net::SMTPAuthenticationError
作业异常:Net::SMTPAuthenticationError
(google_oauth2) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
作业异常:Net::ReadTimeout
(github) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
(discord) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
default: 无法拉取热链接图像 (https://btt.community/uploads/default/optimized/2X/9/9394498c413ffd7cefbee2461a83d1a66b3b499c_2_690x388.jpeg) 帖子:10185 PG::UniqueViolation: ERROR: duplicat
作业异常:ERROR: duplicate key value violates unique constraint "pg_type_typname_nsp_index" DETAIL: Key (typname, typnamespace)=(gamification_leaderboard_cache_1_all_time_1, 2200) 已存在
(google_oauth2) 认证失败!invalid_credentials: OAuth2::Error, invalid_grant: Bad Request { "error": "invalid_grant", "error_description": "Bad Request" }
作业异常:Net::ReadTimeout
作业异常:到达文件末尾
(github) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
(twitter) 认证失败!invalid_credentials: OAuth::Unauthorized, 401 Unauthorized
作业异常:Net::SMTPAuthenticationError
作业异常:到达文件末尾
(google_oauth2) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
(google_oauth2) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
作业异常:Net::ReadTimeout
作业异常:参数数量错误(给定 0,预期 1)
作业异常:到达文件末尾
作业异常:参数数量错误(给定 0,预期 1)
(discord) 认证失败!csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | 检测到 CSRF
作业异常:Net::ReadTimeout
作业异常:参数数量错误(给定 0,预期 1)
致命错误:
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "categories" does not exist LINE 1: SELECT "categories"."id" FROM "categories" LEFT JOIN categor...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
Regexp::TimeoutError (regexp match timeout) lib/crawler_detection.rb:38:in `match?' lib/crawler_detection.rb:38:in `crawler?' lib/middleware/anonymous_cache.rb:129:in `is_crawler?' (eval):2:in `__comp
ActiveRecord::StatementInvalid (PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block ) lib/post_action_creator.rb:295:in `rescue in creat
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:521:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_topic_tags_on_topic_id_and_tag_id" DETAIL: Key (topic_id, tag_id)=(2907, 1) already e
关于 Sidekiq,我不确定具体该查看哪里。Sidekiq 不是处理电子邮件的吗?它与通知有关吗?
好的,我会尝试卸载每一个插件并在此期间重新构建。
以下是我在此问题开始之前安装的扩展(问题正好从那一天开始):
作为主题组件:
编辑:我忘记添加另外几个
我可能弄错了,但那是一个主题组件,对吧?
是的,没错,这在此时此刻是一个主题组件,我不知道是什么,所以还是把它包含进去了。![]()
Sidekiq 处理所有后台作业,包括通知。你的错误信息确实很杂乱
我认为其中一些错误已经被修复了,所以在你执行重建/更新后应该不会再出现。但我确实看到了:
Sidekiq 占用了太多内存(使用量:558.27M)
这可能会迫使它重试作业(包括再次发送通知)。你能点击那个错误看看是否有更多信息吗?
我明白了,如果真是这样,那可能就是问题所在。
![]()
左边是计数,对吧?所以它发生了 10 次。
这是它发生的所有时间:
8 Sep 6:55 pm
25 Sep 9:44 pm
4 Oct 9:53 pm
10 Nov 2:26 am (问题始于 11 月 9 日)
11 Nov 11:37 am
11 Nov 1:37 pm
23 Nov 6:43 pm
25 Nov 6:59 pm
Su 7:32 am
Mo 1:12 pm
但问题是,我们有 4GB 的内存和 2GB 的 SWAP,我从未见过它使用超过这个量:
我刚刚拍的照片就是现在的样子。所以也许这发生在用户高峰期,如果不是这样,也许我需要提高 Sidekiq 的阈值?
信息:
Sidekiq 正在消耗过多内存(使用:558.27M)用于 'btt.community',正在重启
回溯:
config/unicorn.conf.rb:164:in `check_sidekiq_heartbeat'
config/unicorn.conf.rb:244:in `master_sleep'
unicorn-6.1.0/lib/unicorn/http_server.rb:295:in `join'
unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `<main>'
环境:
hostname dc-app, [dc-discourse]
process_id 1215943
application_version a55f924e279b45b81e69e720faeb38284aed90d4
time Mo 1:12 pm
再次查看,我还看到一些可能与之相关的错误:
Message (109 copies reported)
Deprecation notice: Jobs::Chat::NotifyMentioned was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
At /var/www/discourse/plugins/chat/lib/chat/notifier.rb:355:in `notify_mentioned_users`
Backtrace
/var/www/discourse/lib/discourse.rb:1030:in `deprecate'
/var/www/discourse/app/jobs/base.rb:371:in `enqueue'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:355:in `notify_mentioned_users'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:78:in `notify_new'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:42:in `block in execute'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:7:in `execute'
Message (109 copies reported)
Deprecation notice: Jobs::Chat::NotifyWatching was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
At /var/www/discourse/plugins/chat/lib/chat/notifier.rb:367:in `notify_watching_users`
Backtrace
/var/www/discourse/lib/discourse.rb:1030:in `deprecate'
/var/www/discourse/app/jobs/base.rb:371:in `enqueue'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:367:in `notify_watching_users'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:79:in `notify_new'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:42:in `block in execute'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:7:in `execute'
Message (29888 copies reported)
Job exception: wrong number of arguments (given 0, expected 1)
Backtrace
/var/www/discourse/plugins/discourse-private-topics/plugin.rb:20:in `get_filtered_category_ids'
/var/www/discourse/plugins/discourse-private-topics/plugin.rb:149:in `handle'
/var/www/discourse/plugins/discourse-follow/plugin.rb:131:in `block (2 levels) in activate!'
/var/www/discourse/lib/plugin/instance.rb:521:in `block in on'
/var/www/discourse/lib/discourse_event.rb:12:in `block in trigger'
/usr/local/lib/ruby/3.2.0/set.rb:511:in `each_key'
/usr/local/lib/ruby/3.2.0/set.rb:511:in `each'
/var/www/discourse/lib/discourse_event.rb:12:in `trigger'
/var/www/discourse/app/services/post_alerter.rb:205:in `after_save_post'
/var/www/discourse/app/jobs/regular/post_alert.rb:10:in `execute'
hostname dc-app
process_id 190
application_version 95b7cbd8a13ec82003936ef9408ec83bc9f3c2ea
current_db default
current_hostname btt.community
job Jobs::PostAlert
problem_db default
time We 1:55 pm
查看第3个错误的堆栈跟踪,似乎与 discourse-private-topics 和 discourse-follow 插件有关。正如我所说,我不是这方面的专家,但我会尝试从头开始删除并重新构建它们……
好的,问题解决了。最终的 Job exception: wrong number of arguments (given 0, expected 1) 问题是由以下一个或两个插件引起的:Private Topics Plugin 和 https://meta.discourse.org/t/discourse-follow/110579。也许两者结合起来会产生这个问题,我不知道,也不想去弄清楚。我在这里处理这个问题21天,有点受创伤了。😄 也许这个插件的作者想知道这个信息,所以我在这里标记他们:@sam @RGJ
我想我学会了如何调试 Discourse 问题,并且再也不会一次安装超过 1 个插件了……
感谢您对此事的深入调查!问题确实出在我的私有话题插件中,并且仅在关注插件也启用的情况下才会出现。
我已经推送了一个修复补丁。很抱歉给您带来了糟糕的体验 ![]()
出色的调试。
感谢 @RGJ 的快速修复 ![]()
由于这是一个非#official插件的问题,我将把它移出#bug类别(但不会将其合并到 https://meta.discourse.org/t/private-topics-plugin/268646,因为它对那个插件来说有点太大了)。
希望您现在可以同时安装这两个插件而不会收到任何通知。 ![]()