🚨column dsmr_mqtt_mqttbrokersettings.qos #1522
-
DescriptionToday, out of the blue dsmr-reader stopped sending mqtt data. When i try to modify the configuration i receive a server error. In About & support the following message is presented: Too many outgoing MQTT messages queued for transit (now) DSMR-reader version4.17 DSMR-reader platformDocker (Xirixiz) Debug info dumpServer Error
Sorry, something unexpected happened.
Exception:
ProgrammingError: column dsmr_mqtt_mqttbrokersettings.qos does not exist
LINE 1: ...ord", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt...
^
Traceback:
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/mixins.py", line 52, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 159, in get
context = self.get_context_data(**kwargs)
File "/dsmr/dsmr_frontend/views/configuration.py", line 41, in get_context_data
mqtt_broker_settings=MQTTBrokerSettings.get_solo(),
File "/usr/local/lib/python3.9/site-packages/solo/models.py", line 55, in get_solo
obj, created = cls.objects.get_or_create(pk=cls.singleton_instance_id)
File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 573, in get_or_create
return self.get(**kwargs), False
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 425, in get
num = len(clone)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 269, in __len__
self._fetch_all()
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1308, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 53, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params) Datasebase Debug info dump2021-11-24 22:19:38.384 CET [28] ERROR: column dsmr_mqtt_mqttbrokersettings.qos does not exist at character 340
2021-11-24 22:19:38.384 CET [28] STATEMENT: SELECT "dsmr_mqtt_mqttbrokersettings"."id", "dsmr_mqtt_mqttbrokersettings"."enabled", "dsmr_mqtt_mqttbrokersettings"."hostname", "dsmr_mqtt_mqttbrokersettings"."port", "dsmr_mqtt_mqttbrokersettings"."secure", "dsmr_mqtt_mqttbrokersettings"."username", "dsmr_mqtt_mqttbrokersettings"."password", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt_mqttbrokersettings"."qos", "dsmr_mqtt_mqttbrokersettings"."restart_required" FROM "dsmr_mqtt_mqttbrokersettings" WHERE "dsmr_mqtt_mqttbrokersettings"."id" = 1 LIMIT 21
2021-11-24 22:20:58.387 CET [34] ERROR: column dsmr_mqtt_mqttbrokersettings.qos does not exist at character 340
2021-11-24 22:20:58.387 CET [34] STATEMENT: SELECT "dsmr_mqtt_mqttbrokersettings"."id", "dsmr_mqtt_mqttbrokersettings"."enabled", "dsmr_mqtt_mqttbrokersettings"."hostname", "dsmr_mqtt_mqttbrokersettings"."port", "dsmr_mqtt_mqttbrokersettings"."secure", "dsmr_mqtt_mqttbrokersettings"."username", "dsmr_mqtt_mqttbrokersettings"."password", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt_mqttbrokersettings"."qos", "dsmr_mqtt_mqttbrokersettings"."restart_required" FROM "dsmr_mqtt_mqttbrokersettings" WHERE "dsmr_mqtt_mqttbrokersettings"."id" = 1 LIMIT 21
2021-11-24 22:24:38.314 CET [41] ERROR: column dsmr_mqtt_mqttbrokersettings.qos does not exist at character 340
2021-11-24 22:24:38.314 CET [41] STATEMENT: SELECT "dsmr_mqtt_mqttbrokersettings"."id", "dsmr_mqtt_mqttbrokersettings"."enabled", "dsmr_mqtt_mqttbrokersettings"."hostname", "dsmr_mqtt_mqttbrokersettings"."port", "dsmr_mqtt_mqttbrokersettings"."secure", "dsmr_mqtt_mqttbrokersettings"."username", "dsmr_mqtt_mqttbrokersettings"."password", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt_mqttbrokersettings"."qos", "dsmr_mqtt_mqttbrokersettings"."restart_required" FROM "dsmr_mqtt_mqttbrokersettings" WHERE "dsmr_mqtt_mqttbrokersettings"."id" = 1 LIMIT 21
2021-11-24 22:24:39.290 CET [41] ERROR: column dsmr_mqtt_mqttbrokersettings.qos does not exist at character 340
2021-11-24 22:24:39.290 CET [41] STATEMENT: SELECT "dsmr_mqtt_mqttbrokersettings"."id", "dsmr_mqtt_mqttbrokersettings"."enabled", "dsmr_mqtt_mqttbrokersettings"."hostname", "dsmr_mqtt_mqttbrokersettings"."port", "dsmr_mqtt_mqttbrokersettings"."secure", "dsmr_mqtt_mqttbrokersettings"."username", "dsmr_mqtt_mqttbrokersettings"."password", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt_mqttbrokersettings"."qos", "dsmr_mqtt_mqttbrokersettings"."restart_required" FROM "dsmr_mqtt_mqttbrokersettings" WHERE "dsmr_mqtt_mqttbrokersettings"."id" = 1 LIMIT 21
2021-11-24 22:24:47.992 CET [41] ERROR: column dsmr_mqtt_mqttbrokersettings.qos does not exist at character 340
2021-11-24 22:24:47.992 CET [41] STATEMENT: SELECT "dsmr_mqtt_mqttbrokersettings"."id", "dsmr_mqtt_mqttbrokersettings"."enabled", "dsmr_mqtt_mqttbrokersettings"."hostname", "dsmr_mqtt_mqttbrokersettings"."port", "dsmr_mqtt_mqttbrokersettings"."secure", "dsmr_mqtt_mqttbrokersettings"."username", "dsmr_mqtt_mqttbrokersettings"."password", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt_mqttbrokersettings"."qos", "dsmr_mqtt_mqttbrokersettings"."restart_required" FROM "dsmr_mqtt_mqttbrokersettings" WHERE "dsmr_mqtt_mqttbrokersettings"."id" = 1 LIMIT 21
2021-11-24 22:27:13.717 CET [44] ERROR: column dsmr_mqtt_mqttbrokersettings.qos does not exist at character 340
2021-11-24 22:27:13.717 CET [44] STATEMENT: SELECT "dsmr_mqtt_mqttbrokersettings"."id", "dsmr_mqtt_mqttbrokersettings"."enabled", "dsmr_mqtt_mqttbrokersettings"."hostname", "dsmr_mqtt_mqttbrokersettings"."port", "dsmr_mqtt_mqttbrokersettings"."secure", "dsmr_mqtt_mqttbrokersettings"."username", "dsmr_mqtt_mqttbrokersettings"."password", "dsmr_mqtt_mqttbrokersettings"."client_id", "dsmr_mqtt_mqttbrokersettings"."qos", "dsmr_mqtt_mqttbrokersettings"."restart_required" FROM "dsmr_mqtt_mqttbrokersettings" WHERE "dsmr_mqtt_mqttbrokersettings"."id" = 1 LIMIT 21 |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Bedankt voor je melding. Kan het zijn dat je een keer een update hebt gedaan die niet helemaal gelukt is/lijkt? Ik vermoed dat hier een nieuwe versie tegen een oude database aanpraat. Elke nieuwe versie werkt vaak de database zelf bij, al weet ik niet hoe/wanneer dit via de Docker-setup gebeurt. Als je weet hoe je handmatig in de DSMR-container kan komen, kun je proberen of dit herkend wordt en iets uitvoert:
|
Beta Was this translation helpful? Give feedback.
-
En jij bedankt voor je snelle reactie! :-) Versie 4.17 draait nu al 2 weken perfect, het is vanmorgen, uit het niets fout gegaan. manage.py migrate wordt goed uitgevoerd maar er staan geen migraties klaar. Heb je nog een ander idee? 👍 Ik gebruik overigens postgres:10.5-alpine als DB. |
Beta Was this translation helpful? Give feedback.
-
Kan het dan nog andersom zijn? Dat je database van DSMR-reader v4.19 is en je container dus van v4.17? Want dat missende veld is pas in v4.19 verwijderd: 9d07358 |
Beta Was this translation helpful? Give feedback.
-
Je hebt helemaal gelijk. Ik heb een fout gemaakt met de naam van de images. De oude container stond op "auto start" en de nieuwe container niet. Hierdoor startte de oude container op. *schaam schaam Vanmorgen heeft Ansible updates uitgevoerd en is Docker opnieuw gestart. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Oke, maar krijg je het nu werkend? Ik denk dat je hoe dan ook moet updaten naar v4.19. Daarna kun je eventueel terug naar v4.17 (als dat bewust was). Echter omdat alleen versie 4.19 weet wat er anders is tussen zichzelf en vorige versies (andersom kent v4.17 niet wat in 4.19 zit), kunnen database-downgrades alleen gedaan worden vanaf de versie waar de database al op zit. |
Beta Was this translation helpful? Give feedback.
-
Voor elke release is er een pin van de DB-migraties: Als je terug wilt naar v4.17 moet je iig updaten naar v4.19 en dan dit script (of de commands erin) uitvoeren: Daarna kun je de container weer op v4.17 zetten en zou dat missende veld er weer moeten zijn. Als je gewoon naar v4.19 wil, verwacht ik verder geen issues na de update. |
Beta Was this translation helpful? Give feedback.
Je hebt helemaal gelijk. Ik heb een fout gemaakt met de naam van de images. De oude container stond op "auto start" en de nieuwe container niet. Hierdoor startte de oude container op. *schaam schaam
Vanmorgen heeft Ansible updates uitgevoerd en is Docker opnieuw gestart.
Thanks!