Kerlink iStation restart loop, STATE is not set error

Hi,
I’ve set up mqtt forwarder, but it seems to go into restart loop:

monit[1010]: ‘chirpstack-mqtt-forwarder’ process is not running
monit[1010]: ‘chirpstack-mqtt-forwarder’ trying to restart
monit[1010]: ‘chirpstack-mqtt-forwarder’ start: ‘/bin/bash -c /etc/init.d/chirpstack-mqtt-forwarder start’
chirpstack-mqtt-forwarder[1331]: Starting ChirpStack MQTT Forwarder (version: 4.2.3, docs: https://www.chirpstack.io/)
chirpstack-mqtt-forwarder[1331]: Setting up Semtech UDP Packet Forwarder backend
chirpstack-mqtt-forwarder[1331]: Setting up Semtech UDP packet-forwarder backend
chirpstack-mqtt-forwarder[1331]: Binding UDP socket, bind: 0.0.0.0:1700
monit[1010]: ‘chirpstack-mqtt-forwarder’ process is running with pid 1331
chirpstack-mqtt-forwarder[1331]: PUSH_DATA received, random_token: 3240, remote: 127.0.0.1:59041
chirpstack-mqtt-forwarder[1331]: Sending PUSH_ACK, random_token: 3240 remote: 127.0.0.1:59041
chirpstack-mqtt-forwarder[1331]: Handle PUSH_DATA error: STATE is not set, remote: 127.0.0.1:59041
chirpstack-mqtt-forwarder[1331]: PULL_DATA received, random_token: 2728, remote: 127.0.0.1:39718
chirpstack-mqtt-forwarder[1331]: Sending PULL_ACK, random_token: 2728, remote: 127.0.0.1:39718
chirpstack-mqtt-forwarder[1331]: Received Gateway ID from backend, gateway_id: 7076xxxxxxxxxxxx
monit[1010]: ‘chirpstack-mqtt-forwarder’ process is not running
monit[1010]: ‘chirpstack-mqtt-forwarder’ trying to restart
monit[1010]: ‘chirpstack-mqtt-forwarder’ start: ‘/bin/bash -c /etc/init.d/chirpstack-mqtt-forwarder start’

chirpstack mqtt forwarder configuration, where certs and key are the ones generated in the chirpstack gateway web ui. When using those certificates from the mosquitto_sub I can connect to the mosquitto of the chirpstack.
mqtt

I’m not sure if the wsl:// prefix is understood by the MQTT library. Are you trying to connect using Websockets or MQTT?

Sorry, it was a typo. I try to use ssl, and connect using MQTT.
Now I got it to this stage, log from the Kerlink iStation:

‘chirpstack-mqtt-forwarder’ process is not running
‘chirpstack-mqtt-forwarder’ trying to restart
‘chirpstack-mqtt-forwarder’ start: ‘/bin/bash -c /etc/init.d/chirpstack-mqtt-forwarder start’
Starting ChirpStack MQTT Forwarder (version: 4.2.3, docs: https://www.chirpstack.io/)
Setting up Semtech UDP Packet Forwarder backend
Setting up Semtech UDP packet-forwarder backend
Binding UDP socket, bind: 0.0.0.0:1700
‘chirpstack-mqtt-forwarder’ process is running with pid 1041
PULL_DATA received, random_token: 31647, remote: 127.0.0.1:48016
Sending PULL_ACK, random_token: 31647, remote: 127.0.0.1:48016
Received Gateway ID from backend, gateway_id: 7076ff0056080d16
Configuring client with TLS certificate, ca_cert: /home/root/generated/ca.pem, tls_cert: /home/root/generated/cert.pem, tls_key: /home/root/generated/key.pem
Starting MQTT event loop
Subscribing to command topic, topic: eu868/gateway/7076xxxxxxxxxxx/command/+
Sending conn state, topic: eu868/gateway/7076xxxxxxxxxxx/state/conn
PUSH_DATA received, random_token: 31647, remote: 127.0.0.1:32888
Sending PUSH_ACK, random_token: 31647 remote: 127.0.0.1:32888
Sending uplink event, uplink_id: 2856469318, topic: eu868/gateway/7076xxxxxxxxxxx/event/up
PULL_DATA received, random_token: 31903, remote: 127.0.0.1:48016
Sending PULL_ACK, random_token: 31903, remote: 127.0.0.1:48016
PUSH_DATA received, random_token: 31903, remote: 127.0.0.1:32888
Sending PUSH_ACK, random_token: 31903 remote: 127.0.0.1:32888
Sending uplink event, uplink_id: 2087676966, topic: eu868/gateway/7076xxxxxxxxxxx/event/up
PUSH_DATA received, random_token: 32159, remote: 127.0.0.1:32888
Sending PUSH_ACK, random_token: 32159 remote: 127.0.0.1:32888
Sending uplink event, uplink_id: 1344092169, topic: eu868/gateway/7076xxxxxxxxxxx/event/up
PULL_DATA received, random_token: 32159, remote: 127.0.0.1:48016
Sending PULL_ACK, random_token: 32159, remote: 127.0.0.1:48016
PULL_DATA received, random_token: 32415, remote: 127.0.0.1:48016
Sending PULL_ACK, random_token: 32415, remote: 127.0.0.1:48016
PUSH_DATA received, random_token: 32415, remote: 127.0.0.1:32888
Sending PUSH_ACK, random_token: 32415 remote: 127.0.0.1:32888
Sending uplink event, uplink_id: 3037935861, topic: eu868/gateway/7076xxxxxxxxxxx/event/up

Do the logs seem okay? Funny thing is that it takes almost 5-10 minutes for the gateway to appear online in the Chirpstack UI.

The “last seen” status is updated on every stats message received from the gateway. If the gateway is configured to send these stats message each 5 minutes, then it might indeed take some time…

1 Like

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