Zwave-js Docker giving healthcheck error

I am running HA and zwave-js in Docker. My zwave-js is giving a healthcheck error and I can’t figure out what the problem is. My zwave devices are all working fine.

    zwave:
        image: zwavejs/zwave-js-ui:latest
        hostname: zwave
        container_name: zwave
        restart: unless-stopped
        ports:
            - "8091:8091"
            - "3000:3000"
        volumes:
            - /data/docker/zwave/store:/usr/src/app/store
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=America/New_York
        healthcheck:
            test: 'wget --no-verbose --spider --no-check-certificate --header "Accept: text/plain" http://localhost:8091/health || exit 1'
            interval: 1m
            timeout: 10s
            start_period: 30s
            retries: 3
        stdin_open: true
        tty: true
        stop_signal: SIGINT
        devices:
            - '/dev/serial/by-id/usb-Nabu_Casa_ZWA-2_xxx-if00:/dev/zwave'
Connecting to localhost:8091 ([::1]:8091) wget: server returned error: HTTP/1.1 500 Internal Server Error

When I connect to the console for the container and run it manually, I get a similar error.

/usr/src/app # wget --no-verbose --spider --no-check-certificate --header "Accept: text/plain" http://localhost:8091/health
Connecting to localhost:8091 ([::1]:8091)
wget: server returned error: HTTP/1.1 500 Internal Server Error
/usr/src/app # 

test from a PC. This command may not work within docker network for other reasons so test from PC if possible to verify it works at all.

wget --no-verbose --spider --no-check-certificate --header “Accept: text/plain” http://containerIP:8091/health/zwave

Verify below. likely /health was enough but if for some reason you disabled mqtt it may show 500 and /health/zwave should be used

/health: Returns 200 if both mqtt and zwave client are connected, 500 otherwise /health/mqtt: Returns 200 if mqtt client is connected, 500 otherwise /health/zwave: Returns 200 if zwave client is connected, 500 otherwise

I couldnt get that healthcheck to work due to my docker networking and container isolation. below works. it is just checking port open or not.

    healthcheck:
      test: ["CMD-SHELL", "nc -z localhost 8091 || exit 1"]
      interval: 5m
      timeout: 5s
      retries: 3
      start_period: 120s

Checking /health/zwave works. But I didn’t disable MQTT so I’m not sure why /health fails. :confused:

In fact, I just disabled MQTT and then /health works fine.