Issue with docker permission denied when trying to reboot dockers

designator09

Junior Member
Original poster
Local time
10:15 PM
Feb 4, 2019
20
3
So I installed plexguide on a 18.04 server bare installation, seemed to work good, no errors besides a failure to reboot dockers permission denied error, dockers still worked so I over looked them.

Now when I installed all the apps and configured them, I rebooted the machine. When it came back up portainer would still work and told me I do not have any installed images or dockers. I went into pg apps and select uninstall and it said no installed apps. exited plexguide and docker said I do not have any containers running but images and dockers are there.

I decided to start all over, I uninstalled and reinstalled with out a issue, I was setting up the pg clone and I got the docker restart error again. included is the install log erros after I setup my api.

TASK [Stop All Docker Containers] **********************************************
Wednesday 06 February 2019 02:31:43 -0500 (0:00:00.098) 0:00:00.098 ****
fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": "docker stop $(docker ps -a -q)", "delta": "0:00:02.150434", "end": "2019-02-06 02:31:45.930156", "msg": "non-zero return code", "rc": 1, "start": "2019-02-06 02:31:43.779722", "stderr ": "Error response from daemon: cannot stop container: 5d75ac852f8d: Cannot kill container 5d75ac852f8d417b8df6fa5a9144e089d069e632a8a8fac1f4242053a7ffa09c: unk nown error after kill: docker-runc did not terminate sucessfully: container_linu x.go:393: signaling init process caused \"permission denied\"\n: unknown\nError response from daemon: cannot stop container: d1a93f46a784: Cannot kill container d1a93f46a7842548b6a7d1bd185160bfe5637297f8b9ffabb167122708782fb9: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused \"permission denied\"\n: unknown", "stderr_lines": ["Error response from daemon: cannot stop container: 5d75ac852f8d: Cannot kill container 5d75ac852f8d417b8df6fa5a9144e089d069e632a8a8fac1f4242053a7ffa09c: unkn own error after kill: docker-runc did not terminate sucessfully: container_linux .go:393: signaling init process caused \"permission denied\"", ": unknown", "Err or response from daemon: cannot stop container: d1a93f46a784: Cannot kill contai ner d1a93f46a7842548b6a7d1bd185160bfe5637297f8b9ffabb167122708782fb9: unknown er ror after kill: docker-runc did not terminate sucessfully: container_linux.go:39 3: signaling init process caused \"permission denied\"", ": unknown"], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/opt/pgclone/pgservices.retry

PLAY RECAP *********************************************************************
127.0.0.1 : ok=0 changed=0 unreachable=0 failed=1

Wednesday 06 February 2019 02:31:45 -0500 (0:00:02.440) 0:00:02.538 ****
===============================================================================
Stop All Docker Containers ---------------------------------------------- 2.44s


TASK [Register HD Path] *************************************************************************************************************************************
Wednesday 06 February 2019 02:32:14 -0500 (0:00:02.253) 0:00:14.701 ****
changed: [127.0.0.1]

TASK [Restart All Docker Containers] ************************************************************************************************************************
Wednesday 06 February 2019 02:32:14 -0500 (0:00:00.158) 0:00:14.860 ****
fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": "docker restart $(docker ps -a -q)", "delta": "0:00:04.196985", "end": "2019-02-06 02:32:18.888763", "msg": "non-zero return code", "rc": 1, "start": "2019-02-06 02:32:14.691778", "stderr": "Error response from daemon: Cannot restart container 5d75ac852f8d: Cannot kill container 5d75ac852f8d417b8df6fa5a9144e089d069e632a8a8fac1f4242053a7ffa09c: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused \"permission denied\"\n: unknown\nError response from daemon: Cannot restart container d1a93f46a784: Cannot kill container d1a93f46a7842548b6a7d1bd185160bfe5637297f8b9ffabb167122708782fb9: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused \"permission denied\"\n: unknown", "stderr_lines": ["Error response from daemon: Cannot restart container 5d75ac852f8d: Cannot kill container 5d75ac852f8d417b8df6fa5a9144e089d069e632a8a8fac1f4242053a7ffa09c: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused \"permission denied\"", ": unknown", "Error response from daemon: Cannot restart container d1a93f46a784: Cannot kill container d1a93f46a7842548b6a7d1bd185160bfe5637297f8b9ffabb167122708782fb9: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused \"permission denied\"", ": unknown"], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/opt/pgclone/pgunion.retry

PLAY RECAP **************************************************************************************************************************************************
127.0.0.1 : ok=24 changed=20 unreachable=0 failed=1
 

Admin9705

Administrator
Project Manager
Local time
10:15 PM
Jan 17, 2018
4,760
1,809
your having an actual docker-docker issue; it would be more widespread. I don't know much about it, but either someone who is more experienced; or you may have to post their github why it's occuring. it's the first post i've seen and docker in pg hasn't been changed since summer 2018.
 

Swipular

