0

About 99% of the time when I try to stop or rm a ddev project I get a 'permission denied' error, and then have to try a lot of different means to get ddev back to a healthy state so I can start working again. Then it happens all over again the next time I come to work on the project.

Can anyone suggest a) the quickest means to break out of this when I am unable to stop a docker container or ddev project b) a means to work out why it keeps happening and fix it?

To mitigate this I have tried:

ddev stop ddev rm -a ddev rm ddev stop Docker stop Updating ddev Upgrading docker Restarting the machine (occasionally works) Using the docker kill command

I am working on a linux machine Ubuntu 18.04 Ddev version is v1.8.0 Docker is 18.09.6, build 481bc77

Thank you!!

I would expect to be able to stop and start projects easily but seem to have been getting a permissions error about 99% of the time. I have not identified why it sometimes on the rare occasion works fine.

Stopping ddev-lpntheme-dba ... error
Stopping ddev-lpntheme-web ... error
Stopping ddev-lpntheme-db  ... error

ERROR: for ddev-lpntheme-web  cannot stop container: 761c2f876230df13267d3d2a7c5d92c869d796a41f1b45cf1c9831ee6673740f: Cannot kill container 761c2f876230df13267d3d2a7c5d92c869d796a41f1b45cf1c9831ee6673740f: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied" 
: unknown 

ERROR: for ddev-lpntheme-dba  cannot stop container: e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf: Cannot kill container e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied" 
: unknown 
Removing container: ddev-lpntheme-dba 
Failed to remove project lpntheme: 
could not remove container ddev-lpntheme-dba: API error (500): Could not kill running container e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf, cannot remove - Cannot kill container e5165f70b0b949aef305af013f4aae762968aa0afa99cf6f397c6960048a76bf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown 

I've also managed to completely break the Docker daemon in the past trying to resolve this problem. (I was following this and didn't really know what I was doing How to stop running Container, if error response from daemon is: Cannot Kill Container [...] permission denied?)

Any help greatly appreciated!


More info from 7/6/19

crispin@sonic:~/dockerfolder/ToolLibraryProject$ ddev start
Starting ToolLibraryProject... 
Recreating ddev-ssh-agent ... done

ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys. 
Running Command  Command=ip address show dev docker0
Creating volume "ToolLibraryProject-mariadb" with default driver 
Creating ddev-ToolLibraryProject-db ... done
Creating ddev-ToolLibraryProject-web ... done
Creating ddev-ToolLibraryProject-dba ... done

Recreating ddev-router ... done

Ensuring write permissions for ToolLibraryProject 
Successfully started ToolLibraryProject 
Project can be reached at https://ToolLibraryProject.ddev.local, http://ToolLibraryProject.ddev.local, https://127.0.0.1:32771, http://127.0.0.1:32772 
crispin@sonic:~/dockerfolder/ToolLibraryProject$ ls
composer.json  config  LICENSE               phpunit.xml.dist  scripts  web
composer.lock  drush   load.environment.php  README.md         vendor
crispin@sonic:~/dockerfolder/ToolLibraryProject$ ls

composer.json  config  LICENSE               phpunit.xml.dist  scripts  web
composer.lock  drush   load.environment.php  README.md         vendor
crispin@sonic:~/dockerfolder/ToolLibraryProject$ 
crispin@sonic:~/dockerfolder/ToolLibraryProject$ ddev stop
Stopping ddev-ToolLibraryProject-web ... error
Stopping ddev-ToolLibraryProject-dba ... error
Stopping ddev-ToolLibraryProject-db  ... error

ERROR: for ddev-ToolLibraryProject-web  cannot stop container: 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3: Cannot kill container 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied" 
: unknown 

ERROR: for ddev-ToolLibraryProject-dba  cannot stop container: cc2209064e0103fdab638445aeac2206217c83a17a7b97eea2216440bb5bb4e2: Cannot kill container cc2209064e0103fdab638445aeac2206217c83a17a7b97eea2216440bb5bb4e2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied" 
: unknown 
Removing container: ddev-ToolLibraryProject-web 
Failed to remove project ToolLibraryProject: 
could not remove container ddev-ToolLibraryProject-web: API error (500): Could not kill running container 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3, cannot remove - Cannot kill container 3485d615d2dfa46884493b91d7339b06834594fcb46f870cfe60a0486b87f1d3: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown 


And with docker logs ToolLibraryProject I get Error: No such container: ToolLibraryProject Regarding file system I hope this makes sense:

/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
  • What filesystem are you working with? The weird thing is the dba container won't stop either. It doesn't have a mount or anything. Anyway, if you can provide an explicit recipe that makes this happen, step by step, I'll definitely try to reproduce. – rfay Jun 02 '19 at 15:30
  • When this happens, please do docker logs on each of the failed containers – rfay Jun 02 '19 at 15:36
  • Have never seen this happen, so trying to suggest things that might work. Is it possible you're out of disk space? What does `df -Th` show you? That will show us both the type and the fullness of the filesystems. If you're running ddev on a network file system of some type (NFS or other) that might be the issue. – rfay Jun 02 '19 at 21:17
  • Thanks! It's happened again today, so here's what I got: – Nicola Bell Jun 07 '19 at 15:37
  • (I've updated the original post) – Nicola Bell Jun 07 '19 at 15:51
  • I hoped for `df -Th` on the host, that would tell us about your overall space and types of filesystems, which could be super important. The logs commands would be `docker logs ddev-ToolLibraryProject-web` and `docker logs ddev-ToolLibraryProject-db` and `docker logs ddev-ToolLibraryProject-dba` – rfay Jun 08 '19 at 01:45
  • The logs commands would be `docker logs ddev-ToolLibraryProject-web` and `docker logs ddev-ToolLibraryProject-db` and `docker logs ddev-ToolLibraryProject-dba`; I'm a bit shocked to see a boot filesystem of type vfat `/dev/sda1 on /boot/efi type vfat` ??? That's vfat as in Windows 95 FAT, which has no business on a Linux system. Not sure what you've got there. Anyway, please try again on the `df -Th` and the docker logs. You can do the `df -Th` anytime. Obviously the logs only when you have the problem. Remember `docker ps -a` which shows all the containers that are real and out there. – rfay Jun 08 '19 at 01:53
  • Maybe you could say a little about the history of this Ubuntu 18.04 machine? – rfay Jun 08 '19 at 01:54

0 Answers0