# Error with Mosquitto Container - ERRO\[0004\] error waiting for container: context canceled

**URL:** <https://www.wago.community/t/error-with-mosquitto-container-erro-0004-error-waiting-for-container-context-canceled/186>\
**Category:** Hardware and Linux\
**Tags:** mqtt\
**Created:** [July 25, 2022, 10:09pm UTC](https://www.wago.community/t/error-with-mosquitto-container-erro-0004-error-waiting-for-container-context-canceled/186 "2022-07-25T22:09:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyrone.visser](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/tyrone.visser/32/4_2.png) [@tyrone.visser](https://www.wago.community/u/tyrone.visser)\
**Post date:** [July 25, 2022, 10:09pm UTC](https://www.wago.community/t/error-with-mosquitto-container-erro-0004-error-waiting-for-container-context-canceled/186/1 "2022-07-25T22:09:31Z")

</div>

For the following error after a docker run command:

* * *

_docker: Error response from daemon: OCI runtime create failed: container\_linux.go:367: starting container process caused: process\_linux.go:495: container init caused: rootfs\_linux.go:60: mounting “/mosquitto/mosquitto.conf” to rootfs at “/home/docker/overlay2/06e7e424e57112de7ce97a0e91098c67332fce8e2909c7ab080da934ed605d5c/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._

_ERRO[0004] error waiting for container: context canceled_

* * *

This error indicates that the mosquitto.conf file is missing. In this case you will need to delete the /mosquitto directory and start anew:

1. rm -r /mosquitto
2. mkdir /mosquitto
3. cd /mosquitto
4. wget [https://raw.githubusercontent.com/jessejamescox/wago-mosquitto-config/main/mosquitto.conf](https://raw.githubusercontent.com/jessejamescox/wago-mosquitto-config/main/mosquitto.conf)
5. docker run -it -p 1883:1883 -v /mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf --restart unless-stopped eclipse-mosquitto:2.0.11
