question

fab13n avatar image
fab13n asked

Bug report in vrmlogger: not resistant to corrupted sqlite file.

On a firmware v2.92, I couldn't connect to VRM portal, because /data/db/vrmlogger-backlog.sqlite3 was corrupted, and vrmlogger doesn't seem able to detect and correct it. Deleting the faulty file solves the issue, but there ought to be a way to recover without a root SSH access :-)

A backtrace to help pinpoint where it goes South:

@4000000064d0bf9230351a44     main()
@4000000064d0bf9230353984   File "/opt/victronenergy/vrmlogger/vrmlogger.py", line 681, in main
@4000000064d0bf92305c841c     start_logging(state)
@4000000064d0bf92305d91a4   File "/opt/victronenergy/vrmlogger/vrmlogger.py", line 440, in start_logging
@4000000064d0bf9230773424     endpoint.send(VrmCommandType.ANNOUNCE, get_announce())
@4000000064d0bf92307812cc   File "/opt/victronenergy/vrmlogger/http_endpoint.py", line 494, in send
@4000000064d0bf9230950cc4     self._put_in_buffer_with_fallback_on_internal(data, int(time.time()))
@4000000064d0bf92309602dc   File "/opt/victronenergy/vrmlogger/http_endpoint.py", line 449, in _put_in_buffer_with_fallback_on_internal
@4000000064d0bf9230b0ed7c     self._active_buffer.put(data, timestamp)
@4000000064d0bf9230b1c83c   File "/opt/victronenergy/vrmlogger/nonvolatilequeueramdiskwrapper.py", line 58, in put
@4000000064d0bf9230bae05c     return super(NonVolatileQueueRamDiskWrapper, self).put(data, timestamp)
@4000000064d0bf9230bbf1cc   File "/opt/victronenergy/vrmlogger/nonvolatilequeue.py", line 186, in put
@4000000064d0bf9230cae204     cursor.execute("DELETE FROM queue WHERE timestamp < (strftime('%s', 'now') - ?)", (self._max_age,))
@4000000064d0bf9230cbeba4 sqlite3.DatabaseError: database disk image is malformed
VRM
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
Guy Stewart (Victron Community Manager) avatar image
Guy Stewart (Victron Community Manager) answered ·

Hi @fab13n,

Thanks for reporting, I agree with you and have passed this on to the team.

A question for my own interest - did you see any kind of connection error as displayed here, or was this completely invisible (and appearing to work normally) from the Venus front end UI? - https://www.victronenergy.com/media/pg/CCGX/en/vrm-portal.html#UUID-9d000e4f-dfd4-e0a1-ec69-a66278548d67


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.