Open lmontagnon opened 5 months ago
Please have a look at the link below. Encountered the same issue. Resolved it by modifying some files:
https://github.com/Tiryoh/docker-ros2-desktop-vnc/issues/145#issuecomment-2002299363
@cardboardcode thank you for your reply,
I tried your solution but when I'm running the container (5.) I can't access to http://localhost:6080/ I have no errors on the terminal! but unable to connect with localhost:6080
docker run --ipc host --net host -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m tiryoh/ros2-desktop-vnc:humble-amd64-HOST
WARNING: Published ports are discarded when using host network mode
* enable custom user: ubuntu
set default password to "ubuntu"
============================================================================================
NOTE: --security-opt seccomp=unconfined flag is required to launch Ubuntu Jammy based image.
See https://github.com/Tiryoh/docker-ros2-desktop-vnc/pull/56
============================================================================================
2024-03-19 20:25:14,759 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2024-03-19 20:25:14,759 INFO Set uid to user 0 succeeded
2024-03-19 20:25:14,769 INFO RPC interface 'supervisor' initialized
2024-03-19 20:25:14,769 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-03-19 20:25:14,770 INFO supervisord started with pid 44
2024-03-19 20:25:15,773 INFO spawned: 'novnc' with pid 45
2024-03-19 20:25:15,776 INFO spawned: 'vnc' with pid 46
2024-03-19 20:25:17,516 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-19 20:25:17,516 INFO success: vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Hmm... weird. Perhaps try accessing http://localhost:5905/ instead of http://localhost:6080/.
If still does not work, will need your help to show the exact steps you took to get to the aforementioned output so we can work with more information.
Also, remember to git pull
and update the local repository to the latest commit, just in case.
unfortunately yes, I followed the exact steps as mentioned in your post https://github.com/Tiryoh/docker-ros2-desktop-vnc/issues/145#issuecomment-2002299363 And I pulled the last version commit.
I did some tests with the new build:
Without --ipc host --net host
parameters novnc break and when i change entrypoint.sh file directly inside this container (change for vncserver 1 and go back 6080 to 80). stop container and restart it. It's working like before.
With --ipc host --net host
parameters i don't have any errors but it's unable to connect http://localhost:6080/ or http://localhost:5905/
@cardboardcode can you do it again exactly your steps with the latest commit ?
Thank you for your help.
lmontagnon
Hello everyone,
I found a solution to my problem. I'm using Docker desktop on Ubuntu and the problem is that you need to be root to access with the net=host
parameter. So if I run it with sudo
sudo docker run --ipc host --net host -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m tiryoh/ros2-desktop-vnc:humble-amd64-HOST
That works ! I saw that Docker desktop uses another context. I uninstalled all Docker desktop files and installed Docker Engine. Add Docker Engine on root : https://docs.docker.com/engine/install/linux-postinstall/
@cardboardcode Have you tried under Windows 11? Because now it's the same problem and I'm trying to get Docker as root on Windows.
@cardboardcode Have you tried under Windows 11? Because now it's the same problem and I'm trying to get Docker as root on Windows.
Not yet. Not planning to anytime soon, unfortunately.
unfortunately yes, I followed the exact steps as mentioned in your post #145 (comment) And I pulled the last version commit.
I did some tests with the new build:
* Without `--ipc host --net host` parameters novnc break and when i change entrypoint.sh file directly inside this container (change for vncserver 1 and go back 6080 to 80). stop container and restart it. It's working like before. * With `--ipc host --net host` parameters i don't have any errors but it's unable to connect http://localhost:6080/ or http://localhost:5905/
@cardboardcode can you do it again exactly your steps with the latest commit ?
Thank you for your help.
lmontagnon
Will do it with a fresh Ubuntu 22.04
instance on Virtual machine and update accordingly. Please see below (edited as of 24th March 2024 1410):
The steps for reproducing the example can be verified to still be working with the latest commit at least for me.
Hi everyone,
I have a new issue which also breaks vnc startup.
For my project, I need to show my network (Ethernet and Wifi e.g. enp2s0 and wlp4s0) inside the container. With another image without vnc it's working when I add this parameter
--net=host
but with vnc doesn't work and break the startup.Screenshot inside vnc container without --net=host parameter with
ifconfig
command (sudo update
andsudo apt install net-tools
) :How to reproduce
Add --net=host parameter to run a new container :
And this appear
As you can see, a warning appears : WARNING: Published ports are discarded when using host network mode
I found a same Issue here : https://github.com/solarkennedy/ipmi-kvm-docker/issues/10 but the solution with IPv6 doesn't work. Another solution is to make some change inside vnc_startup.sh
VNC_IP=$(ip route get 1 | awk '{print $NF;exit}')
https://github.com/ConSol/docker-headless-vnc-container/issues/31Can you help me ?
Best regards,
lmontagnon