• rabbitmq web管理页面无法访问


    安装rabbitmq 之后可以通过默认的15672端口访问web界面进行管理,rabbitmq一些默认端口如下:

    • 4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
    • 5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
    • 25672: used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). See networking guide for details.
    • 15672: HTTP API clients and rabbitmqadmin (only if the management plugin is enabled)
    • 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
    • 1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
    • 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
    • 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)

      如果默认15672端口页面无法访问,先检查一下防火墙,添加端口或者关闭防火墙,centos6.5 关闭防火墙:

       [root@localhost ~]#servcie iptables stop --临时关闭防火墙,重启后复原

       [root@localhost ~]#chkconfig iptables off --永久关闭防火墙,重启后不会复原
       [root@localhost ~]# service iptables status  查看防火墙状态

      若关闭防火墙之后还是无法访问,则是由于在3.3.1和之后的版本,出于安全的考虑,guest这个默认的用户只能通过http://localhost:15672 登录,无法直接使用远程ip登录访问,需要进行配置,在配置之前先创建一个admin账号,并进行授权:

    查看用户 :rabbitmqctl list_users

    创建一个admin用户:rabbitmqctl add_user admin admin

    用户授权 :rabbitmqctl set_user_tags admin administrator

                  rabbitmqctl set_permissions -p / asdf ".*" ".*" ".*"

    创建用户之后需要进行配置,若使用rpm安装,则修改配置/etc/rabbitmq/rabbitmq.config,配置内容大致如下:

    [
    {rabbit,
    [%%
    %% Network Connectivity
    %% ====================
    %%
    %% By default, RabbitMQ will listen on all interfaces, using
    %% the standard (reserved) AMQP port.
    %%
    {tcp_listeners, [5672]},
    {loopback_users, ["admin"]}
    ]}
    ].

    配置之后,如果rabbitmq无法正常启动,出现错误:

    init terminating in do_boot ()
    
    Crash dump is being written to: erl_crash.dump...done

    此时有可能是配置文件配置有问题,确保配置文件没问题之后,重启即可。

     可参考官方文档:http://www.rabbitmq.com/access-control.html 

  • 相关阅读:
    快速瘦身大米瘦身法 健康程序员,至尚生活!
    20个生活小习惯"狠"减肥 健康程序员,至尚生活!
    橙子帮助减肥,谁都可以轻松做到 健康程序员,至尚生活!
    10个减肥小贴士,日常必备哦! 健康程序员,至尚生活!
    有源淹没分析arcgis_ArcGIS水文分析实战教程(15)库容和淹没区计算
    maven:apache.poi下载不了
    springboot:@RequestBody 注解只能处理json格式的请求字符串吗?
    arcpy计算统计值
    arcgis栅格计算器
    GeoTools:polygon 转 multipolygon&遍历multipolygon中的polygon
  • 原文地址:https://www.cnblogs.com/jessezeng/p/6902542.html
Copyright © 2020-2023  润新知