Error when starting pool in docker (mount: permission denied)
tnkhanh opened this issue · 3 comments
tnkhanh commented
Hi, I'm trying to start a pool and encountered this error:
# ./pool_start.sh
Creating pool
Creating pool of 4 nodes with ips 10.0.0.2,10.0.0.3,10.0.0.4,10.0.0.5
Creating a new node Node1 0.0.0.0 9701 0.0.0.0 9702
Setting up docker with systemd
The mount point for the systemd cgroup hierarchy already exists at /sys/fs/cgroup/systemd.
Mounting the systemd cgroup hierarchy.
mount: /sys/fs/cgroup/systemd: permission denied.
I have my user in the docker group and can run some other docker containers fine.
I'm on Ubuntu 21.10.
What am I missing?
Thanks!
WadeBarnes commented
It's this process that is failing; https://github.com/hyperledger/indy-node/blob/master/environment/docker/pool/node_build.sh#L37
It likely has something to do with your user permissions to the /sys/fs/cgroup/systemd
folder. The container running the setup is running in privileged mode.
tnkhanh commented
I still have this issue. /sys/fs/cgroup
and /sys/fs/cgroup/systemd
are owned by root.
Should I run the pool as root?
wiredhikari commented
I faced the similar issue, I fixed it with following steps:
- Run the mount command with sudo: sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
- If the above command doesn't work, check if the cgroup file system is mounted. You can check it by running the command mount | grep cgroup. If it's not mounted, mount it with the following command: sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd