Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unknown error after kill did not terminate sucessfully: signaling init process caused "permission denied"\n: unknown'

I am trying to startup or some docker containers or at least busy with the docker containers. After first installation every thing whas working perfect. and dint do any thing different than just docker-compose up down stop restart and also making some wordpress containers and PHPmyadmin and MariaDB. But now when i try to shutdown the docker container it gives me permissions denied.

I have search every thing so far on the web like adding www-data to the groups or try with sudo to kill it. Removet the containers and images with out any results.

david@david-Notebook-P14:~/Desktop/docker-projects$ docker-compose up
Starting mailhog                        ... done
Starting docker-projects_wordpress_db_1 ... done
Starting docker-projects_wordpress_1    ... done
Starting docker-projects_phpmyadmin_1   ... done
Attaching to docker-projects_wordpress_db_1, mailhog, docker-projects_wordpress_1, docker-projects_phpmyadmin_1
wordpress_db_1  | 2019-05-14  8:13:31 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
mailhog         | 2019/05/14 08:13:30 Using in-memory storage
mailhog         | 2019/05/14 08:13:30 [SMTP] Binding to address: 
mailhog         | 2019/05/14 08:13:30 Serving under http://0.0.0.0:8025/
mailhog         | [HTTP] Binding to address: 0.0.0.0:8025
mailhog         | Creating API v1 with WebPath: 
mailhog         | Creating API v2 with WebPath: 
wordpress_1     | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
wordpress_1     | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
wordpress_1     | [Tue May 14 08:13:34.311188 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.18 configured -- resuming normal operations
wordpress_1     | [Tue May 14 08:13:34.345515 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
^CGracefully stopping... (press Ctrl+C again to force)
Stopping docker-projects_wordpress_1    ... error
Stopping docker-projects_phpmyadmin_1   ... error
Stopping mailhog                        ... error
Stopping docker-projects_wordpress_db_1 ... error


ERROR: for docker-projects_phpmyadmin_1  b'cannot stop container: 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: Cannot kill container 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
david@david-Notebook-P14:~/Desktop/docker-projects$ docker-compose down
Stopping docker-projects_wordpress_1    ... error
Stopping docker-projects_phpmyadmin_1   ... error
Stopping mailhog                        ... error
Stopping docker-projects_wordpress_db_1 ... error

ERROR: for mailhog  b'cannot stop container: 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: Cannot kill container 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'

ERROR: for docker-projects_wordpress_1  b'cannot stop container: 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: Cannot kill container 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'

ERROR: for docker-projects_phpmyadmin_1  b'cannot stop container: 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: Cannot kill container 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
david@david-Notebook-P14:~/Desktop/docker-projects$ ps aux | grep dockerd
root      1120  0.3  1.8 493900 71232 ?        Ssl  09:32   0:08 dockerd -G docker --exec-root=/var/snap/docker/384/run/docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/var/snap/docker/384/run/docker.pid --config-file=/var/snap/docker/384/config/daemon.json --debug
root      1559  0.0  1.0 781576 40784 ?        Ssl  09:32   0:01 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
david     6053  0.0  0.0  21540  1076 pts/0    S+   10:17   0:00 grep --color=auto dockerd
david@david-Notebook-P14:~/Desktop/docker-projects$ sudo docker-compose down
[sudo] password for david: 
Stopping docker-projects_wordpress_1    ... error
Stopping docker-projects_phpmyadmin_1   ... error
Stopping mailhog                        ... error
Stopping docker-projects_wordpress_db_1 ... error

ERROR: for docker-projects_phpmyadmin_1  b'cannot stop container: 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: Cannot kill container 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'

ERROR: for mailhog  b'cannot stop container: 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: Cannot kill container 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'

ERROR: for docker-projects_wordpress_1  b'cannot stop container: 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: Cannot kill container 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'

I hope to get this permission problem solved. So far i cant find any solutions than hope some one could help me with this.

Thanks alot already

like image 736
david berg Avatar asked May 14 '19 08:05

david berg


People also ask

How do I force kill a docker container?

docker rm -f The final option for stopping a running container is to use the --force or -f flag in conjunction with the docker rm command. Typically, docker rm is used to remove an already stopped container, but the use of the -f flag will cause it to first issue a SIGKILL.

Could not kill running container Cannot remove tried to kill container but did not receive an exit event?

Restart the docker service: sudo systemctl restart docker. service. Restart the Host Machine. Enter inside the container docker exec -it ContainerName /bin/bash and then Kill the container kill 1.

How stop Containerd service in Linux?

To stop the docker process that is already running you can just press ctrl + c or send a kill signal to it.


1 Answers

I got the solution:

[OPTIONAL] Just use sudo systemctl stop apparmor && systemctl disable apparmor

After restarting docker using sudo service docker restart and then run reboot

This will solve the issue.

like image 183
ankit Avatar answered Oct 02 '22 12:10

ankit