Redis and Postgresql data issue

Hi everyone!

As I am experiencing some issues with my network, I tried retrieving data from redis and postgresql databases via console. However, I am having issues with the data displayed (or, rather, data absence). Although postgresql structures are present (tables, schemas) when I run “select * from device_activation” I do not get any output. Also, the only redis keys that are availabe via “keys ‘*’” are as keys and no ns keys!

Let me also provide you with some information about my network status that may assist you in explaining the issue I am facing:
Network had two sensors configured for testing. Gateway was removed for two months and was recently replaced by another one. I configured the new gateway and all I received (from lorawan frames monitor) was unconfirmed data up or proprietary frames. .
Since there were no join requests from the already configured sensors, I tried to correlate the devAddr of the incoming frames with existing sensors using the aforementioned databases. This is where I encountered the issue described above.
Also, I upgrade to 3.8 from 3.4.x. After everything else failed I deleted one of the sensors and re-configured it; still, there were no ns related data in redis.

Thank you in advance!

Update!

I managed to access the postgresql databases and it seems that one of the sensors that sends “unconfirmeddataup” is one the already configured sensors (based on devAddr). So why are the servers ignoring these frames? NS reports last communication 2 months ago and nothing gets forwarded to the AS for processing.

Any help would be greatly appreciated!

I think I am getting to the bottom of it, but I still need some guidance.

It seems that for some reason the Redis database got flushed (maybe the machine hosting the server rebooted) and there was no backup of it. As a result it now includes only entries from the as which logs data from the gateway.
However, all session-related data regarding the 2 end devices are lost. Therefore, they keep sending proper upload frames which do not get accepted due to frame count differences and absence of keys (there are no network or application session keys on redis; only NwkSEncKey, FNwkSIntKey & SNwkSIntKey on postgresql). Maybe this is why disabling frame count does not resume communication.

So there are two points of failure right here:

  1. The end devices should have considered themselves as disconnected after all this time and should instigate new join requests (but what would have happened then? would postgresql data get updated or would the join process fail, because there are already values for them in the device_activation table of postgresql)?:thinking:

  2. The redis server must have been set to .append by the chirpstack server in order to avoid issues like this; granted, I could have myself enabled this or performed regular backups of it, but it would be nice to have this functionality.:sweat:

Any thoughts?