Deconz container doesn't start after update

Hi all,

I am running deconz on a Raspberry 3B in a docker container with docker-compose and everything is working fine. Today I wanted to update from the old marthoc/deconz to the latest deconzcommunity/deconz image. When I follow the instructions and change the entry point, the container still does not start. At startup I get the following error message displayed in the log:

qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Does anyone know the problem or can help me?
Best regards,
Jörg

Can you please give the full docker log as well as the docker-compose config with DECONZ_START_VERBOSE=1?

Sure :slight_smile:

docker-compose.yaml

version: '3.2'

services:
  deconz:
    image: deconzcommunity/deconz:latest
    container_name: deconz
    restart: always
    ports:
      - "82:82"
      - "4434:4434"
      - "5900:5900"
      - "6080:6080"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/dresden-elektronik/deCONZ_:/opt/deCONZ
    devices:
      - "/dev/ttyACM0:/dev/ttyACM0"
    environment:
      - "DECONZ_DEVICE=/dev/ttyACM0"
      - "DECONZ_WEB_PORT=82"
      - "DECONZ_WS_PORT=4434"
      - "DECONZ_VNC_MODE=1"
      - "DECONZ_VNC_DISPLAY=1"
      - "DECONZ_NOVNC_PORT=0"
      - "TZ=Europe/Berlin"
      - "DEBUG_INFO=1"
      - "DEBUG_APS=0"
      - "DEBUG_ZCL=0"
      - "DEBUG_ZDP=0"
      - "DEBUG_OTAU=0"
      - "QT_DEBUG_PLUGINS=1"
      - "DECONZ_START_VERBOSE=1"

Log:

