How to fix docker error "no subsystem for mount"? - docker

I pulled the drools-workbench-showcase image
docker pull jboss/drools-workbench-showcase
But if I try to run it in a docker container like it's proposed on the drools-workbench-showcase site:
docker run -p 8080:8080 -p 8001:8001 -d --name drools-workbench jboss/drools-workbench-showcase:latest
I get an error:
docker: Error response from daemon: rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: no subsystem for mount".
How can I fix it? (A couple of months ago I did the same and it worked without any additional efforts.) My OS is Ubuntu 18.04

So, what I've discovered in a meanwhile. It was an ubuntu-docker issue. Recently I upgraded my ubuntu from 16.04 to 18.04. This change seems to be incompatible with the docker version I had, 1.11.0. I followed the instructions from the site How to Install and Use Docker on Ubuntu 18.04 and installed a new docker version, 18.06.1-ce (above my old one). Now it works.
Reading the comment Docker fails with "no subsystem for mount". Comment 29. helped me to come to this solution.

Related

IOTA "one-click-tangle" via docker linux containers - ERROR 1

I am trying to run a private tangle on my computer through linux docker containers.
Therefore I followed the guide over at https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle
Every step succeeded up until we tried to execute
./private_tangle.sh install
This reports
Error 1
as seen in the screenshot below:
We do net get any further information, is anyone familiar with this error, or has any clue how to get some more information on the error so that we can at least have a clue where to look?
Some further information:
After executing docker ps -a we see that not a single container is running.
I am running on a windows 10 machine
I execute the commands from within ubuntu (version 20.04)
Ubuntu, docker-desktop and docker-desktop-data are all running WSL2
Docker integration with ubuntu is activated
I thought the error could maybe come from no hornet node initially being installed, so I installed a hornet node successfully, according the guide that https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle. This changed nothing to the Error.
The version of docker and docker-compose are compliant with the requirements
If any more details are needed to help me solve this problem, please let me know.
I used the documentation (https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle) to install these containers on my local ubuntu 18.04.
My docker version is: 20.10.12
And docker-compose version is: 1.29.2
By following the steps of the tutorial I managed to successfully start all of the containers without trouble.
My guess here would be that the permission of the 'private-tangle.sh' are not correct or that there is permission problem on the docker level.
You should start with checking the permission level of the private-tangle.sh script by using $ls -l
Here is my output -rwxrwxr-x 1 ben ben 9413 Jan 11 11:28 private-tangle.sh
It could also be due to the docker rights if you have to use sudo when executing a docker command it will give some troubles when executing the script.
You need to add yourself to a docker group to be able to run docker commands without sudo. You can do this by running sudo usermod -aG docker $USER with damiaan-vh as $user.
Solution from source https://stackoverflow.com/posts/70665394/edit
Suggesting to downgrade ubuntu version to 18.04 for more stable version.
For reinstalling the docker and docker-compose programs follow this documentations
(docker: https://docs.docker.com/engine/install/ubuntu/ )
(docker-compose: https://docs.docker.com/compose/install/ )

Cannot start container: OCI runtime create failed: container_linux.go:349

I am using docker on my CentOS Linux release 7.8.2003 (Core) with 16 GB RAM. My docker version is Docker version 19.03.7. Docker-compose version is docker-compose version 1.23.2. I have 30+ docker containers running on my machine.
Everything was working smoothly, but I ran into a problem. Sometimes, when I try to run a container I get this error
ERROR: for container_name Cannot start service container_name: OCI runtime create failed: container_linux.go:349:
starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused \"EOF\"": unknown
When I retry 3-5 times to run container, the container started successfully. Sometimes I need to restart docker service and my server to make it working. I don't know the exact reason why It is giving me this error sometimes and gets created successfully sometimes with same docker-compose file.
Can somebody explain this weird behavior of docker to me? Is it due to so many containers running on my machine or something else?
I had a similar issue:
OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:722: waiting for init preliminary setup caused: EOF: unknown
and the problem turned out to be the wrong version of my WSL distro, which was 1 instead of 2:
PS C:\Users\myself> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 1
So I used the wsl --set-version command to upgrade it:
PS C:\Users\myself> wsl --set-version Ubuntu 2
PS C:\Users\myself> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
Then I was able to successfully build my Docker image.
Hope can help someone.
Came across this link, which solved the issue for me. It apparently works for WSL, but definitely also for my Ubuntu 18.04 installation: the latest version(s) of docker have this problem, a few versions back they haven't.
I am a complete newb to Docker and am running Linux 18.04.6 Bionic Beaver
docker --version reports Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3
I'm not sure if this is the solution, but after reinstalling Docker from various unrelated problems I ran runc init and killed an old running dockerd process and was able to get hello-world to run. I've wasted so much time on it that I don't want to find the root cause.

Mattermost with Docker for Windows error: invalid volume specification

I try to get Mattermost working with Docker for Windows. As mentioned here I executed the following command:
docker run --name mattermost-preview -d --publish 8065:8065 mattermost/mattermost-preview
After pulling and extracting the files, docker exits and throws the following error:
docker.exe: Error response from daemon: Unrecognised volume spec: invalid volume specification: './mattermost-data'.
Running Windows Server 2019 PreRelease 17623 and docker 17.10.0-ee-preview-3
Feedback from our engineers is that while they've never used Docker with Windows, your issue might be Windows related because it can't create a Docker volume (maybe related to the different path syntax between Linux and Windows ?)
Not sure if this will help, but here are the very basic example using volume on Windows Engine.
docker run -it -v C:\Users\Administrator\:C:\Users\public microsoft/nanoserver powershell
Also, you might want to use stable release channel instead of pre-release version of Windows. There are number of changes made, and base images will not be compatible. It is likely that the author of this image built it for Windows stable release.
Maybe, contact support for Mattermost?

Docker registry:2 won't start

I've just setup a new OpenSuse 13.1 server and installed Docker. I pulled the registry:2 image and when I try running it, I get the following error:
93b827525f40c2b8c609115972bc0063c98769434136a54db3a1c77fab011cdc
Error response from daemon: Cannot start container 93b827525f40c2b8c609115972bc0063c98769434136a54db3a1c77fab011cdc: [8] System error: open /sys/fs/cgroup/cpu,cpuacct/system.slice/system.slice/docker-93b827525f40c2b8c609115972bc0063c98769434136a54db3a1c77fab011cdc.scope/cpu.shares: no such file or directory
Edit:
I did a fresh OS install of openSuse and reinstalled Docker. Everything worked fine up to that point and I was able to start bash in a container. Next I tried running registry:2 again and was then faced with the same problem as before. More importantly, following my failed attempt at running registry, I was no longer able to run bash in a container. No containers would start any more. Not sure if registry just isn't compatible with openSuse or if I'm missing something fundamental.

Getting docker daemon not running error

I am trying to get docker working on my sys
However, not able to
Steps to reproduce the issue that I am facing:
Installed EPEL on 6.5 RHEL
Installed docker-io
Able to run "docker" command
When running "docker run -i -t fedora /bin/bash" command using without root, getting below error:
FATA[0000] Post http:///var/run/docker.sock/v1.17/containers/create:
dial unix /var/run/docker.sock
http:///var/run/docker.sock/v1.17/containers/create:%20dial%20unix%20/var/run/docker.sock :
permission denied.
Are you trying to connect to a TLS-enabled daemon without TLS?
However, with root getting diff error like below for the same command:
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
A RHEL 6.5, also termed Update 5, is from 21 November 2013 and comes with kernel 2.6.32-431.
That seems quite an old kernel for docker to be installed and run successfully. Docker would need ideally a 3.10+ kernel.
Although Adrian Mouat mentions in the comments that the Red Hat Enterprise Linux 6.5 (64-bit) or later is supported
You will need 64 bit RHEL 6.5 or later, with a RHEL 6 kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.
So make sure the docker daemon is started:
sudo service docker start
Then try some sudo docker commands:
sudo docker run -i -t fedora /bin/bash
The doc mentions:
If you get a Cannot start container error mentioning SELinux or permission denied, you may need to update the SELinux policies.
This can be done using sudo yum upgrade selinux-policy and then rebooting.

Resources