zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
984 stars 201 forks source link

[Bug]: docker container is crash loop, complaining logs directory doesn't exist #2625

Closed chilicheech closed 2 years ago

chilicheech commented 2 years ago

Checklist

Deploy method

Docker

Zwavejs2Mqtt version

7.0.0

ZwaveJS version

unknown

Describe the bug

App is in a crash loop with the following error:

2022-09-02 11:07:13.631 INFO APP: Version: 7.0.0
2022-09-02 11:07:13.632 INFO APP: Application path:/usr/src/app

 ______                       _     ___                  _   _   
|___  /                      (_)   |__ \                | | | |  
   / /_      ____ ___   _____ _ ___   ) |_ __ ___   __ _| |_| |_ 
  / /\ \ /\ / / _` \ \ / / _ \ / __| / /| '_ ` _ \ / _` | __| __|
 / /__\ V  V / (_| |\ V /  __/ \__ \/ /_| | | | | | (_| | |_| |_ 
/_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_| |_|\__, |\__|\__|
                            _/ |                      | |        
                           |__/                       |_|        

2022-09-02 11:07:13.644 WARN STORE: scenes.json not found
2022-09-02 11:07:13.695 WARN BACKUP: Store backup is disabled
2022-09-02 11:07:13.696 WARN BACKUP: Nvm backup is disabled
Logging to file:
    /usr/src/app/store/logs/zwavejs_2022-09-02.log
Error: ENOTDIR: not a directory, open '/usr/src/app/store/logs/zwavejs_2022-09-02.log'

For some reason my store directory has a logs file:

-rw-rw-r--  1 pi   pi       0 Jun 29  2021 logs

To Reproduce

Upgrade from last working docker image version to version 7.0.0 and start the container.

Expected behavior

The app should start up without issues. It should automatically create the logs directory.

Additional context

No response

chilicheech commented 2 years ago

I solved the issue by removing that logs file and starting the container. It then created the directory automatically and the app worked.