LoRawan DL Ack for LoRaWan confirmedDataUp is not sent if request from HTTP integration return error

TLDR;
Chirpstack do not send LoRaWan Ack if it failed to send data to http when integration is configured.

But, my understanding is that LoRaWan Ack must be sent if LoRaWan NS have received LoRaWan ConfirmedDataUp , Meaning that device has send correctly the data to the network server.

Failed to send to any “integration” must be managed by an application level ack.

=======================
I’m currently using chirpstack 4.0.2 on docker.
I have an application with an http integration and devices that are sending regularly confirmedDataUp.

It work fine but I found recently that when http request (from http integration) receive an error code, then no LoRaWan ack is sent on Downlink.

For testing purpose, I have set up another application with a single device sending uplink every two minutes and I can confirm that:

  • LoRaWan Donwnlink ACK are not sent as soon as i disable http endpoint.
  • LoRaWanDownlink ACK are sent as soon as I reenable endpoint.

This is the last event logged in chirpstack when it fails (This fail was made on purpose, simulating maintenance on http endpoint server)
ERROR up{deduplication_id=ccc0e62b-3d55-445f-b9ad-7a1622132354}: chirpstack::uplink::data: Handle uplink error error=error sending request for url (http://xxx.yyyy.zz:pppp/decode/api/v1/devices?event=up): error trying to connect: tcp connect error: Connection refused (os error 111

In some cases it could be problematic because I got some devices that will rejoin if several LoRaWan downlink ack are missing, meaning that somehow, device could not reach NS.

I didn’t see anything about this on forum. I think Chirpstack consider that LoRaWan must not send LoRaWan Ack if message is not received at the end by Http application server.

But, my understanding is that LoRaWan Ack must be sent if LoRaWan NS have received LoRaWan ConfirmedDataUp, Meaning that device has send correctly the data to the network server.

However, LoRaWan Ack must be always sent if NS has received confirmedDataUp from a device (if gateways/channels/DC available for DL is available)

Thanks in advance if you have some workaround / solution to this problem

Connection refused means that the server sent a RST in response to the TCP handshake. Somehow, Chirpstack could not reach your app. It could be having too many connections or maybe it is hitting another server than you think it is.

If Chirpstack accessing the app’s endpoint from across the network or even across the internet, you might want to check with your administrator for help with resolving what seems to be a routing problem.

To be clear, you are trying to send an application-level acknowledgement. LoRaWAN itself has a mechanism for acknowledgments, but your device does not seem to be using it.

Thanks for your feedback,

I have edited the post that was maybe confusing:
Connection failure was done on purpose for tesing
However the important point is :

LoRaWan Ack must be sent if LoRaWan NS have received LoRaWan ConfirmedDataUp , Meaning that device has send correctly the data to the network server.

Because in my understanding, this is what is expected by LoRaWan protocol.
Other ACKnowledge strategy should be implemented on application level.

After few others tests :
It seems that actually no downlink (data, ack, device-time-request) are sent if http request to external server failed. Even if the TX was unconfirmedDataUp

This was fixed already quite some time ago:

https://www.chirpstack.io/docs/chirpstack/changelog.html#v412

Touché!

Thanks for the answer.
I have done the setup of the 4.0.2 because it was previously used with no problem on another project.
At that moment, I took a look to changeLog, but maybe not so close

A side question about this, you said in another post:

  • Docker: You can upgrade by changing the image tag to a newer version

The upgrade will not overwrite any existing config, and if needed, the upgrade will take care of updating the database schema.

But is ther some kind of requirement for upgrade.
Is it possible to upgrade from 4.0.2 to 4.5.0 directly or do I have to do several upgrade?
4.0.2 => 4.1.0 => 4.2.0 …=> 4.5 (example)

I think you could upgrade from 4.0.2 to 4.5.x without issues, but as always, make a backup first so that you can do a rollback in case it doesn’t work.

Alternatively, you could import your backup on a test environment and try the migration to 4.5.x first to see if everything works well and then do the migration on production :slight_smile: