Ansible and ‘Error while fetching server API version’

If you are getting this error

'Error while fetching server API version: {0}'.format(e)
DockerException: Error while fetching server API version: 
   ('Connection aborted.', error(2, 'No such file or directory'))

you should know that all you need is a Docker that is running ;)

I love this kind of errors :)

Comments (7)

Kartezjanizm PlatonaJune 27th, 2018 at 4:32 pm

thanks a lot

Buddyzm KotarbińskiegoJuly 6th, 2018 at 3:23 pm

systemctl enable docker.service
systemctl start docker.service

Pragmatyzm PlatonaAugust 14th, 2018 at 6:40 pm

You just saved a life. Been trying to figure this out for 2 days.

i just added an ansible task to start the docker daemon before the main task to start the container

thanks a lot

michalAugust 14th, 2018 at 7:55 pm

Cool! Have fun with Docker ;)

Behawioryzm KartezjuszaAugust 24th, 2018 at 9:07 am

this is great.

5aee84ab615485a26e99c24a76e8c707October 4th, 2018 at 4:41 pm

I have docker running and still get this :(

c9dcb5bb0ea823b7a376a8a44c50cec6October 19th, 2018 at 12:05 pm

Yep, was stuck on this for a while too, thanks!