moby: Error starting daemon: error initializing graphdriver: driver not supported

After upgrade from 1.7.1 to 1.8.1 docker daemon refuse to start. It fails with this error log message:

ERRO[0000] Failed to GetDriver graph btrfs /lxc/docker  
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported 

docker version: Client: Version: 1.8.1 API version: 1.20 Go version: go1.4.2 Git commit: d12ea79 Built: Thu Aug 13 02:32:18 UTC 2015 OS/Arch: linux/amd64 Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?

uname -a: Linux alambike-MM061 3.13.0-61-generic #100~precise1-Ubuntu SMP Wed Jul 29 12:06:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I was running docker in my laptop, with ubuntu 12.04, with the btrfs driver, but after upgrade from 1.7.1 to 1.8.1 the docker daemon refuses to start. The upgrade process was made with the recommended script curl -sSL https://get.docker.com/ | sh

It seems can’t find correct driver now

# docker -s btrfs -d -D
Warning: '-d' is deprecated, it will be removed soon. See usage.
WARN[0000] please use 'docker daemon' instead.          
DEBU[0000] Registering GET, /images/search              
DEBU[0000] Registering GET, /containers/json            
DEBU[0000] Registering GET, /containers/{name:.*}/export 
DEBU[0000] Registering GET, /containers/{name:.*}/json  
DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws 
DEBU[0000] Registering GET, /info                       
DEBU[0000] Registering GET, /version                    
DEBU[0000] Registering GET, /containers/ps              
DEBU[0000] Registering GET, /containers/{name:.*}/top   
DEBU[0000] Registering GET, /containers/{name:.*}/stats 
DEBU[0000] Registering GET, /containers/{name:.*}/archive 
DEBU[0000] Registering GET, /_ping                      
DEBU[0000] Registering GET, /events                     
DEBU[0000] Registering GET, /images/json                
DEBU[0000] Registering GET, /images/get                 
DEBU[0000] Registering GET, /images/{name:.*}/get       
DEBU[0000] Registering GET, /images/{name:.*}/history   
DEBU[0000] Registering GET, /images/{name:.*}/json      
DEBU[0000] Registering GET, /containers/{name:.*}/changes 
DEBU[0000] Registering GET, /containers/{name:.*}/logs  
DEBU[0000] Registering GET, /exec/{id:.*}/json          
DEBU[0000] Registering POST, /images/{name:.*}/tag      
DEBU[0000] Registering POST, /containers/{name:.*}/pause 
DEBU[0000] Registering POST, /containers/{name:.*}/rename 
DEBU[0000] Registering POST, /commit                    
DEBU[0000] Registering POST, /images/create             
DEBU[0000] Registering POST, /images/load               
DEBU[0000] Registering POST, /images/{name:.*}/push     
DEBU[0000] Registering POST, /containers/{name:.*}/unpause 
DEBU[0000] Registering POST, /containers/{name:.*}/restart 
DEBU[0000] Registering POST, /exec/{name:.*}/resize     
DEBU[0000] Registering POST, /containers/{name:.*}/resize 
DEBU[0000] Registering POST, /containers/create         
DEBU[0000] Registering POST, /containers/{name:.*}/kill 
DEBU[0000] Registering POST, /containers/{name:.*}/start 
DEBU[0000] Registering POST, /containers/{name:.*}/stop 
DEBU[0000] Registering POST, /containers/{name:.*}/copy 
DEBU[0000] Registering POST, /containers/{name:.*}/exec 
DEBU[0000] Registering POST, /exec/{name:.*}/start      
DEBU[0000] Registering POST, /auth                      
DEBU[0000] Registering POST, /build                     
DEBU[0000] Registering POST, /containers/{name:.*}/wait 
DEBU[0000] Registering POST, /containers/{name:.*}/attach 
DEBU[0000] Registering PUT, /containers/{name:.*}/archive 
DEBU[0000] Registering DELETE, /containers/{name:.*}    
DEBU[0000] Registering DELETE, /images/{name:.*}        
DEBU[0000] Registering OPTIONS,                         
DEBU[0000] Registering HEAD, /containers/{name:.*}/archive 
DEBU[0000] [graphdriver] trying provided driver "btrfs" 
ERRO[0000] Failed to GetDriver graph btrfs /lxc/docker  
DEBU[0000] docker group found. gid: 999                 
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported 

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 54 (19 by maintainers)

