Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post Reply
Rizzen59
First post
Posts: 1
Joined: Tue Apr 14, 2020 3:58 pm

Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by Rizzen59 » Tue Apr 14, 2020 10:36 pm

Hi,

I'm trying to install docker on lxc ubuntu but when i want to run a container i have this error :<br/>
$ sudo docker run hello-world
docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.
ERRO[0002] error waiting for container: context canceled

Do you have an idea ?


QNAP :
version : TS-431X
firmware : 4.4.2.1270

Code: Select all

# uname -a
Linux Odin 4.2.8 #2 SMP Fri Apr 10 10:07:09 CST 2020 armv7l unknown

cnmuranjan
First post
Posts: 1
Joined: Wed Feb 08, 2017 1:19 pm

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by cnmuranjan » Tue May 05, 2020 5:01 pm

please help!!

User avatar
Trexx
Ask me anything
Posts: 5304
Joined: Sat Oct 01, 2011 7:50 am
Location: Minnesota

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by Trexx » Tue May 05, 2020 10:42 pm

If you are looking for Qnap help, then you would need to open a helpdesk ticket.

In regards to docker, if supported on your model all you need to do is install container station to get docker support.

If that isn’t available for your model, trying to do an end around likely won’t work either.


Sent from my iPhone using Tapatalk
Paul

Model: TS-877-1600 FW: 4.4.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x 500GB Evo 860
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
GPU: EVGA GTX 1060 6GB
UPS: CP AVR1350

Model:TVS-673 32GB FW: 4.4.3.x Test/Backup Box
Model:TS-228a FW: 4.4.3.x Test/Backup Box
-----------------------------------------------------------------------------------------------------------------------------------------
NAS RAID Rebuild Times | Live QTS Videos | | QNAP NAS Guide | Information needed when you ask for HELP | QNAP Links, Tutorials, etc.
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq

MadMaxster
Starting out
Posts: 17
Joined: Wed Dec 30, 2015 2:12 pm

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by MadMaxster » Tue Sep 22, 2020 2:15 am

I'm having the same exact problem.

I'm trying to get lancache.net (which uses docker) up and running.
I have tried to run docker from lxc ubuntu 18.04 with no success, but the exact same docker run commands work without issue when run on ubuntu 18.04 on virtualisation station.
Somehow a difference between lxc via container and virtualisation station is affecting docker.

Not sure where the problem lies.... would appreciate anyone who has docker up and running on lxc ubuntu 18.04 suggest steps or where we may be going wrong

MadMaxster
Starting out
Posts: 17
Joined: Wed Dec 30, 2015 2:12 pm

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by MadMaxster » Wed Sep 23, 2020 2:59 am

In the hope that this helps others I got around this problem by using an older version of docker-ce and not docker-io.
This allowed me to get through the cgroup problem

Install older version of docker-ce due to cgroups bug (as of Sept 2020) :
Setup the depot's (old version which works is under xenial even though our ubuntu build is bionic) and remove old versions :

Code: Select all

sudo apt-get remove docker docker-engine docker.io docker.ce
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu  $(lsb_release -cs)  stable" 
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu  xenial  stable"
To list versions available :

Code: Select all

apt-cache madison docker-ce
Install older docker version :

Code: Select all

sudo apt-get install docker-ce=17.09.1~ce-0~ubuntu
Allow docker to be run as $USER (logout and back in to take effect - check via groups) :

Code: Select all

sudo usermod -aG docker $USER
After this all my docker containers worked without issue

aalllop
New here
Posts: 3
Joined: Wed Oct 14, 2020 5:34 pm

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by aalllop » Wed Oct 14, 2020 5:39 pm

Hello, I have followed all your instructions and now the error was:

docker run hello-world
container_linux.go:265: starting container process caused "process_linux.go:284: applying cgroup configuration for process caused \"open /sys/fs/cgroup/memory/lxc/ubuntu-bionic-arm64-1/docker/cpuset.cpus: no such file or directory\""
docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:284: applying cgroup configuration for process caused \"open /sys/fs/cgroup/memory/lxc/ubuntu-bionic-arm64-1/docker/cpuse
t.cpus: no such file or directory\"".
ERRO[0002] error waiting for container: context canceled

Any idea of what could be the problem?

aalllop
New here
Posts: 3
Joined: Wed Oct 14, 2020 5:34 pm

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by aalllop » Tue Oct 20, 2020 11:37 pm

Finally i was able to install hassio under LXC with docker. This are the steps:

- Create a LXC ubuntu 18.04 machine.
- Using SSH into NAS and go to NAS Host to edit “/usr/local/container-station/lxc/share/lxc/config/common.conf”
Modify string “lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed” into “lxc.mount.auto = proc:mixed sys:mixed”

Add those lines:

lxc.mount.entry = /dev/ttyS0 dev/ttyS0 none bind,create=file 0 0
lxc.mount.entry = /dev/ttyS1 dev/ttyS1 none bind,create=file 0 0
lxc.mount.entry = /dev/ttyS2 dev/ttyS2 none bind,create=file 0 0
lxc.mount.entry = /dev/ttyS3 dev/ttyS3 none bind,create=file 0 0
linux.kernel_modules: bridge,br_netfilter,ip_tables,ip6_tables,ip_vs,netlink_diag,nf_nat,overlay,xt_conntrack
raw.lxc: |-
lxc.cgroup.devices.allow = a
lxc.cap.drop =
security.nesting: "true"
security.privileged: "true"

Uncomment lxc.include = /usr/share/lxc/config/nesting.conf

- Restart LXC docker


- Download docker 17.09.01 from https://download.docker.com/linux/ubunt ... ble/arm64/
- Execute those commands:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
dpkg -i <route_of_the_package>/docker-ce_17.09.1_ce-0_ubuntu_arm64.deb
....to be continued

aalllop
New here
Posts: 3
Joined: Wed Oct 14, 2020 5:34 pm

Re: Ubuntu 18.04 - LXC - With Docker - Cannot find cgroup mount destination: unknown.

Post by aalllop » Wed Oct 21, 2020 12:27 am

Continuation:


Now you have docker installed and running. Test with
sudo -i

apt-get dist-upgrade

apt-get update

apt-get install apt-utils -y

apt install software-properties-common -y

add-apt-repository universe

apt-get update

apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common -y

curl -sL "https://raw.githubusercontent.com/home- ... staller.sh" | bash -s -- -m qemuarm -p 8123:8123

My qnap has ARM chip but if yours has another family please see the options for the -m on https://raw.githubusercontent.com/home- ... staller.sh

One important thing, I have created those lines:
lxc.mount.entry = /dev/ttyS0 dev/ttyS0 none bind,create=file 0 0
lxc.mount.entry = /dev/ttyS1 dev/ttyS1 none bind,create=file 0 0
lxc.mount.entry = /dev/ttyS2 dev/ttyS2 none bind,create=file 0 0
lxc.mount.entry = /dev/ttyS3 dev/ttyS3 none bind,create=file 0 0

because when I try to install the hassio add-on node-red I obtain an error that it can't be installed because it can't access to /dev/ttyS3, so I mapped in the conf file. If the docker doesn't start comment those lines.

Now homeassistant with supervisor is running on my qnap.

Post Reply

Return to “Container Station”