Closed Regimbal closed 5 years ago
This might be because you are compiling the master branch and not a tagged version. In the next LoRa Server and LoRa App Server versions gateway stats will be migrated from the LoRa Server to the LoRa App Server database to make it possible to show gateways on a map in the web-interface. See also: https://forum.loraserver.io/c/announcements.
Is this a bug or a feature request?
Not sure but this seems to be a bug when compiled at commit c1f0589
What did you expect?
last seen and frame counters shall be refreshed. for gateways it shall display few seconds.
What happened?
lora-app-server does not interpret received gateway stats.
What version are your using?
commit c1f0589
How can your issue be reproduced?
it works when compile at tag 3.3.1.
Could you share your log output?
There is not a single error on the log output. In log level warning (3) I get this:
sept. 18 17:17:10 LoraSRVVIPARIS1 systemd[1]: Stopping LoRa App Server... sept. 18 17:17:10 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:17:10+02:00" level=info msg="signal received" signal=terminated sept. 18 17:17:10 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:17:10+02:00" level=warning msg="stopping lora-app-server" sept. 18 17:17:10 LoraSRVVIPARIS1 systemd[1]: lora-app-server.service: Succeeded. sept. 18 17:17:10 LoraSRVVIPARIS1 systemd[1]: Stopped LoRa App Server. sept. 18 17:17:10 LoraSRVVIPARIS1 systemd[1]: Started LoRa App Server.
I placed lora-app-server in debug level logging and get this around the time a stat event is received from the gateway
sept. 18 17:14:34 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:34+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:34.866030523 +0200 CEST m=+190.509299352 100]" duration=1.176939ms query="\n\t\tselect\n\t\t\tfs.dev_eui,\n\t\t\tfs.frag_index,\n\t\t\tfs.created_at,\n\t\t\tfs.updated_at,\n\t\t\tfs.mc_group_ids,\n\t\t\tfs.nb_frag,\n\t\t\tfs.frag_size,\n\t\t\tfs.fragmentation_matrix,\n\t\t\tfs.block_ack_delay,\n\t\t\tfs.padding,\n\t\t\tfs.descriptor,\n\t\t\tfs.state,\n\t\t\tfs.state_provisioned,\n\t\t\tfs.retry_after,\n\t\t\tfs.retry_count,\n\t\t\tfs.retry_interval\n\t\tfrom\n\t\t\tremote_fragmentation_session fs\n\t\twhere\n\t\t\tfs.state_provisioned = false\n\t\t\tand fs.retry_count < $1\n\t\t\tand fs.retry_after < $2\n\t\t\tand (\n\t\t\t\t-- in case of unicast\n\t\t\t\tarray_length(fs.mc_group_ids, 1) is null\n\n\t\t\t\t-- in case of multicast\n\t\t\t\tor exists (\n\t\t\t\t\tselect\n\t\t\t\t\t\t1\n\t\t\t\t\tfrom\n\t\t\t\t\t\tremote_multicast_setup ms\n\t\t\t\t\twhere\n\t\t\t\t\t\tms.dev_eui = fs.dev_eui\n\t\t\t\t\t\tand ms.state_provisioned = true\n\t\t\t\t\t\tand ms.mc_group_id = any(fs.mc_group_ids)\n\t\t\t\t)\n\t\t\t)\n\t\tlimit $3\n\t\tfor update of fs\n\t\tskip locked" sept. 18 17:14:34 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:34+02:00" level=debug msg="sql query executed" args="[admin 2]" duration=5.876914ms query="select count(*) from (\n\tselect 1\n\tfrom \"user\" u\n\tleft join organization_user ou\n\t\ton u.id = ou.user_id\n\tleft join organization o\n\t\ton o.id = ou.organization_id\n\tleft join gateway g\n\t\ton o.id = g.organization_id\n\tleft join application a\n\t\ton a.organization_id = o.id\n\tleft join service_profile sp\n\t\ton sp.organization_id = o.id\n\tleft join device_profile dp\n\t\ton dp.organization_id = o.id\n\tleft join network_server ns\n\t\ton ns.id = sp.network_server_id or ns.id = dp.network_server_id\n\tleft join device d\n\t\ton a.id = d.application_id\n\tleft join multicast_group mg\n\t\ton sp.service_profile_id = mg.service_profile_id\n\tleft join fuota_deployment_device fdd\n\t\ton d.dev_eui = fdd.dev_eui\n\tleft join fuota_deployment fd\n\t\ton fdd.fuota_deployment_id = fd.id\n where ((u.username = $1) and (u.is_active = true) and (u.is_admin = true)) or ((u.username = $1) and (u.is_active = true) and (o.id = $2)) or ((u.username = $1) and (u.is_active = true) and (a.organization_id = $2)) limit 1) count_only" sept. 18 17:14:34 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:34+02:00" level=debug msg="sql query executed" args="[2]" duration="595.332µs" query="select * from organization where id = $1" sept. 18 17:14:34 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:34+02:00" level=info msg="finished unary call with code OK" ctx_id=f2649aa3-9802-45fb-8e06-599da0499731 grpc.code=OK grpc.method=Get grpc.service=api.OrganizationService grpc.start_time="2019-09-18T17:14:34+02:00" grpc.time_ms=6.916 peer.address="[::1]:59672" span.kind=server system=grpc sept. 18 17:14:35 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:35+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:35.835093903 +0200 CEST m=+191.478362700 100]" duration=1.008374ms query="\n\t\tselect\n\t\t\t*\n\t\tfrom\n\t\t\tremote_multicast_setup\n\t\twhere\n\t\t\tstate_provisioned = false\n\t\t\tand retry_count < $1\n\t\t\tand retry_after < $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:35 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:35+02:00" level=debug msg="sql query executed" args="[DONE 2019-09-18 17:14:35.835553976 +0200 CEST m=+191.478822800 1]" duration="798.123µs" query="\n\t\tselect\n\t\t\tid,\n\t\t\tcreated_at,\n\t\t\tupdated_at,\n\t\t\tname,\n\t\t\tmulticast_group_id,\n\t\t\tfragmentation_matrix,\n\t\t\tdescriptor,\n\t\t\tpayload,\n\t\t\tstate,\n\t\t\tnext_step_after,\n\t\t\tunicast_timeout,\n\t\t\tfrag_size,\n\t\t\tredundancy,\n\t\t\tblock_ack_delay,\n\t\t\tmulticast_timeout,\n\t\t\tgroup_type,\n\t\t\tdr,\n\t\t\tfrequency,\n\t\t\tping_slot_period\n\t\tfrom\n\t\t\tfuota_deployment\n\t\twhere\n\t\t\tstate != $1\n\t\t\tand next_step_after <= $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:35 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:35+02:00" level=debug msg="sql query executed" args="[]" duration=1.056839ms query="\n\t\tselect\n\t\t\tg.*\n\t\tfrom gateway g\n\t\tinner join network_server ns\n\t\t\ton ns.id = g.network_server_id\n\t\twhere\n\t\t\tns.gateway_discovery_enabled = true\n\t\t\tand g.ping = true\n\t\t\tand (g.last_ping_sent_at is null or g.last_ping_sent_at <= (now() - (interval '24 hours' / ns.gateway_discovery_interval)))\n\t\torder by last_ping_sent_at\n\t\tlimit 1\n\t\tfor update" sept. 18 17:14:35 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:35+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:35.864774453 +0200 CEST m=+191.508043262 SETUP 100]" duration=1.421704ms query="\n\t\tselect\n\t\t\tsess.*\n\t\tfrom\n\t\t\tremote_multicast_class_c_session sess\n\t\tinner join\n\t\t\tremote_multicast_setup ms\n\t\t\ton\n\t\t\t\tsess.dev_eui = ms.dev_eui\n\t\t\t\tand sess.multicast_group_id = ms.multicast_group_id\n\t\t\t\tand sess.mc_group_id = ms.mc_group_id\n\t\twhere\n\t\t\tms.state_provisioned = true\n\t\t\tand ms.state = $3\n\t\t\tand sess.state_provisioned = false\n\t\t\tand sess.retry_count < $1\n\t\t\tand sess.retry_after < $2\n\t\tlimit $4\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:35 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:35+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:35.867911763 +0200 CEST m=+191.511180567 100]" duration="924.938µs" query="\n\t\tselect\n\t\t\tfs.dev_eui,\n\t\t\tfs.frag_index,\n\t\t\tfs.created_at,\n\t\t\tfs.updated_at,\n\t\t\tfs.mc_group_ids,\n\t\t\tfs.nb_frag,\n\t\t\tfs.frag_size,\n\t\t\tfs.fragmentation_matrix,\n\t\t\tfs.block_ack_delay,\n\t\t\tfs.padding,\n\t\t\tfs.descriptor,\n\t\t\tfs.state,\n\t\t\tfs.state_provisioned,\n\t\t\tfs.retry_after,\n\t\t\tfs.retry_count,\n\t\t\tfs.retry_interval\n\t\tfrom\n\t\t\tremote_fragmentation_session fs\n\t\twhere\n\t\t\tfs.state_provisioned = false\n\t\t\tand fs.retry_count < $1\n\t\t\tand fs.retry_after < $2\n\t\t\tand (\n\t\t\t\t-- in case of unicast\n\t\t\t\tarray_length(fs.mc_group_ids, 1) is null\n\n\t\t\t\t-- in case of multicast\n\t\t\t\tor exists (\n\t\t\t\t\tselect\n\t\t\t\t\t\t1\n\t\t\t\t\tfrom\n\t\t\t\t\t\tremote_multicast_setup ms\n\t\t\t\t\twhere\n\t\t\t\t\t\tms.dev_eui = fs.dev_eui\n\t\t\t\t\t\tand ms.state_provisioned = true\n\t\t\t\t\t\tand ms.mc_group_id = any(fs.mc_group_ids)\n\t\t\t\t)\n\t\t\t)\n\t\tlimit $3\n\t\tfor update of fs\n\t\tskip locked" sept. 18 17:14:36 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:36+02:00" level=debug msg="sql query executed" args="[DONE 2019-09-18 17:14:36.837347726 +0200 CEST m=+192.480616509 1]" duration=1.135352ms query="\n\t\tselect\n\t\t\tid,\n\t\t\tcreated_at,\n\t\t\tupdated_at,\n\t\t\tname,\n\t\t\tmulticast_group_id,\n\t\t\tfragmentation_matrix,\n\t\t\tdescriptor,\n\t\t\tpayload,\n\t\t\tstate,\n\t\t\tnext_step_after,\n\t\t\tunicast_timeout,\n\t\t\tfrag_size,\n\t\t\tredundancy,\n\t\t\tblock_ack_delay,\n\t\t\tmulticast_timeout,\n\t\t\tgroup_type,\n\t\t\tdr,\n\t\t\tfrequency,\n\t\t\tping_slot_period\n\t\tfrom\n\t\t\tfuota_deployment\n\t\twhere\n\t\t\tstate != $1\n\t\t\tand next_step_after <= $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:36 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:36+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:36.837888298 +0200 CEST m=+192.481157156 100]" duration=2.145547ms query="\n\t\tselect\n\t\t\t*\n\t\tfrom\n\t\t\tremote_multicast_setup\n\t\twhere\n\t\t\tstate_provisioned = false\n\t\t\tand retry_count < $1\n\t\t\tand retry_after < $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:36 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:36+02:00" level=debug msg="sql query executed" args="[]" duration=1.143062ms query="\n\t\tselect\n\t\t\tg.*\n\t\tfrom gateway g\n\t\tinner join network_server ns\n\t\t\ton ns.id = g.network_server_id\n\t\twhere\n\t\t\tns.gateway_discovery_enabled = true\n\t\t\tand g.ping = true\n\t\t\tand (g.last_ping_sent_at is null or g.last_ping_sent_at <= (now() - (interval '24 hours' / ns.gateway_discovery_interval)))\n\t\torder by last_ping_sent_at\n\t\tlimit 1\n\t\tfor update" sept. 18 17:14:36 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:36+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:36.867114892 +0200 CEST m=+192.510383696 SETUP 100]" duration=1.13704ms query="\n\t\tselect\n\t\t\tsess.*\n\t\tfrom\n\t\t\tremote_multicast_class_c_session sess\n\t\tinner join\n\t\t\tremote_multicast_setup ms\n\t\t\ton\n\t\t\t\tsess.dev_eui = ms.dev_eui\n\t\t\t\tand sess.multicast_group_id = ms.multicast_group_id\n\t\t\t\tand sess.mc_group_id = ms.mc_group_id\n\t\twhere\n\t\t\tms.state_provisioned = true\n\t\t\tand ms.state = $3\n\t\t\tand sess.state_provisioned = false\n\t\t\tand sess.retry_count < $1\n\t\t\tand sess.retry_after < $2\n\t\tlimit $4\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:36 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:36+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:36.869754768 +0200 CEST m=+192.513023548 100]" duration="894.295µs" query="\n\t\tselect\n\t\t\tfs.dev_eui,\n\t\t\tfs.frag_index,\n\t\t\tfs.created_at,\n\t\t\tfs.updated_at,\n\t\t\tfs.mc_group_ids,\n\t\t\tfs.nb_frag,\n\t\t\tfs.frag_size,\n\t\t\tfs.fragmentation_matrix,\n\t\t\tfs.block_ack_delay,\n\t\t\tfs.padding,\n\t\t\tfs.descriptor,\n\t\t\tfs.state,\n\t\t\tfs.state_provisioned,\n\t\t\tfs.retry_after,\n\t\t\tfs.retry_count,\n\t\t\tfs.retry_interval\n\t\tfrom\n\t\t\tremote_fragmentation_session fs\n\t\twhere\n\t\t\tfs.state_provisioned = false\n\t\t\tand fs.retry_count < $1\n\t\t\tand fs.retry_after < $2\n\t\t\tand (\n\t\t\t\t-- in case of unicast\n\t\t\t\tarray_length(fs.mc_group_ids, 1) is null\n\n\t\t\t\t-- in case of multicast\n\t\t\t\tor exists (\n\t\t\t\t\tselect\n\t\t\t\t\t\t1\n\t\t\t\t\tfrom\n\t\t\t\t\t\tremote_multicast_setup ms\n\t\t\t\t\twhere\n\t\t\t\t\t\tms.dev_eui = fs.dev_eui\n\t\t\t\t\t\tand ms.state_provisioned = true\n\t\t\t\t\t\tand ms.mc_group_id = any(fs.mc_group_ids)\n\t\t\t\t)\n\t\t\t)\n\t\tlimit $3\n\t\tfor update of fs\n\t\tskip locked" sept. 18 17:14:37 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:37+02:00" level=debug msg="sql query executed" args="[DONE 2019-09-18 17:14:37.839675417 +0200 CEST m=+193.482944233 1]" duration=1.092031ms query="\n\t\tselect\n\t\t\tid,\n\t\t\tcreated_at,\n\t\t\tupdated_at,\n\t\t\tname,\n\t\t\tmulticast_group_id,\n\t\t\tfragmentation_matrix,\n\t\t\tdescriptor,\n\t\t\tpayload,\n\t\t\tstate,\n\t\t\tnext_step_after,\n\t\t\tunicast_timeout,\n\t\t\tfrag_size,\n\t\t\tredundancy,\n\t\t\tblock_ack_delay,\n\t\t\tmulticast_timeout,\n\t\t\tgroup_type,\n\t\t\tdr,\n\t\t\tfrequency,\n\t\t\tping_slot_period\n\t\tfrom\n\t\t\tfuota_deployment\n\t\twhere\n\t\t\tstate != $1\n\t\t\tand next_step_after <= $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:37 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:37+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:37.84100051 +0200 CEST m=+193.484269342 100]" duration=1.273856ms query="\n\t\tselect\n\t\t\t*\n\t\tfrom\n\t\t\tremote_multicast_setup\n\t\twhere\n\t\t\tstate_provisioned = false\n\t\t\tand retry_count < $1\n\t\t\tand retry_after < $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:37 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:37+02:00" level=debug msg="sql query executed" args="[]" duration=1.320016ms query="\n\t\tselect\n\t\t\tg.*\n\t\tfrom gateway g\n\t\tinner join network_server ns\n\t\t\ton ns.id = g.network_server_id\n\t\twhere\n\t\t\tns.gateway_discovery_enabled = true\n\t\t\tand g.ping = true\n\t\t\tand (g.last_ping_sent_at is null or g.last_ping_sent_at <= (now() - (interval '24 hours' / ns.gateway_discovery_interval)))\n\t\torder by last_ping_sent_at\n\t\tlimit 1\n\t\tfor update" sept. 18 17:14:37 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:37+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:37.86908866 +0200 CEST m=+193.512357479 SETUP 100]" duration=1.571982ms query="\n\t\tselect\n\t\t\tsess.*\n\t\tfrom\n\t\t\tremote_multicast_class_c_session sess\n\t\tinner join\n\t\t\tremote_multicast_setup ms\n\t\t\ton\n\t\t\t\tsess.dev_eui = ms.dev_eui\n\t\t\t\tand sess.multicast_group_id = ms.multicast_group_id\n\t\t\t\tand sess.mc_group_id = ms.mc_group_id\n\t\twhere\n\t\t\tms.state_provisioned = true\n\t\t\tand ms.state = $3\n\t\t\tand sess.state_provisioned = false\n\t\t\tand sess.retry_count < $1\n\t\t\tand sess.retry_after < $2\n\t\tlimit $4\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:37 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:37+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:37.871629369 +0200 CEST m=+193.514898192 100]" duration=1.555093ms query="\n\t\tselect\n\t\t\tfs.dev_eui,\n\t\t\tfs.frag_index,\n\t\t\tfs.created_at,\n\t\t\tfs.updated_at,\n\t\t\tfs.mc_group_ids,\n\t\t\tfs.nb_frag,\n\t\t\tfs.frag_size,\n\t\t\tfs.fragmentation_matrix,\n\t\t\tfs.block_ack_delay,\n\t\t\tfs.padding,\n\t\t\tfs.descriptor,\n\t\t\tfs.state,\n\t\t\tfs.state_provisioned,\n\t\t\tfs.retry_after,\n\t\t\tfs.retry_count,\n\t\t\tfs.retry_interval\n\t\tfrom\n\t\t\tremote_fragmentation_session fs\n\t\twhere\n\t\t\tfs.state_provisioned = false\n\t\t\tand fs.retry_count < $1\n\t\t\tand fs.retry_after < $2\n\t\t\tand (\n\t\t\t\t-- in case of unicast\n\t\t\t\tarray_length(fs.mc_group_ids, 1) is null\n\n\t\t\t\t-- in case of multicast\n\t\t\t\tor exists (\n\t\t\t\t\tselect\n\t\t\t\t\t\t1\n\t\t\t\t\tfrom\n\t\t\t\t\t\tremote_multicast_setup ms\n\t\t\t\t\twhere\n\t\t\t\t\t\tms.dev_eui = fs.dev_eui\n\t\t\t\t\t\tand ms.state_provisioned = true\n\t\t\t\t\t\tand ms.mc_group_id = any(fs.mc_group_ids)\n\t\t\t\t)\n\t\t\t)\n\t\tlimit $3\n\t\tfor update of fs\n\t\tskip locked" sept. 18 17:14:38 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:38+02:00" level=debug msg="sql query executed" args="[DONE 2019-09-18 17:14:38.84182178 +0200 CEST m=+194.485090572 1]" duration="956.305µs" query="\n\t\tselect\n\t\t\tid,\n\t\t\tcreated_at,\n\t\t\tupdated_at,\n\t\t\tname,\n\t\t\tmulticast_group_id,\n\t\t\tfragmentation_matrix,\n\t\t\tdescriptor,\n\t\t\tpayload,\n\t\t\tstate,\n\t\t\tnext_step_after,\n\t\t\tunicast_timeout,\n\t\t\tfrag_size,\n\t\t\tredundancy,\n\t\t\tblock_ack_delay,\n\t\t\tmulticast_timeout,\n\t\t\tgroup_type,\n\t\t\tdr,\n\t\t\tfrequency,\n\t\t\tping_slot_period\n\t\tfrom\n\t\t\tfuota_deployment\n\t\twhere\n\t\t\tstate != $1\n\t\t\tand next_step_after <= $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:38 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:38+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:38.843497658 +0200 CEST m=+194.486766453 100]" duration="695.81µs" query="\n\t\tselect\n\t\t\t*\n\t\tfrom\n\t\t\tremote_multicast_setup\n\t\twhere\n\t\t\tstate_provisioned = false\n\t\t\tand retry_count < $1\n\t\t\tand retry_after < $2\n\t\tlimit $3\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:38 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:38+02:00" level=debug msg="sql query executed" args="[]" duration=1.331779ms query="\n\t\tselect\n\t\t\tg.*\n\t\tfrom gateway g\n\t\tinner join network_server ns\n\t\t\ton ns.id = g.network_server_id\n\t\twhere\n\t\t\tns.gateway_discovery_enabled = true\n\t\t\tand g.ping = true\n\t\t\tand (g.last_ping_sent_at is null or g.last_ping_sent_at <= (now() - (interval '24 hours' / ns.gateway_discovery_interval)))\n\t\torder by last_ping_sent_at\n\t\tlimit 1\n\t\tfor update" sept. 18 17:14:38 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:38+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:38.871737649 +0200 CEST m=+194.515006483 SETUP 100]" duration=1.327264ms query="\n\t\tselect\n\t\t\tsess.*\n\t\tfrom\n\t\t\tremote_multicast_class_c_session sess\n\t\tinner join\n\t\t\tremote_multicast_setup ms\n\t\t\ton\n\t\t\t\tsess.dev_eui = ms.dev_eui\n\t\t\t\tand sess.multicast_group_id = ms.multicast_group_id\n\t\t\t\tand sess.mc_group_id = ms.mc_group_id\n\t\twhere\n\t\t\tms.state_provisioned = true\n\t\t\tand ms.state = $3\n\t\t\tand sess.state_provisioned = false\n\t\t\tand sess.retry_count < $1\n\t\t\tand sess.retry_after < $2\n\t\tlimit $4\n\t\tfor update\n\t\tskip locked" sept. 18 17:14:38 LoraSRVVIPARIS1 lora-app-server[3608]: time="2019-09-18T17:14:38+02:00" level=debug msg="sql query executed" args="[3 2019-09-18 17:14:38.873888058 +0200 CEST m=+194.517156869 100]" duration=1.160384ms query="\n\t\tselect\n\t\t\tfs.dev_eui,\n\t\t\tfs.frag_index,\n\t\t\tfs.created_at,\n\t\t\tfs.updated_at,\n\t\t\tfs.mc_group_ids,\n\t\t\tfs.nb_frag,\n\t\t\tfs.frag_size,\n\t\t\tfs.fragmentation_matrix,\n\t\t\tfs.block_ack_delay,\n\t\t\tfs.padding,\n\t\t\tfs.descriptor,\n\t\t\tfs.state,\n\t\t\tfs.state_provisioned,\n\t\t\tfs.retry_after,\n\t\t\tfs.retry_count,\n\t\t\tfs.retry_interval\n\t\tfrom\n\t\t\tremote_fragmentation_session fs\n\t\twhere\n\t\t\tfs.state_provisioned = false\n\t\t\tand fs.retry_count < $1\n\t\t\tand fs.retry_after < $2\n\t\t\tand (\n\t\t\t\t-- in case of unicast\n\t\t\t\tarray_length(fs.mc_group_ids, 1) is null\n\n\t\t\t\t-- in case of multicast\n\t\t\t\tor exists (\n\t\t\t\t\tselect\n\t\t\t\t\t\t1\n\t\t\t\t\tfrom\n\t\t\t\t\t\tremote_multicast_setup ms\n\t\t\t\t\twhere\n\t\t\t\t\t\tms.dev_eui = fs.dev_eui\n\t\t\t\t\t\tand ms.state_provisioned = true\n\t\t\t\t\t\tand ms.mc_group_id = any(fs.mc_group_ids)\n\t\t\t\t)\n\t\t\t)\n\t\tlimit $3\n\t\tfor update of fs\n\t\tskip locked"