本篇内容介绍了“Docker部署rabbitmq常见的两个问题”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
1.背景
Docker部署rabbitmq遇到的如下两个问题
问题一:访问交换机时报错
Management API returned status code 500
问题二:访问channel时报错
Stats in management UI are disabled on this node
2.解决方案
[root@ldp03host ~]# clear
[root@ldp03host ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
adc292b90f88 rabbitmq "docker-entrypoint.s…" 6 days ago Up 18 hours 4369/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp, :::15672->15672/tcp rabbit
[root@ldp03host ~]# docker exec -it adc292b90f88 /bin/bash
root@my-rabbit:/# cd /etc/rabbitmq/conf.d/
root@my-rabbit:/etc/rabbitmq/conf.d# echo management_agent.disable_metrics_collector = false > management_agent.disable_metrics_collector.conf
root@my-rabbit:/etc/rabbitmq/conf.d# exit
exit
[root@ldp03host ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
adc292b90f88 rabbitmq "docker-entrypoint.s…" 6 days ago Up 19 hours 4369/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp, :::15672->15672/tcp rabbit
[root@ldp03host ~]# docker restart adc292b90f88
adc292b90f88
[root@ldp03host ~]#
完美!
“Docker部署rabbitmq常见的两个问题”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注编程网网站,小编将为大家输出更多高质量的实用文章!