-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
VNC not working on HAOS hosts? #149
Comments
Works fine for me on $ uname -a
Linux ubuntu 5.15.0-1029-oracle #35-Ubuntu SMP Tue Jan 24 15:21:05 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
$ docker run --rm -it -p 6080:6080 -v fgc3:/fgc/data --pull=always ghcr.io/vogler/free-games-claimer
latest: Pulling from vogler/free-games-claimer
79d0ea7dc1a8: Already exists
bbc5da6b69f2: Pull complete
b903faaa1cc5: Pull complete
a2e0a116c2fa: Pull complete
311f56e46f21: Pull complete
7b5c54872c4b: Pull complete
44836435d649: Pull complete
3d40588588f1: Pull complete
bedbfb574087: Pull complete
ff2501dc7ea9: Pull complete
Digest: sha256:203de0163d8685637c127cdb1394bb083bca03a9939fea4ba84d30093c5e00ca
Status: Downloaded newer image for ghcr.io/vogler/free-games-claimer:latest
Xvfb display server created screen with resolution 1280x1280
VNC is running on port 5900 (no password!)
noVNC (VNC via browser) is running on http://localhost:6080
2023-05-31 07:40:52.268 started checking epic-games
Not signed in anymore. Please login in the browser or here in the terminal.
Open http://localhost:6080 to login inside the docker container.
Login timeout is 180 seconds!
Press ESC to skip the prompts if you want to login in the browser (not possible in headless mode).
✖ Enter email ·
Waiting for you to login in the browser.
...
$ curl 127.0.0.1:6080
<!DOCTYPE html>
<html>
<head>
<!--
noVNC example: lightweight example using minimal UI and features
Copyright (C) 2012 Joel Martin
Copyright (C) 2017 Samuel Mannehed for Cendio AB
noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
Connect parameters are provided in query string:
http://example.com/?host=HOST&port=PORT&encrypt=1
or the fragment:
http://example.com/#host=HOST&port=PORT&encrypt=1
-->
<title>noVNC</title>
... What system are you trying to run it on? |
Hi, thanks for checking that! I'm using HAos which is a 64-bit os developed by HomeAssistant Home Assistant Operating System (HAOS) is using the Buildroot build system. Buildroot is not a Linux distribution in the classic sense. It provides the infrastructure and build system to build a Linux distribution. Here is my log :
and it just waits forever... any ideas? thanks! Performing other curl -v (such as google.com) works |
It's strange that the image behaves differently depending on the host OS, but I don't see any other explanation.
|
Hi, thanks
Edit : I saw that error when starting vnc are suppressed in the script. I therefore execute log here for aarch64 (not working) : Linux 227ccf7d9a4f 6.1.21-v8 #1 SMP PREEMPT Wed May 24 21:11:41 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
log here for amd64 (working) : Linux db21ed7f-free-games-claimer 5.15.90 #1 SMP Tue Jan 24 18:48:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
|
Hello, I'm with the same issue, but using HAOS 10.2 (latest) on the (amd64 / generic-x86-64) platform, which is indeed a working platform for @alexbelgium . The only difference I have is that this is a physical machine, instead of a VM amd64. Let me know if I could help to debug this in anyway... Edit: direct VNC is not reachable on :5900 port, so noVNC is also not reachable trough browser on :6080 port. |
update: after insisting a lot to connect trough VNC direct client on port:5900 I was able to connect after pressing connect button several times on my VNC Client! However, it was already on one of the later stages, during the GOG login, so I have missed the login for Epic and Prime... |
Removed the times in your logs and diffed (a: Don't know if that is the issue, but it's the only difference I see. Didn't find an issue for VNC or xvfb on https://github.com/home-assistant/operating-system. What hardware is it? Would be helpful to compare the same hardware with different host OS in order to verify that the issue is HAOS (maybe some missing kernel module?). |
@vogler , I believe you are on the right track! I have a amd64 machine, but it is indeed very old... It's a laptop with an AMD C-60 CPU with 2 cores @ 1ghz and 8gb Ram. I notice that the add-on consumes 100% of CPU after start for up to 10 minutes, and then it decreases during time... When CPU is high, I'm not able to connect to VNC, but the connection is not closed, it keeps "loading"... I managed to connect to VNC 2 times, but it was only after the GOG started... In my case, I'm starting first the Epic node, then the Prime and lastly the GOG node.... Perhaps the CPU usage was low during GOG, but I have not checked. However, when I managed to access it trough VNC, the performance was pretty well! Mouse and keyboard had good response, so maybe the start up process is what is creating the heavy load... |
Every script starts Firefox and loads the respective website. Due to how the websites are built (lots of JS and images), I'm not surprised about high load on a 1GHz CPU. Still, I think it should be done in some minutes and then quit, such that it's fine to run e.g. every night. I think the issue is just the slow frame buffer read rate which is already logged before any browser is started. |
Yes, I agree the JS creates a high load on the CPU... But is still strange taking that time... For example, there is this other standalone firefox HA addon https://github.com/mincka/ha-addons/tree/main/firefox that is based on this docker image https://github.com/jlesage/docker-firefox with a similar approach with VNC. In the same 1ghz cpu it opens in seconds, and I'm able to load the epicgames and login just like if I was in a native browser, from both VCN direct connection, and trough the browser... not sure if they use noVNC as proxy, I'm not that expert... |
I checked this image out in #68, mainly due to its reduced size. You can edit It's hard to compare loads of manually visiting a page in an already running Firefox vs. a script starting a new Firefox and immediately automating actions in it. |
Update : actually VNC connects on aarch64 but only after several hours (around 6h). I've tried checking if arguments for Xvfb or x11vnc can help to improve read rate but without success for the moment. I'll try your proposal with tigervnc - thanks |
Is just VNC a problem or is the rest also slow? |
Any update on this? |
To clarify if the issue is with the image or the host, you could check if VNC is also slow using these images (both using noVNC):
|
Hi, thanks very much. Test system : rpi4 aarch64 HAos 8gb ram Docker-firefox :
log - click this[cont-env ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env ] XDG_CACHE_HOME: loading...
[cont-env ] XDG_CONFIG_HOME: loading...
[cont-env ] XDG_DATA_HOME: loading...
[cont-env ] XDG_RUNTIME_DIR: loading...
[cont-env ] XDG_STATE_HOME: loading...
[cont-env ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init ] executing container initialization scripts...
[cont-init ] 10-certs.sh: executing...
[cont-init ] 10-certs.sh: terminated successfully.
[cont-init ] 10-check-app-niceness.sh: executing...
[cont-init ] 10-check-app-niceness.sh: terminated successfully.
[cont-init ] 10-cjk-font.sh: executing...
[cont-init ] 10-cjk-font.sh: terminated successfully.
[cont-init ] 10-clean-logmonitor-states.sh: executing...
[cont-init ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init ] 10-clean-tmp-dir.sh: executing...
[cont-init ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init ] 10-fontconfig-cache-dir.sh: executing...
[cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init ] 10-init-users.sh: executing...
[cont-init ] 10-init-users.sh: terminated successfully.
[cont-init ] 10-nginx.sh: executing...
[cont-init ] 10-nginx.sh: terminated successfully.
[cont-init ] 10-openbox.sh: executing...
[cont-init ] 10-openbox.sh: terminated successfully.
[cont-init ] 10-set-tmp-dir-perms.sh: executing...
[cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully.
[cont-init ] 10-vnc-password.sh: executing...
[cont-init ] 10-vnc-password.sh: terminated successfully.
[cont-init ] 10-web-data.sh: executing...
[cont-init ] 10-web-data.sh: terminated successfully.
[cont-init ] 10-x11-unix.sh: executing...
[cont-init ] 10-x11-unix.sh: terminated successfully.
[cont-init ] 10-xdg-runtime-dir.sh: executing...
[cont-init ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init ] 15-install-pkgs.sh: executing...
[cont-init ] 15-install-pkgs.sh: terminated successfully.
[cont-init ] 55-check-snd.sh: executing...
[cont-init ] 55-check-snd.sh: sound not supported: device /dev/snd not exposed to the container.
[cont-init ] 55-check-snd.sh: terminated successfully.
[cont-init ] 55-firefox.sh: executing...
[cont-init ] 55-firefox.sh: generating machine-id...
[cont-init ] 55-firefox.sh: terminated successfully.
[cont-init ] 56-firefox-set-prefs-from-env.sh: executing...
[cont-init ] 56-firefox-set-prefs-from-env.sh: terminated successfully.
[cont-init ] 85-take-config-ownership.sh: executing...
[cont-init ] 85-take-config-ownership.sh: terminated successfully.
[cont-init ] 89-info.sh: executing...
╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
│ │
│ Application: Firefox │
│ Application Version: 114.0.2-r0 │
│ Docker Image Version: 23.06.1 │
│ Docker Image Platform: linux/arm64 │
│ │
╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init ] 89-info.sh: terminated successfully.
[cont-init ] all container initialization scripts executed.
[init ] giving control to process supervisor.
[supervisor ] loading services...
[supervisor ] loading service 'default'...
[supervisor ] loading service 'logmonitor'...
[supervisor ] service 'logmonitor' is disabled.
[supervisor ] loading service 'app'...
[supervisor ] loading service 'gui'...
[supervisor ] loading service 'certsmonitor'...
[supervisor ] service 'certsmonitor' is disabled.
[supervisor ] loading service 'openbox'...
[supervisor ] loading service 'xvnc'...
[supervisor ] loading service 'nginx'...
[supervisor ] loading service 'logrotate'...
[supervisor ] all services loaded.
[supervisor ] starting services...
[supervisor ] starting service 'xvnc'...
[xvnc ] Xvnc TigerVNC 1.13.1 - built May 16 2023 17:54:35
[xvnc ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
[xvnc ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc ] Underlying X server release 12014000
[xvnc ] Sat Jul 22 07:27:07 2023
[xvnc ] vncext: VNC extension running!
[xvnc ] vncext: Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc ] vncext: Listening for VNC connections on all interface(s), port 5900
[xvnc ] vncext: created VNC server for screen 0
[supervisor ] starting service 'openbox'...
[supervisor ] starting service 'nginx'...
[nginx ] Listening for HTTP connections on port 5800.
[xvnc ] Sat Jul 22 07:27:09 2023
[xvnc ] Connections: accepted: /tmp/vnc.sock
[xvnc ] SConnection: Client needs protocol version 3.8
[xvnc ] SConnection: Client requests security type None(1)
[xvnc ] VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888
[xvnc ] VNCSConnST: Client pixel format depth 24 (32bpp) little-endian bgr888
[xvnc ] ComparingUpdateTracker: 0 pixels in / 0 pixels out
[xvnc ] ComparingUpdateTracker: (1:nan ratio)
[supervisor ] starting service 'app'...
[app ] Mozilla Firefox 114.0.2
[supervisor ] all services started. Docker-ubuntu-vnc-desktop
Free-games-claimer
log - click this
|
I can't connect to VNC using RealVNC and noVNC doesn't work either. |
Yea, it's an issue with HAOS, not the used VNC client. |
What can we do about it? HAOS does get regular updates so it should be possible to solve this. |
It's still open if the issue is Ubuntu or the VNC server in combination with HAOS. We can't use Alpine as a base since Playwright doesn't support it. We could try tigervnc instead of x11vnc. |
Hi, I'm developing an HomeAssistant addon for your great app here : https://github.com/alexbelgium/hassio-addons/tree/master/free_games_claimer
I've ran into an issue : although it works great on amd64, I can't get the NoVNC webui to show on aarch64. The page just waits idly without any error message nor action until it timeouts.
Things I've tested (running your
latest
container straight from Portainer with all default settings on two different systems : amd64 virtual machine, and aarch64 rpi4) :- Starting the addon : works on both systems (see collapsible log)
curl 127.0.0.1:6080
from within the container using a portainer console : works on amd64 (provides a normal response), waits forever on aarch64Based on this behavior, it conluded the issue is limited to the aarch64 system and is due to the container and not the external docker environment - and therefore wanted to request your help. This does not affect the env variables system that works on both system.
Is there anything else I could do to make it work ?
Thanks !
The text was updated successfully, but these errors were encountered: