ZwaveJS2Mqtt: Failed to lock DB file


I currently have the problem that after a reboot of the Raspberry Pi the zwavejs2mqtt container does not work anymore. The container is running, the UI is also accessible, but all my devices are not displayed.

Instead, I’m seeing the error:

Failed to initialize the driver: Error: Failed to lock DB file "/usr/src/app/store/f5a3756b.metadata.jsonl"!
                                      at (/usr/src/app/node_modules/@alcalzone/jsonl-db/src/lib/db.
                                      at Driver.initValueDBs (/usr/src/app/node_modules/zwave-js/src/lib/driver/
                                      at Driver.initializeControllerAndNodes (/usr/src/app/node_modules/zwave-js
                                      at Immediate.<anonymous> (/usr/src/app/node_modules/zwave-js/src/lib/drive

Sometimes, after a few minutes it’s magically working again, but not every time.

Do you have an idea what could be the reason for that issue?
Could it have to do with the write permissions? I’m not a Linux pro, I set up the container following a guide that also adjusted the privileges for the mounted folder. But maybe something didn’t fit there.

Here my config:

  • Device: Raspberry Pi 3B
  • Docker with portainer
  • ZwaveJS2Mqtt running on that portainer
  • Zigbee2Mqtt running on the same portainer
  • Using 2 sticks for Zwave and Zigbee, they are mounted with their device ID (e.g. /dev/serial/by-id/usb-0658_0200-if00) to avoid interferences
  • The docker container is running in privileged mode

Thanks for your support!

Best regards

The error is about accessing the mounted folder, so this seems likely. I’d try to go back to some default settings, see if that helps.

SDcard or some other media as the OS drive?

Almost sounds like the media’s going bad.