Skip to content

image is not working on Debian 11 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
boschkundendienst opened this issue Dec 10, 2021 · 6 comments
Closed

image is not working on Debian 11 #2

boschkundendienst opened this issue Dec 10, 2021 · 6 comments
Assignees

Comments

@boschkundendienst
Copy link

I tried both ways, directly using the image or create it myself with the dockerfile. I could not get it working on Debian 11.

With the dockerfile I received some errors which are in my opinion related to the fact, that some of the repos are no longer present or the URL has changed.

The image does not work on Debian 11 and even latest docker. It starts and immediately exits, I was not even able to debug in any way.

Then I tried it with Ubuntu 18.04 and the docker engine from its orginal repos and the command

docker run --rm -p 5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc

ran flawlessly. It also works without problems on Arch and Manjaro.

Do you have any ideas what could be the problem??

P.S. The hello world example from docker always works! (docker run hello-world)

@mablanco
Copy link
Owner

mablanco commented Dec 11, 2021

Hi @boschkundendienst. I use Debian 11 myself and the launch command works flawlessly. Maybe it has to do with some custom setup of your desktop. For the record, I'm using docker-ce version 5:20.10.11~3-0~debian-bullseye from the official Docker repo.

Please, follow these steps to try to debug the problem:

  1. Launch the container without the --rm argument: docker run -p 5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc
  2. When the container exists, get the logs from it: docker logs firefox-java-vnc
  3. Paste them here so I can have a look

It may also suggest you to have a look at this article: https://docs.docker.com/config/daemon/

Regards.

@mablanco mablanco self-assigned this Dec 11, 2021
@boschkundendienst
Copy link
Author

Hi,
thanks for your quick reply.

I followed your advise and did the following

  1. stopped docker and docker.socket daemon using systemctl
  2. created a screen session and started dockerd manually sudo dockerd
  3. in a new session I did the following
pcfreak@debian-11:~$ docker run -p 5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc
Unable to find image 'mablanco/firefox-java-vnc:latest' locally
latest: Pulling from mablanco/firefox-java-vnc
a0c8dde657f9: Pull complete 
b287b309bebe: Pull complete 
b24e43eab8a9: Pull complete 
Digest: sha256:1a9b1e4e22827a9ec6a59ca1d176893e1a708627c612102ea4731cbe559cd18e
Status: Downloaded newer image for mablanco/firefox-java-vnc:latest
pcfreak@debian-11:~$ docker ps -a
CONTAINER ID   IMAGE                       COMMAND                  CREATED          STATUS                       PORTS     NAMES
0d8405e89add   mablanco/firefox-java-vnc   "/usr/bin/x11vnc -fo…"   19 seconds ago   Exited (139) 7 seconds ago             firefox-java-vnc
pcfreak@debian-11:~$ docker logs firefox-java-vnc
pcfreak@debian-11:~$

As you can see, it just does not work. And there is no log. The docker version is Docker version 20.10.5+dfsg1, build 55c4c88.

I tried it with docker in a VM using VirtualBox and Qemu, both same result.

It seems this is debian related but I have no clue why it does not work. Maybe the error is only when using a virtual debian but I can not try with a physical machine.

@mablanco
Copy link
Owner

mablanco commented Dec 12, 2021

Hi @boschkundendienst. I think I've found the problem. After doing my own tests, I discovered the following error message in the kernel log (sudo dmesg) of a brand new Debian VM:

x11vnc[154000] vsyscall attempted with vsyscall=none...

That reminded me of going through this problem in the past with other Docker images and solving it in my computer by adding the parameter vsyscall=emulate to the Grub command line. You can do that in Debian by editing /etc/default/grub and adding that parameter to the GRUB_CMDLINE_LINUX_DEFAULT variable and running update-grub afterwards.

Please give it a try and, if it works, I'll update the README file so I won't forget about this again.

Regards.

@mablanco
Copy link
Owner

These articles were the ones I went through in the past when I was first faced with this issue:

I know that vsyscall is defaulted to none in modern Linux distros for security reasons, so use this workaround carefully. It'd be great if anyone comes with a better solution.

@boschkundendienst
Copy link
Author

Hi @mablanco,
very good analysis. I can verify adding vsyscall=emulate to the Grub command line by editing /etc/default/grub and changing the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet vsyscall=emulate"

and a final sudo update-grub and a reboot made everything working.

Also thank you for the links, they are a good read about the initial problem.

@mablanco
Copy link
Owner

Thanks @boschkundendienst. Glad to be helpful!

mablanco added a commit that referenced this issue Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants