Hi all,
I have a Kona Enterprise gateway on a cellular connection. When it first powers up the gateway bridge (3.14.2, current version) starts up, but is not able to connect to Azure, likely because the cell connection is not yet online. If i restart the gateway bridge software once the cell connection is online, then everything works fine. I have keepalive and reconnect settings in my config file, but they don’t seem to be helping.
I could potentially do a delayed startup of the gateway bridge, but this isn’t really a reliable solution. I could also write a script that monitors the logs to check if it’s not connected and restart the software, but that’s also not a great solution.
Has anyone seen this behaviour before? it works fine with a hardwired ethernet connection, so i suspect it’s the delay in the cell getting service that’s causing the issue. Log and config excerpts are below.
Syslog
Aug 3 14:12:03 kona-enterprise-013186 chirpstack-gateway-bridge[2386]: time="2022-08-03T14:12:03.168351227Z" level=info msg="integration/mqtt: publishing event" event=stats qos=0 stats_id=573bd779-6086-4718-a92d-2cdabed4a112 topic=devices/647fdafffe013186/messages/events/stats
Aug 3 14:12:03 kona-enterprise-013186 chirpstack-gateway-bridge[2386]: time="2022-08-03T14:12:03.18026848Z" level=error msg="publish event error" error="not Connected" event_type=stats gateway_id=647fdafffe013186 stats_id=573bd779-6086-4718-a92d-2cdabed4a112
TOML file
# MQTT authentication.
[integration.mqtt.auth]
type="azure_iot_hub"
max_reconnect_interval="1m0s"
keep_alive="60s"
[integration.mqtt.auth.azure_iot_hub]
device_connection_string="HostName=xxxxxx"
device_id=""
sas_token_expiration="24h0m0s"
hostname=""