简体   繁体   English

RabbitMQ Shovel 卡在“已终止”状态

[英]RabbitMQ Shovel Stuck in 'Terminated' Status

We have an issue where once in a while, a dynamic shovel (created via the HTTP API: /api/parameters/shovel/ ) with src-delete-after set to queue-length finishes and then instead of being deleted, gets stuck in a terminated status.我们有一个问题,有时,一个动态 shovel(通过 HTTP API 创建: /api/parameters/shovel/src-delete-after设置为queue-length完成,然后而不是被删除,卡在终止状态。

Subsequent attempts to delete the shovel by any of the following methods are unsuccessful:后续尝试通过以下任一方法删除铲子均未成功:

  1. Posting a DELETE to /api/parameters/shovel/DELETE发布到/api/parameters/shovel/
  2. rabbitmqctl delete_shovel
  3. rabbitmqctl clear_parameter -p <vhost> shovel <shovel_name>

The shovel doesn't even appear in the 'Shovel Management' section of the RabbitMQ admin UI.铲子甚至没有出现在 RabbitMQ 管理 UI 的“铲子管理”部分。

The only way we could get rid of that stuck shovel is by restarting RabbitMQ.我们可以摆脱卡住的铲子的唯一方法是重新启动 RabbitMQ。

Is anyone else having this issue?还有其他人有这个问题吗? If so, how do we clear the shovel without having to restart the cluster?如果是这样,我们如何在不重新启动集群的情况下清除铲子? Also, is it possible to prevent this from happening via configuration?另外,是否可以通过配置防止这种情况发生?

Thanks!谢谢!

PS: PS:

  1. RabbitMQ version: 3.4.4 RabbitMQ 版本:3.4.4
  2. Running a 2 node cluster (will be making it a 3 node cluster shortly due to obvious issue we could face in the case of a network partition).运行一个 2 节点集群(由于我们在网络分区的情况下可能面临的明显问题,很快将使其成为 3 节点集群)。

RabbitMQ Shovel 卡在“已终止”状态

You are using a very, very old version of RabbitMQ.您使用的是非常非常旧的 RabbitMQ 版本。 Please upgrade to the latest version ( 3.7.6 ) and be sure to use Erlang 20.3.X (not 21 ).请升级到最新版本( 3.7.6 )并确保使用 Erlang 20.3.X (不是21 )。 If you can still reproduce this issue, please report it on the rabbitmq-users mailing list.如果您仍然可以重现此问题,请在rabbitmq-users邮件列表中报告。

We're using RMQ 3.7.13, Erlang 21.3.1.我们使用的是 RMQ 3.7.13,Erlang 21.3.1。

One possible way the problem happens:问题发生的一种可能方式:

  • 3 node HA cluster 3节点HA集群
  • restart one of the nodes (/etc/init.d/rabbitmq-server restart)重启其中一个节点(/etc/init.d/rabbitmq-server restart)
  • old shovels AND old queues get resurrected somehow旧铁锹和旧队列以某种方式复活

The shovels can't be deleted using any of the ways mentioned in the question.无法使用问题中提到的任何方式删除铲子。 The only way I was able to get the shovels removed was to disable the shovel plugin on all 3 nodes in the cluster, then re-enable each plugin on each node like so:我能够移除铲子的唯一方法是禁用集群中所有 3 个节点上的铲子插件,然后重新启用每个节点上的每个插件,如下所示:

rabbitmq-plugins disable rabbit_shovel
rabbitmq-plugins enable rabbit_shovel
rabbitmq-plugins enable rabbit_shovel_management

As far as the old queues getting resurrected (happens randomly not touching anything... I call them "zombie" queues), this problem happens about once a month, so I created PostMan scripts to delete the resurrected queues.至于旧队列复活(随机发生,不接触任何东西......我称它们为“僵尸”队列),这个问题大约每月发生一次,所以我创建了 PostMan 脚本来删除复活的队列。 This has been a problem for years.这是多年来一直存在的问题。 We upgraded RMQ in hopes that fixes the issue... but it doesn't.我们升级了 RMQ,希望能解决这个问题……但事实并非如此。 Perhaps Quorum queues are a more robust solution?也许仲裁队列是一个更强大的解决方案? If I had more time to investigate/experiment, I would, but I'm buried up to my eyeballs with higher priorities.如果我有更多的时间来调查/实验,我会的,但我已经被更高优先级的眼球埋没了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM