time=“2018-03-05T16:48:13+08:00” level=error msg=“backend: mqtt connection error: pingresp not received, disconnecting”
time=“2018-03-05T16:48:13+08:00” level=info msg=“backend: connected to mqtt broker”
time=“2018-03-05T16:48:13+08:00” level=info msg=“backend: re-registering to gateway topics” topic_count=1
time=“2018-03-05T16:48:13+08:00” level=error msg=“backend: mqtt connection error: write tcp 127.0.0.1:38738->127.0.0.1:1883: use of closed network connection”
time=“2018-03-05T16:48:13+08:00” level=info msg=“backend: connected to mqtt broker”
time=“2018-03-05T16:48:13+08:00” level=info msg=“backend: re-registering to gateway topics” topic_count=1
time=“2018-03-05T16:49:06+08:00” level=info msg=“backend: unsubscribing from topic” topic=“gateway/0102030405060708/tx”
time=“2018-03-05T16:56:08+08:00” level=info msg=“backend: subscribing to topic” topic=“gateway/0102030405060708/tx”
time=“2018-03-05T16:56:08+08:00” level=info msg=“backend: publishing packet” topic=“gateway/0102030405060708/stats”
time=“2018-03-05T16:58:06+08:00” level=info msg=“backend: unsubscribing from topic” topic=“gateway/0102030405060708/tx”
time=“2018-03-05T17:01:56+08:00” level=info msg=“backend: subscribing to topic” topic=“gateway/0102030405060708/tx”
time=“2018-03-05T17:01:56+08:00” level=info msg=“backend: publishing packet” topic=“gateway/0102030405060708/stats”
time=“2018-03-05T17:03:06+08:00” level=info msg=“backend: unsubscribing from topic” topic=“gateway/0102030405060708/tx”
After ‘backend: mqtt connection error: pingresp not received, disconnecting’ I send rxpacket to the gateway-bridge , the gateway can’t publish rxpacket but it can publish statspacket.
That looks like a networking issue between the LoRa Gateway Bridge and your MQTT broker (Mosquitto). E.g. high latency or packet-loss. There might also be a networking issue between the LoRa Gateway Bridge and your gateway / packet-forwarder. You will only see the backend: unsubscribing from topic when LoRa Gateway Bridge hasn’t seen the gateway for a while.
I test the LoRa Gateway Bridge and MQTT on the same system.
The LoRa Gateway Bridge can’t publish any rx package. It looks like the chan blocking. There is nothing printed in the log after recieve the rx package.
I will show you the log.
It looks like the Goroutine PublishGatewayRX is down or rxchan blocking . when there are too many rxpackage recieved from gateway , the LoRa Gateway Bridge disconnect from MQTT. After reconnect , the goroutine or rxchan has something wrong.
When mqtt error is ‘write tcp …->…: use of closed network connect’ , it will happen.
If mqtt is not this error,server will be ok.
Thank you for your reply!
There is no proplem after the servers updated .
I found the reason may be due to the package paho.mqtt.golang . There are some updates on it.