Junior Member
Local time
9:15 PM
Dec 20, 2018
23
2
Docker permission problems can be a real pain to track down. However, all the PG stuff should be running as root which should have full permission.

I would start by trying that command "docker restart $(docker ps -a -q)" as root. You should get no error. If you do your docker install is broken in some way. If you do not get an error then it's something in the way you are running the PG stuff.
 

designator09

Junior Member
Original poster
Local time
10:15 PM
Feb 4, 2019
20
3
Swipular you may be on something here, I did the command both as my sudo user and root iself and got the same issue

[email protected]:~$ sudo docker restart $(docker ps -a -q)
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/json?all=1: dial unix /var/run/docker.sock: connect: permission denied
"docker restart" requires at least 1 argument.
See 'docker restart --help'.

Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]

Restart one or more containers
[email protected]:~$ sudo su
[email protected]:/home/eric# docker restart $(docker ps -a -q)
d1a93f46a784
Error response from daemon: Cannot restart container 5d75ac852f8d: Cannot kill container 5d75ac852f8d417b8df6fa5a9144e089d069e632a8a8fac1f4242053a7ffa09c: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"
: unknown

So I fixed it, I reinstalled docker-ce that was not needed, but adding the user to docker group was needed so
Code:
    sudo usermod -a -G docker $USER
Im guessing your sudo code also needs the -a and -G seperated also, now im getting this error again

TASK [Deploying emby] **********************************************************
Wednesday 06 February 2019 12:18:34 -0500 (0:00:00.025) 0:00:02.640 ****
An exception occurred during task execution. To see the full traceback, use -vvv . The error was: docker.errors.NotFound: 404 Client Error: Not Found ("network p lexguide not found")
fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "Traceback (m ost recent call last):\n File \"/tmp/ansible_hNHDlF/ansible_module_docker_conta iner.py\", line 2162, in <module>\n main()\n File \"/tmp/ansible_hNHDlF/ansi ble_module_docker_container.py\", line 2157, in main\n cm = ContainerManager( client)\n File \"/tmp/ansible_hNHDlF/ansible_module_docker_container.py\", line 1777, in __init__\n self.parameters = TaskParameters(client)\n File \"/tmp/ ansible_hNHDlF/ansible_module_docker_container.py\", line 808, in __init__\n self.published_ports = self._parse_publish_ports()\n File \"/tmp/ansible_hNHDlF /ansible_module_docker_container.py\", line 1039, in _parse_publish_ports\n d efault_ip = self.default_host_ip\n File \"/tmp/ansible_hNHDlF/ansible_module_do cker_container.py\", line 1022, in default_host_ip\n network = self.client.in spect_network(net['name'])\n File \"/usr/local/lib/python2.7/dist-packages/dock er/utils/decorators.py\", line 19, in wrapped\n return f(self, resource_id, * args, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/docker/api/netw ork.py\", line 212, in inspect_network\n return self._result(res, json=True)\ n File \"/usr/local/lib/python2.7/dist-packages/docker/api/client.py\", line 26 2, in _result\n self._raise_for_status(response)\n File \"/usr/local/lib/pyt hon2.7/dist-packages/docker/api/client.py\", line 258, in _raise_for_status\n raise create_api_error_from_http_exception(e)\n File \"/usr/local/lib/python2. 7/dist-packages/docker/errors.py\", line 31, in create_api_error_from_http_excep tion\n raise cls(e, response=response, explanation=explanation)\ndocker.error s.NotFound: 404 Client Error: Not Found (\"network plexguide not found\")\n", "m odule_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/opt/plexguide/containers/emby.retry
 
Last edited:

designator09

Junior Member
Original poster
Local time
10:15 PM
Feb 4, 2019
20
3
fixed the permissions thing, I disabled app armor and it fixed all the permission issues
Code:
For anyone that does not wish to completely purge AppArmor.

Check status: sudo aa-status

Shutdown and prevent it from restarting:

sudo systemctl disable apparmor.service --now

Unload AppArmor profiles:

sudo service apparmor teardown

Check status: sudo aa-status

You should now be able to stop/kill containers.
Now im having issues installing apps... Had better luck installing everything on bare 18.04 then this program.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
? PGBox ~ Multi-App Installer ? Reference: pgbox.plexguide.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

? Potential Apps to Install

emby jackett jellyfin lazylibrarian lidarr netdata nzbget
nzbhydra ombi plex portainer qbittorrent radarr rutorrent
sabnzbd sonarr tautulli

? Apps Queued for Installation

emby

? Quitting? TYPE > exit | ? Ready to Install? TYPE > deploy
? Type APP for QUEUE | Press [ENTER]: deploy
ERROR -- No APP Queued for Install!

⛔ ERROR - Bad Input! | Press [ENTER]
only command it allows is exit APP or deploy get same error
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.


Staff online

Maintenance Donations

Recommend NewsGroups

      Up To a 58% Discount!

Trending