我在Ubuntu上安装了RabbitMQ,并且一切正常,但是当我尝试更改管理插件的侦听端口时,无法再启动RabbitMQ服务器。
sudo /etc/init.d/rabbitmq-server restart
[....] Restarting rabbitmq-server (via systemctl): rabbitmq-server.serviceJob for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
failed!
这是启动日志所说的:
{"init terminating in do_boot",generate_config_file}
这是我的rabbitmq.conf文件:
listeners.tcp.default = 5672
management.tcp.port = 80
rabbitmq-plugins list命令:
[ ] rabbitmq_amqp1_0 3.7.8
[ ] rabbitmq_auth_backend_cache 3.7.8
[ ] rabbitmq_auth_backend_http 3.7.8
[ ] rabbitmq_auth_backend_ldap 3.7.8
[ ] rabbitmq_auth_mechanism_ssl 3.7.8
[ ] rabbitmq_consistent_hash_exchange 3.7.8
[ ] rabbitmq_event_exchange 3.7.8
[ ] rabbitmq_federation 3.7.8
[ ] rabbitmq_federation_management 3.7.8
[ ] rabbitmq_jms_topic_exchange 3.7.8
[E ] rabbitmq_management 3.7.8
[E ] rabbitmq_management_agent 3.7.8
[ ] rabbitmq_mqtt 3.7.8
[ ] rabbitmq_peer_discovery_aws 3.7.8
[ ] rabbitmq_peer_discovery_common 3.7.8
[ ] rabbitmq_peer_discovery_consul 3.7.8
[ ] rabbitmq_peer_discovery_etcd 3.7.8
[ ] rabbitmq_peer_discovery_k8s 3.7.8
[ ] rabbitmq_random_exchange 3.7.8
[ ] rabbitmq_recent_history_exchange 3.7.8
[ ] rabbitmq_sharding 3.7.8
[ ] rabbitmq_shovel 3.7.8
[ ] rabbitmq_shovel_management 3.7.8
[ ] rabbitmq_stomp 3.7.8
[ ] rabbitmq_top 3.7.8
[ ] rabbitmq_tracing 3.7.8
[ ] rabbitmq_trust_store 3.7.8
[e ] rabbitmq_web_dispatch 3.7.8
[ ] rabbitmq_web_mqtt 3.7.8
[ ] rabbitmq_web_mqtt_examples 3.7.8
[ ] rabbitmq_web_stomp 3.7.8
[ ] rabbitmq_web_stomp_examples 3.7.8
有人知道如何解决此问题吗?
您想使用端口80
运行RabbitMQ管理,但是RabbitMQ以非特权用户rabbitmq
运行,该用户不允许绑定到端口80
。
最简单的解决方案是在默认端口15672
上运行,并使用代理在端口80
上进行服务。
[NOTE: RabbitMQ团队监视rabbitmq-users
mailing list,并且有时仅在StackOverflow上回答问题。