Docker error with Zigbee and MQTT containers

Hello,
I have a problem with my Gladys installation,
The MQTT and ZIGBEE2MQTT services have stopped working, I can’t figure out why, I haven’t changed anything in particular, here is the log message, I’d appreciate any troubleshooting suggestions.

My current setup uses unRAID OS, they moved from Docker version 20.10.24, build 297e128
to Docker 23, then reverted because of stability issues or something, do you think that could be the problem?

2023-08-17T23:24:37+0200 \u003cwarn\u003e service.start.js:44 (Service.start) Unable to start service zigbee2mqtt PlatformNotCompatible [Error]: DOCKER_CONTAINER_ID_NOT_AVAILABLE
    at System.getGladysContainerId (/src/server/lib/system/system.getGladysContainerId.js:115:11)
    at System.getNetworkMode (/src/server/lib/system/system.getNetworkMode.js:16:25)
    at Zigbee2mqttManager.init (/src/server/services/zigbee2mqtt/lib/init.js:19:23)
    at Object.start (/src/server/services/zigbee2mqtt/index.js:17:5)
    at Service.start (/src/server/lib/service/service.start.js:33:7)
    at start (/src/server/api/controllers/service.controller.js:22:21)
2023-08-17T23:24:39+0200 \u003cinfo\u003e index.js:16 (Object.start) Starting MQTT service
2023-08-17T23:24:39+0200 \u003cwarn\u003e service.start.js:44 (Service.start) Unable to start service mqtt PlatformNotCompatible [Error]: DOCKER_CONTAINER_ID_NOT_AVAILABLE
    at System.getGladysContainerId (/src/server/lib/system/system.getGladysContainerId.js:115:11)
    at System.getNetworkMode (/src/server/lib/system/system.getNetworkMode.js:16:25)
    at MqttHandler.checkDockerNetwork (/src/server/services/mqtt/lib/checkDockerNetwork.js:8:29)
    at MqttHandler.getConfiguration (/src/server/services/mqtt/lib/getConfiguration.js:24:24)
    at MqttHandler.init (/src/server/services/mqtt/lib/init.js:13:25)
    at Object.start (/src/server/services/mqtt/index.js:17:5)
    at Service.start (/src/server/lib/service/service.start.js:33:7)
    at start (/src/server/api/controllers/service.controller.js:22:21)
1 Like

Did you try simply unchecking/rechecking the integrations in Gladys?
This has the effect of destroying/recreating/reconfiguring the containers.


Mosquito was updated by watchtower yesterday…

This error occurs when Gladys has no way to find the id of the container it’s in (Gladys/server/lib/system/system.getGladysContainerId.js at master · GladysAssistant/Gladys · GitHub)

We use 3 methods to find the container ID:

  • Using the CID file
  • By reading the /proc/self/cgroup file
  • By reading the /proc/self/mountinfo file

Depending on the Docker version, one of the three methods works :stuck_out_tongue:

Maybe indeed upgrading to a recent Docker version removed all these methods?

Which command did you use to start Gladys?

Thanks for your help,

So when I try to uncheck and recheck it it doesn’t do anything at all, I even have the impression that the button no longer works (nothing appears in the logs when I click on it), and in the integrations in the settings, both are in error and cannot be started

@pierre-gilles this could be coming from there, it reminds me of the adjustments we had to make to get it running on unraid and the addition of a variable to the docker: /var/run/docker.sock, or even this thread: Gladys sur Unraid

However, I just checked and the docker.sock is still in the same place:

@jgcb00 Do you have the « docker run » command you used to start Gladys?

yep :

docker run
  -d
  --name='Gladys-Assistant'
  --net='host'
  --privileged=true
  -e TZ="Europe/Paris"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Tower"
  -e HOST_CONTAINERNAME="Gladys-Assistant"
  -e 'TZ'='Europe/Paris'
  -e 'SERVER_PORT'='8006'
  -e 'SQLITE_FILE_PATH'='/var/lib/gladysassistant/gladys-production.db'
  -e 'NODE_ENV'='production'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8006]'
  -l net.unraid.docker.icon='https://gladysassistant.com/en/img/external/github-gladys-logo.png'
  -v '/mnt/user/appdata/Gladys':'/var/lib/gladysassistant':'rw'
  -v '/dev':'/dev':'rw'
  -v '/run/udev':'/run/udev':'ro'
  -v '/var/run/docker.sock':'/var/run/docker.sock':'rw'
  --restart=always
  --log-opt max-size=10m 'gladysassistant/gladys:v4'

8cc639be315af2f6a2680da6a99fb4236e73fbe97729c42bb0d0e8ff66f226e5

Ok, that makes sense then that it doesn’t work anymore — it’s missing:

--cgroupns=host \

Check the Docker command in the documentation:

It’s an old change — it dates from March 2022 :smiley:

The explanation on the blog:

Indeed, that solved my problem, but what bothers me is that I didn’t need it before — probably Unraid hadn’t been upgraded to Debian 11. I’ll update the template that’s on git
Thanks a lot @pierre-gilles

1 Like

Great, glad it works :raising_hands:

5 messages were split into a new topic: Problem connecting to MQTT after Mosquitto update by Watchtower

A post has been merged into an existing topic: Problem connecting to MQTT after Mosquitto update via Watchtower