I had reason to restart the Pi on which HA and the zigbee2mqtt addon (1…17.1) are installed. Following this the addon will not run properly. It is stuck in a continual restart loop.
The latest log file shows:
debug 2021-02-16 17:03:14: Loaded state from file /config/zigbee2mqtt/state.json
info 2021-02-16 17:03:14: Logging to console and directory: '/config/zigbee2mqtt/log/2021-02-16.17-03-11' filename: log.txt
debug 2021-02-16 17:03:14: Removing old log directory '/config/zigbee2mqtt/log/2021-02-16.17-00-58'
info 2021-02-16 17:03:14: Starting Zigbee2MQTT version 1.17.1 (commit #1.17.1)
info 2021-02-16 17:03:14: Starting zigbee-herdsman (0.13.59)
debug 2021-02-16 17:03:14: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2149889-if00"}}'
error 2021-02-16 17:03:24: Failed to call 'OnEvent' 'stop' (TypeError: Cannot read property 'getEntries' of null
at Function.loadFromDatabaseIfNecessary (/app/node_modules/zigbee-herdsman/dist/controller/model/device.js:216:55)
at Function.all (/app/node_modules/zigbee-herdsman/dist/controller/model/device.js:236:16)
at Controller.getDevices (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:268:31)
at Zigbee.getClients (/app/lib/zigbee.js:145:30)
at OnEvent.stop (/app/lib/extension/onEvent.js:23:42)
at Controller.callExtensionMethod (/app/lib/controller.js:382:44)
at async Controller.stop (/app/lib/controller.js:190:9))
debug 2021-02-16 17:03:24: Saving state to file /config/zigbee2mqtt/state.json
error 2021-02-16 17:03:24: Not connected to MQTT server!
error 2021-02-16 17:03:24: Cannot send message: topic: 'zigbee2mqtt/bridge/state', payload: 'offline
info 2021-02-16 17:03:24: Disconnecting from MQTT server
It is worth noting that all was OK prior to this restart.
What can I do to recover this?