deconz-community / deconz-docker

MIT License
376 stars 34 forks source link

DSM 7 (Intel Xeon D-1527 broadwell) Docker stops if run with VNC enabled #110

Closed manudar closed 2 years ago

manudar commented 2 years ago

Hi, I have tried several possible configurations, but if I enable VNC, the docker stops after few seconds. These are the logs I get. I at 2022-05-05:14:02 it restarts

2022-05-05 12:14:02 | stdout |  
-- | -- | --
2022-05-05 12:14:02 | stdout | Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
2022-05-05 12:14:02 | stdout |  
2022-05-05 12:14:02 | stdout | This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
2022-05-05 12:14:02 | stdout | qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
2022-05-05 12:14:02 | stdout | qt.qpa.xcb: could not connect to display :5
2022-05-05 12:14:01 | stdout | [deconzcommunity/deconz] NOVNC port: 6085
2022-05-05 12:14:01 | stdout | - Backgrounding (daemon)
2022-05-05 12:14:01 | stdout | - SSL/TLS support
2022-05-05 12:14:01 | stdout | - Web server. Web root: /usr/share/novnc
2022-05-05 12:14:01 | stdout | - Listen on :6085
2022-05-05 12:14:01 | stdout | WebSocket server settings:
2022-05-05 12:13:59 | stdout | -----
2022-05-05 12:13:59 | stdout | writing new private key to '/opt/deCONZ/vnc/novnc.pem'
2022-05-05 12:13:59 | stdout | ........................+++++
2022-05-05 12:13:59 | stdout | ...............+++++
2022-05-05 12:13:59 | stdout | Generating a RSA private key
2022-05-05 12:13:59 | stdout | tigervncserver: Could not acquire fully qualified host name of this machine.
2022-05-05 12:13:59 | stdout | hostname: Name or service not known
2022-05-05 12:13:59 | stdout | tigervncserver: Could not acquire fully qualified host name of this machine.
2022-05-05 12:13:59 | stdout | hostname: Name or service not known
2022-05-05 12:13:59 | stdout | tigervncserver: Could not acquire fully qualified host name of this machine.
2022-05-05 12:13:59 | stdout | hostname: Name or service not known
2022-05-05 12:13:58 | stdout | [deconzcommunity/deconz] VNC port: 5905
2022-05-05 12:13:58 | stdout | [deconzcommunity/deconz] Checking device group ID
2022-05-05 12:13:57 | stdout | [deconzcommunity/deconz] Modifying user and group ID
2022-05-05 12:13:57 | stdout | [deconzcommunity/deconz] Using options --auto-connect=1         --appdata=/opt/deCONZ         --dbg-info=1         --dbg-aps=0         --dbg-zcl=0         --dbg-ddf=0         --dbg-dev=0         --dbg-zdp=0         --dbg-ota=0  --dbg-error=0         --http-port=85         --ws-port=448
2022-05-05 12:13:57 | stdout | [deconzcommunity/deconz] Websockets port: 448
2022-05-05 12:13:57 | stdout | [deconzcommunity/deconz] Web UI port: 85
2022-05-05 12:13:57 | stdout | [deconzcommunity/deconz] Current deCONZ version: 2.15.03
2022-05-05 12:13:57 | stdout | [deconzcommunity/deconz] Starting deCONZ...

Any idea on how to solve this.

Jo-Be-Co commented 2 years ago

hostname: Name or service not known Try to start your container without setting a hostname from outside.

manudar commented 2 years ago

Hi, I don't know how to do that. I use the Docker app from DSM 7.0 in synology. I use the host network setting. With this setting I share the name and network from the DSM.

manudar commented 2 years ago

I run bash inside the docker and when I type hostname is returns deconz, but in /etc/hosts the only names defined are localhost and nas (which is the network name of my nas). I don't know how the hostname was set to deconz or how to change it in the Docker app in DMS7 in Synology. Any idea?

manudar commented 2 years ago

I have downloaded the docker code to update start.sh by adding in the second line of the script the line echo "127.0.0.1 deconz ">> /etc/hosts which I thik it would solve the issue, but I get an error. I use the comand
sudo docker build --build-arg VERSION="2.15.03" --build-arg CHANNEL="stable" -t "deconz:local" ./docker/ After a long while of doing things I get this error: + DECONZ_VERSION=2.15.03 + CHANNEL=stable + PLATFORM= + echo '' + grep -qE arm64 + echo '' + grep -qE amd64 + echo '' + grep -qE v7 + curl -vv '' -o /deconz.deb * Closing connection -1 curl: (3) URL using bad/illegal format or missing URL The command '/bin/sh -c chmod +x /download-deconz.sh && /download-deconz.sh ${VERSION} ${CHANNEL} ${TARGETPLATFORM}' returned a non-zero code: 3

I have to say that the instructions on how to build are wrong as I had to replace the ./Docker/ in the end with ./docker/ Any ideas?

manudar commented 2 years ago

OK, the build worked with the following command sudo docker build --build-arg VERSION="2.15.03" --build-arg CHANNEL="stable" --build-arg TARGETPLATFORM="amd64" -t "deconz:local" ./docker/

But also, by chance I found out how the hostname is set. It is set to the name given to the docker, but on creation. If the docker is renamed, it does not change it afterwards. So anothe way to fix ma problem would be to use the default build docker image and to call it nas (which is the hostname of my nas).

It works now using port 5902.

Jo-Be-Co commented 2 years ago

Actually I also don't know how the hosts file is filled - but yes it gets the name of your container. And if the container is started

  1. co-running on your host it will take that hostname
  2. with --hostname option the hostname will get this

As I mentioned not to set the hostname - this was my guess of things going wrong. In your case you could have use the option the set the hostname corresponding to the entry in /etc/hosts ... I really think the start.sh should get some line to sort out the needed entry in /etc/hosts!

Im am running on DSM7 too - but in my case I use a mac-vlan (or likely) so the the container uses a different ip. Imho this is needed on synology NAS as this hosts is using some needed ports by itself.

As you found out on your own: your build call lacked of the platform information.

manudar commented 2 years ago

I have been using it for some days and it works perfectly. It is amazing how much lighter than a VM the docker is. It is an amazing solution. Thanks for doing it.

lambu76 commented 1 year ago

Hi guys, I've exactly the same problem but I'm not so familiar with Linux, so I'm not getting how you solved it.

Someone could help me ?

I'm running DSM 7 (last update availalable) Deconzcommunity/deconz:latest docker image

Deconz work fine w/o VNC enabled

manudar commented 1 year ago

HI, I don't remember. It was a long time. What remember is that I used the build command that I put in the comments. Then it was important to call the docker with the right name from start (nas in my case) then you can rename. Finally these are the values I set for the variables, note that I changed the ports, but I don't remember why. You have to use those ports to connect to the novnc client.

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBIAN_FRONTEND: noninteractive DECONZ_VERSION: 2.17.01 DECONZ_WEB_PORT: 85 DECONZ_WS_PORT: 448 DEBUG_INFO: 1 DEBUG_APS: 0 DEBUG_ZCL: 0 DEBUG_ZDP: 0 DEBUG_DDF: 0 DEBUG_DEV: 0 DEBUG_OTA: 0 DEBUG_ERROR: 0 DEBUG_HTTP: 0 DECONZ_DEVICE: 0 DECONZ_VNC_MODE: 1 DECONZ_VNC_DISPLAY: 0 DECONZ_VNC_PASSWORD: changeme DECONZ_VNC_PASSWORD_FILE: 0 DECONZ_VNC_PORT: 5902 DECONZ_NOVNC_PORT: 6082 DECONZ_UPNP: 1 DECONZ_UID: 0 DECONZ_GID: 0 DECONZ START VERBOSE: 0

El mié, 14 dic 2022 a las 10:51, lambu76 @.***>) escribió:

Hi guys, I've exactly the same problem but I'm not so familiar with Linux, so I'm not getting how you solved it.

Someone could help me ?

I'm running DSM 7 (last update availalable) Deconzcommunity/deconz:latest docker image

Deconz work fine w/o VNC enabled

— Reply to this email directly, view it on GitHub https://github.com/deconz-community/deconz-docker/issues/110#issuecomment-1350754477, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZHVZJ6LDWUVQ3A7QJQ7HLWNGKA3ANCNFSM5VMHS4LQ . You are receiving this because you modified the open/close state.Message ID: @.***>

lambu76 commented 1 year ago

I recreated the image in Docker with same name of my synology device and then renamed in Docker.

In this way I was able to start VNC service....it's a bug in my opinion or something to improve at least.

thx to all