Closed Ruvetuve closed 1 year ago
Hmm, this is odd as there's no output at all. Somehting like this:
-> docker logs -f dsmr
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------
User UID: 803
User GID: 803
-------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-set-app-defaults: executing...
[ INFO ] DSMR Reader Reader release: 5.9.0
[ INFO ] DSMR Reader Reader Docker release: 2022.12.04
[ INFO ] Ensure permissions...
[ INFO ] Setting architecture requirements...
[ INFO ] X64 Architecture
[ INFO ] Verifying if the DSMR Reader web credential variables have been set...
[ INFO ] Verifying database connectivity to host: dsmrdb with port: 5432...
[ INFO ] Database connectivity successfully verified!
[ INFO ] Vacuum cleaning enabled. Vacuming database...
vacuumdb: vacuuming database "dsmrreader"
[ 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.
559 static files copied to '/var/www/dsmrreader/static'.
Updating password of superuser "admin"
Deactivating any other existing superusers
[ INFO ] Checking for CLIENT CERTIFICATE AUTHENTICATION configuration...
[ INFO ] ENABLE_CLIENTCERT_AUTH is disabled, nothing to see here. Continuing...
[ 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 Reader to run all processes in a single container with a serial or ipv4 datalogger...
[ INFO ] Using a serial connection for the DSMR Reader remote datalogger...
[ INFO ] Fixing /dev/ttyUSB0 security...
[ INFO ] Adding serial input method configuration settings...
[cont-init.d] 20-set-app-defaults: exited 0.
It looks like something is wrong with caching or something as I also see 0 static files copied to '/var/www/dsmrreader/static', 559 unmodified
...umnodified?? . Can you remove the container fully and retry again?
same result. but it seems to copy the files now.
log:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 10-adduser: executing... usermod: no changes
[cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-set-app-defaults: executing... 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.
559 static files copied to '/var/www/dsmrreader/static'. Updating password of superuser "admin" Deactivating any other existing superusers [cont-init.d] 20-set-app-defaults: exited 1. [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.
I'm using this instance for receiver only from a rasp pi which is sending the data to this unraid docker.
Saw you just pushed a new version, which is now taking the DEBUG arg into account, thanks!
Also the container works again, I do see some errors because i use receiver and not standalone (I assume)
`Starting DSMR Reader - datalogger... 192.168.0.5 - - [19/Dec/2022:11:26:29 +0100] "POST /api/v1/datalogger/dsmrreading HTTP/1.1" 201 0 "-" "python-requests/2.28.1" "-" 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-12-19 11:26:29,713 ERROR mixins run_once 107 | dsmr_datalogger.management.commands.dsmr_datalogger: [!] Exception raised. Traceback (most recent call last):
File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 39, in read_telegram serial_handle = serial.serial_for_url( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/serial/init.py", line 90, in serial_for_url instance.open() File "/usr/local/lib/python3.11/site-packages/serial/serialposix.py", line 316, in open raise SerialException("Port must be configured before it can be used.") serial.serialutil.SerialException: Port must be configured before it can be used.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/app/dsmr_backend/mixins.py", line 96, in run_once self.run(data=self.data, **options) File "/app/dsmr_datalogger/management/commands/dsmr_datalogger.py", line 29, in run telegram = next(self.telegram_generator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 43, in read_telegram raise RuntimeError("Failed to connect: {}", error) from error
RuntimeError: ('Failed to connect: {}', SerialException('Port must be configured before it can be used.'))
192.168.0.5 - - [19/Dec/2022:11:26:31 +0100] "POST /api/v1/datalogger/dsmrreading HTTP/1.1" 201 0 "-" "python-requests/2.28.1" "-" 192.168.0.47 - - [19/Dec/2022:11:26:31 +0100] "GET /xhr/header HTTP/1.1" 200 146 "http://dsmr.lan/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-"`
Great! Check out the readme. Receiver mode doesn't exist anymore with that name:
https://github.com/xirixiz/dsmr-reader-docker#dsmr-datalogger-related
Ok thanks, ive changed _DATALOGGER_MODE to _apiserver so now the docker startup says _-e 'DATALOGGER_MODE'='apiserver'
by setting the unraid template
DATALOGGER MODE (change if P1 port is on this machine to STANDALONE)
to _receiver|standalone|api_server|apiclient
Still i get these type or errors as shown below. Do i need to set something inside DSMR configuration screens?
` 192.168.0.5 - - [19/Dec/2022:13:40:30 +0100] "POST /api/v1/datalogger/dsmrreading HTTP/1.1" 201 0 "-" "python-requests/2.28.1" "-" 192.168.0.5 - - [19/Dec/2022:13:40:32 +0100] "POST /api/v1/datalogger/dsmrreading HTTP/1.1" 201 0 "-" "python-requests/2.28.1" "-" Starting DSMR Reader - datalogger... 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-12-19 13:40:33,435 ERROR mixins run_once 107 | dsmr_datalogger.management.commands.dsmr_datalogger: [!] Exception raised. Traceback (most recent call last):
File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 39, in read_telegram serial_handle = serial.serial_for_url( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/serial/init.py", line 90, in serial_for_url instance.open() File "/usr/local/lib/python3.11/site-packages/serial/serialposix.py", line 316, in open raise SerialException("Port must be configured before it can be used.") serial.serialutil.SerialException: Port must be configured before it can be used.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/app/dsmr_backend/mixins.py", line 96, in run_once self.run(data=self.data, **options) File "/app/dsmr_datalogger/management/commands/dsmr_datalogger.py", line 29, in run telegram = next(self.telegram_generator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 43, in read_telegram raise RuntimeError("Failed to connect: {}", error) from error
RuntimeError: ('Failed to connect: {}', SerialException('Port must be configured before it can be used.'))
192.168.0.5 - - [19/Dec/2022:13:40:34 +0100] "POST /api/v1/datalogger/dsmrreading HTTP/1.1" 201 0 "-" "python-requests/2.28.1" "-" 192.168.0.5 - - [19/Dec/2022:13:40:36 +0100] "POST /api/v1/datalogger/dsmrreading HTTP/1.1" 201 0 "-" `
Correct. The name of the variable is DSMRREADER_OPERATION_MODE
😄
added variable DSMRREADER_OPERATION_MODE
to the unraid template with
Key: DSMRREADER_OPERATION_MODE
Value: api_server
And the errors are gone, thanks again!
Support guidelines
I've found an issue and checked that ...
Description
Hi,
Ik krijg de volgende log uit unraid, waarna de container direct afsluit. Ik kan mij herinneren dat ik gister de image geupdate heb. Als ik de debug env variable toevoeg aan de startup zie ik nergens debug logs..
`[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 10-adduser: executing... usermod: no changes
User UID: 803 User GID: 803
[cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-set-app-defaults: executing... 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.
0 static files copied to '/var/www/dsmrreader/static', 559 unmodified. Updating password of superuser "admin" Deactivating any other existing superusers [cont-init.d] 20-set-app-defaults: exited 1. [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.`
Expected behaviour
startup van de docker of log files
Actual behaviour
container stopt gelijk na starten
Steps to reproduce
Start de docker
Docker info
Version
none
Docker compose
Container logs
`[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 10-adduser: executing... usermod: no changes
User UID: 803 User GID: 803
[cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-set-app-defaults: executing... 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.
0 static files copied to '/var/www/dsmrreader/static', 559 unmodified. Updating password of superuser "admin" Deactivating any other existing superusers [cont-init.d] 20-set-app-defaults: exited 1. [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.`
Additional info
No response