0

I was following this http://www.rabbitmq.com/plugin-development.html link to build rabbitmq plugin https://github.com/rabbitmq/rabbitmq-web-mqtt

after building i ONLY copied rabbitmq_mqtt.ez to /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.2/plugins

running sudo rabbitmq-plugins enable rabbitmq_web_mqtt shows :

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}]}]}}

Running 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

I am not able to connect using paho JS client. So what is causing the issue? I tried port 1888, 8083,8883,15675

Manish Kumar
  • 10,214
  • 25
  • 77
  • 147

1 Answers1

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

Lager is only in the version 3.7.0, most likely you built the master branch.

To build the plugin version 3.6.2 you should:

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

EDIT

you have to disable and remove the old .ez file, after copied the new one, you have to enable the plugin.

just tried and it works correctly, see the test:

enter image description here

Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
  • I copied binary `rabbitmq_web_mqtt-3.6.x-3b6a09bb.ez` from `https://www.rabbitmq.com/community-plugins.html` and copied to `/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.2/plugins` but i am getting ` 'ws://127.0.0.1:15675/mqtt' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED` – Manish Kumar May 26 '16 at 14:17
  • but paho client send request as `ws://localhost:15675/mqtt` – Manish Kumar May 26 '16 at 15:56
  • @manish this is another question/problem. Please accept the answer if it is ok and maybe ask another one. I am not `Paho` expert but I am almost sure you can change the end point – Gabriele Santomaggio May 26 '16 at 16:30