sanderdw / hassio-addons

DSMR Reader Datalogger and Metabase Home Assistant Add-ons
https://community.home-assistant.io/search?q=%40sanderdw%20%23home-assistant-os
Other
54 stars 14 forks source link

Addon crashes with incorrect MQTT config #27

Closed hugodejong closed 2 years ago

hugodejong commented 2 years ago

Hi,

The DSMR reader addon crashes when the MQTT config is incorrect. Now I can't log into the admin interface to change the settings. For now, is there a way to delete the config to configure the addon from scratch? Cheers!

`[ INFO ] Fixing /dev/ttyUSB* security... chmod: /dev/ttyUSB0: Read-only file system

[ INFO ] Verifying if the DSMR web credential variables have been set...

[ INFO ] Verifying database connectivity to host: 77b2833f-timescaledb with port: 5432...

[ INFO ] Database connectivity successfully verified!

[ INFO ] Running post configuration... Operations to perform: Apply all migrations: admin, auth, contenttypes, dsmr_api, dsmr_backend, dsmr_backup, dsmr_consumption, dsmr_datalogger, dsmr_dropbox, dsmr_frontend, dsmr_influxdb, dsmr_mindergas, dsmr_mqtt, dsmr_notification, dsmr_pvoutput, dsmr_stats, dsmr_weather, sessions Running migrations: No migrations to apply. 563 static files copied to '/var/www/dsmrreader/static'. Updating password of superuser "admin" Deactivating any other existing superusers

[ INFO ] Checking for NGINX SSL configuration...

[ INFO ] ENABLE_NGINX_SSL is disabled, nothing to see here. Continuing...

[ INFO ] Checking for HTTP AUTHENTICATION configuration...

[ INFO ] ENABLE_HTTP_AUTH is disabled, nothing to see here. Continuing...

[ INFO ] Configuring DSMR in standlone datalogger mode....

[ INFO ] Starting supervisord...

[ INFO ] Logfiles can be found at: /var/log/supervisor/*.log and /tmp/supervisord.log 2022-01-08 20:11:41,487 INFO Set uid to user 0 succeeded 2022-01-08 20:11:41,487 INFO Set uid to user 0 succeeded 2022-01-08 20:11:41,538 INFO RPC interface 'supervisor' initialized 2022-01-08 20:11:41,538 INFO RPC interface 'supervisor' initialized 2022-01-08 20:11:41,542 INFO supervisord started with pid 34 2022-01-08 20:11:41,542 INFO supervisord started with pid 34 2022-01-08 20:11:42,547 INFO spawned: 'processes' with pid 36 2022-01-08 20:11:42,547 INFO spawned: 'processes' with pid 36 2022-01-08 20:11:42,553 INFO spawned: 'dsmr_backend' with pid 37 2022-01-08 20:11:42,553 INFO spawned: 'dsmr_backend' with pid 37 2022-01-08 20:11:42,581 INFO spawned: 'dsmr_datalogger' with pid 38 2022-01-08 20:11:42,581 INFO spawned: 'dsmr_datalogger' with pid 38 2022-01-08 20:11:42,619 INFO spawned: 'dsmr_webinterface' with pid 39 2022-01-08 20:11:42,619 INFO spawned: 'dsmr_webinterface' with pid 39 2022-01-08 20:11:42,677 INFO spawned: 'nginx' with pid 40 2022-01-08 20:11:42,677 INFO spawned: 'nginx' with pid 40 2022-01-08 20:11:43,709 INFO success: processes entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-01-08 20:11:43,709 INFO success: processes entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-01-08 20:11:43,710 INFO success: dsmr_backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-01-08 20:11:43,710 INFO success: dsmr_backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-01-08 20:11:43,711 INFO success: dsmr_datalogger entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-01-08 20:11:43,711 INFO success: dsmr_datalogger entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) [2022-01-08 20:11:44 +0100] [39] [INFO] Starting gunicorn 20.1.0 [2022-01-08 20:11:44 +0100] [39] [INFO] Listening at: unix:/var/tmp/gunicorn--dsmr_webinterface.socket (39) [2022-01-08 20:11:44 +0100] [39] [INFO] Using worker: sync [2022-01-08 20:11:44 +0100] [42] [INFO] Booting worker with pid: 42 2022-01-08 20:11:46,081 INFO success: dsmr_webinterface entered RUNNING state, process has stayed up for > than 3 seconds (startsecs) 2022-01-08 20:11:46,081 INFO success: dsmr_webinterface entered RUNNING state, process has stayed up for > than 3 seconds (startsecs) Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html2022-01-08 20:11:47,961 INFO success: nginx entered RUNNING state, process has stayed up for > than 5 seconds (startsecs) 2022-01-08 20:11:47,961 INFO success: nginx entered RUNNING state, process has stayed up for > than 5 seconds (startsecs) Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html 2022-01-08 20:11:48,089 ERROR broker initialize_client 55 | MQTT: Failed to connect to broker (192.168.1.184:1883): EOF occurred in violation of protocol (_ssl.c:997) 2022-01-08 20:11:48,105 ERROR persistent_clients initialize 17 | CLIENTS: Init error: MQTT: Failed to connect to broker 2022-01-08 20:11:50,559 INFO exited: dsmr_backend (exit status 0; expected) 2022-01-08 20:11:50,559 INFO exited: dsmr_backend (exit status 0; expected) 2022-01-08 20:11:51,568 INFO spawned: 'dsmr_backend' with pid 43 2022-01-08 20:11:51,568 INFO spawned: 'dsmr_backend' with pid 43 2022-01-08 20:11:51,571 WARN received SIGQUIT indicating exit request 2022-01-08 20:11:51,571 WARN received SIGQUIT indicating exit request 2022-01-08 20:11:51,578 INFO waiting for processes, dsmr_backend, dsmr_datalogger, dsmr_webinterface, nginx to die 2022-01-08 20:11:51,578 INFO waiting for processes, dsmr_backend, dsmr_datalogger, dsmr_webinterface, nginx to die 2022-01-08 20:11:51,584 INFO stopped: nginx (exit status 0) 2022-01-08 20:11:51,584 INFO stopped: nginx (exit status 0) [2022-01-08 20:11:51 +0100] [39] [INFO] Handling signal: term [2022-01-08 20:11:51 +0100] [42] [INFO] Worker exiting (pid: 42) [2022-01-08 20:11:51 +0100] [39] [INFO] Shutting down: Master`

sanderdw commented 2 years ago

Hi Hugo, have a look here: https://community.home-assistant.io/t/dsmr-reader-add-on-for-home-assistant/279087/163?u=sanderdw. So you need to change the config in the table directly. Let me know if this fixes your problem.

hugodejong commented 2 years ago

Thank you, I've been able to get it working again :)