Broker doesn't appear to be sending messages

I’m using the official MQTT Broker add-on. It’s configured and clients can connect to it

[14:53:05] INFO: Setup mosquitto configuration
[14:53:05] INFO: Found local users inside config
[14:53:06] INFO: Initialize Hass.io Add-on services
[14:53:06] INFO: Initialize Home Assistant discovery
[14:53:06] INFO: Start Mosquitto daemon
1589809987: mosquitto version 1.6.3 starting
1589809987: Config loaded from /etc/mosquitto.conf.
1589809987: Loading plugin: /usr/share/mosquitto/auth-plug.so
1589809987: |-- *** auth-plug: startup
1589809987:  ├── Username/password checking enabled.
1589809987:  ├── TLS-PSK checking enabled.
1589809987:  └── Extended authentication not enabled.
1589809987: Opening ipv4 listen socket on port 1883.
1589809987: Opening ipv6 listen socket on port 1883.
1589809987: Opening websockets listen socket on port 1884.
1589809987: Opening ipv4 listen socket on port 8883.
1589809987: Opening ipv6 listen socket on port 8883.
1589809987: Opening websockets listen socket on port 8884.
1589809987: Warning: Mosquitto should not be run as root/administrator.
1589809987: New connection from 172.29.12.30 on port 1883.
1589809987: New client connected from 172.29.12.30 as mosqsub/1380-dellups (p1, c1, k60).
1589809988: New connection from 172.30.32.1 on port 1883.
[INFO] found mqtt on Home Assistant

However, nothing is ever received by subscribing clients. That connection above from .30 was with the command

mosquito_sub -h <mymqtthost> -u "secret" -p "secret" -d -t '#' -t \SYS$/#

So I should have got everything. I do see the status messages, but I never see messages sent to he broker: even though I (think I) am subscribed to the wildcard topic.

I tried sending messages from the Develop panel, got no errors, but also no messages on the subscriber.

The config is

logins: []
anonymous: true
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Any ideas?

Devices send messages, the broker relays them to subscribing clients. The broker does not send messages on its own.

Did you try to listen to # in developer tools -> mqtt ?

OK, bad terminology. Sorry about that :slight_smile:

Regarding the substantive point: listening to ‘#’ from the Developer pane, does see traffic, but only when I send from the developer pane. This is odd, as the trace from another client looks good (other than no messages)

$ mosquitto_sub -h myhost -d -v  -t '#'
Client mosqsub/1908-dellups sending CONNECT
Client mosqsub/1908-dellups received CONNACK
Client mosqsub/1908-dellups sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0)
Client mosqsub/1908-dellups received SUBACK
Subscribed (mid: 1): 0
Client mosqsub/1908-dellups sending PINGREQ
Client mosqsub/1908-dellups received PINGRESP

You are using the add-on with anonymous: true. Bad combination. You should create a mqtt user in Ha, set anonymous: false and tell the clients to use the HA mqtt user ( and password)

Maybe true, but it shouldn’t stop it working, should it?

As far as I know : Nobody ever got the mqtt add-on working with anonymous: true. If you get it working, you will be the first.

You seem to be right. Switching to logging in seems to have solved it.
Thanks for the pointer.