ulfh2018
Posts: 3
Joined: Thu Mar 01, 2018 10:38 am

MQTT installation on Stretch fixed?

Thu Mar 01, 2018 12:10 pm

I am new to this forum, and though I have been working in the computer business since 1987 (retired now), and have been playing with Linux parts of this time, I am NOT a guru, and even basic things sometimes stops me.

I have now been trying to install mqtt on stretch, but as far as I can see, it's not possible. Have tried to follow different advices, non of them working, and I even tried a cook book, that said this would solve the problem, but the version of mqtt I wanted did not exist, and when I tried a newer version, the command I should use, did not work at all. (That's one of the problmes with Linux, utilities and commands are not alway simple to understand).

I have no problems installing on Jessie, so my questions are two:

1. Have anyone made a successful installation?
2. Will the problem with the libraries that does not exist ever be sorted out?

Best regards

Ulf

droleary
Posts: 174
Joined: Fri Feb 09, 2018 3:45 am
Location: Minneapolis, MN USA
Contact: Website Skype

Re: MQTT installation on Stretch fixed?

Thu Mar 01, 2018 3:57 pm

You don't give any details that are useful for debugging whatever issues you're experiencing. MQTT is a protocol, not a piece of software. Are you trying to install Mosquitto, or something else? The packages for that install just fine for me. If you're trying to build something from source code, you may want to take the issues you're having into the Programming discussion groups.

PhatFil
Posts: 1368
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: MQTT installation on Stretch fixed?

Thu Mar 01, 2018 4:37 pm

open a terminal window or putty session if running headless and type


sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install mosquitto
sudo apt-get install mosquitto-clients

to install mosquitto mqtt broker and clients

then to test its all ok, type

mosquitto_sub –d –t mqtt-test

this will sit waiting as you have just subscribed to the mqtt topic mqtt-test

So open a second terminal session and this time publish a mqtt message to the mqtt-test topic with a command

mosquitto_pub –d –t mqtt_test –m "Hello from terminal session #2"

and if you get the message in terminal #1 all is a-ok and you can point mqtt clients at your pi on port 1883 and use mqtt

User avatar
DougieLawson
Posts: 36150
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: MQTT installation on Stretch fixed?

Thu Mar 01, 2018 10:03 pm

Mosquitto 1.4.15 (using the Mosquitto.org repository) is broken on ARM6 (1B, B+ & Zero) raspberries. It gets a segmentation fault (segfault) when you try to run it. Mosquitto 1.4.10 (from the Debian Stretch repo) is broken because of the dependency on libwebsockets.

The second breakage is easier to resolve using sudo apt install aptitude; aptitude install mosquitto libmosquitto1 mosquitto-clients then follow the Aptitude prompts until it gives you an option to get rid of libev-dev and install libwebsockets8 (which gets you 1.4.10)

I've written to the mosquitto-dev mailing list to tell them it's broken, I've had no reply.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ulfh2018
Posts: 3
Joined: Thu Mar 01, 2018 10:38 am

Re: MQTT installation on Stretch fixed?

Fri Mar 02, 2018 7:49 am

Sorry for not giving details, but I observe there are other people having problem with usnupported libraries, so I swithced to Jessie - works stright out of the box, though I had serious problems with error 179,2 when trying to boot several of the downloaded images. Jessie Light worked for me.

DougieLawson might have given me a soulution - shall have a look, if I'm able to boot up Strech Light - also givse me 179,2 error though the full version Works.

Heater
Posts: 13344
Joined: Tue Jul 17, 2012 3:02 pm

Re: MQTT installation on Stretch fixed?

Fri Mar 02, 2018 8:00 am

Should be OK. I use nothing but Stretch Lite.

Mosquitto is very annoying. Something seems to go wrong with it on every major Debian version change. Should be easy enough to remedy though, even if it does mean building it from source code.

mattmiller
Posts: 2106
Joined: Thu Feb 05, 2015 11:25 pm

Re: MQTT installation on Stretch fixed?

Fri Mar 02, 2018 8:17 am

Just to add that as long as v1.4.10 is good enough for you then simply downloading a fresh copy of Stretch and doing

Code: Select all

sudo apt-get install mosquitto mosquitto-clients
will install a working version on a PiZeroW
(I just did it and tested it out to make sure)

helioz2000
Posts: 3
Joined: Sun Jul 22, 2018 2:19 am
Location: Australia
Contact: Website

Re: MQTT installation on Stretch fixed?

Tue Jul 24, 2018 5:40 am

mattmiller wrote: .... will install a working version ....
Thank you,
it works exactly as you say on my stretch installation on a 3B

Vaughang91
Posts: 1
Joined: Sat Jun 09, 2018 5:17 am

Re: MQTT installation on Stretch fixed?

Sun Aug 12, 2018 8:31 am

sorry guys... ive been trying to figure this out for hours.. just seeing if anyone knows of any updated news on this issue..
any help would be much appreciated... im currently. im currently using the latest stretch. (not lite) trying a fresh install..

User avatar
DougieLawson
Posts: 36150
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: MQTT installation on Stretch fixed?

Tue Aug 14, 2018 9:07 am

sudo apt install mosquitto mosquitto-client*
Works on latest Stretch.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

rorie
Posts: 4
Joined: Thu May 31, 2018 7:06 am

Re: MQTT installation on Stretch fixed?

Mon Oct 08, 2018 8:54 am

Same problem here, I did an update on my Raspberry Pi 3 with Stretch installed on it. This update installed MQTT 1.5.3, after this update I did a reboot and noticed that my broker was not working anymore. I really trying to understand why this is not working anymore. The first question I have is why is my MQTT broker not started anymore duing boot time. When I do A mosquitto -v it starts and I can connecnt again to the mqtt broker. The second issue here is that websockets are not working at this time. When I quit the mqtt broker it stops working and I can`t start it again, some message about port already in use. Why, I just stopped it.

User avatar
DougieLawson
Posts: 36150
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: MQTT installation on Stretch fixed?

Mon Oct 08, 2018 4:49 pm

Add

Code: Select all

listen 1883
into your config.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

sn8kboy
Posts: 2
Joined: Wed Oct 24, 2018 2:56 am

Re: MQTT installation on Stretch fixed?

Wed Oct 24, 2018 2:59 am

MQTT is still broken on Stretch.!!!!!!

Any word on when there will be a fix. I am a novice and I am trying to some simple projects but am hindered by this broken product.

mattmiller
Posts: 2106
Joined: Thu Feb 05, 2015 11:25 pm

Re: MQTT installation on Stretch fixed?

Wed Oct 24, 2018 4:13 pm

What exactly is broken for you?

MQTT is a protocol that works fine for most of us.

There are issues from time to time with running the mosquitto MQTT broker on a Pi

What are you trying to do? (and what make of Pi are you trying to do it on?)

sn8kboy
Posts: 2
Joined: Wed Oct 24, 2018 2:56 am

Re: MQTT installation on Stretch fixed?

Fri Oct 26, 2018 5:59 pm

I was trying it on a pi 3+ running stretch but changed to just a pi 3 running jessie and it all works now! Thanks for your help!

Return to “General discussion”