anop
January 27, 2023, 2:22pm
1
Hi,
After I have performed the recent V4 upgrade to ChirpStack Gateway Bridge 4.0.4 there is no gateway connection to the server anymore.
During upgrade there was the question if to keep or modify /etc/chirpstack/region_eu868.toml.
I decided to keep the old file first and then modified the minor changes like name out and id in.
Does anyone had the same issue and solved it or can give me a hint? Would appreciate very much!
datnus
January 27, 2023, 4:10pm
2
True. No auto merge of toml files yet.
I have to backup toml files and manually merge every upgrade.
anop
January 29, 2023, 7:06pm
3
Hi datnus,
thanks for your reply.
Issue is reproducible: After installing Chirpstack 4.2.0 and the settings of the file /etc/chirpstack/region_eu868.toml, gateway still runs. But as soon as afterwards upgraded to ChirpStack Gateway Bridge 4.0.4, the gateway cannot connect anymore.
(Gateway connected via Semtech UDP Packet Forwarder.)
@all , @brocaar ,
Is it just me who has the problem or is there a bug in the version 4.0.4?
datnus
January 29, 2023, 11:57pm
4
Check the toml file for the bridge.
It is usually at /etc/chirpstack-gateway-bridge.
anop
January 30, 2023, 9:09am
5
Thanks for the hint, but no difference before and after the upgrade in chirpstack-gateway-bridge.toml.
I have compared the file content with VS Code to make sure I that I have not missed anything. Problem must be somewhere else.
Did you prefix the gateway topics with the region (new in v4), ie:
event_topic_template=“eu868 /gateway/{{ .GatewayID }}/event/{{ .EventType }}”
anop
January 30, 2023, 10:01am
7
Hi Jerome,
Yes it was in before the upgrade to 4.0.4 and it is still in the chirpstack-gateway-bridge.toml file exactly as above.
I’m affraid you have to review your toml file line by line, starting with MQTT(S) connection (to see if the gateway can connect to the broker)…
I am also upgraded to v4.2 and gateway connection is lost. Compared new and old region_eu868.toml
The lines that old version were removed
# Event topic template.
event_topic="eu868/gateway/+/event/+"
# Command topic template.
command_topic="eu868/gateway/{{ gateway_id }}/command/{{ command }}"
replaced with
topic_prefix="eu868"
How to solve it ?
bconway
January 30, 2023, 3:54pm
10
It looks like there was a bug in configuration file(s) loading and a new release will be available soon:
opened 07:52AM - 27 Jan 23 UTC
closed 02:33PM - 30 Jan 23 UTC
gateway bridge not connecting in latest version.
I double checked my configs … and even hard coded the gateway bridge mqtt settings and it always tried to connect to `localhost:1883` no matter what I set this to ( it should be going to my container as set in settings `tcp://mosquitto:1883` for my server). I was pulling hairs trying to get this to work - I ended up dropping back to version 4.0.3 and it connected and worked straight away with exisiting config.
all other services connect fine, just errors with gateway bridge component.
errors with latest gateway-bridge image 3226e542433e
```
chirpstack-gateway-bridge | time="2023-01-27T18:16:39.262411168+11:00" level=info msg="starting ChirpStack Gateway Bridge" docs="https://www.chirpstack.io/gateway-bridge/" version=
chirpstack-gateway-bridge | time="2023-01-27T18:16:39.264080671+11:00" level=info msg="backend/semtechudp: starting gateway udp listener" addr="0.0.0.0:1700"
chirpstack-gateway-bridge | time="2023-01-27T18:16:39.264853945+11:00" level=error msg="[client] dial tcp 127.0.0.1:1883: connect: connection refused" module=mqtt
chirpstack-gateway-bridge | time="2023-01-27T18:16:39.264865505+11:00" level=warning msg="[client] failed to connect to broker, trying next" module=mqtt
chirpstack-gateway-bridge | time="2023-01-27T18:16:39.264877316+11:00" level=error msg="[client] Failed to connect to a broker" module=mqtt
chirpstack-gateway-bridge | time="2023-01-27T18:16:39.264887116+11:00" level=error msg="integration/mqtt: connection error" error="network Error : dial tcp 127.0.0.1:1883: connect: connection refused"
```
![Screenshot 2023-01-27 at 18 45 20](https://user-images.githubusercontent.com/34887996/215035027-ebbda5f5-b63b-4363-ba43-42fb8e247b69.jpg)
same config on v4.0.3 - seems to connect fine.
```
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.342638139+11:00" level=info msg="starting ChirpStack Gateway Bridge" docs="https://www.chirpstack.io/gateway-bridge/" version=
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.342738961+11:00" level=info msg="backend/semtechudp: starting gateway udp listener" addr="0.0.0.0:1700"
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.348002337+11:00" level=warning msg="[store] memorystore wiped" module=mqtt
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.348151912+11:00" level=info msg="integration/mqtt: connected to mqtt broker"
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.649648149+11:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="au915_1/gateway/b827ebfffec9b93e/command/#"
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.649938978+11:00" level=warning msg="[store] memorystore del: message 1 not found" module=mqtt
chirpstack-gateway-bridge | time="2023-01-27T18:32:38.650358492+11:00" level=info msg="integration/mqtt: publishing state" gateway_id=b827ebfffec9b93e qos=0 state=conn topic=au915_1/gateway/b827ebfffec9b93e/state/conn
- - - -
chirpstack-gateway-bridge | time="2023-01-27T18:35:57.444655082+11:00" level=info msg="integration/mqtt: publishing event" event=up qos=0 topic=au915_1/gateway/60c5a8fffe76fXXXXevent/up uplink_id=21187
chirpstack-gateway-bridge | time="2023-01-27T18:35:57.447436063+11:00" level=info msg="integration/mqtt: publishing event" event=up qos=0 topic=au915_1/gateway/dca632fffe6aXXXX/event/up uplink_id=16644
```
![Screenshot 2023-01-27 at 18 51 40](https://user-images.githubusercontent.com/34887996/215035413-989faa6e-b773-4a33-9748-8d960ad3af20.jpg)
samtd
January 30, 2023, 5:15pm
11
I solve my problem with that changing the gateway bridge service
/lib/systemd/system/chirpstack-gateway-bridge.service
[Service]
User=gatewaybridge
Group=gatewaybridge
ExecStart=/usr/bin/chirpstack-gateway-bridge -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
Restart=on-failure
anop
January 30, 2023, 5:45pm
12
This worked for me! Thanks very much, samtd
brocaar
January 30, 2023, 7:54pm
13
Sorry for the trouble, this has been fixed in v4.0.5.