On Friday, December 31, 2021 at 11:04:00 AM UTC-8 Eric K wrote: > This confirms that mosquitto 2.x requires passwords (where version 1.x > does not). > see: https://mosquitto.org/documentation/migrating-to-2-0/ > No, it doesn't. The example I posted worked fine either way.
I ran it successfully with allow_anonymous and no user specified. I also ran it with allow_anonymous=false and a user created and specified. The password requirement appears to be the change that breaks my working > mosquitto setup. > Disagree. > 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. > > Unable to write pid file is because you are running something requiring privileges as a unprivileged user 'weewx'. Preface your command with "sudo". You need mosquitto to start as root so it can bind to the privileged port 1883. > and using the default mosquitto config (not sure where it's finding that > default file - no path is shown) > > If you look at the mosquitto docs, it says it runs a default configuration in the absence of a specified config file. 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. > Yes - in this case you didn't specify a config file so it runs localhost-only for developer debugging purposes. This is documented on their website. You want to read https://projects.eclipse.org/projects/iot.mosquitto/releases/2.0 more carefully. It explains. And just go with the example I posted which definitely works. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/03becd37-e699-455c-bbbc-1a1f5dabfc1en%40googlegroups.com.
