Recovering from a redis flushall

i got some error
device-session does not exist or invalid fcnt or mic

any help!!! thanks!!!

i have 30+ device, god!

Sessions are stored in Redis. If you flushed it, they will no longer exist and the devices will need to re-join.

Your devices should probably have rejoin-after-X-confirmed-failures logic, if they don’t already.

device awlays re-join,but just got some error
device-session does not exist or invalid fcnt or mic

i don’t know what can i do for it

As @bconway already mentioned, when you run a redis flushall, all your device activations are gone and the error your are getting is expected. Your device(s) need to re-activate after which the error should be gone, as a new activation has been created.

1 Like

Hello Brocaar,

I used your docker-compose.yml template and extended it to accomodate all the features I needed. I had a chirpstack instance running on docker, and activated some sensors (Dragino LSN50v2). Everything was fine.
Then I started up another chirpstack instance using docker-compose on another Kunbus (industrial RPi). I registered the sensors using the WebUI, by typing in the DEUI+APPKEY’s. I know they are correct because everything worked on the previous instance. The device never sjows Lora-Frames and I get the following error message in chirpstack-network.server:

*level=error msg="uplink: processing uplink frame error" ctx=.... error="get device-session error: object does not exist"*

From what I understand this means the device has not been activated in Chirpstack. The only method with which to activate (and re-activate) the device, that I know of, is to push the reset button. But this is not always feasible since some devices have been installed on a construction site in places that are no longer accessible.
Downlink messages cannot be sent unless it is activated, so that’s also not an option.
Is there a way of automatically reactivating the device, or at least doing it remotely?
Or is this a feature which the device should have?