Bug 1466479 - level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"
level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
Unspecified Unspecified
medium Severity high
: rc
: ---
Assigned To: Daniel Walsh
: Extras
: 1466867 (view as bug list)
Depends On:
Blocks: 1186913 1502829 1537321
  Show dependency treegraph
Reported: 2017-06-29 14:19 EDT by Ryan Howe
Modified: 2018-06-15 18:14 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-05-31 11:50:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3122871 None None None 2017-07-21 19:04 EDT

  None (edit)
Description Ryan Howe 2017-06-29 14:19:19 EDT
Description of problem:

  Docker gets terminated at the same time as OpenShift trying to restart a pod that mounts /var/run/docker.sock. Causing /var/run/docker.sock to be created as a directory. When docker starts again it fails with the following error: 

   level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"

Version-Release number of selected component (if applicable):


Steps to Reproduce:
1. Start container mounting var/run/docker.sock at the same time as killing docker. 

Actual results:
var/run/docker.sock is created as a directory 

Expected results:
fail to start the container while docker shuts down. 

Additional info:

Upstream issue:  https://github.com/moby/moby/issues/30348

Reproducer is in commit message. 
Possible fix: https://github.com/moby/moby/pull/33330/commits/7318eba5b2f8bb4b867ca943c3229260ca98a3bc
Comment 2 Daniel Walsh 2017-06-30 11:58:39 EDT
Are you using autostarted containers with the /var/run/docker.sock mounted into them?
Comment 3 Ryan Howe 2017-06-30 16:17:15 EDT

These containers are configured as a daemonset in OpenShift. Using this template. 


Issue was worked around by mounting /var/run to another location.
Comment 5 Alexis Solanas 2017-11-27 03:39:37 EST
*** Bug 1466867 has been marked as a duplicate of this bug. ***
Comment 6 Daniel Walsh 2018-05-31 11:50:23 EDT
THis should no longer be an issue.

Note You need to log in before you can comment on or make changes to this bug.