Skip to content

Anonymous logins removed from Mosquitto Add-on #2623

Description

@DCSBL

Describe the issue you are experiencing

I have some wifi devices that can connect to a MQTT broker, but they do not provide a way to set an username/password nor they have one. Because of this I get this error:

1661075134: Sending CONNACK to ::ffff:192.168.5.152 (0, 5)
1661075134: Client <unknown> closed its connection.
error: received null username or password for unpwd check

After looking around a bit, I saw that this PR removed support for anonymous logins, why?

Why can't we just add the allow_anonymous true config in the customise part? Or is it not as easy as it seems?

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Mosquitto broker

What is the version of the add-on?

6.1.2

Steps to reproduce the issue

  1. Rewritten a DNS record so the device tries to make a connection to the Mosquitto add-on
  2. Saw that the device was able to connect
  3. Saw that the device was not able to authenticate, connection was disconnected.
logins: []
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: true
  folder: mosquitto
# acl.conf
allow_anonymous true
acl_file /share/mosquitto/accesscontrollist
# accesscontrollist
topic readwrite #

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

...
1661075508: Sending CONNACK to ::ffff:192.168.5.152 (0, 5)
1661075508: Client <unknown> closed its connection.
error: received null username or password for unpwd check
1661075524: Sending CONNACK to ::ffff:192.168.5.152 (0, 5)
1661075524: Client <unknown> closed its connection.
1661075528: New connection from 172.30.32.2:39318 on port 1883.
1661075528: Client <unknown> closed its connection.
error: received null username or password for unpwd check
1661075540: Sending CONNACK to ::ffff:192.168.5.152 (0, 5)
1661075540: Client <unknown> closed its connection.
error: received null username or password for unpwd check
1661075556: Sending CONNACK to ::ffff:192.168.5.152 (0, 5)
1661075556: Client <unknown> closed its connection.
error: received null username or password for unpwd check
...

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions