我们正在尝试使用v3.7.8附带的集群形成插件来建立Rabbitmq集群。我们正在使用Ubuntu 16.04,并已安装erlang 21。
我已经用手动集群测试了系统,并且一切正常。
使用正确的策略设置IAM角色,并打开所有必需的端口。
启用rabbitmq_peer_discovery_aws似乎可以正常工作,我得到以下响应:
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_peer_discovery_aws
rabbitmq_peer_discovery_common
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@ip-10-0-0-192...
当我将任何以cluster_formation.xxxx开头的命令添加到Rabbit配置文件时,就会出现问题。
例如;
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_aws
cluster_formation.aws.region = us-east-1
cluster_formation.aws.access_key_id = SOMERANDOMID
cluster_formation.aws.secret_key = somerandomkey
cluster_formation.aws.use_autoscaling_group = true
重新启动rabbitmq服务失败,并且journalctl -xe状态; </ p>
-- Unit rabbitmq-server.service has begun starting up.
Oct 17 20:33:39 ip-10-0-0-192 rabbitmq-server[5868]: /usr/lib/rabbitmq/bin/rabbitmq-server: 24: /etc/rabbitmq/rabbitmq-env.conf: cluster_formation.peer_discovery_backend: not found
Oct 17 20:33:39 ip-10-0-0-192 systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=127/n/a
Oct 17 20:33:39 ip-10-0-0-192 rabbitmqctl[5875]: /usr/lib/rabbitmq/bin/rabbitmqctl: 24: /etc/rabbitmq/rabbitmq-env.conf: cluster_formation.peer_discovery_backend: not found
Oct 17 20:33:39 ip-10-0-0-192 systemd[1]: rabbitmq-server.service: Control process exited, code=exited status=127
Oct 17 20:33:39 ip-10-0-0-192 systemd[1]: Failed to start RabbitMQ broker.
-- Subject: Unit rabbitmq-server.service has failed
无论如何,我都会更改配置文件,如果在开始时有一个带有cluster_formation的命令,它将说找不到该命令。
答案 0 :(得分:0)
您没有使用正确的配置文件名。执行这些步骤
mv /etc/rabbitmq/rabbitmq-env.conf /etc/rabbitmq/rabbitmq.conf
systemctl start rabbitmq-server
rabbitmq-env.conf
文件用于设置RabbitMQ的外壳环境。 rabbitmq.conf
是ini样式的配置文件。
注意: RabbitMQ团队监视the rabbitmq-users
mailing list,并且有时仅在StackOverflow上回答问题。