hassio-addons / addon-appdaemon

AppDaemon4 - Home Assistant Community Add-ons
https://addons.community
MIT License
151 stars 47 forks source link

AppDeamon Crashing #203

Closed bartgabriels closed 2 years ago

bartgabriels commented 2 years ago

Problem/Motivation

Since a few days, my NSPanels with LoveLace integration has been having issues. Opened a case at the maker and he pointed to AppDeamon: https://github.com/joBr99/nspanel-issue-graveyard/issues/9

Since then, looking in the logs, AppDeamon keeps crashing.

Expected behavior

NSPanels to update correctly

Actual behavior

AppDeamon Keeps crashing

Steps to reproduce

Not sure. I'm having 2 integrations using AppDeamon:

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

Captured logs:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: AppDaemon
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.9.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 8.2  (aarch64 / raspberrypi3-64)
 Home Assistant Core: 2022.7.5
 Home Assistant Supervisor: 2022.07.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/appdaemon.sh
Looking in links: https://wheels.home-assistant.io/musllinux/
Collecting babel
  Downloading Babel-2.10.3-py3-none-any.whl (9.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 5.8 MB/s eta 0:00:00
Requirement already satisfied: pytz>=2015.7 in /usr/lib/python3.10/site-packages (from babel) (2021.3)
Installing collected packages: babel
Successfully installed babel-2.10.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
cont-init: info: /etc/cont-init.d/appdaemon.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun appdaemon (no readiness notification)
s6-rc: info: service legacy-services successfully started
[10:54:56] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/appdaemon/__main__.py", line 443, in main
    admain.main()
  File "/usr/lib/python3.10/site-packages/appdaemon/__main__.py", line 387, in main
    self.logging = logging.Logging(logs, args.debug)
  File "/usr/lib/python3.10/site-packages/appdaemon/logging.py", line 288, in __init__
    handler = RotatingFileHandler(
  File "/usr/lib/python3.10/logging/handlers.py", line 155, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding,
  File "/usr/lib/python3.10/logging/handlers.py", line 58, in __init__
    logging.FileHandler.__init__(self, filename, mode=mode,
  File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
FileNotFoundError: [Errno 2] No such file or directory: '/config/appdaemon/log/appdaemon.log'
[10:55:18] WARNING: AppDaemon crashed, halting add-on
s6-rc: info: service legacy-services: stopping
[10:55:18] INFO: AppDaemon stoped, restarting...
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
bartgabriels commented 2 years ago

Removed logging part from the config and fixed now.