Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z2M crashes when it cannot save the state #4388

Closed
syphernl opened this issue Sep 17, 2020 · 1 comment
Closed

Z2M crashes when it cannot save the state #4388

syphernl opened this issue Sep 17, 2020 · 1 comment
Labels
problem Something isn't working

Comments

@syphernl
Copy link

What happened

Because of the issues in #4307 I switched to the dev-branch. However, it crashes every 5 minutes.
supervise-daemon restarts the process and 5 minutes later it happens again.

The last line of each log was Saving state to file /opt/zigbee2mqtt/data/state.json. I looked in to this and found out that that file was not writable for the Z2M user.

What did you expect to happen

An error to be shown that the state could not be saved and Z2M not to crash / exit because it cannot write to the state file.

How to reproduce it (minimal and precise)

  • Ensure the data/state.json is not writable for the Z2M user (in my case it was root:root with 0644 permissions while Z2M runs as zigbee2mqtt user)
  • Start Z2M
  • After 5 minutes Z2M will stop with exit code 1.

Debug info

Zigbee2MQTT version: 1.14.4-dev (9c2fd10)
Adapter hardware: CC2531
Adapter firmware version: 20190619

@syphernl syphernl added the problem Something isn't working label Sep 17, 2020
@Koenkk
Copy link
Owner

Koenkk commented Sep 19, 2020

Fixed!

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

@Koenkk Koenkk closed this as completed Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants