MQTT Forwarder TCP/TLS connect failure

I’m a newbie and I installed Chripstack v4 for the first time.

Chirpstack and Chirpstack Gateway Bridge are installed on a server (Debian 11).

I installed the Chirpstack MQTT Forwarder on a Kerlink Gateway.

Error message:

chirpstack-mqtt-forwarder[1860]: PULL_DATA received, random_token: 47449, remote:

chirpstack-mqtt-forwarder[1860]: Sending PULL_ACK, random_token: 47449, remote:

chirpstack-mqtt-forwarder[1860]: PUSH_DATA received, random_token: 63063, remote:

chirpstack-mqtt-forwarder[1860]: Sending PUSH_ACK, random_token: 63063 remote:

chirpstack-mqtt-forwarder[1860]: Handle PUSH_DATA error: STATE is not set, remote:

chirpstack-mqtt-forwarder[1860]: Connecting to MQTT broker error, error: [-1] TCP/TLS connect failure

What could be misconfigured? What is the best way for me to debug? In v4, unfortunately, there aren’t not many examples.

Thx for support!

Try to use MQTT (Not MQTTS) first.

Thank you for support. Where can i find the settings for mqtt/mqtts? I have checked all files and couldn´t find any settings…

This is the default configuration (which you probably already modified):



If you would use MQTT over TLS, it would be:


See also:

1 Like

Hi, I have the same issue. I’m using Multitech Conduit AP Gateway :disappointed_relieved:.

I followed your guide, option 1.
My external Mqtt Server (used Docker, see GitHub Repo is secured, so it is public accessible with username and over ssl with self signed certificate). The Mqtt server looks good, because I can connect with certs etc. via Mqtt Explorer.

I have no idea, what I can do futher. Now I hopy someone has an idea.
Logs from output with command:
tail -f -n 100 /var/log/messages |grep chirpstack-mqtt-forwarder

2023-02-27T22:13:47.302046+01:00 mtcap chirpstack-mqtt-forwarder[24329]: Handle PUSH_DATA error: STATE is not set, remote:
2023-02-27T22:13:49.189587+01:00 mtcap chirpstack-mqtt-forwarder[24329]: PULL_DATA received, random_token: 5221, remote:
2023-02-27T22:13:49.189988+01:00 mtcap chirpstack-mqtt-forwarder[24329]: Sending PULL_ACK, random_token: 5221, remote:
2023-02-27T22:13:49.614978+01:00 mtcap chirpstack-mqtt-forwarder[24329]: PUSH_DATA received, random_token: 35336, remote:
2023-02-27T22:13:49.616548+01:00 mtcap chirpstack-mqtt-forwarder[24329]: Sending PUSH_ACK, random_token: 35336 remote:

No body have an idea? Should I take the (older) chirpstack gateway bridge instead?
Thanks a lot :slight_smile:

If you share the actual error logs + your configuration, it will be easier for us to help you :slight_smile:

Hopefully you mean the configuration of the chirpstack-mqtt-forwarder:

> [backend]
>   # Enabled backend.
>   #
>   # Set this to the backend that must be used by the ChirpStack MQTT Forwarder.
>   # Valid options are:
>   #   * concentratord
>   #   * semtech_udp
>   enabled="semtech_udp" 
>   [backend.concentratord]
>     event_url="ipc:///tmp/concentratord_event" 
> 	command_url="ipc:///tmp/concentratord_command"
>   [backend.semtech_udp]
>     bind=""
> [mqtt]
>   event_topic="eu868/gateway/{{ gateway_id }}/event/{{ event }}"
>   command_topic="eu868/gateway/{{ gateway_id }}/command/{{ command }}"
>   state_topic="eu868/gateway/{{ gateway_id }}/state/{{ state }}"
>   server="ssl://mypublicmqtt:8883"
>   username="myuser"
>   password="mypassword"
>   ca_cert="/var/config/chirpstack-mqtt-forwarder/certs/ca.pem"
>   tls_cert="/var/config/chirpstack-mqtt-forwarder/certs/cert.pem"
>   tls_key="/var/config/chirpstack-mqtt-forwarder/certs/cert-key.pem"
>   client_id=""

On my public mqtt server I have no logs about a request from my gateway.
Or what do mean with logs? Can I find more logs instead of that:

> tail -f -n 100 /var/log/messages |grep chirpstack-mqtt-forwarder

In addition I found some here /var/log/lora-pkt-fwd-1.log. Maybe this could be interesting.

> LORA","datr":"SF7BW125","codr":"4/5","lsnr":-0.5,"rssi":-110,"size":23,"data":"AAAAAAAAAAAAFm0pNDMKYajspToHFaM="}]}
> INFO: [up] PUSH_ACK received in 12 ms
> INFO: [down] PULL_ACK received in 3 ms
> INFO: Received pkt from mote: 00000000 (fcnt=0)
> JSON up: {"rxpk":[{"tmst":1708152995,"chan":2,"rfch":0,"freq":868.500000,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":3.0,"rssi":-103,"size":23,"data":"AAAAAAAAAAAAFoccNDMKYajTH2XkCW0="}]}
> INFO: [up] PUSH_ACK received in 22 ms
> INFO: Received pkt from mote: 00000000 (fcnt=0)
> JSON up: {"rxpk":[{"tmst":1709636772,"chan":2,"rfch":0,"freq":868.500000,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":-2.2,"rssi":-107,"size":23,"data":"AAAAAAAAAAAAFnIfNDMKYahE/12CGB0="}]}
> INFO: [up] PUSH_ACK received in 12 ms
> INFO: Received pkt from mote: 00000000 (fcnt=0)
> JSON up: {"rxpk":[{"tmst":1710648219,"chan":1,"rfch":0,"freq":868.300000,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":1.2,"rssi":-104,"size":23,"data":"AAAAAAAAAAAAFmxMNDMKYaioFYiB7nM="}]}
> INFO: [up] PUSH_ACK received in 13 ms

I checked if I would get a connection without a secure channel. Doesn’t work
I’m guessing that’s a local problem on multitech gateway side.
@brocaar do you have an another idea?

Solved problem: I had an typo in certificate location on my gateway (because renamed my certifificate files) :partying_face:

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.