-
Couldn't load subscription status.
- Fork 559
Open
Labels
Description
Hi, I'm getting this error from the MQTT lib:
[MQTT-LOG] - [[client] Connect comms goroutine - error triggered EOF]
The connection options is:
mqttOpts := mqtt.NewClientOptions()
mqttOpts = mqttOpts.SetAutoReconnect(true)
mqttOpts = mqttOpts.SetOnConnectHandler(func(mqtt.Client) {
// On connect stuff
})
mqttOpts = mqttOpts.SetConnectionLostHandler(func(c mqtt.Client, err error) {
// On disconnect stuff
})
mqttOpts = mqttOpts.SetClientID(mqttClientID(fmt.Sprintf("%s-%s", clientIDPrefix, h.GetMchID()), time.Now().UnixNano()))
mqttOpts = mqttOpts.SetCleanSession(false)
mqttOpts = mqttOpts.SetKeepAlive(2 * time.Minute) // Sent a ping to the MQTT broker every 2 minutes
mqttOpts = mqttOpts.SetWriteTimeout(2 * time.Second)
mqttOpts = mqttOpts.SetConnectRetry(true)
mqttOpts = mqttOpts.SetPingTimeout(2 * time.Second) // Default is 10 seconds
mqttOpts = mqttOpts.SetConnectRetryInterval(15 * time.Second)
mqttOpts = mqttOpts.AddBroker(fmt.Sprintf("%s://%s:%d", h.connOpts.Protocol, h.connOpts.Host, h.connOpts.Port))
mqttOpts = mqttOpts.SetProtocolVersion(4)
mqttOpts = mqttOpts.SetMaxResumePubInFlight(1) // Max in-flight messages for resume publish
mqttOpts = mqttOpts.SetUsername(h.connOpts.Username)
mqttOpts = mqttOpts.SetPassword(h.connOpts.Password)I followed the error to the file net.go file at startComms goroutine, specifically at the startOutgoingComms, but it's not triggering the disconnection status and somehow the IsConnected() bool function (at client.go) returns true and the client can't receive or send messages.
The MQTT image instance on EKS version is: eclipse-mosquitto:1.6.10 with SSL enabled
The image is too old or I'm doing some soemthing wrong with the client connection options?