Most upvoted comments

I upgraded from Debian Jessie to testing and I’m now using linux-image-4.2 and I encountered the same kind of issue with a missing aufs driver.

A quick fix is to delete the docker aufs folder. You might lose some data, so please do it with care!

sudo rm -rf /var/lib/docker/aufs

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version: docker info: uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue: 1. 2. 3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

Thanks @merwan

In my case, removing the aufs folder set up a failure where docker couldn’t find an ID.

A dose of rm -rf /var/lib/docker/ and a complete reinstall of docker-engine made things right without real data loss.

I hit this when upgrading from Red Hat Enterprise Linux 7.1 to 7.2 which took me from docker-1.6.0-11.el7.x86_64 to docker-1.8.2-8.el7.x86_64. To get this solved, I had to do:

systemctl stop docker rm -rf /var/lib/docker lvremove /dev/volumegroup/docker-pool docker-storage-setup systemctl start docker

I had the same problem on Ubuntu 16.10 and have to change driver from autf to overlay2 in /etc/systemd/system/docker.service.d/10-machine.conf.

Same problem after updating Docker on Mac OS. Solved by simply resetting Docker to factory settings.

@thaJeztah I guess that’s a reasonable explanation. Let me mention my use case: every few months, I have a need to fiddle with Docker. I do nothing special to manage it – basically, ignore it – I installed it a few years ago, and have been doing nothing but apt-get upgrade ever since. Perhaps there have been new kernels, I don’t recall. I am using a stock, default, mostly-unmodified version of ubuntu trusty and that’s that. A few days ago, I had to dust off some old Docker images and was surprised by the error. Google search on the error string lead me here. I have no clue what a graph driver is, I just rm -r * 'ed the entire /var/lib/docker directory, and was back in business. No harm done.

So really, this was a ‘me-too’ +1 type post: sometimes, QA teams are interested in finding out how many users/customers are being bitten by some particular bug/issue/feature, so as to focus appropriate attention on it.

I’m going to post here because I just spent an embarrassing amount of time trying all the solutions in this thread but my fix was slightly different.

I’m trying to build a Docker image with AWS CodeBuild on Ubuntu, using the default CodeBuild managed image aws/codebuild/standard:4.0. I was getting a bunch of

ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
29
[...]
failed to start daemon: error initializing graphdriver: driver not supported

Turns out CodeBuild has a flag for enabling “Privileged mode”, which is off by default. I switched it on and the problem vanished.

In fairness to AWS, it does tell you this on the GUI (hidden behind an “Override image” button):

Enable this flag if you want to build Docker images or want your builds to get elevated privileges.

But I was using Terraform and didn’t spot the flag in amongst all the other documented config options. Anyway - just in case it saves anyone else some pain.

I have met this problem when I change kernel and reboot my Centos7.2 server , but I solved it:

Just only remove the file in /var/lib/docker , then docker daemon will work rm -rf /var/lib/docker

The answer at https://github.com/docker/docker/issues/14026#issuecomment-128055691 worked for me.

I just upgraded the Kernel to 4.9 and was getting:

[graphdriver] prior storage driver aufs failed: driver not supported

Moved the /var/lib/docker/aufs folder to my $HOME_DIR/Backups/docker (just in case) and was able to run service docker stop/start. Now it starts up as it should!

@linas , you’re a life saver! rm -r /var/lib/docker did the trick to get us back in business!

For me, on a Raspberry Pi using http://blog.hypriot.com/post/your-number-one-source-for-docker-on-arm/ the Error starting daemon: error initializing graphdriver: driver not supported error was indeed caused by a pending restart after an earlier sudo apt-get update and sudo apt-get dist-upgrade.

