eclipse-mosquitto "Address in use" 与 v2.0.12

eclipse-mosquitto "Address in use" with v2.0.12

我正在将我的 mosquitto 从 v1.6.9 更新到 v2.0.12。但是现在,我无法使用此 docker 容器发送 mqtt 消息。

docker-容器运行:

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

我的配置文件:

listener 1883
allow_anonymous true
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

配置文件的权限(在docker容器中):644mosquitto:mosquitto

在日志中我看到以下输出:

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

如果我发布新消息,我会收到未知错误

# mosquitto_pub -t 'test/topic' -m 'hello, is anybody out there?'
Error: Unknown error.

它似乎没有加载我的配置文件。请参阅“0:使用默认配置”。 或者是别的什么?也许是配置文件的权限?

感谢

来源是使用较新的 alpine 映像,libseccomp2 需要更新 Raspbian。

详情见这里:https://github.com/eclipse/mosquitto/issues/2323#issuecomment-927367047

之后,它运行没有任何进一步的问题。