Error when using rabbitmq_web_mqtt plugin

158 views
Skip to first unread message

Laing, Michael

unread,
Apr 9, 2016, 4:32:02 PM4/9/16
to rabbitm...@googlegroups.com
The plugin seemed to build, install and start up correctly.

However when I access the broker using the paho javascript client it fails to connect.

The logs are attached. I couldn't find a similar issue.

Thanks for taking a look,

Michael


logs.tgz

Michael Klishin

unread,
Apr 9, 2016, 4:56:23 PM4/9/16
to rabbitm...@googlegroups.com
And what version of RabbitMQ is used?

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Laing, Michael

unread,
Apr 9, 2016, 8:52:07 PM4/9/16
to rabbitm...@googlegroups.com
It's 3.6.1 running in a Mac installed w homebrew.

Laing, Michael

unread,
Apr 9, 2016, 9:33:16 PM4/9/16
to rabbitm...@googlegroups.com
RabbitMQ is using erlang 18.3 (as reported by RabbitMQ Mgt)

erlang 18.3 is also installed via homebrew and was used to make the plugin.

Chrome gives me the following in the console:

Host=127.0.0.1, port=15675, path=/ws TLS = false username=guest password=guest
mqttws31.js:979 WebSocket connection to 'ws://127.0.0.1:15675/ws' failed: Error during WebSocket handshake: Unexpected response code: 500
mqttws31.js:977 WebSocket connection to 'ws://127.0.0.1:15675/ws' failed: Error during WebSocket handshake: Unexpected response code: 500
...

I am using https://github.com/jpmens/simple-mqtt-websocket-example with an appropriately modified config.

Michael Klishin

unread,
Apr 9, 2016, 9:34:59 PM4/9/16
to rabbitm...@googlegroups.com, Laing, Michael
Thanks. Can you reproduce the same issue with https://github.com/rabbitmq/rabbitmq-web-mqtt-examples?  

On 10 April 2016 at 04:33:16, Laing, Michael (michae...@nytimes.com) wrote:
> RabbitMQ is using erlang 18.3 (as reported by RabbitMQ Mgt)
>
> erlang 18.3 is also installed via homebrew and was used to make the plugin.
>
> Chrome gives me the following in the console:
>
> Host=127.0.0.1, port=15675, path=/ws TLS = false username=guest
> password=guest
> mqttws31.js:979 WebSocket connection to 'ws://127.0.0.1:15675/ws' failed:
> Error during WebSocket handshake: Unexpected response code: 500
> mqttws31.js:977 WebSocket connection to 'ws://127.0.0.1:15675/ws' failed:
> Error during WebSocket handshake: Unexpected response code: 500
> ...
>
> I am using https://github.com/jpmens/simple-mqtt-websocket-example with an
> appropriately modified config.
>
> On Sat, Apr 9, 2016 at 8:52 PM, Laing, Michael
> To post to this group, send an email to rabbitm...@googlegroups.com.

Michael Klishin

unread,
Apr 9, 2016, 10:11:22 PM4/9/16
to Laing, Michael, rabbitm...@googlegroups.com
+rabbitmq-users

Maybe try 3.6.2 M3? 

On 10 April 2016 at 05:09:02, Laing, Michael (michae...@nytimes.com) wrote:
> > The example works against the broker running as a result of 'make
> run-broker'
>
> Also I can run jpmens example against that broker and it connects
> fine.
>
> So perhaps it is the installation of the .ez files that is a problem.
> There are a few with names that are similar to existing ones but
> lack version numbers so I will just replace all the existing ones
> with any that have similar names from my build.
>
> The ones from the build are: amqp_client.ez cowlib-1.0.1.ez
> lager-3.2.0.ez rabbitmq_mqtt.ez ranch-1.2.1.ez
>
> cowboy-1.0.3.ez goldrush-0.1.8.ez rabbit_common.ez rabbitmq_web_mqtt.ez
>
>
>
>
>
>
> So I will copy these over the existing ones and delete: amqp_client-3.6.1.ez,
> amqp_client-3.6.1.ez, and rabbitmq_mqtt-3.6.1.ez.

Laing, Michael

unread,
Apr 9, 2016, 10:24:09 PM4/9/16
to Michael Klishin, rabbitm...@googlegroups.com
Overwriting and deleting worked, apparently.

I will test more tomorrow - thanks for your help!

ml

Laing, Michael

unread,
Apr 10, 2016, 10:42:56 AM4/10/16
to Michael Klishin, rabbitm...@googlegroups.com
I installed 3.6.2 M3 mac standalone, noting that it uses erlang 17.5.

Then I copied rabbitmq_web_mqtt, lager, and goldrush plugins from rabbitmq-web-mqtt-examples which I built yesterday (using erlang 18.3).

I configured lager in rabbitmq.config.

I enabled lager and rabbitmq_web_mqtt.

simple-mqtt-websocket-example works fine - lager is nice too.

Cheers,

ml
Reply all
Reply to author
Forward
0 new messages