I run a small VM with some services, one of them being our beloved Odoo CE ERP which help us with our "side hustle" on viavinum.at. Yesterday my wife tells me very candid that "odoo is not functioning".
...ooops!
Are you sure? Yes, I'm sure! Than let me check!
... 2xooops!
Yeap, nothing comes when calling the URL. Let me login to the VM... couple of seconds later:
... 3xooops! -> PANIC!
sudo docker ps
returns nothing! nothing! Actually the header line and then n-o-t-h-i-n-g! Enter panic&troubleshoot mode!
sudo docker image ls
comes also empty!
sudo docker volumes ls
shows me the volumes! Yes! Data is still there!
Of course, I put the worst first: I have been hacked! Small probability but, worse that could happen. I quickly checked my other VMs and there everything seemed to be in order. Good!
Quickly check in /var/log/syslog
. All looked ok... Quickly run a last
command. All looked in order. Last time I logged in here was in December! I love it! :-)
So that the worst is out of the picture! Is only a Linux problem! :-D
Let's run a sudo docker-compose up -d
to see what happens...
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown
... is what happens!
Let's see what google says about this... Luckily found something on the BBB discussion board group. It seems to be something with the docker
package. Wait no, it's with the docker-ce
package. Oooo look I have the same version as them installed. (apt info docker-ce
shows 23.0.1-1~debian.11~bullseye
)It seems I should roll back... but wait forward on somebody mentions apparmor
which is also part of my error message. Checking it I found out that is not installed. Let's install it: sudo apt install apparmor
... and docker-compose again... again error... wait let's read further... ooo, I should restart the VM, aha, let's do it.
Long story short after restarting the VM and running sudo docker-compose up -d
again got all my dockers back and running!
And I've decreed "Habemus Odoo!" and then needed to explain my geek joke :-)
Happy End! ... and I hope this helps somebody!
p.s. VM is running and uptodate version of debian bullseye
p.p.s. if this is not working, you can also try to fully disable apparmor. Instructions for debian-based systems can be found here: https://wiki.debian.org/AppArmor/HowToUse#Disable_AppArmor. The error message saw in my nginx reverse proxy docker was:
s6-ipcserver-socketbinder: fatal: unable to create socket: permission denied
and
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown