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

Docker daemon doesn't start after updating to 1.7 on Ubuntu 15.04 #14088

Closed
lots0logs opened this issue Jun 22, 2015 · 20 comments
Closed

Docker daemon doesn't start after updating to 1.7 on Ubuntu 15.04 #14088

lots0logs opened this issue Jun 22, 2015 · 20 comments

Comments

@lots0logs
Copy link

I'm creating a new issue because I don't think the issue I am experiencing is the same as #14035 as I have always used the aufs storage drive and the error I am getting doesn't mention anything about the storage driver:

root@buildsrv:~# systemctl status -l docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Mon 2015-06-22 02:15:42 CDT; 7min ago
     Docs: https://docs.docker.com
 Main PID: 3217 (code=exited, status=0/SUCCESS)

Jun 22 02:15:42 buildsrv systemd[1]: Started Docker Application Container Engine.
Jun 22 02:15:42 buildsrv systemd[1]: Starting Docker Application Container Engine...
Jun 22 02:15:42 buildsrv docker[3217]: Please specify only one -H
Jun 22 02:15:42 buildsrv systemd[1]: start request repeated too quickly for docker.service
Jun 22 02:15:42 buildsrv systemd[1]: Failed to start Docker Application Container Engine.
Jun 22 02:15:42 buildsrv systemd[1]: Unit docker.service entered failed state.
Jun 22 02:15:42 buildsrv systemd[1]: docker.service failed.

The documentation says that -H can be included multiple times. Has this changed?? How would I specify both a tcp port and a unix socket then?

@GordonTheTurtle
Copy link

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

@lots0logs
Copy link
Author

Update: I figured out the reason for the error was that the socket was being managed by systemd socket file and I was also including it in the service files exec command. After removing it from the service file I get a different error that seems to be related to #14035 after all:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Mon 2015-06-22 02:34:40 CDT; 3s ago
     Docs: https://docs.docker.com
  Process: 3733 ExecStart=/usr/bin/docker -d --dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:4243 (code=exited, status=1/FAILURE)
 Main PID: 3733 (code=exited, status=1/FAILURE)

Jun 22 02:34:40 buildsrv docker[3733]: time="2015-06-22T02:34:40.096575829-05:00" level=fatal msg="Error starting daemon: error initializing graphdriver: \"/var/lib/docker\" contains other graphdrivers: devicemapper; Please cleanup or explicitly choose storage driver (-s <DRIVER>)"

@lots0logs
Copy link
Author

Another update: I moved /var/lib/docker/devicemapper outside of /var/lib/docker and everything seems to be back to normal. Sorry for the noise, but hopefully it will help someone

@magnetikonline
Copy link

@lots0logs just to add - this fix worked for me - upgrading to Docker 1.7.1 from 1.6 on Ubuntu 14.04LTS. Cheers!

@tf
Copy link

tf commented Aug 5, 2015

@magnetikonline Same here

@jb11211
Copy link

jb11211 commented Sep 29, 2015

Found this fun little gotcha updating from 1.6 to 1.8 as well. It's disappointing that this is still an issue.

@mylons
Copy link

mylons commented Nov 13, 2015

also happened to me upgrading to 1.8 from a much earlier version.

@michael-henderson
Copy link

Happened to me moving from 1.6.* to 1.9.0.

@lots0logs
Copy link
Author

Seems I should reopen this issue I guess 😏

@lots0logs lots0logs reopened this Nov 17, 2015
@Bilge
Copy link

Bilge commented Nov 17, 2015

Also happened to me after upgrading 1.4 -> 1.9. Not sure what to do.

@cpuguy83
Copy link
Member

What does your unit file look like?

@thaJeztah
Copy link
Member

@michael-henderson @Bilge @mylons what is the issue you're having? The problem with multiple -H flags, or the "error initializing graphdriver" message?

@Bilge
Copy link

Bilge commented Nov 26, 2015

@thaJeztah The graphdriver message. I had to delete /var/lib/docker/devicemapper.

@thaJeztah
Copy link
Member

@Bilge the graphdriver message can be expected; previously other existing directories were silently ignored when docker "switched" to another graphdriver (docker automatically selects the best available graphdriver). However, this resulting in situations where all images and/or containers apparently disappeared, if another graphdriver was used before upgrading, We therefore decided to add that error to make the user either remove the unwanted directories, or explicitly specify the graphdriver that should be used.

@flaccid
Copy link
Contributor

flaccid commented Feb 3, 2016

@thaJeztah that is ok but we might need a message to point the user to how e.g. a link to doc, additionally with no docker running I still get rm: cannot remove ‘/var/lib/docker/devicemapper’: Device or resource busy when doing sudo rm -Rf /var/lib/docker/devicemapper and will probably need to disable the service and reboot, then remove that directory.

@thaJeztah
Copy link
Member

@flaccid the current message is;

Error starting daemon: error initializing graphdriver: "/var/lib/docker" contains other graph drivers:
devicemapper; Please cleanup or explicitly choose storage driver (-s <DRIVER>)

Do you think that message needs more information?
Note that it's not strictly needed to remove the "devicemapper" directory; as long as you've specified a storage driver.

@flaccid
Copy link
Contributor

flaccid commented Mar 2, 2016

Sure I just think most users will end up googling with that error, preventing that is an art form :)

@hanyong
Copy link

hanyong commented Mar 3, 2016

I'm a user end up googling with this things. I don't sure how to do a "cleanup ", is there some command, or just do a "rm -rf". I found this, It seems a simply "rm -rf" should work.

update:

seems not. I did rm -rf /var/lib/docker/containers /var/lib/docker/overlay. next time I switch to -s overylay, I got this error:

$ docker create -ti --name test rwtest:init /a.out
Error response from daemon: lstat /var/lib/docker/overlay/e474979dc07be39df72a7c19b723a51aa5455d12ab98365bd7159048d16e2ff9: no such file or directory

and docker-daemon log shows:

INFO[0000] API listen on /var/run/docker.sock           
ERRO[0010] Clean up Error! Cannot destroy container ef7a154e0008863eed0663261db17036637e821db1643a0c98e62374e5412444: nosuchcontainer: No such container: ef7a154e0008863eed0663261db17036637e821db1643a0c98e62374e5412444 
ERRO[0010] Handler for POST /v1.22/containers/create returned error: lstat /var/lib/docker/overlay/e474979dc07be39df72a7c19b723a51aa5455d12ab98365bd7159048d16e2ff9: no such file or directory 

Then I did rm -rf /var/lib/docker/*, docker works now, but I have lost all local images and containers.

@icecrime
Copy link
Contributor

Tentatively closing as the issue seems to be resolved: please let me know if it needs reopening! Thanks.

@douglas-larocca
Copy link

For anyone getting rm: cannot remove ‘/var/lib/docker/devicemapper’: Device or resource busy, I was finally able to remove it by running sudo umount /var/lib/docker/devicemapper first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests