-
Couldn't load subscription status.
- Fork 300
Description
Mosquitto quick fix
If you have just upgraded Mosquitto by doing:
$ cd ~/IOTstack
$ docker-compose pull
$ docker-compose up -d
and find that Mosquitto is no longer working, you have two options for getting your IOTstack working again:
- Pin to version 1.6.12 (quickest)
- Edit the configuration file (needs more thought)
Pin to version 1.6.12
-
Edit the mosquitto service definition in
docker-compose.ymlto pin to version 1.6.12. Something like this will get the job done:mosquitto: container_name: mosquitto image: eclipse-mosquitto:1.6.12 # image: eclipse-mosquitto -
Repeat the upgrade process:
$ docker-compose pull $ docker-compose up -dMosquitto will downgrade to the previous version and resume its previous behaviour.
Edit the configuration file
The default configuration file for Mosquitto looks like this:
persistence true
persistence_location /mosquitto/data/
#log_dest file /mosquitto/log/mosquitto.log
# To avoid flash wearing
log_dest stdout
#Uncomment to enable passwords
#password_file /mosquitto/pwfile/pwfile
#allow_anonymous false
#Uncomment to enable filters
#acl_file /mosquitto/config/filter.acl
log_timestamp_format %Y-%m-%dT%H:%M:%S
The active version of the configuration file is at the path:
~/IOTstack/services/mosquitto/mosquitto.conf
You need to make the following changes to the active file:
-
Add this line (anywhere in the file):
listener 1883 -
If and only if you have not implemented a password scheme for Mosquitto then
allow_anonymouswill still be commented-out. You need to change it to look like this:allow_anonymous trueIf you have previously implemented a password scheme for Mosquitto then
allow_anonymouswill be active andfalse, and should be left that way.
After you have edited the configuration file, apply the changes by doing:
$ docker-compose restart mosquitto
Mix-and-match
The configuration file changes described above are compatible with 1.6.12 so you can apply them while 1.6.12 is running, and take the decision to upgrade to version 2.x later.
Known issue with IOTstack Mosquitto configuration file
Under new menu (master branch), there is a known issue 258 where the active version of the Mosquitto configuration file can be overwritten by a menu run. Keep this in mind and make a backup.