In other words: I restarted, and ran sudo apt-get install docker-hypriot=1.10.3-1 from that blog without any further problems.

I had this problem after updating to a newer Linux kernel and switching to overlay2 seems to have solved the issue (KDE Neon, Ubuntu 16.04).

I used this resource: https://docs.docker.com/storage/storagedriver/overlayfs-driver/

rm -rf isn’t fixing anything, it’s just removing your old data dir and as such automatically selecting a new storage driver. I suspect you were using some driver like AUFS and performed a kernel upgrade without also updating the AUFS kernel mod for the new kernel.

Reproduces 100% with Gentoo:

vagrant init emerge generic/gentoo && vagrant up
vagrant ssh
sudo su -
emerge app-emulation/docker
/etc/init.d/docker start
cat /var/log/docker.log

@linas thanks; in that case, it’s plausible that during one of those upgrades, the requirements for the graph-driver (“storage driver”) was missing, or not available until restart. If you’re interested in learning what storage/graph-drivers are; this section of the docs explains them; https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/

@linas it’s not a bug; this error is because a graph driver that was previously used is no longer available, or multiple “graph” directories were found (e.g. directories for both aufs and devicemapper were found). Instead of “randomly” picking one of them (leading to “where have my images gone”?), Docker will refuse to start, and ask you to either specify which graph-driver you want to use, or remove the directory of the graph-driver you’re no longer using.

If the graphdriver you used previously is no longer working on your system (which may be the result of, e.g., upgrading your kernel, without installing the new dependencies for your graph-driver - people using aufs can run into this if linux-image-extra is not installed for the new kernel version), at least you know that it’s not supported, so that something needs to be addressed before docker is started.

This one bit me too, its now 6 months later.

I think the problem is motivated by the compilation flags for deb package in ubuntu precise: https://github.com/docker/docker/blob/master/contrib/builder/deb/ubuntu-debootstrap-precise/Dockerfile

I just downloaded the docker binary and works ok.

More or less the same happened to me after switching to debian stretch which is now under linux 4.1 and since aufs support is dropped from debian 9 packaging (https://lists.debian.org/debian-kernel/2014/12/msg00136.html), I had to switch to overlayfs. I now have to compile aufs module to export my images and import them back to docker with overlayfs…

For the record, check-config.sh script returns :

warning: /proc/config.gz does not exist, searching other paths for kernel config ...
info: reading kernel config from /boot/config-4.1.0-1-amd64 ...

Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: enabled
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled (as module)
- CONFIG_NF_NAT_IPV4: enabled (as module)
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled

Optional Features:
- CONFIG_MEMCG_KMEM: missing
- CONFIG_MEMCG_SWAP: enabled
- CONFIG_MEMCG_SWAP_ENABLED: missing
    (note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")
- CONFIG_BLK_CGROUP: enabled
- CONFIG_IOSCHED_CFQ: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: missing
- CONFIG_NET_CLS_CGROUP: enabled (as module)
- CONFIG_CGROUP_NET_PRIO: enabled
- CONFIG_CFS_BANDWIDTH: missing
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: missing
- CONFIG_EXT3_FS: missing
- CONFIG_EXT3_FS_XATTR: missing
- CONFIG_EXT3_FS_POSIX_ACL: missing
- CONFIG_EXT3_FS_SECURITY: missing
    (enable these ext3 configs if you are using ext3 as backing filesystem)
- CONFIG_EXT4_FS: enabled (as module)
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Storage Drivers:
  - "aufs":
    - CONFIG_AUFS_FS: missing
  - "btrfs":
    - CONFIG_BTRFS_FS: enabled (as module)
  - "devicemapper":
    - CONFIG_BLK_DEV_DM: enabled (as module)
    - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
  - "overlay":
    - CONFIG_OVERLAY_FS: enabled (as module)
  - "zfs":
    - /dev/zfs: missing
    - zfs command: missing
    - zpool command: missing