Chirpstack v4: Timing out waiting for MQTT connection

Hello,

We have been running a successful installation of Chirpstack v3 with several hundred devices. After seeing the v4 release we decided to try a new installation but ran into an issue when trying to connect our first gateway.

The Web UI comes up and we registered a gateway, however we get an error in the logs and the gateways shows “Never” for Last Seen:

ERROReProcessing gateway event error: timed out waiting for connection: broken pipe eus915_0/gateway/647fdafffe00b963/event/up

ERROR Processing gateway event error: timed out waiting for connection: broken pipe eus915_0/gateway/647fdafffe00b963/event/stats

Using an MQTT Client I can see data coming in from the Gateway Bridge under the topics listed above.

If i log into our MQTT Broker I can browse the client connections and I’m able to verify that Chirpstack is indeed connected and listening to the correct topic.

All of our config is out of the box, all we did was update the host / passwords etc for our postgress, redis, and MQTT.

There’s no connection error on startup until it starts listening to the topics:

Initializing MQTT integration
Connecting to MQTT broker  ... tcp://xxxxx:1883/ eclient_ide... clean_session=false
Starting MQTT consumer loop
Connected to MQTT broker

Connecting to MQTT broker e... region_name=us915_0 ... command_topic  = application/+/device/+/command/+
Connected to MQTT broker eregion_namee=eus915_0

Subscribing to gateway event topic eregion_name=us915_0 event_topic=us915_0/gateway/+/event/+
Starting MQTT consumer loop

<ERRORS>

Likely keepalive issue for MQTT.

I can not figure out which is your doubt.
You expose the problem, and it can be understood. However I dont know what to response as soon as there is not a clear question.

We resolved the issue.

The problem was actually with the Redis connection!

It was hard to trace down because the all logs reported that it was due to MQTT timing out.

We only figured out it was Redis once we noticed that it was never populated with any data.

Here is what happened, in version 3 you specified the password through it’s own field:

[redis]
  servers=[ "somehost.dev.company.com:6379" ]
  password="xxxxx"

MQTT is configured similarly:

server="tcp://xxxxx.company.com:1883"
username="xxxx"
password="xxxx"

However in version 4, password is not a config option for Redis, the password has to be passed in through the server URL.

[redis]
  servers=[ "username:password@somehost.company.com:6379" ]
1 Like