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

Too many levels of symbolic links #5763

Closed
2 tasks done
STaRDoGG opened this issue Feb 13, 2020 · 41 comments
Closed
2 tasks done

Too many levels of symbolic links #5763

STaRDoGG opened this issue Feb 13, 2020 · 41 comments

Comments

@STaRDoGG
Copy link

As requested, I'm creating another issue for this error.

Some relevant links that go even more in depth on it, in previous posts (in mo particular order):

An additional aside:
In the above link I mention/show that the docker run php:apache container is one of them that also gives this error; it seems after the latest Docker update, it no longer does; however, the docker run wordpress:apache does still give the same overlay error.

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 2ECBE1F4-ADE2-4D97-8082-505598CFAE53/20200213120818

Expected behavior

No overlay error while trying to create certain containers. (Apparently not happening to all containers, as I can run many others, though I haven't picked out a pattern yet).

Actual behavior

Getting an overlay error.

Information

See below
  • Windows Version: See below
  • Docker Desktop Version: See below
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: It's running in Docker Desktop (Hyper-V)

Unfortunately for me, I still have the same issue with an overlay error (which I don't really understand).

I just installed:

image

Using this Compose (I left out the MySQL service, to focus on the problem container):

version: '2'

services:

  phpmyadmin:
    container_name: phpmyadmin
    image: 'phpmyadmin/phpmyadmin:latest'
    restart: unless-stopped
    environment:
      - TZ='America/Chicago'
      - "PMA_HOST=mysql"
      - "MYSQL_ROOT_PASSWORD=RlL1#2Z%^W"
      - "PMA_ABSOLUTE_URI=https://my.domain.rocks:3112/phpmyadmin/"
    volumes:
      - "/f/Sites/Web/.config/PHPMyAdmin/Files:/Files:rw,shared"    
      - "/f/Sites/Web/.config/PHPMyAdmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php"
      - "/f/Sites/Web/.config/PHPMyAdmin/apache2.conf:/etc/apache2/apache2.conf"
      - "/f/Sites/Web/.config/PHPMyAdmin/Themes/:/var/www/html/themes/"
    depends_on:
      - mysql
    networks:
      - odb

networks:
  odb:
    external:
      name: my-db

Gives me this error (which is the same is the previous Docker Edge version):

{"message":"Status: failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/a54d40ac5df89eb2c2c9737db85772fe5782ea47c693ceba2eb1889ec2d7f25e/merged: too many levels of symbolic links, Code: 1","details":"Status: failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/a54d40ac5df89eb2c2c9737db85772fe5782ea47c693ceba2eb1889ec2d7f25e/merged: too many levels of symbolic links, Code: 1"}

For what it might also be worth, since I don't know if the 2 are related in any way, but I'm just throwing it out there, I also get this error when trying to create an Adminer container, and mount a local CSS file to the container:

{"message":"Error response from daemon: error while creating mount source path '/c/Servers/Docker/Containers/Adminer/pepa-linha-dark/adminer.css': mkdir /c/Servers/Docker/Containers/Adminer/pepa-linha-dark/adminer.css: file exists","details":"Error response from daemon: error while creating mount source path '/c/Servers/Docker/Containers/Adminer/pepa-linha-dark/adminer.css': mkdir /c/Servers/Docker/Containers/Adminer/pepa-linha-dark/adminer.css: file exists"}

I'm running on Win 10 x64 (Version 10.0.18363.657])

@stephen-turner
Copy link
Contributor

FWIW, docker run wordpress:apache and docker run php:apache both work fine for me.

@STaRDoGG
Copy link
Author

STaRDoGG commented Feb 13, 2020

@stephen-turner

FWIW, docker run wordpress:apache and docker run php:apache both work fine for me.

Weird, I just now tried it again:

docker

Any idea what could be causing it on my end?

@stephen-turner
Copy link
Contributor

Sorry, not at the moment, I'm puzzled.

@STaRDoGG
Copy link
Author

STaRDoGG commented Feb 14, 2020

@stephen-turner Thanks for helping to sort this out with me.

I did come across that before as well, but in the case of simply running: docker run wordpress:apache without any mounts specified, I still get it, which makes no sense to me. Then again, I'm not anywhere near a Linux guru, so it might boil down to something simple I'm missing that I just don't know about.

I was wondering if maybe it had something to do with the actual VM that these containers are running in? I'm not sure of how it all works, but I thought in Docker Desktop, a Hyper-V VM is made, then it installs a Linux OS in it, which runs all of these containers?

I could have it wrong, as I'm still in the learning phase of all of this, but I was thinking if that's the case, maybe something's borked in the VM's linux file system or something.

@stephen-turner
Copy link
Contributor

You're correct about the architecture, @STaRDoGG. I'm still confused though, sorry!

@FibreFoX
Copy link

This started to be a problem from version 2.2.0.x. I recently updated docker-desktop (using chocolatey) from 2.1.x.x to 2.2.0.3 and had strange problems since, unable to use it.

So I assume the VM in Hyper-V did not get updated, or something else changed?!

@FibreFoX
Copy link

Reverting to an older version of docker-desktop via chocolately helped me.

choco uninstall docker-desktop
choco install docker-desktop --version=2.1.0.5 --allow-downgrade

@STaRDoGG
Copy link
Author

@FibreFoX Just out of curiosity, how much free space do you have?

Try this:

docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh

And then to see file system stats: df -h

image

@liorshk
Copy link

liorshk commented Mar 26, 2020

I got the same error. Not sure why @FibreFoX answer solved it (reverted to 2.1.0.5)

@mhughes2k
Copy link

mhughes2k commented Apr 4, 2020

I seem to be getting this same issue but on OSX:
ERROR: failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/0ad84af3143bb919fd20db8dad37a5faf66b2371baf2a27b4a8c236eeafdbd69/merged: too many levels of symbolic links

It appears to be trying to pull an image for MySQL.

Version 2.2.0.5 (43884)

@FibreFoX
Copy link

FibreFoX commented Apr 4, 2020

A colleague of mine tried to import docker-images that I exported with my "2.1.0.5"-version, he was on "2.2.0.4"-version. He was not able to start the container. I am not able to provide that export due to "payed work content" ;) but wanted to share these details with you.

@Neutrino3316
Copy link

I have the same problem.
When I try to pull a image, this error occurs:

failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/4fd249b68d166ef63e7c648e3ded05ac44f129f494fb4e468efb49e65581d06f/merged: too many levels of symbolic links

@mchudinov
Copy link

mchudinov commented Apr 19, 2020

same problem. Docker desktop for Windows with Linux containers.
Same setup for Windows containers works fine.

docker info:
`$ docker info
Client:
Debug Mode: false
Plugins:
app: Docker Application (Docker Inc., v0.8.0)
buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)

Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 3
Server Version: 19.03.8
Storage Driver: overlay2
Backing Filesystem:
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.76-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 2.678GiB
Name: docker-desktop
ID: IQTA:DH6C:3VNV:BPLM:2B52:ILAA:EDV7:4VYF:7MY4:ETIO:NOI5:GVC3
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 34
Goroutines: 50
System Time: 2020-04-19T21:58:11.898404295Z
EventsListeners: 3
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
docker build error:$ docker build --file ./Backend/Orleans/Silo/Dockerfile --tag backend-orleans-silo .
Sending build context to Docker daemon 1.498MB
Step 1/15 : FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
---> fee92e5c81eb
Step 2/15 : WORKDIR /app
error creating overlay mount to /var/lib/docker/overlay2/67bb6e16395fde564c918c4b7d8cc54f641d02a4a9372922d291b2d999548071-init/merged: too many levels of symbolic links`

@FibreFoX
Copy link

Just a short update: I tried to uninstall everything, deleted all Hyper-V VM-files, restarted my system and installed via chocolatey again. The current version is 2.3.0.3 which seems to work again for me. Maybe others on this issue-ticket can try to verify this?!

@mihaipanait
Copy link

I have the same issue running docker-compose on this repo: https://github.com/devnix/prestashop-docker-compose
After it fails I have to restart docker in order to try again.
2020-06-19 22_08_44-About Docker Desktop

@FibreFoX
Copy link

@mihaipanait did you fresh-install docker-desktop, or did you upgrade your version from a previous one?

@mihaipanait
Copy link

mihaipanait commented Jun 19, 2020

I did an upgrade.
Strange thing, windows update just finished updating my system to 1909 and suddenly everything works like a charm. I used to have Windows 10, version 1809 before.
After the update i was able to run docker-compose on that repo without issues. I haven't reinstalled Docker after the update. It simply worked.

@Neutrino3316
Copy link

I did an upgrade.
Strange thing, windows update just finished updating my system to 1909 and suddenly everything works like a charm. I used to have Windows 10, version 1809 before.
After the update i was able to run docker-compose on that repo without issues. I haven't reinstalled Docker after the update. It simply worked.

Thanks for your suggestion, it worked! I'm able to pull the latest image of sharelatex in Windows 10 version 1909 with Docker Desktop 2.2.0.3(42716)
I didn't change anything except for the auto update of Windows 10

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@flatline-studios
Copy link

flatline-studios commented Oct 15, 2020

/remove-lifecycle stale

This is still an issue, I'm encountering it simply attempting to docker pull ousefulcoursecontainers/ou-tm351:current.

It reaches the largest layer, gets to about 95% of the way through extracting it, then fails.

@markoueis
Copy link

markoueis commented Oct 29, 2020

We are getting this as well:
Pulling blabla (/docker/blabla:8.10.0-103)...
ERROR: failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/1e2a6a31a7a53cd712a163b08038cea72f3815dcf55037b92e11e45c5f81dd9a/merged: too many levels of symbolic links.

Nothing has changed anywhere from our end as far as we know. Seems intermittent and only happening on a few boxes

Using 2.4.0.0

@cpaton
Copy link

cpaton commented Nov 3, 2020

Also getting this. Seen the problem pulling various different images, and even building an image for the first time today.

Docker Desktop: 2.5.0.0 (49427)
OS: Windows 10 1909 using WSL 2

Also for the first time today I got a different error which crashed docker desktop part way through pulling the image.

time="2020-11-03T20:43:42Z" level=error msg="error waiting for container: invalid character 'u' looking for beginning of value"

Then after starting docker desktop I get the following error pulling the same image

docker: failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/24d699731f4bfbee54790254b6f76bbf8ae2e6da7f44d660653938cb73924e04/merged: too many levels of symbolic links.

So far the Clean / Purge data option under the troubleshoot section of docker desktop resolves the problem. i.e. after using that option and with no changes to the image the pull will work. Then a few pulls later of different images I get the "too many levels of symbolic links." error again and have to go round the loop of purging all data and pulling all images

@IlyaZha
Copy link

IlyaZha commented Nov 4, 2020

Same problem here. Windows10 ver 1909, docker desktop 2.4, 2.5. Problem happens with image phpmyadmin/phpmyadmin
Error message:
error creating overlay mount to /var/lib/docker/overlay2/3494feccb057663d3deb9919e27a0492623084c39e48e3184e45a86e67fc22c0/merged: too many levels of symbolic links

Edit: I've fixed the problem. Mention me to know how.

@FibreFoX
Copy link

FibreFoX commented Nov 4, 2020

Being on Windows 10 20H2, docker-desktop 2.4.0.0 running on HyperV-based system I have not had any problem yet.

@flatline-studios
Copy link

Being on Windows 10 20H2, docker-desktop 2.4.0.0 running on HyperV-based system I have not had any problem yet.

Why are you posting here?

@FibreFoX
Copy link

FibreFoX commented Nov 5, 2020

Being on Windows 10 20H2, docker-desktop 2.4.0.0 running on HyperV-based system I have not had any problem yet.

Why are you posting here?

Because I had this issue some time ago (even reported here too). But to nail the issue down, it is important to have some more information, like it this is always broken or just on some machines.
I personally assume that the used HyperV-machine is somewhat broken, due to several updates (not sure if windows-updates or docker-desktop-updates), but can not confirm this. When others could try to upgrade their machine (on their own responsability), and re-try, they might get a working docker-desktop system again.

@kmkvc3
Copy link

kmkvc3 commented Nov 26, 2020

I my case, deleting ALL IMAGES and building it again helped

@kaplanerbil
Copy link

Same issue occurred to me. I think It was related to not having enough disk space when pulling images. It worked after deleting all images

@AbyssalWhale
Copy link

I had enough space and made downgrade to version=2.1.0.5 but it didn't work out for me.
What helped:

  1. PowerShell to remove all images: $images = docker images -a -q foreach ($image in $images) { docker image rm $image -f }
  2. install chocolatey;
  3. cmd to removed docker: choco uninstall docker-desktop - remove docker
  4. reboot;
  5. cmd: choco install docker-desktop --version=2.1.0.5 --allow-downgrade -

@barisozakar
Copy link

I my case, deleting ALL IMAGES and building it again helped

Thanks, this solved my problem.

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@Hadh
Copy link

Hadh commented Sep 14, 2021

@zhernosekim hey, how did you fix this error?

@warpech
Copy link

warpech commented Oct 6, 2021

I had the same problem in Windows using Docker Desktop 4.1.0 (69386).

My solution: Launch the GUI and go to Settings > Troubleshoot > Clean / Purge data.

More information:

I think that the problem was caused by running out of free disk space while downloading an image. Then, after I cleaned up more disk space, Docker was still not able to download an image. It broke every time on the same chunk, with the following error:

failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/0b0929964971d19e9741bd430f885a3407efb355f5b8f98cc83cc5e7a0c47e01/merged: too many levels of symbolic links
error Command failed with exit code 18.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@IlyaZha
Copy link

IlyaZha commented Oct 6, 2021

@Hadh I deleted docker desktop and all its folders manually. Everything worked correctly after reinstalling.

@lrq3000
Copy link

lrq3000 commented Oct 22, 2021

Same issue with the latest Docker Desktop on Windows using a Seafile docker. It used to work. But it just stopped working someday. Seems like it's a heisenbug.

@warpech 's suggested solution to purge data did not help either.

@IlyaZha
Copy link

IlyaZha commented Oct 22, 2021

@lrq3000 Try to delete the app, all its folders and reinstall.

@lrq3000
Copy link

lrq3000 commented Oct 23, 2021

@zhernosekim Obviously I will try that at some point, but this is really not an adequate solution. First because then I have to reconfigure everything in the docker, from the app's config to tweaking SSL certificate config and other NGINX parameters, which took me a full week, but also what if I didn't have a local backup of the user files, which are encrypted in the app?

This issue really needs to be fixed, Docker on Windows is too unreliable for production use in the current state, that's very unfortunate.

@Buratinator
Copy link

tl;dr: freeing up RAM helped me.

Good day y'all. I got here looking for a solution to the failed to register layer: error creating overlay mount to [...]: too many levels of symbolic links error when trying to pull a 3.6GB image from a web repo. I had enough disk space, but got a hunch about RAM after reading this thread, so I closed some of the more RAM-hungry apps (looking at you, Firefox). Then I watched RAM usage while pulling again, and the vemm process consumed over 6GB at the end of the process, successfully finishing at last (and not releasing RAM after closing docker, so I had to do wsl --shutdown to free up the memory.

@lrq3000
Copy link

lrq3000 commented Nov 18, 2021

Freeing RAM was not an issue in my case. I have 32 GB of RAM and no other app running but Docker and 3 containers when the issue happened after a reboot (it didn't before the reboot). Nothing changed, just a reboot and a relaunch of the containers, and the error appeared.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

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

No branches or pull requests