Mosquitto won't start any ideas?

Trying to start mosquitto all I can find is this:
Hassio docker rpi4 all latest versions restart reinstated etc.

19-11-14 20:08:48 ERROR (SyncWorker_3) [hassio.docker] Can’t start addon_core_mosquitto: 500 Server Error: Internal Server Error (“driver failed programming external connectivity on endpoint addon_core_mosquitto (539604c09b2d1987cce39104f204402658f8e68f2f69d84c932a08401c4feaea): Error starting userland proxy: listen tcp 0.0.0.0:1883: bind: address already in use”)

Have this in my config:
mqtt:
broker: 192.168.1.X
port: 1883
username: xx
password: xxxx

This is the hassio addon config :

“logins”: [
{
“username”: “xx”,
“password”: “xxxx”
}
],
“anonymous”: false,
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_certificate”: false

Any ideas what’s wrong?

Hi, yeah you should not have the mqtt entries in the configurstion.yaml if u use the addon. So as in the log port 1883 is already taken.
U try to run built in and the addon at the same time.

Remove and I guess it will go better (depending on addon version u need to follow the docs snd setup the acl.conf and accesscontrol files

Whatever username and password you are using, create a Home Assistant user with the same names. Then reset the addon to defaults and start it up.

Yeah I added the config entry after it didn’t work standard. So mqtt user and password in the mosquitto adon need a user in hassio the same? Or return to defaults which is no user or password? Then add what password to hassio? Sorry I’m lost.
I started out with nothing just defaults in mosquitto, didn’t work so tried adding user and password,still no good added config entry still no good.

Create a HOME ASSISTANT user - the one you could login with that is the same as the MQTT user/pass you use in your devices. Then set the addon to DEFAULTS and it will start.

So defaults in mosquitto is no user details. I’ve created a user in home assistant but I can’t see how mosquitto will know this or how this can stop mosquitto starting. How does it know this user is for it to use other than the clients knowing the details to access it but it won’t even start.

As long as the device is using that username and password it will authenticate with the broker. I am using the hass.io addon broker and have not changed the configuration from the default. It just works.

If the broker won’t start, what is in the log for the addon?


Does this mean that it’s already running? But not from the addon I’m guessing part of something else I have installed?

So I changed port from 1883 to 1885 and it let’s the addon start.
Must be included somewhere else I’m guessing. Pretty time poor at the moment, I’ll look into it more.

So you must have something else listening on 1883!

Am I to assume you are running Raspbian/hassbian NOT hass.io? Or have you done a generic linux install? See it looks like you have installed mosquitto in Raspbian and also trying to run the hassio addon… hence the port conflict! If that is the case, remove the mosquitto from Raspbian and the addon will start.

Yeah it’s raspbian, would it be part of node red? I haven’t installed anything else that I can think of.