# Portainer Fails to Launch, Install, or Re-Install \[SOLVED\]

**URL:** https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862
**Category:** Troubleshooting
**Created:** [6 February 2023 22:15 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862 "2023-02-06T22:15:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dwr](https://dietpi.com/forum/user_avatar/dietpi.com/dwr/32/86_2.png) [@dwr](https://dietpi.com/forum/u/dwr)
#### Post date: [6 February 2023 22:15 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/1 "2023-02-06T22:15:05Z")

</div>

#### Workaround:

```auto
apt install apparmor
systemctl disable --now apparmor

```

Also, check out the links provided by **Joulinar** below…

* * *

#### Summary:

I noticed a similiar Troubleshooting topic made by someone in this forum, but it doesn’t seem like the same thing so I am posting my issue as well… although he mentions AppArmor as being a potential issue, and as you can see in the logs below AppArmor also seems to be causing havoc?

* * *

#### Details:

- Date | Mon Feb 6 16:01:47 CST 2023
- Bug report | 1c7734ed-672e-4791-a7c4-fda2e810e1c4
- DietPi version | v8.13.2 (MichaIng/master)
- Image creator | DietPi Core Team
- Pre-image | from scratch
- Hardware | Native PC (x86\_64) (ID=21)
- Kernel version | `Linux DellPi 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux`
- Distro | bullseye (ID=6)
- Command | `docker run -d -p 9002:9000 --name=portainer --restart=always -v /run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce`
- Exit code | 127
- Software title | DietPi-Software

#### Steps to reproduce:

1. Run `dietpi-software reinstall 185`.  
OR
2. Run `dietpi-software install 185`.

#### Expected behaviour:

- Portainer should reinstall.

#### Actual behaviour:

- Portainer Fails to Download and Install.

#### Extra details:

- I noticed that I was unable to access Portainer earlier today so I attempted to access some of the Docker Containers but all access failed (`Unable to Connect` error showed in my browser). I then checked my other two Portainer/Docker installations on other computers and found that 1 of the 2 instances are experiencing the same issue with the same error as shown in this log. I am not certain as to why 1 out of the 3 is still working, but I have a feeling that it has to do with the recent updates to Docker.

- I also tried uninstalling Portainer and reinstalling Docker on both of the problematic machines, but recieved the same errors.

- Note: All Portainer/Docker instances are being run on x86\_64 machines with similiar specs.

#### Additional logs:

```auto
Unable to find image 'portainer/portainer-ce:latest' locally
latest: Pulling from portainer/portainer-ce
772227786281: Pulling fs layer
96fd13befc87: Pulling fs layer
0bad1d247b5b: Pulling fs layer
b5d1b01b1d39: Pulling fs layer
b5d1b01b1d39: Waiting
96fd13befc87: Download complete
772227786281: Verifying Checksum
772227786281: Download complete
772227786281: Pull complete
96fd13befc87: Pull complete
b5d1b01b1d39: Verifying Checksum
b5d1b01b1d39: Download complete
0bad1d247b5b: Verifying Checksum
0bad1d247b5b: Download complete
0bad1d247b5b: Pull complete
b5d1b01b1d39: Pull complete
Digest: sha256:f7607310051ee21f58f99d7b7f7878a6a49d4850422d88a31f8c61c248bbc3a4
Status: Downloaded newer image for portainer/portainer-ce:latest
99a47932dd4740c7ab4dbe1f507f526e822748c5ba40f00efa495f2159bd7fd6
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output:
error: exec: "apparmor_parser": executable file not found in $PATH.

```

* * *

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [6 February 2023 22:19 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/2 "2023-02-06T22:19:25Z")

</div>

see [DietPi-Software | Docker: Service fails to start after upgrade (AppArmor) · Issue #6126 · MichaIng/DietPi · GitHub](https://github.com/MichaIng/DietPi/issues/6126)

It’s an issue in Docker v23 [Docker Engine 23.0 release notes | Docker Documentation](https://docs.docker.com/engine/release-notes/23.0/#known-issues)

---

<div class="post-metadata">

### Author: ![dwr](https://dietpi.com/forum/user_avatar/dietpi.com/dwr/32/86_2.png) [@dwr](https://dietpi.com/forum/u/dwr)
#### Post date: [6 February 2023 22:23 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/3 "2023-02-06T22:23:34Z")

</div>

Running `journalctl -u docker.service` returns the following after running `dietpi-software reinstall 185`:

```auto
Feb 06 16:01:28 DellPi systemd[1]: Stopping Docker Application Container Engine...
Feb 06 16:01:28 DellPi systemd[1]: docker.service: Succeeded.
Feb 06 16:01:28 DellPi systemd[1]: Stopped Docker Application Container Engine.
Feb 06 16:01:40 DellPi systemd[1]: Started Docker Application Container Engine.
Feb 06 16:01:40 DellPi dockerd[8499]: time="2023-02-06T16:01:40.695294506-06:00" level=error msg="AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: \nerror: exec: \"apparmor_parser\": executable file not found in $PATH"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.235219424-06:00" level=error msg="fafa1b52e72dacec75daccb4ad56467d817beb4ac3188b241fbdfb9f04ccf561 cleanup: failed to delete container from containerd: no such container"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.235244946-06:00" level=error msg="failed to start container" container=fafa1b52e72dacec75daccb4ad56467d817beb4ac3188b241fbdfb9f04ccf561 error="AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: \nerror: exec: \"apparmor_parser\": executable file not found in $PATH"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.235221501-06:00" level=error msg="d7df42f68a2e4ad907c8463cb3ac3a2e3aadf78a622965210713d39f5f678426 cleanup: failed to delete container from containerd: no such container"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.235269476-06:00" level=error msg="failed to start container" container=d7df42f68a2e4ad907c8463cb3ac3a2e3aadf78a622965210713d39f5f678426 error="AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: \nerror: exec: \"apparmor_parser\": executable file not found in $PATH"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.552565641-06:00" level=error msg="e6a69e130c3ba34270e0aa72b22b9c03e975bf43e81c3151160be4fdab32a77c cleanup: failed to delete container from containerd: no such container"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.552605585-06:00" level=error msg="failed to start container" container=e6a69e130c3ba34270e0aa72b22b9c03e975bf43e81c3151160be4fdab32a77c error="AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: \nerror: exec: \"apparmor_parser\": executable file not found in $PATH"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.586563514-06:00" level=error msg="022a0ea4974a88754bbf07cb2ace1b283dc8ed0cd6b14bd1b2921234ddc7f05a cleanup: failed to delete container from containerd: no such container"
Feb 06 16:01:41 DellPi dockerd[8499]: time="2023-02-06T16:01:41.586583365-06:00" level=error msg="failed to start container" container=022a0ea4974a88754bbf07cb2ace1b283dc8ed0cd6b14bd1b2921234ddc7f05a error="AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: \nerror: exec: \"apparmor_parser\": executable file not found in $PATH"
Feb 06 16:01:47 DellPi dockerd[8499]: time="2023-02-06T16:01:47.158403546-06:00" level=error msg="99a47932dd4740c7ab4dbe1f507f526e822748c5ba40f00efa495f2159bd7fd6 cleanup: failed to delete container from containerd: no such container"
Feb 06 16:01:47 DellPi dockerd[8499]: time="2023-02-06T16:01:47.158428141-06:00" level=error msg="Handler for POST /v1.42/containers/99a47932dd4740c7ab4dbe1f507f526e822748c5ba40f00efa495f2159bd7fd6/start returned error: AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: \nerror: exec: \"apparmor_parser\": executable file not found in $PATH"

```

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [6 February 2023 22:26 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/4 "2023-02-06T22:26:07Z")

</div>

Check the GitHub link and follow the proposed workaround.

---

<div class="post-metadata">

### Author: ![dwr](https://dietpi.com/forum/user_avatar/dietpi.com/dwr/32/86_2.png) [@dwr](https://dietpi.com/forum/u/dwr)
#### Post date: [6 February 2023 22:26 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/5 "2023-02-06T22:26:28Z")

</div>

So, is this the workaround for the issue?

```auto
apt install apparmor
systemctl disable --now apparmor

```

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [6 February 2023 22:27 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/6 "2023-02-06T22:27:00Z")

</div>

yes it is. Just follow it

---

<div class="post-metadata">

### Author: ![dwr](https://dietpi.com/forum/user_avatar/dietpi.com/dwr/32/86_2.png) [@dwr](https://dietpi.com/forum/u/dwr)
#### Post date: [6 February 2023 22:35 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/7 "2023-02-06T22:35:12Z")

</div>

Confirmed - it does allow me to reinstall and access Portainer and all Containers within Docker.

Thank you.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [28 March 2023 19:50 UTC](https://dietpi.com/forum/t/portainer-fails-to-launch-install-or-re-install-solved/15862/8 "2023-03-28T19:50:21Z")

</div>

Finally, Docker 23.0.2 has been released fixing the issue on x86 [Docker Engine 23.0 release notes](https://docs.docker.com/engine/release-notes/23.0/#2302)
