Handle event error: Operation cannot be accomplished in current state

Viewed 76

Hi,

I am performing a long-term test for the mesh function and encountered an issue with ChirpStack Mesh.

Testing version:

  • chirpstack-concentratord-sx1302 4.6.0
  • chirpstack-gateway-mesh 4.1.2

At first, the mesh function works as expected. However, after about one day, the relay gateway can no longer send mesh frames.

chirpstack-gateway-mesh[2114]: Relaying uplink LoRa frame, uplink_id: 83540149, downlink_id: 2174043768, mesh_packet: [Uplink hop_count: 1, uplink_id: 2101, relay_id: f10cb5c6, mic: 3f96609e]
hirpstack-gateway-mesh[2114]: Sending mesh frame - [downlink_id: 2174043768 - [freq: 923200000, power: 20, mod: [LORA - sf: 7, bw: 125000], timing: [IMMEDIATELY]]]
chirpstack-gateway-mesh[2114]: Handle event error: Operation cannot be accomplished in current state

The heartbeat also stop working.

chirpstack-gateway-mesh[2114]: Sending heartbeat event
chirpstack-gateway-mesh[2114]: Sending event packet, downlink_id: 1260676982, mesh_packet: [Event hop_count: 1, timestamp: SystemTime { tv_sec: 1773651811, tv_nsec: 622036202 }, relay_id: f10cb5c6]
chirpstack-gateway-mesh[2114]: Sending mesh frame - [downlink_id: 1260676982 - [freq: 922600000, power: 20, mod: [LORA - sf: 7, bw: 125000], timing: [IMMEDIATELY]]]
chirpstack-gateway-mesh[2114]: Report heartbeat error, error: Operation cannot be accomplished in current state

Has anyone else encountered this issue? Is there any way to avoid this from happening?

Thanks.

[20260319 EDITED]

Tested with chirpstack-gateway-mesh 4.1.3. The mesh function has stopped working again.
After the "Sending mesh command" log, there is no subsequent "Sending command to socket" log.
Additionally, the "Re-creating ZMQ REQ socket" log is not observed when this issue occurs.

Mar 19 05:54:03 user.info chirpstack-concentratord-sx1302[13222]: Frame received, uplink_id: 214547463, count_us: 4020322622, freq: 923200000, bw: 125000, mod: LoRa, dr: SF7, ftime_received: false, ftime_ns: 0

Mar 19 05:54:03 user.debug chirpstack-gateway-mesh[13273]: Handling mesh event, event: Event { event: Some(UplinkFrame(UplinkFrame { phy_payload: [224, 218, 85, 57, 14, 0, 241, 14, 105, 117, 64, 65, 180, 30, 0, 0, 195, 9, 10, 35, 80, 246, 122, 25, 62, 252, 226, 106, 99, 136, 24, 160, 89, 14, 186, 231, 12, 18], tx_info_legacy: None, rx_info_legacy: None, tx_info: Some(UplinkTxInfo { frequency: 923200000, modulation: Some(Modulation { parameters: Some(Lora(LoraModulationInfo { bandwidth: 125000, spreading_factor: 7, code_rate_legacy: "", code_rate: Cr45, polarization_inversion: false, preamble: 0, no_crc: false })) }) }), rx_info: Some(UplinkRxInfo { gateway_id: "0016c001f10cb5c6", uplink_id: 214547463, gw_time: Some(Timestamp { seconds: 1773899643, nanos: 376830089 }), ns_time: None, time_since_gps_epoch: None, fine_time_since_gps_epoch: None, rssi: -8, snr: 10.0, channel: 6, rf_chain: 1, board: 0, antenna: 0, location: None, context: [239, 161, 65, 62], metadata: {}, crc_status: CrcOk }) })) }

Mar 19 05:54:03 user.debug chirpstack-gateway-mesh[13273]: Mesh frame received - [uplink_id: 214547463, freq: 923200000, rssi: -8, snr: 10, mod: [LORA - sf: 7, bw: 125000]], mesh_packet: [Uplink hop_count: 1, uplink_id: 3493, relay_id: f10e6975, mic: bae70c12]

Mar 19 05:54:03 user.debug chirpstack-gateway-mesh[13273]: Getting relay ID

Mar 19 05:54:03 user.info chirpstack-gateway-mesh[13273]: Re-relaying mesh packet, downlink_id: 393443842, mesh_packet: [Uplink hop_count: 2, uplink_id: 3493, relay_id: f10e6975, mic: 5a8697b6]

Mar 19 05:54:03 user.info chirpstack-gateway-mesh[13273]: Sending mesh frame - [downlink_id: 393443842 - [freq: 922200000, power: 20, mod: [LORA - sf: 7, bw: 125000], timing: [IMMEDIATELY]]]

Mar 19 05:54:03 user.debug chirpstack-gateway-mesh[13273]: Sending mesh command, command: Command { command: Some(SendDownlinkFrame(DownlinkFrame { downlink_id: 393443842, downlink_id_legacy: [], items: [DownlinkFrameItem { phy_payload: [225, 218, 85, 57, 14, 0, 241, 14, 105, 117, 64, 65, 180, 30, 0, 0, 195, 9, 10, 35, 80, 246, 122, 25, 62, 252, 226, 106, 99, 136, 24, 160, 89, 14, 90, 134, 151, 182], tx_info_legacy: None, tx_info: Some(DownlinkTxInfo { frequency: 922200000, power: 20, modulation: Some(Modulation { parameters: Some(Lora(LoraModulationInfo { bandwidth: 125000, spreading_factor: 7, code_rate_legacy: "", code_rate: Cr45, polarization_inversion: false, preamble: 0, no_crc: false })) }), board: 0, antenna: 0, timing: Some(Timing { parameters: Some(Immediately(ImmediatelyTimingInfo)) }), context: [] }) }], gateway_id_legacy: [], gateway_id: "" })) }

Mar 19 05:54:03 user.info chirpstack-concentratord-sx1302[13222]: Frame received, uplink_id: 3448562948, count_us: 4020635451, freq: 923400000, bw: 125000, mod: LoRa, dr: SF7, ftime_received: false, ftime_ns: 0

Mar 19 05:54:04 user.warn chirpstack-concentratord-sx1302[13222]: GPS time reference is not valid, age: 1773899644.214388422s

1 Answers

Thanks. I'm now testing chirpstack-gateway-mesh v4.1.3 to verify the ZeroMQ socket issue.

Tested with chirpstack-gateway-mesh v4.1.3. There is no "Sending command to socket" log to trigger chirpstack-concentratord to enqueue the packet immediately. After that, chirpstack-gateway-mesh stops working.