"Cannot start container" when running docker task

65 views
Skip to first unread message

Guy Knights

unread,
Jan 28, 2016, 7:53:06 PM1/28/16
to Ansible Project
I occasionally get the following error in some of my docker tasks, which stops ansible-playbook dead:

"changed": true, "failed": true, "msg": "Docker API Error: Cannot start container 1117bfd50795c71278d75e6f97ef1a1d67b5758658b57a5803ceffb28dea8565: Error getting container 1117bfd50795c71278d75e6f97ef1a1d67b5758658b57a5803ceffb28dea8565 from driver devicemapper: Error mounting '/dev/mapper/docker-202:1-153569-1117bfd50795c71278d75e6f97ef1a1d67b5758658b57a5803ceffb28dea8565' on '/var/lib/docker/devicemapper/mnt/1117bfd50795c71278d75e6f97ef1a1d67b5758658b57a5803ceffb28dea8565': no such file or directory"

More often than not, if I re-run the same ansible-playbook command again it works fine. Has anyone encountered this, and if so did you manage to resolve it?

Thanks,
Guy

Greg DeKoenigsberg

unread,
Jan 28, 2016, 10:05:31 PM1/28/16
to Ansible Project
If you're getting a transient Docker API error, that's almost
certainly not an issue with Ansible; it's likely that you're running
Docker frequently enough to trigger some transient error. My guess is
that you'd be running into that problem if you ran Docker repeatedly
on the command line.

In fact, this issue looks a lot like what you're seeing:

https://github.com/docker/docker/issues/4036

Looks like a Docker race condition.

--g

> Thanks,
> Guy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/916b194a-4181-4567-8e0f-680cf14959de%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Greg DeKoenigsberg
Ansible Community Guy

Guy Knights

unread,
Jan 29, 2016, 3:25:28 PM1/29/16
to ansible...@googlegroups.com
Ok, thanks Greg. I'll follow up your lead.


--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/Jxcvw0-udjo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages