Mosquitto 1.4.2 Websocket支持 [英] Mosquitto 1.4.2 Websocket support

查看:445
本文介绍了Mosquitto 1.4.2 Websocket支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试利用Mosquittos的最新更新来支持代理中的Websocket.我正在运行Mosquitto v1.4.2,并将以下行添加到mosquitto配置文件(mosquitto.conf):

I'm trying to utilize Mosquittos recent update to support websockets in the broker. I'm running Mosquitto v1.4.2 and I've added the following lines to the mosquitto configuration file (mosquitto.conf):

listener 10001 127.0.0.1
protocol websockets

listener 1883
protocol mqtt

当我尝试使用新配置启动代理时,我得到以下信息:

When I try and start the broker with the new configuration I get the following :

$ mosquitto -c /etc/mosquitto/mosquitto.conf
Error: Websockets support not available.
Error found at /etc/mosquitto/mosquitto.conf:16.
Error: Unable to open configuration file.

我假设Mosquitto的1.4版及更高版本现在具有websocket支持(不必像从v1.4之前那样就从源代码构建以启用websocket支持),所以我想知道自己是什么丢失的.感谢您对如何解决问题的任何方向的帮助.

I was under the assumption that version 1.4 and above of Mosquitto has websocket support now (don't have to build from source to enable websocket support like you had to before v1.4) so I'm wondering what I'm missing. Any help on what direction to look to troubleshoot the problem is appreciated.

忘了提及我正在运行CentOS6

Forgot to mention I'm running CentOS6

推荐答案

虽然1.4.x代码库包含Websocket支持,但必须在构建时启用它并依赖libwebsocket库.

While the 1.4.x codebase includes Websocket support it has to be enabled at build time and relies on the libwebsocket library.

RedHat/Fedora yum存储库中当前可用的内部版本未启用Webosockets,因为没有可用的libwebsocket软件包.我假设CentOS使用的是相同的srpm.

The builds currently available in the RedHat/Fedora yum repos do not have Webosockets enabled as there is no libwebsocket package available. I assume CentOS is using the same srpms.

有关详细信息,请参见此bugzilla的详细信息: https://bugzilla.redhat.com/show_bug .cgi?id = 1197678

See this bugzilla enrty for details: https://bugzilla.redhat.com/show_bug.cgi?id=1197678

这篇关于Mosquitto 1.4.2 Websocket支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