-
Notifications
You must be signed in to change notification settings - Fork 818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The moquette server closes the connection #864
Comments
Given the line
I'm guessing that your connection is timing out. Can you try turning on keep-alive messages, or increasing the keep-alive frequency? |
public MqttConnectOptions mqttConnectOptions() { |
You can view this method initializeKeepAliveTimeout |
The keeplive in the broker comes from the MQTT message |
The paho-client library repeatedly disconnects and connects when creating a client connection to moquette. This does not happen when connecting with the mqttx test tool but drops and reconnects every 8 minutes or so
2024-10-30 14:16:06.387 INFO 30908 --- [tLoopGroup-3-18] i.m.broker.metrics.MQTTMessageLogger : C->B CONNECT
2024-10-30 14:16:06.388 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 连接:io.moquette.interception.messages.InterceptConnectMessage@40bea6d2
2024-10-30 14:16:06.395 INFO 30908 --- [tLoopGroup-3-18] i.m.broker.metrics.MQTTMessageLogger : C->B SUBSCRIBE <mqtt_fx0604> to topics [MqttTopicSubscription[topicFilter=Mosquitto_bridge, option=SubscriptionOption[qos=AT_MOST_ONCE, noLocal=false, retainAsPublished=false, retainHandling=SEND_AT_SUBSCRIBE]]]
2024-10-30 14:16:06.395 INFO 30908 --- [tLoopGroup-3-18] i.m.broker.metrics.MQTTMessageLogger : C<-B SUBACK <mqtt_fx0604> packetID <1>, grantedQoses [0]
2024-10-30 14:16:06.396 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 客户端 mqtt_fx0604 订阅主题:Mosquitto_bridge
2024-10-30 14:16:06.753 INFO 30908 --- [tLoopGroup-3-19] i.m.broker.metrics.MQTTMessageLogger : C->B CONNECT
2024-10-30 14:16:06.756 INFO 30908 --- [tLoopGroup-3-18] i.m.broker.metrics.MQTTMessageLogger : Channel Inactive
2024-10-30 14:16:06.756 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 连接:io.moquette.interception.messages.InterceptConnectMessage@570486df
2024-10-30 14:16:06.756 INFO 30908 --- [tLoopGroup-3-18] io.moquette.broker.MQTTConnection : Notifying connection lost event
2024-10-30 14:16:06.756 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 连接丢失:mqtt_fx0604
2024-10-30 14:16:06.757 INFO 30908 --- [tLoopGroup-3-19] i.m.broker.metrics.MQTTMessageLogger : C->B SUBSCRIBE <mqtt_fx0604> to topics [MqttTopicSubscription[topicFilter=online01Topic, option=SubscriptionOption[qos=AT_LEAST_ONCE, noLocal=false, retainAsPublished=false, retainHandling=SEND_AT_SUBSCRIBE]]]
2024-10-30 14:16:06.757 INFO 30908 --- [tLoopGroup-3-19] i.m.broker.metrics.MQTTMessageLogger : C<-B SUBACK <mqtt_fx0604> packetID <1>, grantedQoses [1]
2024-10-30 14:16:06.757 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 客户端 mqtt_fx0604 订阅主题:online01Topic
2024-10-30 14:16:06.760 INFO 30908 --- [tLoopGroup-3-19] i.m.broker.metrics.MQTTMessageLogger : C<-B PUBACK <mqtt_fx0604> packetID <2>
2024-10-30 14:16:06.760 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 发送数据:主题 = online01Topic, 内容 = online01
2024-10-30 14:16:07.422 INFO 30908 --- [tLoopGroup-3-19] i.m.broker.metrics.MQTTMessageLogger : C->B PUBACK <mqtt_fx0604> packetID <1>
2024-10-30 14:16:17.108 INFO 30908 --- [tLoopGroup-3-20] i.m.broker.metrics.MQTTMessageLogger : C->B CONNECT
2024-10-30 14:16:17.110 INFO 30908 --- [tLoopGroup-3-19] i.m.broker.metrics.MQTTMessageLogger : Channel Inactive
2024-10-30 14:16:17.111 INFO 30908 --- [tLoopGroup-3-19] io.moquette.broker.MQTTConnection : Notifying connection lost event
2024-10-30 14:16:17.111 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 连接:io.moquette.interception.messages.InterceptConnectMessage@73dea4e
2024-10-30 14:16:17.111 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 连接丢失:mqtt_fx0604
2024-10-30 14:16:17.111 INFO 30908 --- [tLoopGroup-3-20] i.m.broker.metrics.MQTTMessageLogger : C->B SUBSCRIBE <mqtt_fx0604> to topics [MqttTopicSubscription[topicFilter=Mosquitto_bridge, option=SubscriptionOption[qos=AT_MOST_ONCE, noLocal=false, retainAsPublished=false, retainHandling=SEND_AT_SUBSCRIBE]]]
2024-10-30 14:16:17.111 INFO 30908 --- [tLoopGroup-3-20] i.m.broker.metrics.MQTTMessageLogger : C<-B SUBACK <mqtt_fx0604> packetID <1>, grantedQoses [0]
2024-10-30 14:16:17.111 INFO 30908 --- [pool-2-thread-1] c.b.mqttImp.SafetyInterceptHandler : 客户端 mqtt_fx0604 订阅主题:Mosquitto_bridge
The text was updated successfully, but these errors were encountered: