MQTT failed to start Topic is solved

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
mikejclark
Posts: 23
Joined: Tuesday 03 September 2013 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

MQTT failed to start

Post by mikejclark »

Hopefully this should just be a quick question.
I've bought some Sonoff devices and have flashed Tasmota to utilise MQTT.
Following the Domoticz MQTT wiki I have added the MQTT Client Gateway with LAN interface
https://www.domoticz.com/wiki/MQTT
The wiki indicates that all the necessary software is installed with the Domoticz image
Please note that the current Domoticz SDCard image has this included, and you do not need to install any software.
But I see this error:

MQTT: Failed to start, return code: 14 (Check IP/Port)

Is it possible my install is old enough that MQTT was not on the image?
What do I need to do to get MQTT running?
Many thanks!

Version V3.8392
Raspberry Pi
Last edited by mikejclark on Wednesday 13 September 2017 14:56, edited 1 time in total.
Logread
Posts: 228
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: MQTT failed to start

Post by Logread »

not sure about how the images are updated/prepared, but you could try to see if the MQTT broker is listening by issuing this from the shell command line:

Code: Select all

netstat -na | grep 1883
if you see something output like:

Code: Select all

tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN
tcp6       0      0 :::1883                 :::*                    LISTEN
then you have a MQTT broker up and running with websockets enabled... If not you probably want to manually install a MQTT broker such as mosquitto (search the forum for instructions)
Hope this helps
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: MQTT failed to start

Post by htilburgs »

Just checking to be sure:

- You installed Node.JS ? -> https://joshondesign.com/2013/10/23/noderpi
- You installed Mosquitto ? -> http://mosquitto.org/2013/01/mosquitto- ... epository/
- You don't have a firewall that blockes port 1883 ?
- You've checked the remote address and the ip port in Domoticz (Settings - Hardware MQTT Client Gateway)?
- Somethimes it helpes if you change the address from 127.0.0.1 to the real ip of your Domoiticz Host

If all this is checked and still have the error, maybe try the solution in viewtopic.php?f=6&t=14263&start=20#p144735

Succes!
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
mikejclark
Posts: 23
Joined: Tuesday 03 September 2013 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT failed to start

Post by mikejclark »

Logread wrote: Wednesday 13 September 2017 13:56
Spoiler: show
not sure about how the images are updated/prepared, but you could try to see if the MQTT broker is listening by issuing this from the shell command line:

Code: Select all

netstat -na | grep 1883
if you see something output like:

Code: Select all

tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN
tcp6       0      0 :::1883                 :::*                    LISTEN
then you have a MQTT broker up and running with websockets enabled... If not you probably want to manually install a MQTT broker such as mosquitto (search the forum for instructions)
Hope this helps
I will try this when I get home, thanks!
mikejclark
Posts: 23
Joined: Tuesday 03 September 2013 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT failed to start

Post by mikejclark »

htilburgs wrote: Wednesday 13 September 2017 14:05
Spoiler: show
Just checking to be sure:

- You installed Node.JS ? -> https://joshondesign.com/2013/10/23/noderpi
- You installed Mosquitto ? -> http://mosquitto.org/2013/01/mosquitto- ... epository/
- You don't have a firewall that blockes port 1883 ?
- You've checked the remote address and the ip port in Domoticz (Settings - Hardware MQTT Client Gateway)?
- Somethimes it helpes if you change the address from 127.0.0.1 to the real ip of your Domoiticz Host

If all this is checked and still have the error, maybe try the solution in viewtopic.php?f=6&t=14263&start=20#p144735

Succes!
I haven't installed anything yet, I have the default Domoticz installation from the image, can't remember how long ago. As you suggest, I think I am missing the software you mention. Will try and install later. Thanks!
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: MQTT failed to start

Post by htilburgs »

mikejclark wrote: Wednesday 13 September 2017 14:56
htilburgs wrote: Wednesday 13 September 2017 14:05
Spoiler: show
Just checking to be sure:

- You installed Node.JS ? -> https://joshondesign.com/2013/10/23/noderpi
- You installed Mosquitto ? -> http://mosquitto.org/2013/01/mosquitto- ... epository/
- You don't have a firewall that blockes port 1883 ?
- You've checked the remote address and the ip port in Domoticz (Settings - Hardware MQTT Client Gateway)?
- Somethimes it helpes if you change the address from 127.0.0.1 to the real ip of your Domoiticz Host

If all this is checked and still have the error, maybe try the solution in viewtopic.php?f=6&t=14263&start=20#p144735

Succes!
I haven't installed anything yet, I have the default Domoticz installation from the image, can't remember how long ago. As you suggest, I think I am missing the software you mention. Will try and install later. Thanks!
You write
Following the Domoticz MQTT wiki I have added the MQTT Client Gateway with LAN interface
https://www.domoticz.com/wiki/MQTT
In the wiki are al the steps you have to follow, including installing Node.JS, installing Mosquitto, etc...
Just follow the wiki and it should be fine.
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
mikejclark
Posts: 23
Joined: Tuesday 03 September 2013 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT failed to start

Post by mikejclark »

In the wiki are al the steps you have to follow, including installing Node.JS, installing Mosquitto, etc...
Just follow the wiki and it should be fine.
I was thrown by the statement about all software being already installed, but I think that must be a recent thing.
Will follow the rest of the wiki and see what happens.
Thanks!
mikejclark
Posts: 23
Joined: Tuesday 03 September 2013 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT failed to start

Post by mikejclark »

Followed the rest of the wiki and all working well now. Thanks for your help!
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: MQTT failed to start

Post by htilburgs »

Your welcome and succes!
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
jeroenvd
Posts: 4
Joined: Saturday 03 August 2019 5:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Best, Netherlands
Contact:

Re: MQTT failed to start

Post by jeroenvd »

htilburgs wrote: Wednesday 13 September 2017 14:05 Just checking to be sure:

- You installed Node.JS ? -> https://joshondesign.com/2013/10/23/noderpi
- You installed Mosquitto ? -> http://mosquitto.org/2013/01/mosquitto- ... epository/
- You don't have a firewall that blockes port 1883 ?
- You've checked the remote address and the ip port in Domoticz (Settings - Hardware MQTT Client Gateway)?
- Somethimes it helpes if you change the address from 127.0.0.1 to the real ip of your Domoiticz Host

If all this is checked and still have the error, maybe try the solution in viewtopic.php?f=6&t=14263&start=20#p144735

Succes!
Strangely 127.0.0.1 or localhost didn't work for me either. Changing to the real IP does the trick for me :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest