chirpstack / chirpstack-gateway-bridge

ChirpStack Gateway Bridge abstracts Packet Forwarder protocols into Protobuf or JSON over MQTT.
https://www.chirpstack.io
MIT License
423 stars 272 forks source link

Chirpstack v4.6.0 missing uplink info latest gw bridge tag #233

Closed ccall48 closed 5 months ago

ccall48 commented 8 months ago

What happened?

I run chirpstack using chirpstack-docker containers and repo. On trying to run latest tag on chirpstack v4.6.0 I get the following errors on the gateway bridge with no data being transmitted.

What did you expect?

Latest to be compatible with v4.6.0 / as this is whats pulled from docker with container tag 4

Steps to reproduce this issue

Steps:

  1. replace gateway bridge from 4 to latest in docker compose

Could you share your log output?

This is a snippet of one error, as the logs are full of these for every uplink from all gateways on every region.

chirpstack-docker-chirpstack-1        | 2024-01-12T08:28:56.977789Z  INFO chirpstack::gateway::backend::mqtt: Message received from gateway region_id="au915_1" topic="au915_1/gateway/2864afc74baa57f1/event/up" qos=0 json=false
chirpstack-docker-chirpstack-1        | 2024-01-12T08:28:57.180429Z  WARN chirpstack::uplink: tx_info of uplink event is empty, skipping
chirpstack-docker-chirpstack-1        | 2024-01-12T08:28:57.180469Z  WARN chirpstack::uplink: tx_info of uplink event is empty, skipping
chirpstack-docker-chirpstack-1        | 2024-01-12T08:28:57.180702Z ERROR chirpstack::uplink: Deduplication error error=Unable to get first item from rx_info

Your Environment

This is docker-chirpstack running on ubuntu cloud server, built new as version 4 - so not an update from v3.

Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

brocaar commented 8 months ago

I tried to reproduce:

chirpstack-gateway-bridge-1               | time="2024-01-25T13:10:59.016411521Z" level=info msg="integration/mqtt: downlink frame received" downlink_id=4138928630 gateway_id=0016c001ff1a0a5f
chirpstack-gateway-bridge-1               | time="2024-01-25T13:10:59.023083574Z" level=info msg="integration/mqtt: publishing event" event=ack qos=0 topic=eu868/gateway/0016c001ff1a0a5f/event/ack
chirpstack-1                              | 2024-01-25T13:10:59.023485Z  INFO chirpstack::gateway::backend::mqtt: Message received from gateway region_id="eu868" topic="eu868/gateway/0016c001ff1a0a5f/event/ack" qos=0 json=false
chirpstack-1                              | 2024-01-25T13:10:59.023742Z  INFO tx_ack{downlink_id=4138928630}: chirpstack::downlink::tx_ack: Log downlink-frame for gateway gateway_id=0016c001ff1a0a5f
chirpstack-1                              | 2024-01-25T13:10:59.024049Z  INFO tx_ack{downlink_id=4138928630}: chirpstack::downlink::tx_ack: Log downlink-frame for device device_eui=0101010101010101
ccall48 commented 8 months ago

I wonder if the issue is present only if the original build is done using gwb container tagged 4. docker compose down --remove-orphans swap the gwb with the latest tag and brought back up docker compose up all the existing registered devices coming from gwmp show the gw tx/rx errors which is about 4 regions atm.

I will see if i can reproduce on my homelab this week as the issue is occurring on my production server.

ccall48 commented 8 months ago

Seems to reproduce straight away on my testlab with the above, I even created a new us915_1 bridge then added 2x new virtual devices and tried to join them.

Here is a pastebin to the logfile. https://pastebin.com/hRsRPj2f

brocaar commented 7 months ago

Have you tried with the :4 tag? I think that is a lot safer to use.

ckvi commented 6 months ago

Hi!

I stumbled across the same error lines. Since I am new to LoRaWAN and unfortunately to Docker aswell, I wondered how you came around that described issue. As far as I understood @brocaar recommended using tag :4 but as far as I understand, tag :4 is already referenced in the docker-compose.yml for die gateway bridge?

I think I didn't understand something right. Is there an easy way to get around this?

Thanks, Chris

brocaar commented 6 months ago

@ckvi the title of this issue is the problem with the :latest tag. Please note that this is something different than the :4 tag.

ckvi commented 6 months ago

I see. I tried pulling the v4 Branch and with that it worked immediately. Thanks for your reply.