_session.qo - new error interpretation

hi all
To this day I would receive the following _session.qo notes when syncing with notehub:

  1. when opening communication: { “why”: “opened: readings.qo requested sync (readings.qo)”} or {“why”:“opened: periodic inbound sync due”}

  2. and when closing: {“why”:“closed: notecard ended the session”}

after a few changes i did (changed from I2c to serial between MCU and noteCarrier )
i now get the same _session.qo note at opening communication, but when closing i get:

{ “why”: “closed: notehub error reading request: wire read: can’t read version: read tcp 10.0.34.6:24666->10.64.9.194:58489: read: connection reset by peer”}

It doesn’t seem to affect syncing with notehub itself (notes still sync), but I wanted to ask if anyone knows what the problem is?, and what causes it?

thank you very much
elyasaf

1 Like

Hi @elyasaf and welcome to the Blues community!

We recently made an update to Notehub that extends the information made available in the _session.qo Notefiles, specifically at the end of a session. One is created when the Notehub session ends which has Notehub’s “end of session” data. The other is created when the Notecard session is known to end and contains the Notecard’s “end of session” data. We haven’t updated our docs quite yet to reflect these changes, but will do so soon.

Thanks,
Rob

@RobLauer - thank you for the response
Further to this question, I noticed an additional message that appears every now and then:

{“why”:“closed: notehub can’t transmit response to notecard: write tcp 10.0.34.6:29269->10.64.31.121:49200: write: broken pipe”}

Is there a way to interpret or understand this message?

I have a system that collects sensor data every minute, and sends it every hour to the server (depending on system voltage).
Sometimes (usually once a day) duplication occurs when sending the information to the server and 60 records (data of one hour) are sent twice to the server
I know that this is duplication in sending and not in collection because the data is also saved on a SD card and the duplication does not appear there…

I suspect that there is a connection between the message above and the cases where the sending is doubled.
Is there a basis for my suspicion? Or does anyone have another idea?

thank you very much
elyasaf

Hi @elyasaf,

In this case, it looks like the Notecard/Notehub session failed during the syncing/merging of data, either because of a communications failure or because of a transaction with Notehub that extended longer than expected. This could cause duplicate data to be sent. In order to help mitigate this, I would recommend using Notefile Templates to reduce bytes stored in flash and during transit.

Rob

@RobLauer
Actually, we are using Notefile Templates allready
i think i will try to lower the time between syncs, maybe this will help

Just to make sure, there is no dictionary or interpretation for the messages received
in _session.qo notes? I think it could have helped in development (for me at least)
thank you
elyasaf

If you’re already using templates, then the package size is already very small. I’d be more concerned about a very weak cellular connection (I’m assuming you are on cellular, correct me if I’m wrong). Can’t hurt to consult our guide on diagnosing cellular connectivity to possibly improve the connection.

We are going to be updating our documentation on the _session.qo Notefiles soon!

Rob