Skip to content

Error Mosquitto Docker #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IgnacioAnguita opened this issue May 29, 2021 · 1 comment
Open

Error Mosquitto Docker #24

IgnacioAnguita opened this issue May 29, 2021 · 1 comment

Comments

@IgnacioAnguita
Copy link

Hi,

When running the ./services start command I get the following error on the Mosquitto Container. Is able to start the rest of the containers except the mosquitto one. No errors on services create.

$ ./services start
Force removal of mqtt-subscriber
mqtt-subscriber not running
Stopping containers
Stopping fiware-orion ... done
Stopping db-mongo ... done
Removing fiware-orion ... done
Removing db-mongo ... done
Removing mosquitto ... done
Starting five containers Orion, IoT-Agent, Tutorial, Mosquitto MQTT broker and a MongoDB database.

  • Orion is the context broker
  • IoT-Agent is configured for the UltraLight Protocol
  • Tutorial acts as a series of dummy IoT Sensors over MQTT
  • Mosquitto acts as an MQTT Message BrokerCreating mosquitto ... error
    Creating db-mongo ...ERROR: for mosquitto Cannot start service mosquitto: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/c/FIWARE/tutorial_mqtt/tutorials.IoT-over-MQTT/mosquitto/mosquitto.conf\" to rootfs \"/mnt/sda1/var/lib/docker/overlay2/20c863e6a6b2804927e8aa036e2be468e8b983227684bfad09e2dc9ab889f25f/merged\" at \"/mnt/sda1/var/lib/docker/overlay2/20c863e6a6b2804927e8aa036e2be468e8b983227684bfad09e2dc9ab889f25f/merged/mosquitto/config/mosquitto.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the spCreating db-mongo ... done
    Creating fiware-orion ... doneERROR: for mosquitto Cannot start service mosquitto: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/c/FIWARE/tutorial_mqtt/tutorials.IoT-over-MQTT/mosquitto/mosquitto.conf\" to rootfs \"/mnt/sda1/var/lib/docker/overlay2/20c863e6a6b2804927e8aa036e2be468e8b983227684bfad09e2dc9ab889f25f/merged\" at \"/mnt/sda1/var/lib/docker/overlay2/20c863e6a6b2804927e8aa036e2be468e8b983227684bfad09e2dc9ab889f25f/merged/mosquitto/config/mosquitto.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
    Encountered errors while bringing up the project.
@jason-fox
Copy link
Member

This issue is due to mounting a Docker volume using windows. The relevant docker-compose line is here: https://github.com/FIWARE/tutorials.IoT-over-MQTT/blob/master/docker-compose.yml#L148

 volumes:      
      - ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf

If the existing bash script isn't working with your specific O/S, you will need to change this statement to hard-code your volume location c:\FIWARE\tutorial_mqtt/tutorials.IoT-over-MQTT - try looking at How to Create (and Manage) Docker Volumes on Windows for inspiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants