Mosquitto MQTT 4.1 doesnt work after update

mqtt
Tags: #<Tag:0x00007fd083fd3210>

#21

Is it possible to have multible

acl_file

set? So we can make a options anon_write or so that set a default ACL like this


#22

Hi I do not understand well how this file accesscontrollist has to be. Currently I have no user (user “” and password “”), how shall I do in my case? Also I have too many topic , do not want to put topic restriction

user ""

#23

When I revert I do get version 4 with old config setup but I cant start it. Do you check home assistant as well in snapshot? When it tries to get the container it says there is no version 4. I run on a pi.


#24

mines working fine?

my mqtt config is:

{
  "logins": [
    {
      "username": "hidden",
      "password": "hidden"
    }
  ],
  "anonymous": true,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

and in the hass config i have:

###MQTT Server

broker: 192.168.0.53
password: !secret mqqt_password
discovery: true
discovery_prefix: homeassistant

#25

4.1 does not work for me either, with or without the mqtt: in configuration.
I had to revert back to 4.0


#26

‘’’
user mqtt
topic readwrite #
‘’’

this allows user mqtt to readwrite all topics


#27

How to allow ALL users to readwrite ALL topics?


#28

just topic readwrite # solved it for me


#29

This worked for me as well.
Now running latest HA version and latest Mosquitto addon version.


#30

Sorry for the dumb question. Where should I have to write this?


#31

Does not work for me :disappointed:
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe 1552400547: |-- http req fail url=http://127.0.0.1:8080/login re=Timeout was reached 1552400547: |-- url=http://127.0.0.1:8080/login 1552400547: |-- data=username=hidden&amp;password=hidden&amp;topic=&amp;acc=-1&amp;clientid=


#32

I don’t have any users set. “anonymous” is set to “true” in my case and it works.

@euon

  1. Make sure your mosquitto config has
    “customize”: {
    “active”: true,
  2. Create “mosquitto” folder in /share
  3. Create two files there: acl.conf and accesscontrollist
  4. In acl.conf add line
    acl_file /share/mosquitto/accesscontrollist
  5. In accesscontrollist add line
    topic readwrite #

#33

Thanks for your fast answer.

Now it says that it ca not open the files:

Error: Unable to open include_dir '/share/mosquitto'.
Error found at /etc/mosquitto.conf:27.
Error: Unable to open configuration file.

I have just createt two new textfiles in the new ordner (has it to be a special type?)

Edit: I have researched and I found out that I have no acces to the Share folder over samba. How can I get access to the folder?


#34

I have users, but also if i remove all of them it doesn’t work.

this is the conf:
{
“logins”: [],
“anonymous”: true,
“customize”: {
“active”: true,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

also have acl.conf and accesscontrollist files


#35

Hi,
I had the same issue since yesterday upgrade to MQTT ver 4.1.
I solved by creating the ACL files as per indication from [xmegapixelx]…but after spending few hours on debugging the issue, including disassembly of my custom ESP8266 relay board which controls my outdoor lights and provide remote temperature - because I suspected a hardware failure of the temp/humidity sensor :-)))

It works now with Mosquitto broker 4.1 version but I disabled the auto-update!

Thank you, guys!


#36

I used the Cloud9 IDE add-on (which offers access to the share folder) to create the missing file structure.


#37

Thanks!!!

It worked!!


#38

Dear all,

this is my working setup:
1- create a user Home Assistant and define a password;
2- configure add.on with the user & password with anonymous off and active as true:
{
“logins”: [
{
“username”: “my user”,
“password”: “my password”
}
],
“anonymous”: false,
“customize”: {
“active”: true,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

3- Create “mosquitto” folder in /share
4- Create two files there: acl.conf and accesscontrollist
5- In acl.conf add line
6- acl_file /share/mosquitto/accesscontrollist
7- In accesscontrollist add this 2 lines:
user my user
topic readwrite #

Log output:
1552422490: New client connected from 10.0.0.157 as sensore07 (c1, k10, u’my user’).
1552422490: |-- mosquitto_auth_unpwd_check(my user)
1552422490: |-- ** checking backend http
1552422490: |-- url=http://127.0.0.1:8080/login
1552422490: |-- data=username=my user&password=user password&topic=&acc=-1&clientid=[INFO] found on local database
1552422492: |-- getuser(my user) AUTHENTICATED=1 by http


#39

I did exactly that and I can’t get it to work. I’ve gone back to active false and it works perfectly. Setup files exactly like you show.


#40

Here’s my setup which worked before and after the update:

{
  "logins": [],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

I create a new home assistant user and password. Those credentials are are what my mqtt clients use to authenticate to the broker.

There is no mqtt: config. I went to configuration > integrations and the broker was discovered by HA. I checked the box for mqtt discovery and hit submit.

I don’t touch any ACL files.
Everything works.