mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

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

Open robmarkcole opened this issue 9 years ago • 8 comments

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.

robmarkcole avatar Jun 08 '17 06:06 robmarkcole

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

ralight avatar Jun 12 '17 20:06 ralight

I have the same problem

Sammers21 avatar Jun 14 '17 17:06 Sammers21

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

dimarzio avatar Jul 14 '17 10:07 dimarzio

Seeing the same thing on debian jessie.

cyclingengineer avatar Jul 19 '17 18:07 cyclingengineer

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.

kainoj avatar Jul 27 '17 14:07 kainoj

OK working thanks!

robmarkcole avatar Jul 28 '17 19:07 robmarkcole

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?

tompscanlan avatar Oct 23 '17 18:10 tompscanlan

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

ralight avatar Nov 07 '18 23:11 ralight