I'm updatet my mosquitto from v1.6.9 to v2.0.12. But now, I'm not able to send mqtt messagtes with this docker container.
docker-container run:
docker run -itd \
--name="mosquitto" \
--restart always \
-p 1883:1883 \
-v /home/pi/.docker/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf \
-v mosquitto_data:/mosquitto/data \
-v mosquitto_data:/mosquitto/log \
eclipse-mosquitto
my config file:
listener 1883
allow_anonymous true
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
The permissions for config file (in docker container): 644 mosquitto:mosquitto
In log I see following output:
0: mosquitto version 2.0.12 starting
0: Using default config.
0: Starting in local only mode. Connections will only be possible from clients running on this machine.
0: Create a configuration file which defines a listener to allow remote access.
0: For more details see https://mosquitto.org/documentation/authentication-methods/
0: Opening ipv4 listen socket on port 1883.
0: Error: Address in use
0: Opening ipv6 listen socket on port 1883.
0: Error: Address not available
If I pub a new message I got an unknown error
# mosquitto_pub -t 'test/topic' -m 'hello, is anybody out there?' Error: Unknown error.
It seems it doesn't load my config-file. see "0: Using default config". Or is it something else? Maybe the permissions of the config file?
Thx
Source was that with the newer alpine image, libseccomp2 needed an update on Raspbian.
Details see here: https://github.com/eclipse/mosquitto/issues/2323#issuecomment-927367047
After that, it runs without any further problems.