+ echo [deconzcommunity/deconz] Starting deCONZ...
+ echo [deconzcommunity/deconz] Current deCONZ version: 2.15.03
+ echo [deconzcommunity/deconz] Web UI port: 82
+ echo [deconzcommunity/deconz] Websockets port: 4434
+ DECONZ_OPTS=--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=82         --ws-port=4434
+ echo [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=82         --ws-port=4434
+ echo [deconzcommunity/deconz] Modifying user and group ID
[deconzcommunity/deconz] Starting deCONZ...
[deconzcommunity/deconz] Current deCONZ version: 2.15.03
+ [ 1000 != 1000 ]
+ [ 1000 != 1000 ]
+ echo [deconzcommunity/deconz] Checking device group ID
+ [ /dev/ttyACM0 != 0 ]
+ DEVICE=/dev/ttyACM0
[deconzcommunity/deconz] Web UI port: 82
[deconzcommunity/deconz] Websockets port: 4434
[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=82         --ws-port=4434
[deconzcommunity/deconz] Modifying user and group ID
[deconzcommunity/deconz] Checking device group ID
+ stat --printf=%g /dev/ttyACM0
+ DIALOUTGROUPID=20
+ DIALOUTGROUPID=20
+ [ 20 != 20 ]
+ stat -c %A /dev/ttyACM0
+ cut -c 5-7
+ GROUPPERMISSIONS=rw-
+ [ rw- = --- ]
[deconzcommunity/deconz] VNC port: 5900
+ [ 1 != 0 ]
+ [ 5900 -lt 5900 ]
+ DECONZ_VNC_DISPLAY=:0
+ echo [deconzcommunity/deconz] VNC port: 5900
+ [ ! -e /opt/deCONZ/vnc ]
+ ln -sfT /opt/deCONZ/vnc /home/deconz/.vnc
+ chown deconz:deconz /home/deconz/.vnc
+ chown deconz:deconz /opt/deCONZ -R
+ [ 0 != 0 ]
+ echo changeme
+ tigervncpasswd -f
+ chmod 600 /opt/deCONZ/vnc/passwd
+ chown deconz:deconz /opt/deCONZ/vnc/passwd
+ gosu deconz tigervncserver -kill :*
tigervncserver: No VNC server running for this user!
+ gosu deconz tigervncserver -list :* -cleanstale

TigerVNC server sessions:

X DISPLAY #	RFB PORT #	PROCESS ID	SERVER
+ [ -e /tmp/.X0-lock ]
+ continue
+ [ -e /tmp/.X11-unix/X0 ]
+ continue
+ gosu deconz tigervncserver -SecurityTypes VncAuth,TLSVnc :0
/usr/bin/xauth:  file /home/deconz/.Xauthority does not exist

=================== tail /home/deconz/.vnc/e33933e48996:5900.log ===================
====================================================================================

tigervncserver: /usr/bin/Xtigervnc did not start up, please look into '/home/deconz/.vnc/e33933e48996:5900.log' to determine the reason! -1
Killing Xtigervnc process ID 46... which seems to be deadlocked. Using SIGKILL!
+ export DISPLAY=:0
+ [ 0 = 0 ]
+ echo [deconzcommunity/deconz] noVNC Disabled
+ [ /dev/ttyACM0 != 0 ]
+ DECONZ_OPTS=--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=82         --ws-port=4434 --dev=/dev/ttyACM0
+ [ 1 != 1 ]
+ mkdir -p /opt/deCONZ/otau
[deconzcommunity/deconz] noVNC Disabled
+ ln -sfT /opt/deCONZ/otau /home/deconz/otau
+ chown deconz:deconz /home/deconz/otau
+ chown deconz:deconz /opt/deCONZ -R
+ exec gosu deconz /usr/bin/deCONZ --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=82 --ws-port=4434 --dev=/dev/ttyACM0
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Can you get that log?

To be honest, I don’t know how. The log is only in the container available and I can’t connect to it because the container crashes and doesn’t start properly.

Can I ask why you need VNC? You can disable VNC by using DECONZ_VNC_MODE=0.

To bash into your container: docker exec -it container_name /bin/bash

I use VNC to see the topology of the devices: who is connecting to whom.

I know how to connect into a container. But that only works if the container can be started. In my case it does not come up at all including VNC.

When I start the container without VNC, it comes up. Meaning my problem is with the startup from the VNC server? Can I fix this?

Perhaps starting the container without VNC would help getting the log file and see what is causing it, to try to solve the issue.

Unfortunately, I can’t manage to get the log file. When I run the container into error and then restart it, it deletes the log from the previous instance automatically.
I have also tried to persist the log to a volume:

/var/dresden-elektronik/deCONZ/home:/opt/deCONZ/vnc

Then a log file is written there, but it is always empty. :roll_eyes:

 - "DEBUG_INFO=1"
  - "DEBUG_APS=0"
  - "DEBUG_ZCL=0"
  - "DEBUG_ZDP=0"
  - "DEBUG_OTAU=0"

Need to be set to:

 - "DEBUG_INFO=2"
  - "DEBUG_APS=2"
  - "DEBUG_ERROR=2"

Then you are able to get the log, right?

You should mount /home/deconz/.vnc/to a persistent volume.

I tried that first. But that doesn’t work either because .vnc is just a link to /opt/deCONZ/vnc

So you should have the log in /opt/deCONZ/vnc?

I would say that doesn’t change much:

[deconzcommunity/deconz] Starting deCONZ...
[deconzcommunity/deconz] Current deCONZ version: 2.15.03
[deconzcommunity/deconz] Web UI port: 82
[deconzcommunity/deconz] Websockets port: 4434
+ echo [deconzcommunity/deconz] Starting deCONZ...
+ echo [deconzcommunity/deconz] Current deCONZ version: 2.15.03
+ echo [deconzcommunity/deconz] Web UI port: 82
+ echo [deconzcommunity/deconz] Websockets port: 4434
[deconzcommunity/deconz] Using options --auto-connect=1         --appdata=/opt/deCONZ         --dbg-info=2         --dbg-aps=2         --dbg-zcl=0         --dbg-ddf=0         --dbg-dev=0         --dbg-zdp=0         --dbg-ota=0 	--dbg-error=2         --http-port=82         --ws-port=4434
[deconzcommunity/deconz] Modifying user and group ID
[deconzcommunity/deconz] Checking device group ID
+ DECONZ_OPTS=--auto-connect=1         --appdata=/opt/deCONZ         --dbg-info=2         --dbg-aps=2         --dbg-zcl=0         --dbg-ddf=0         --dbg-dev=0         --dbg-zdp=0         --dbg-ota=0 	--dbg-error=2         --http-port=82         --ws-port=4434
+ echo [deconzcommunity/deconz] Using options --auto-connect=1         --appdata=/opt/deCONZ         --dbg-info=2         --dbg-aps=2         --dbg-zcl=0         --dbg-ddf=0         --dbg-dev=0         --dbg-zdp=0         --dbg-ota=0 	--dbg-error=2         --http-port=82         --ws-port=4434
+ echo [deconzcommunity/deconz] Modifying user and group ID
+ [ 1000 != 1000 ]
+ [ 1000 != 1000 ]
+ echo [deconzcommunity/deconz] Checking device group ID
+ [ /dev/ttyACM0 != 0 ]
+ DEVICE=/dev/ttyACM0
+ stat --printf=%g /dev/ttyACM0
+ DIALOUTGROUPID=20
+ DIALOUTGROUPID=20
+ [ 20 != 20 ]
+ stat -c %A /dev/ttyACM0
+ cut -c 5-7
+ GROUPPERMISSIONS=rw-
+ [ rw- = --- ]
+ [ 1 != 0 ]
+ [ 5900 -lt 5900 ]
+ DECONZ_VNC_DISPLAY=:0
+ echo [deconzcommunity/deconz] VNC port: 5900
+ [ ! -e /opt/deCONZ/vnc ]
[deconzcommunity/deconz] VNC port: 5900
+ ln -sfT /opt/deCONZ/vnc /home/deconz/.vnc
+ chown deconz:deconz /home/deconz/.vnc
+ chown deconz:deconz /opt/deCONZ -R
+ [ 0 != 0 ]
+ echo changeme
+ tigervncpasswd -f
+ chmod 600 /opt/deCONZ/vnc/passwd
+ chown deconz:deconz /opt/deCONZ/vnc/passwd
+ gosu deconz tigervncserver -kill :*
tigervncserver: No VNC server running for this user!
+ gosu deconz tigervncserver -list :* -cleanstale

TigerVNC server sessions:

X DISPLAY #	RFB PORT #	PROCESS ID	SERVER
+ [ -e /tmp/.X0-lock ]
+ continue
+ [ -e /tmp/.X11-unix/X0 ]
+ continue
+ gosu deconz tigervncserver -SecurityTypes VncAuth,TLSVnc :0

=================== tail /home/deconz/.vnc/31c0fa408356:5900.log ===================
====================================================================================

tigervncserver: /usr/bin/Xtigervnc did not start up, please look into '/home/deconz/.vnc/31c0fa408356:5900.log' to determine the reason! -1
Killing Xtigervnc process ID 46... which seems to be deadlocked. Using SIGKILL!
+ export DISPLAY=:0
+ [ 0 = 0 ]
+ echo [deconzcommunity/deconz] noVNC Disabled
+ [ /dev/ttyACM0 != 0 ]
+ DECONZ_OPTS=--auto-connect=1         --appdata=/opt/deCONZ         --dbg-info=2         --dbg-aps=2         --dbg-zcl=0         --dbg-ddf=0         --dbg-dev=0         --dbg-zdp=0         --dbg-ota=0 	--dbg-error=2         --http-port=82         --ws-port=4434 --dev=/dev/ttyACM0
[deconzcommunity/deconz] noVNC Disabled
+ [ 1 != 1 ]
+ mkdir -p /opt/deCONZ/otau
+ ln -sfT /opt/deCONZ/otau /home/deconz/otau
+ chown deconz:deconz /home/deconz/otau
+ chown deconz:deconz /opt/deCONZ -R
+ exec gosu deconz /usr/bin/deCONZ --auto-connect=1 --appdata=/opt/deCONZ --dbg-info=2 --dbg-aps=2 --dbg-zcl=0 --dbg-ddf=0 --dbg-dev=0 --dbg-zdp=0 --dbg-ota=0 --dbg-error=2 --http-port=82 --ws-port=4434 --dev=/dev/ttyACM0
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Exactly. But, as I wrote above, this is always empty (0 bytes in size).

Log

@phdelodder where do the logs go after creating?

The logs don’t go anywhere, they just stay there.

Killing Xtigervnc process ID 46... which seems to be deadlocked. Using SIGKILL!```

There seems to be a deadlock issue, we need to know what process id 46. Can you change you display to 1?

If I am meant, that is unfortunately beyond my knowledge. How can I achieve that?