简体   繁体   English

Rabbit MQ声明性集群

[英]Rabbit MQ declarative clustering

I have a RabbitMQ node running on a Windows 2012 server (rabbit@my-server-1). 我有一个运行在Windows 2012服务器(rabbit @ my-server-1)上的RabbitMQ节点。

I am creating a second node (rabbit@my-server-2) on a seperate server (also Windows 2012) and would like to cluster it with the existing node. 我正在另一台服务器(也是Windows 2012)上创建第二个节点(rabbit @ my-server-2),并希望将其与现有节点群集。 The deployment of the second node is via Octopus Deploy and to make life easier I would like to have the clustering automatically done on startup of the node. 第二个节点的部署是通过Octopus Deploy进行的,为了使生活更轻松,我希望在节点启动时自动完成集群。

Reading the documentation ( https://www.rabbitmq.com/clustering.html and https://www.rabbitmq.com/configure.html ) leads me to believe I just need to add the following to the rabbitmq.conf file: 阅读文档( https://www.rabbitmq.com/clustering.htmlhttps://www.rabbitmq.com/configure.html )使我相信我只需要向rabbitmq.conf文件添加以下内容:

cluster_nodes.disc.1 = rabbit@my-server-1

However doing so causes the node to not start. 但是,这样做会导致节点无法启动。 The erl.exe process starts using 100% cpu and I see the following message in the erl_crash.dump file: erl.exe进程开始使用100%cpu,我在erl_crash.dump文件中看到以下消息:

Slogan: init terminating in do_boot (generate_config_file)

I believe this is symptomatic of an invalid config file, and indeed removing these config entries allows me start the node fine. 我认为这是无效配置文件的症状,确实删除了这些配置条目使我可以很好地启动节点。

I am able to cluster to the existing node manually via the relevant rabbitmqctl commands, but would prefer the declarative solution if possible. 我能够通过相关的rabbitmqctl命令手动集群到现有节点,但是如果可能的话,希望使用声明式解决方案。

I'm running RabbitMQ v3.7.4 and Erlang v20.3 我正在运行RabbitMQ v3.7.4和Erlang v20.3

So, what am I doing wrong? 那么,我在做什么错呢? I've done some googling but haven't found anything that helps. 我已经进行了一些谷歌搜索,但是没有找到任何有用的信息。

EDIT 编辑

Config file in full is: 完整的配置文件是:

listeners.ssl.default = 5671

ssl_options.cacertfile = e:/Rabbit/Certificates/cacert.pem
ssl_options.certfile = e:/Rabbit/Certificates/cert.pem
ssl_options.keyfile = e:/Rabbit/Certificates/key.pem
ssl_options.password = xxxxxxx
ssl_options.verify = verify_none
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.2

web_stomp.ssl.port       = 14879
web_stomp.ssl.backlog    = 1024
web_stomp.ssl.certfile   = e:/Rabbit/Certificates/cert.pem
web_stomp.ssl.keyfile    = e:/Rabbit/Certificates/key.pem
web_stomp.ssl.cacertfile = e:/Rabbit/Certificates/cacert.pem
web_stomp.ssl.password   = xxxxxxx

cluster_nodes.disc.1 = rabbit@my-server-1

How about adding the clustering-information like it is written in the doc under "Config File Peer Discovery Backend" 像在文档中“配置文件对等发现后端”中编写的那样,如何添加集群信息

this would leave you with a configfile like this: 这将为您提供一个像这样的配置文件:

listeners.ssl.default = 5671

ssl_options.cacertfile = e:/Rabbit/Certificates/cacert.pem
ssl_options.certfile = e:/Rabbit/Certificates/cert.pem
ssl_options.keyfile = e:/Rabbit/Certificates/key.pem
ssl_options.password = xxxxxxx
ssl_options.verify = verify_none
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.2

web_stomp.ssl.port       = 14879
web_stomp.ssl.backlog    = 1024
web_stomp.ssl.certfile   = e:/Rabbit/Certificates/cert.pem
web_stomp.ssl.keyfile    = e:/Rabbit/Certificates/key.pem
web_stomp.ssl.cacertfile = e:/Rabbit/Certificates/cacert.pem
web_stomp.ssl.password   = xxxxxxx

cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.classic_config.nodes.1 = rabbit@my-server-1
cluster_formation.classic_config.nodes.2 = rabbit@my-server-2

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

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