I've currently got 2 Ubuntu setups I can switch back and forth between.
mosquitto works fine in Ubuntu 20.10, (works with no passwords).
mosquitto does not work after the Ubuntu 21.04 upgrade.

I just switched from 20.10 to 21.04 and can report.
Ubuntu 20.10 has mosquitto 1.6.12
Ubuntu 21.04 has mosquitto 2.0.10 

This confirms that mosquitto 2.x requires passwords (where version 1.x does 
not).
see: https://mosquitto.org/documentation/migrating-to-2-0/

The password requirement appears to be the change that breaks my working 
mosquitto setup.
They also changed the config file keyword from port to listener.
So "port 1883" becomes "listener 1883"

In Ubuntu 21.04 with mosquitto 2.0.10 using my config file for mosquitto 
1.6.12:

weewx@Ubuntu20-WEEWX:~$ mosquitto -c /etc/mosquitto/mosquitto.conf
1640977238: The 'port' option is now deprecated and will be removed in a 
future version. Please use 'listener' instead.
1640977238: Error: Unable to write pid file.

and using the default mosquitto config (not sure where it's finding that 
default file - no path is shown)

weewx@Ubuntu20-WEEWX:~$ mosquitto
1640976300: mosquitto version 2.0.10 starting
1640976300: Using default config.
1640976300: Starting in local only mode. Connections will only be possible 
from clients running on this machine.
1640976300: Create a configuration file which defines a listener to allow 
remote access.
1640976300: For more details see 
https://mosquitto.org/documentation/authentication-methods/
1640976300: Opening ipv4 listen socket on port 1883.
1640976300: Opening ipv6 listen socket on port 1883.
1640976300: mosquitto version 2.0.10 running



On Friday, December 31, 2021 at 12:09:55 PM UTC-6 vince wrote:

> If your mosquitto server won't start, run it in the foreground and it'll 
> tell you what line is wrong...
>
> mosquitto -c /etc/mosquitto/mosquitto.conf
>
> This is a minimalist /etc/mosquitto/conf.d/myconfig.conf file that works 
> on ubuntu
>
> #-----------------------------------------------------------
> ### this is an anonymous listener on the usual port
> #
> # listener 1883
> # allow_anonymous true
> #
> #-----------------------------------------------------------
> ### this is a simple username/password pair
> #
> # remember to make a password file entry for the user
> #     mosquitto_passwd -c /etc/mosquitto/pwfile myuser
> #     (and enter the mosquitto password for that user twice)
> #
> # to subscribe - remember to provide the user and pass you created
> # ala:
> #    mosquitto_sub -t mytopic -h myaddress -u myuser -P mypass
> #
> listener 1883
> allow_anonymous false
> password_file /etc/mosquitto/pwfile
> #
> #-----------------------------------------------------------
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/5111e60c-767d-44e9-a3b9-3825b6cea5e1n%40googlegroups.com.

Reply via email to