Mosquitto

An Open Source MQTT v3.1/v3.1.1 Broker

On a previous post I described how to make mosquitto debian packages. This turned out to be a bit problematic, so I’ve now put up an experimental debian repository for mosquitto. It includes packages for the i386, amd64, armel and raspberry pi (raspbian armhf ) architectures.

It’s worth repeating that this is experimental – there are package changes that haven’t been vetted by a Debian developer so it’s possible something will break. I’ve tested myself and had no problems so far.

To use the new repository you should first import the repository package signing key:

I’m planning to use it with openHAB so i don’t think i will need the websockets, should i be worried about upgrading to 1.4.3 ?
in that case i will have to install 1.4.3 by compiling the files in archive “mosquitto_1.4.3.tar.gz”; am i right?

great work! thank you very much!

M.

Roger2015/09/18

If you follow the instructions on this page you should be able to use the mosquitto debian repository rather than the raspbian repository – that will get you the latest version.

[…] While exploring MQTT I had installed the Mosquitto message broker on my Raspberry Pi. However, the version that is in the Debian Wheezy repository is, as of this writing, really old (v0.15). So an upgrade was in order and fortunately the guys from Mosquitto have set up a Debian repo of their own and a description how to use it. […]

so you can complete the help for debian installation by
# apt-cache showpkg mosquitto
to verify the release and version..
thanks for this fantastic broker…

luisgcu2015/10/17

Hello, I am new to raspberry pi, and all linux environment. I am trying to follow this guide to install mosquitto on my rpi, where I had installed openhab. I am trying to get familiar with all this.. when follow the guide posted here at the end I got the following message which suggest tha something is not right, I’ll appreciate if anyone can help me or just point me other guide with more detail to install Mosquitto on my Rpi.

//////////////////////////////////////////////////////
The following packages have unmet dependencies:
mosquitto : Depends: libwebsockets3 (>= 1.2) but it is not installable
N: Ignoring file ‘mosquitto-wheezy.list.1’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
N: Ignoring file ‘mosquitto-wheezy.list.1’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
E: Unable to correct problems, you have held broken packages.
/////////////////////////////////////////////////////

Rajaneesh2015/10/26

Roger

I followed the steps and got the mosquitto server running.
But for my use-case , I need websocket support.
Are you planning to enhance it to support websocket

Just as a follow-up: I followed the instructions both on a RPi with Wheezy and one running Jessie.
The one with Jessie installed fine and the websockets worked.
The one with Wheezy installed fine, but when I tried to enable the websockets, I received a notification that they were not available. Now, the one with Wheezy was (of course) not a new image, so there might be other factors that influenced the install.

Roger2016/01/06

Pierre,

I’m afraid that because Debian Wheezy doesn’t have libwebsockets I can’t provide websockets support on it.

Pawel2016/01/05

Why there is no websockets support in package for Debian Wheezy ?

Roger2016/01/06

Pawel, Debian Wheezy doesn’t have libwebsockets packages and I do not wish to distribute libwebsockets packages – hence there is no support.

Sadly your repo server has a strange certificate and even when I disable the certificate check it responses with a 404.

I mention this because I’m checking out Docker images for mosquitto and all of them retrieve the GPG key over HTTP. But this undermines the the motivation to use the GPG key in the first place.
Especially for automatically build Docker images.

Roger2016/03/08

Agreed, that is now configured.

yury2016/04/27

Hello Roger,

I followed the suggested steps and I installed mosquitto-jessie on a new Raspbian Jessie on my Raspberry PI.
Then I made the following :

I have a problem with Mosquitto that I am hoping you can help with. I am Running it on a Raspberry Pi 3 with the newest and fully update version of the OS. I have used Mosquitto in the past up till about two weeks ago and collected tons of data as well as control lighting in my home when storage on my RPI crashed and I had to do a total re-install. When I did this is what I get:

Upon issuing a simple command like:
sudo mosquitto_sub -d -t humidity

I get this response:
Client mosqsub/2259-raspberryp sending CONNECT
Client mosqsub/2259-raspberryp received CONNACK
Connection Refused: not authorised.

It repeats over and over until I hit Ctrl-C

I am totally stumped and have scoured the web for an answer before contacting you. I hope you can help and thank you in advance for that help.

When I follow this procedure on a BeagleBone (Jessie) I get the package libwebsockets3 installed as a dependency. However, that package appears to actually install libwebsockets.so.4.0.0, not 3. As a result mosquitto complains that it can’t find libwebsockets.so.3 and will not run.

I’ll probably go back to the older mosquitto in the official repo’s as I don’t really need websockets.