我正在尝试将RabbitMQ设置为在SSL上工作。
我已经更改了配置文件(/etc/rabbitmq/rabbitmq.config),如以下链接https://www.rabbitmq.com/ssl.html中所述:
# Defaults to rabbit. This can be useful if you want to run more than one node
# per machine - RABBITMQ_NODENAME should be unique per erlang-node-and-machine
# combination. See the clustering on a single machine guide for details:
# http://www.rabbitmq.com/clustering.html#single-machine
#NODENAME=rabbit
# By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if
# available. Set this if you only want to bind to one network interface or#
# address family.
#NODE_IP_ADDRESS=127.0.0.1
# Defaults to 5672.
#NODE_PORT=5672
listeners.ssl.default = 5671
ssl_options.cacertfile = /home/myuser/rootca.crt
ssl_options.certfile = /home/myuser/mydomain.com.crt
ssl_options.keyfile = /home/myuser/mydomain.com.key
ssl_options.verify = verify_peer
ssl_options.password = 1234
ssl_options.fail_if_no_peer_cert = false
我一直得到以下错误:
sudo rabbitmq-server
/usr/lib/rabbitmq/bin/rabbitmq-server: 15: /etc/rabbitmq/rabbitmq-env.conf: listeners.ssl.default: not found
如果我删除上面的行,我会得到以下错误:
sudo rabbitmq-server
/usr/lib/rabbitmq/bin/rabbitmq-server: 17: /etc/rabbitmq/rabbitmq-env.conf: ssl_options.cacertfile: not found
值得一提的是,没有上面的SSL配置,一切都工作得很好。
你能帮忙吗?
谢谢您的支持:)
2条答案
按热度按时间fykwrbwg1#
当您请求软件帮助时,请始终说明您使用的软件版本,这非常重要。在RabbitMQ的情况下,提供Erlang版本和使用的操作系统也是必要的。
在您的例子中,您在
/etc/rabbitmq/rabbitmq-env.conf
中有(删除的)环境配置,以及RabbitMQ配置,这是不正确的。必须从rabbitmq-env.conf
中删除以下行并将其放入/etc/rabbitmq/rabbitmq.conf
文件中:另请参阅文档
lymnna712#
在Rabbitmq.config中更改以下内容以监听5673