-
Notifications
You must be signed in to change notification settings - Fork 84
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
Run with --net=host break access to vnc #146
Comments
Please have a look at the link below. Encountered the same issue. Resolved it by modifying some files: |
@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/ 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 |
unfortunately yes, I followed the exact steps as mentioned in your post #145 (comment) I did some tests with the new build:
@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 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. |
Not yet. Not planning to anytime soon, unfortunately. |
Will do it with a fresh Ubuntu 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 : solarkennedy/ipmi-kvm-docker#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}')
ConSol/docker-headless-vnc-container#31Can you help me ?
Best regards,
lmontagnon
The text was updated successfully, but these errors were encountered: