Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 14.04 apt-get install docker-engine fails #23365

Closed
simonas88 opened this issue Jun 8, 2016 · 19 comments
Closed

Ubuntu 14.04 apt-get install docker-engine fails #23365

simonas88 opened this issue Jun 8, 2016 · 19 comments

Comments

@simonas88
Copy link

simonas88 commented Jun 8, 2016

Hello,

I'm attempting to install docker-engine on Ubuntu 14.04.
I have followed the official guide (https://docs.docker.com/engine/installation/linux/ubuntulinux/) to a step, however I am getting this error when I attempt sudo apt-get install docker-engine:

simonas@simmo-ws:$ sudo apt-get install docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker-engine is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up docker-engine (1.11.2-0
trusty) ...
groupadd: Invalid configuration: SYS_GID_MIN (101), GID_MIN (100), SYS_GID_MAX (99)
dpkg: error processing package docker-engine (--configure):
subprocess installed post-installation script returned error exit status 4
Errors were encountered while processing:
docker-engine
E: Sub-process /usr/bin/dpkg returned an error code (1)

@thaJeztah
Copy link
Member

docker-engine is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.

Looks like there's a partial install already, can you try uninstalling? apt-get purge docker-engine?

@thaJeztah
Copy link
Member

groupadd: Invalid configuration: SYS_GID_MIN (101), GID_MIN (100), SYS_GID_MAX (99

That looks odd, never seen that one. Actually; looks like a misconfiguration on your computer; see http://unix.stackexchange.com/questions/80277/whats-the-difference-between-a-normal-user-and-a-system-user.

@simonas88
Copy link
Author

I have already tried purging and reinstalling. It doesn't help.

@thaJeztah
Copy link
Member

Can you check the configuration I linked to?

@ghigi123
Copy link

ghigi123 commented Jun 8, 2016

Hello,

I have a similar Issue on Debian Jessie, I tried reinstalling the package but nothing changes

Setting up docker-engine (1.11.2-0~jessie) ...
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript docker, action "start" failed.
dpkg: error processing package docker-engine (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for initramfs-tools (0.120+deb8u2) ...
Processing triggers for systemd (215-17+deb8u4) ...
Errors were encountered while processing:
docker-engine
E: Sub-process /usr/bin/dpkg returned an error code (1)

Output for journalctl -xn

Unit docker.service has begun starting up.
Jun 08 11:14:52 scw-1e2c9f docker[9574]: time="2016-06-08T11:14:52.750609451Z" level=info msg="New containerd process, pid: 9580\n"
Jun 08 11:14:53 scw-1e2c9f docker[9574]: time="2016-06-08T11:14:53.755799109Z" level=error msg="There are no more loopback devices available."
Jun 08 11:14:53 scw-1e2c9f docker[9574]: time="2016-06-08T11:14:53.755915922Z" level=error msg="[graphdriver] prior storage driver "devicemapper" failed: loopback attach fail
Jun 08 11:14:53 scw-1e2c9f docker[9574]: time="2016-06-08T11:14:53.756041768Z" level=fatal msg="Error starting daemon: error initializing graphdriver: loopback attach failed"
Jun 08 11:14:53 scw-1e2c9f systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jun 08 11:14:53 scw-1e2c9f docker[9574]: time="2016-06-08T11:14:53Z" level=info msg="stopping containerd after receiving terminated"
Jun 08 11:14:53 scw-1e2c9f systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd`

@thaJeztah
Copy link
Member

@ghigi123 did you have docker running on that machine before, or a fresh install (docker was never installed on it?); this message "There are no more loopback devices available." seems to indicate an issue with the device mapper loop device, possibly running out of space

@ghigi123
Copy link

ghigi123 commented Jun 8, 2016

It is a fresh install, approximately 40 Gb are available on my disk

@HackToday
Copy link
Contributor

@ghigi123 how did you install docker ? I found you use loopback for Debian. what configuration did you do for that ?

@simonas88
Copy link
Author

@thaJeztah
So I uncommented the lines in /etc/login.defs

SYS_GID_MIN 100
SYS_GID_MAX 999

And now I can install docker-engine without errors.

I guess that solves my particular issue. Thanks for the pointer.

@thaJeztah
Copy link
Member

@simonas88 good to hear! I wonder why those values were set incorrectly; it's the first time this was reported, so may have just been an incident, but I'll keep an eye out if there's other people running into this.

I'll close this issue for now

@bradleyjeck
Copy link

I also had this issue installing on Ubuntu 14.04 LTS. Editing /etc/login.defs as suggested by @simonas88 fixed it.

@LandyCandy
Copy link

I had the same issue on Ubuntu 14.04, the /etc/login.defs fix worked for me

@thaJeztah
Copy link
Member

@justincormack think we should add a check for this to the check-config.sh script?

@manycoding
Copy link

I just encountered the same error trying to install docker on Ubuntu 16.04.1 LTS following instructions from https://docs.docker.com/engine/installation/linux/ubuntulinux/.
Uncommenting those lines fixed it.

SYS_GID_MIN 100
SYS_GID_MAX 999

@vsxen
Copy link

vsxen commented Oct 31, 2016

root@awsd233-test-3967455:/home/ubuntu/workspace# curl -fsSL https://get.docker.com/ | sh
apparmor is enabled in the kernel, but apparmor_parser is missing. Trying to install it..
+ sh -c sleep 3; apt-get update
Ign http://downloads-distro.mongodb.org dist InRelease
Hit http://downloads-distro.mongodb.org dist Release.gpg                       
Ign http://toolbelt.heroku.com ./ InRelease                                    
...
Get:52 http://us-central1.gce.clouds.archive.ubuntu.com trusty/universe i386 Packages [7597 kB]
Get:53 http://us-central1.gce.clouds.archive.ubuntu.com trusty/multiverse i386 Packages [172 kB]
Fetched 34.9 MB in 7s (4961 kB/s)                                              
Reading package lists... Done
+ sh -c sleep 3; apt-get install -y -q apparmor
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libapparmor-perl
Suggested packages:
  apparmor-profiles apparmor-docs apparmor-utils
The following NEW packages will be installed:
  apparmor libapparmor-perl
0 upgraded, 2 newly installed, 0 to remove and 120 not upgraded.
Need to get 346 kB of archives.
After this operation, 1414 kB of additional disk space will be used.
Get:1 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty-updates/main libapparmor-perl amd64 2.8.95~2430-0ubuntu5.3 [26.8 kB]
Get:2 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty-updates/main apparmor amd64 2.8.95~2430-0ubuntu5.3 [319 kB]
Fetched 346 kB in 0s (461 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libapparmor-perl.
(Reading database ... 74716 files and directories currently installed.)
Preparing to unpack .../libapparmor-perl_2.8.95~2430-0ubuntu5.3_amd64.deb ...
Unpacking libapparmor-perl (2.8.95~2430-0ubuntu5.3) ...
Selecting previously unselected package apparmor.
Preparing to unpack .../apparmor_2.8.95~2430-0ubuntu5.3_amd64.deb ...
Unpacking apparmor (2.8.95~2430-0ubuntu5.3) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libapparmor-perl (2.8.95~2430-0ubuntu5.3) ...
Setting up apparmor (2.8.95~2430-0ubuntu5.3) ...
 * Starting AppArmor profiles
 * Mounting securityfs on /sys/kernel/security...
mount: permission denied
   ...fail!
   ...fail!
invoke-rc.d: initscript apparmor, action "start" failed.
 * Reloading AppArmor profiles
 * Mounting securityfs on /sys/kernel/security...
mount: permission denied
   ...fail!
   ...fail!
invoke-rc.d: initscript apparmor, action "reload" failed.
Processing triggers for ureadahead (0.100.0-16) ...
+ sh -c sleep 3; apt-get install -y -q apt-transport-https ca-certificates
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  apt-transport-https
The following packages will be upgraded:
  ca-certificates
1 upgraded, 1 newly installed, 0 to remove and 119 not upgraded.
Need to get 215 kB of archives.
After this operation, 251 kB of additional disk space will be used.
Get:1 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty-updates/main apt-transport-https amd64 1.0.1ubuntu2.15 [25.0 kB]
Get:2 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty-updates/main ca-certificates all 20160104ubuntu0.14.04.1 [190 kB]
Fetched 215 kB in 0s (303 kB/s)
Preconfiguring packages ...
Selecting previously unselected package apt-transport-https.
(Reading database ... 74853 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.0.1ubuntu2.15_amd64.deb ...
Unpacking apt-transport-https (1.0.1ubuntu2.15) ...
Preparing to unpack .../ca-certificates_20160104ubuntu0.14.04.1_all.deb ...
Unpacking ca-certificates (20160104ubuntu0.14.04.1) over (20130906ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up apt-transport-https (1.0.1ubuntu2.15) ...
Setting up ca-certificates (20160104ubuntu0.14.04.1) ...
Processing triggers for ca-certificates (20160104ubuntu0.14.04.1) ...
Updating certificates in /etc/ssl/certs... 35 added, 26 removed; done.
Running hooks in /etc/ca-certificates/update.d....
Adding debian:ACCVRAIZ1.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:CA_WoSign_ECC_Root.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:Certification_Authority_of_WoSign_G2.pem
Adding debian:Certinomis_-_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:E-Tugra_Certification_Authority.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:S-TRUST_Universal_Root_CA.pem
Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.pem
Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H6.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:WoSign.pem
Adding debian:WoSign_China.pem
Removing debian:A-Trust-nQual-03.pem
Removing debian:America_Online_Root_Certification_Authority_1.pem
Removing debian:America_Online_Root_Certification_Authority_2.pem
Removing debian:Buypass_Class_3_CA_1.pem
Removing debian:ComSign_Secured_CA.pem
Removing debian:Digital_Signature_Trust_Co._Global_CA_1.pem
Removing debian:Digital_Signature_Trust_Co._Global_CA_3.pem
Removing debian:E-Guven_Kok_Elektronik_Sertifika_Hizmet_Saglayicisi.pem
Removing debian:Entrust.net_Secure_Server_CA.pem
Removing debian:Firmaprofesional_Root_CA.pem
Removing debian:GTE_CyberTrust_Global_Root.pem
Removing debian:RSA_Root_Certificate_1.pem
Removing debian:TC_TrustCenter_Class_2_CA_II.pem
Removing debian:TC_TrustCenter_Universal_CA_I.pem
Removing debian:TDC_Internet_Root_CA.pem
Removing debian:TDC_OCES_Root_CA.pem
Removing debian:TURKTRUST_Certificate_Services_Provider_Root_1.pem
Removing debian:TURKTRUST_Certificate_Services_Provider_Root_2.pem
Removing debian:Thawte_Premium_Server_CA.pem
Removing debian:Thawte_Server_CA.pem
Removing debian:UTN_DATACorp_SGC_Root_CA.pem
Removing debian:ValiCert_Class_1_VA.pem
Removing debian:ValiCert_Class_2_VA.pem
Removing debian:Verisign_Class_4_Public_Primary_Certification_Authority_-_G3.pem
Removing debian:Wells_Fargo_Root_CA.pem
Removing debian:spi-cacert-2008.pem
done.
done.
+ sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.Crn6rMj3wk --no-auto-check-trustdb --trust-model always --keyring 

/etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/fkrull-deadsnakes.gpg --keyring /etc/apt/trusted.gpg.d/git-core-ppa.gpg 

--keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
+ break
+ sh -c apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D >/dev/null
+ sh -c mkdir -p /etc/apt/sources.list.d
+ dpkg --print-architecture
+ sh -c echo deb \[arch=amd64\] https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list
+ sh -c sleep 3; apt-get update; apt-get install -y -q docker-engine
Ign http://downloads-distro.mongodb.org dist InRelease
Hit http://downloads-distro.mongodb.org dist Release.gpg                       
...
Hit http://us-central1.gce.clouds.archive.ubuntu.com trusty/multiverse i386 Packages
Fetched 35.8 kB in 6s (5280 B/s)                                               
Reading package lists... Done
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  aufs-tools cgroup-lite iptables libnfnetlink0 libsystemd-journal0
  libxtables10
The following NEW packages will be installed:
  aufs-tools cgroup-lite docker-engine iptables libnfnetlink0
  libsystemd-journal0 libxtables10
0 upgraded, 7 newly installed, 0 to remove and 119 not upgraded.
Need to get 19.7 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Get:1 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty/main libnfnetlink0 amd64 1.0.1-2 [15.0 kB]
Get:2 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty-updates/main libsystemd-journal0 amd64 204-5ubuntu20.19 [50.1 kB]
Get:3 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty/main libxtables10 amd64 1.4.21-1ubuntu1 [25.9 kB]
Get:4 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty/main iptables amd64 1.4.21-1ubuntu1 [261 kB]
Get:5 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty/universe aufs-tools amd64 1:3.2+20130722-1.1 [92.3 kB]
Get:6 http://us-central1.gce.clouds.archive.ubuntu.com/ubuntu/ trusty/main cgroup-lite all 1.9 [3918 B]
Fetched 19.7 MB in 1s (19.4 MB/s)
Selecting previously unselected package libnfnetlink0:amd64.
(Reading database ... 74867 files and directories currently installed.)
Preparing to unpack .../libnfnetlink0_1.0.1-2_amd64.deb ...
Unpacking libnfnetlink0:amd64 (1.0.1-2) ...
Selecting previously unselected package libsystemd-journal0:amd64.
Preparing to unpack .../libsystemd-journal0_204-5ubuntu20.19_amd64.deb ...
Unpacking libsystemd-journal0:amd64 (204-5ubuntu20.19) ...
Selecting previously unselected package libxtables10.
Preparing to unpack .../libxtables10_1.4.21-1ubuntu1_amd64.deb ...
Unpacking libxtables10 (1.4.21-1ubuntu1) ...
Selecting previously unselected package iptables.
Preparing to unpack .../iptables_1.4.21-1ubuntu1_amd64.deb ...
Unpacking iptables (1.4.21-1ubuntu1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1) ...
Selecting previously unselected package docker-engine.
Preparing to unpack .../docker-engine_1.12.3-0~trusty_amd64.deb ...
Unpacking docker-engine (1.12.3-0~trusty) ...
Selecting previously unselected package cgroup-lite.
Preparing to unpack .../cgroup-lite_1.9_all.deb ...
Unpacking cgroup-lite (1.9) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libnfnetlink0:amd64 (1.0.1-2) ...
Setting up libsystemd-journal0:amd64 (204-5ubuntu20.19) ...
Setting up libxtables10 (1.4.21-1ubuntu1) ...
Setting up iptables (1.4.21-1ubuntu1) ...
Setting up aufs-tools (1:3.2+20130722-1.1) ...
Setting up docker-engine (1.12.3-0~trusty) ...
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
/etc/init.d/docker: 96: ulimit: error setting limit (Operation not permitted)
invoke-rc.d: initscript docker, action "start" failed.
dpkg: error processing package docker-engine (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up cgroup-lite (1.9) ...
invoke-rc.d: unknown initscript, /etc/init.d/cgroup-lite not found.
dpkg: error processing package cgroup-lite (--configure):
 subprocess installed post-installation script returned error exit status 100
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 docker-engine
 cgroup-lite
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@awsd233-test-3967455:/home/ubuntu/workspace# docker version
Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 21:44:32 2016
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
root@awsd233-test-3967455:/home/ubuntu/workspace# docker pull nginx
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: 

https://index.docker.io/v1/
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
root@awsd233-test-3967455:/home/ubuntu/workspace# vi /etc/login.defs 
root@awsd233-test-3967455:/home/ubuntu/workspace# sudo apt-get install docker-engine
Reading package lists... Done
Building dependency tree       
Reading state information... Done
docker-engine is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 119 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 

@simonas88 @thaJeztah
The root password is root
you can look at https://ide.c9.io/awsd233/test

@1beb
Copy link

1beb commented Nov 25, 2016

I get the same error, for me this was fixed by adjusting my ufw policies.

sed -i 's/DEFAULT_FORWARD_POLICY="DROP"/DEFAULT_FORWARD_POLICY="ACCEPT"/'
ufw allow 2376/tcp
echo "y" | ufw enable

@ThomasGHenry
Copy link

/etc/login.defs fix resolved this for me as well

@matyapiro31
Copy link

I found this happens when multiple storage drivers are exist in OS.
syslog for dockerd shows this error.

dockerd[28020]: time="2016-12-10T13:58:06.609918951+09:00" level=fatal msg="Error starting daemon: error initializing graphdriver: \"/var/lib/docker\" contains several valid graphdrivers: devicemapper, aufs; Please cleanup or explicitly choose storage driver (-s <DRIVER>)"

docker cannot be installed correctly if multiple drivers found.

@thaJeztah
Copy link
Member

I'm going to lock the discussion on this issue, as it starts to collect all possible causes for the daemon not starting. The original issue was resolved, and the solution for the issue reported here can be found in this comment #23365 (comment)

@moby moby locked and limited conversation to collaborators Dec 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests