You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No matter what I do, Mosquitto can't seem to find the config file that definitely exists. Everything is apparently configured according to the instructions here: https://hub.docker.com/_/eclipse-mosquitto
Mosquitto is running in a Docker container based on python:3.11.6-bullseye. Docker is running on a Windows host. It's executed from Python (Popen) with this command: "mosquitto -c /mosquitto/config/mosquitto.conf --verbose"
Mosquitto version: 2.0.11.
Here is an excerpt from the logs of the program. Notice that we are confirming the existence of the file, the perms, etc., but Mosquitto is still using the default config and starting in local only mode:
Starting Mosquitto Eclipse as a service.
Does config file (/mosquitto/config/mosquitto.conf) exist? True
PERMS OF CONFIG FILE:
-rwxrwxrwx 1 1883 1883 40475 Nov 28 02:41 /mosquitto/config/mosquitto.conf
CONTENTS OF CONFIG FILE:
# Config file for mosquitto
#
# See mosquitto.conf(5) for more information.
# ...
Running: mosquitto -c /mosquitto/config/mosquitto.conf --verbose
1701447361: mosquitto version 2.0.11 starting
1701447361: Using default config.
1701447361: Starting in local only mode. Connections will only be possible from clients running on this machine.
I have confirmed:
The file exists at /mosquitto/config/mosquitto.conf inside the Docker container
The file has Linux line endings
The file exists on container startup (tried both mapping in a volume and COPYing in the Dockerfile)
The file has 777 permissions (more appropriate permissions don't work either)
If I run it directly from a start.sh script (same command: mosquitto -c /mosquitto/config/mosquitto.conf), it works, but we have to run it from a Python script for various reasons.
The text was updated successfully, but these errors were encountered:
magnus-bakke
changed the title
Mosquitto running inside Docker container can't find config file (which definitely exists)
Mosquitto running inside Docker container can't find config file (which definitely exists inside the Docker container in the correct location)
Dec 1, 2023
It turns out running Popen with shell=True was preventing the passing of arguments somehow, so the -c argument was ignored. Removing shell=True makes it find the config file.
No matter what I do, Mosquitto can't seem to find the config file that definitely exists. Everything is apparently configured according to the instructions here: https://hub.docker.com/_/eclipse-mosquitto
Mosquitto is running in a Docker container based on python:3.11.6-bullseye. Docker is running on a Windows host. It's executed from Python (Popen) with this command: "mosquitto -c /mosquitto/config/mosquitto.conf --verbose"
Mosquitto version: 2.0.11.
Here is an excerpt from the logs of the program. Notice that we are confirming the existence of the file, the perms, etc., but Mosquitto is still using the default config and starting in local only mode:
I have confirmed:
Mosquitto is executed using Python:
If I run it directly from a
start.sh
script (same command:mosquitto -c /mosquitto/config/mosquitto.conf
), it works, but we have to run it from a Python script for various reasons.The text was updated successfully, but these errors were encountered: