我在Windows 2012服务器上运行了RabbitMQ节点(rabbit @ my-server-1)。
我正在单独的服务器(也是Windows 2012)上创建第二个节点(rabbit @ my-server-2),并希望将其与现有节点集群。第二个节点的部署是通过Octopus Deploy进行的,为了让生活更轻松,我希望在节点启动时自动完成集群。
阅读文档(https://www.rabbitmq.com/clustering.html和https://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
答案 0 :(得分:0)
如何像在文档中"Config File Peer Discovery Backend"下那样添加聚类信息
这将为您提供如下配置文件:
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