Node-session does not exist or invalid fcnt or mic in v1.1.0


#1

Hii,

i am using feature/5.0.0 branch for LoRaWAN v1.1.0.
now currently Device successfully activated on Network Server and sending UPLINKS but sometimes Network Server shows below error

Node-session does not exist or invalid fcnt or mic

LoRaServer logs

time="2019-04-16T14:29:03+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:03+05:30" level=info msg="rx info sent to network-controller" dev_eui=3033343858379418
time="2019-04-16T14:29:03+05:30" level=info msg="device gateway rx-info meta-data saved" dev_eui=3033343858379418
time="2019-04-16T14:29:03+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:29:03+05:30" level=info msg="finished client unary call" grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=32.611 span.kind=client system=grpc
time="2019-04-16T14:29:03+05:30" level=info msg="adr request added to mac-command queue" dev_eui=3033343858379418 dr=0 nb_trans=1 req_dr=4 req_nb_trans=3 req_tx_power_idx=0 tx_power=0
time="2019-04-16T14:29:03+05:30" level=info msg="pending mac-command block set" cid=LinkADRReq commands=1 dev_eui=3033343858379418
time="2019-04-16T14:29:03+05:30" level=info msg="gateway/mqtt: publishing downlink frame" qos=0 topic=gateway/b827ebfffe113d94/tx
time="2019-04-16T14:29:03+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:29:03+05:30" level=info msg="downlink-frames saved" dev_eui=3033343858379418 token=65390
time="2019-04-16T14:29:07+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:07+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCCZgFMlgJqoLghPg==" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:13+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:13+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCAZwEChPFLZn8=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:18+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:18+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCAaAECsgLWtSE=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:23+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:24+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCAaQECV0IOv+k=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:29+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:29+05:30" level=info msg="rx info sent to network-controller" dev_eui=3033343858379418
time="2019-04-16T14:29:29+05:30" level=info msg="device gateway rx-info meta-data saved" dev_eui=3033343858379418
time="2019-04-16T14:29:29+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:29:29+05:30" level=info msg="finished client unary call" grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=21.184 span.kind=client system=grpc
time="2019-04-16T14:29:30+05:30" level=info msg="adr request added to mac-command queue" dev_eui=3033343858379418 dr=0 nb_trans=1 req_dr=5 req_nb_trans=3 req_tx_power_idx=0 tx_power=0
time="2019-04-16T14:29:30+05:30" level=info msg="pending mac-command block set" cid=LinkADRReq commands=1 dev_eui=3033343858379418
time="2019-04-16T14:29:30+05:30" level=info msg="gateway/mqtt: publishing downlink frame" qos=0 topic=gateway/b827ebfffe113d94/tx
time="2019-04-16T14:29:30+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:29:30+05:30" level=info msg="downlink-frames saved" dev_eui=3033343858379418 token=41377
time="2019-04-16T14:29:32+05:30" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=b827ebfffe113d94
time="2019-04-16T14:29:32+05:30" level=info msg="gateway updated" gateway_id=b827ebfffe113d94
time="2019-04-16T14:29:32+05:30" level=info msg="gateway/mqtt: publishing gateway configuration" qos=0 topic=gateway/b827ebfffe113d94/config
time="2019-04-16T14:29:32+05:30" level=info msg="metrics saved" aggregation="[MINUTE HOUR DAY MONTH]" name="gw:b827ebfffe113d94"
time="2019-04-16T14:29:34+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:34+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCCawEHEQID08gBRQ==" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:39+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:39+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCAbAECNWWuLwo=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:43+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:43+05:30" level=info msg="rx info sent to network-controller" dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="device gateway rx-info meta-data saved" dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="finished client unary call" grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=20.675 span.kind=client system=grpc
time="2019-04-16T14:29:43+05:30" level=info msg="adr request added to mac-command queue" dev_eui=3033343858379418 dr=0 nb_trans=1 req_dr=5 req_nb_trans=3 req_tx_power_idx=0 tx_power=0
time="2019-04-16T14:29:43+05:30" level=info msg="requesting device-status" dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="pending mac-command block set" cid=LinkADRReq commands=1 dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="pending mac-command block set" cid=DevStatusReq commands=1 dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="gateway/mqtt: publishing downlink frame" qos=0 topic=gateway/b827ebfffe113d94/tx
time="2019-04-16T14:29:43+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:29:43+05:30" level=info msg="downlink-frames saved" dev_eui=3033343858379418 token=57415
time="2019-04-16T14:29:48+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:48+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCFbgFF72OVUQKO68YZkg==" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:29:54+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:29:54+05:30" level=error msg="processing uplink frame error" data_base64="QI4vxgCAbwEC1vBdHRc=" error="get device-session error: device-session does not exist or invalid fcnt or mic"
time="2019-04-16T14:30:00+05:30" level=info msg="gateway/mqtt: uplink frame received"
time="2019-04-16T14:30:00+05:30" level=info msg="rx info sent to network-controller" dev_eui=3033343858379418
time="2019-04-16T14:30:00+05:30" level=info msg="device gateway rx-info meta-data saved" dev_eui=3033343858379418
time="2019-04-16T14:30:00+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:30:00+05:30" level=info msg="finished client unary call" grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=21.086 span.kind=client system=grpc
time="2019-04-16T14:30:00+05:30" level=info msg="adr request added to mac-command queue" dev_eui=3033343858379418 dr=0 nb_trans=1 req_dr=5 req_nb_trans=3 req_tx_power_idx=0 tx_power=0
time="2019-04-16T14:30:00+05:30" level=info msg="pending mac-command block set" cid=LinkADRReq commands=1 dev_eui=3033343858379418
time="2019-04-16T14:30:00+05:30" level=info msg="gateway/mqtt: publishing downlink frame" qos=0 topic=gateway/b827ebfffe113d94/tx
time="2019-04-16T14:30:00+05:30" level=info msg="device-session saved" dev_addr=00c62f8e dev_eui=3033343858379418
time="2019-04-16T14:30:00+05:30" level=info msg="downlink-frames saved" dev_eui=3033343858379418 token=20870
time="2019-04-16T14:30:02+05:30" level=info msg="gateway/mqtt: gateway stats packet received" gateway_id=b827ebfffe113d94
time="2019-04-16T14:30:02+05:30" level=info msg="gateway updated" gateway_id=b827ebfffe113d94
time="2019-04-16T14:30:02+05:30" level=info msg="gateway/mqtt: publishing gateway configuration" qos=0 topic=gateway/b827ebfffe113d94/config

Thank You