繁体   English   中英

Rabbit MQ声明性集群

[英]Rabbit MQ declarative clustering

我有一个运行在Windows 2012服务器(rabbit @ my-server-1)上的RabbitMQ节点。

我正在另一台服务器(也是Windows 2012)上创建第二个节点(rabbit @ my-server-2),并希望将其与现有节点群集。 第二个节点的部署是通过Octopus Deploy进行的,为了使生活更轻松,我希望在节点启动时自动完成集群。

阅读文档( https://www.rabbitmq.com/clustering.htmlhttps://www.rabbitmq.com/configure.html )使我相信我只需要向rabbitmq.conf文件添加以下内容:

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

但是,这样做会导致节点无法启动。 erl.exe进程开始使用100%cpu,我在erl_crash.dump文件中看到以下消息:

Slogan: init terminating in do_boot (generate_config_file)

我认为这是无效配置文件的症状,确实删除了这些配置条目使我可以很好地启动节点。

我能够通过相关的rabbitmqctl命令手动集群到现有节点,但是如果可能的话,希望使用声明式解决方案。

我正在运行RabbitMQ v3.7.4和Erlang v20.3

那么,我在做什么错呢? 我已经进行了一些谷歌搜索,但是没有找到任何有用的信息。

编辑

完整的配置文件是:

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

像在文档中“配置文件对等发现后端”中编写的那样,如何添加集群信息

这将为您提供一个像这样的配置文件:

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