I have two PCs running desktop OSes, Ubuntu on one and Mint on other.
Systemctl shows that ufw is inactive and that mosquitto is active on both machines.
My mosquitto.conf has allow anonymous set to false, password_file set to location of password file containing a username and hash in username:hash format, and listener is set at 1883.
I typed:
mosquitto_sub -h 192.168.1.115 -u rei -P xyzpasswrd -t MQBT1
-and-
mosquitto_pub -h 192.168.1.108 -u rei -P xyzpasswrd -t MQBT1 -m hello
I tried the reverse as well e.g. mosquitto_sub -h 192.168.1.108/mosquitto_pub -h 192.168.1.115 respectively to send the message in the reverse direction.
My mosquitto.log is as follows:
GNU nano 6.2 /var/log/mosquitto/mosquitto.log M
1709943218: New connection from 192.168.1.115:34698 on port 1883.
1709943218: New client connected from 192.168.1.115:34698 as auto-BAF5A2AB-FAEA-98D7-6565-888AA3E8E0B5 (p2, c1, k60, u’rei’).
1709943218: Client auto-BAF5A2AB-FAEA-98D7-6565-888AA3E8E0B5 disconnected.
1709943318: New connection from 192.168.1.115:48014 on port 1883.
1709943318: New client connected from 192.168.1.115:48014 as auto-CDC082CB-21C3-08EE-70F3-A4B6FC0E238F (p2, c1, k60, u’rei’).
1709943318: Client auto-CDC082CB-21C3-08EE-70F3-A4B6FC0E238F disconnected.
This is on Mint Linux with ip address 192.168.1.108. My Ubuntu desktop has a very similar log. No complaints. No errors.
The broker is active according to systemctl. I have tried loading mosquitto with -v and -d options and the logs get no more detailed - as if -v does nothing.
There are of course no messages being displayed on either machine no matter which way I send the messages.