无法添加Rabbitmq插件

时间:2016-05-26 13:39:08

标签: rabbitmq mqtt

我正在关注此http://www.rabbitmq.com/plugin-development.html链接以构建rabbitmq插件https://github.com/rabbitmq/rabbitmq-web-mqtt

构建完成后,

仅将rabbitmq_mqtt.ez复制到/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.2/plugins

正在运行sudo rabbitmq-plugins enable rabbitmq_web_mqtt 显示:

The following plugins have been enabled:
  cowlib
  cowboy
  rabbitmq_web_mqtt

Applying plugin configuration to rabbit@manish-Lenovo-G510... failed.
Error: {could_not_start,rabbitmq_web_mqtt,
           {undef,
               [{lager_config,get,
                    [{rabbit_log_lager_event,loglevel},{0,[]}],
                    []},
                {rabbit_web_mqtt_app,mqtt_init,0,
                    [{file,"src/rabbit_web_mqtt_app.erl"},{line,69}]},
                {rabbit_web_mqtt_app,start,2,
                    [{file,"src/rabbit_web_mqtt_app.erl"},{line,31}]},
                {application_master,start_it_old,4,
                    [{file,"application_master.erl"},{line,269}]}]}}

正在运行sudo rabbitmq-plugins list

 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@manish-Lenovo-G510
 |/
[e*] amqp_client                       3.6.2
[e ] cowboy                            1.0.3
[e ] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.2
[  ] rabbitmq_auth_backend_ldap        3.6.2
[  ] rabbitmq_auth_mechanism_ssl       3.6.2
[  ] rabbitmq_consistent_hash_exchange 3.6.2
[  ] rabbitmq_event_exchange           3.6.2
[  ] rabbitmq_federation               3.6.2
[  ] rabbitmq_federation_management    3.6.2
[E*] rabbitmq_management               3.6.2
[e*] rabbitmq_management_agent         3.6.2
[  ] rabbitmq_management_visualiser    3.6.2
[E*] rabbitmq_mqtt                     3.6.2
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.2
[  ] rabbitmq_shovel_management        3.6.2
[  ] rabbitmq_stomp                    3.6.2
[  ] rabbitmq_tracing                  3.6.2
[e*] rabbitmq_web_dispatch             3.6.2
[E ] rabbitmq_web_mqtt                 
[  ] rabbitmq_web_stomp                3.6.2
[  ] rabbitmq_web_stomp_examples       3.6.2
[  ] sockjs                            0.3.4
[e*] webmachine                        1.10.3

我无法使用paho JS客户端进行连接。那么是什么导致了这个问题呢?我尝试了端口1888,8083,8883,15675

1 个答案:

答案 0 :(得分:1)

Applying plugin configuration to rabbit@manish-Lenovo-G510... failed.
Error: {could_not_start,rabbitmq_web_mqtt,
           {undef,
               [{lager_config,get,

Lager仅在版本3.7.0中,很可能是您构建了master分支。

要构建插件版本3.6.2,您应该:

    git clone https://github.com/rabbitmq/rabbitmq-public-umbrella.git .
    make up BRANCH=rabbitmq_v3_6_2
    cd deps/rabbitmq_web_mqtt
    make dist

修改

您必须禁用并删除旧的.ez文件,复制新文件后,您必须启用该插件。

刚试过,它运行正常,请参阅测试:

enter image description here