Mosquitto: docker: Error response from daemon: readdirent: not a directory.

Created on 8 Jun 2017  路  8Comments  路  Source: eclipse/mosquitto

Attempting to run the docker image https://hub.docker.com/_/eclipse-mosquitto/ on docker on my Synology using sudo docker run -it -p 1883:1883 -p 9001:9001 -v mosquitto.conf:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto I get the error: docker: Error response from daemon: readdirent: not a directory.

help wanted

Most helpful comment

I hit the same problem.

I copied the example from https://hub.docker.com/_/eclipse-mosquitto/, so
I was running -v mosquitto.conf:/mosquitto/config/mosquitto.conf:ro which failed. Changed it to -v $(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro and it's working.

Maybe update the docker hub readme file?

All 8 comments

I'm relying on others for docker support - any suggestions?

I have the same problem

Me and one another colleague have the same problem! We are using the docker for mac.

Seeing the same thing on debian jessie.

Something is messed up with -v flag. If you don't need custom configs simply remove the flag:

sudo docker run -it -p 11883:1883 -p 9001:9001 eclipse-mosquitto

If you need, do the following:

  • create /mosquitto/config/, /mosquitto/data/, /mosquitto/log/ dirs on your host machine
  • put mosquitto.config in /mosquitto/config/. Don't forget about those options in config:
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

Now just simply execute

# Notice that mosquitto is exposed on 11883 on host
sudo docker run -it -p 11883:1883 -p 9001:9001 -v /mosquitto/:/mosquitto/ eclipse-mosquitto

It all worked on a fresh Ubuntu Server 16.10 vm.

OK working thanks!

I hit the same problem.

I copied the example from https://hub.docker.com/_/eclipse-mosquitto/, so
I was running -v mosquitto.conf:/mosquitto/config/mosquitto.conf:ro which failed. Changed it to -v $(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro and it's working.

Maybe update the docker hub readme file?

The readme now notes that you need an absolute path to the config file, so I'm closing this. Thanks for the report!

Was this page helpful?
0 / 5 - 0 ratings