eclipse-paho / eclipse-paho/paho.mqtt.java

Timed out waiting for a response from the server

Open
#785 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

I use IMqttAsyncClient, which throws an exception in the setCallback function

2020-06-06T07:39:07.217382883Z 2020-06-06 15:39:07.217 ERROR 1 --- [1f-9308a60f67bd] o.e.p.c.mqttv3.internal.ClientState : 7e12cfaf-7734-40d3-ad1f-9308a60f67bd: Timed out as no activity, keepAlive=60,000,000,000 lastOutboundActivity=3,702,800,591,221,505 lastInboundActivity=3,702,740,659,674,271 time=3,702,860,591,244,376 lastPing=3,702,800,591,224,053
2020-06-06T07:39:07.227207116Z 2020-06-06 15:39:07.226 INFO 1 --- [1f-9308a60f67bd] com.kunyue.mqtt.mqtt.OnMessageCallback : 客户端断开:{}
2020-06-06T07:39:07.227239180Z
2020-06-06T07:39:07.227244435Z org.eclipse.paho.client.mqttv3.MqttException: Timed out waiting for a response from the server
2020-06-06T07:39:07.227248742Z at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) ~[org.eclipse.paho.client.mqttv3-1.2.2.jar!/:na]
2020-06-06T07:39:07.227253125Z at org.eclipse.paho.client.mqttv3.internal.ClientState.checkForActivity(ClientState.java:741) ~[org.eclipse.paho.client.mqttv3-1.2.2.jar!/:na]
2020-06-06T07:39:07.227257127Z at org.eclipse.paho.client.mqttv3.internal.ClientComms.checkForActivity(ClientComms.java:816) [org.eclipse.paho.client.mqttv3-1.2.2.jar!/:na]
2020-06-06T07:39:07.227269238Z at org.eclipse.paho.client.mqttv3.internal.ClientComms.checkForActivity(ClientComms.java:802) [org.eclipse.paho.client.mqttv3-1.2.2.jar!/:na]
2020-06-06T07:39:07.227272648Z at org.eclipse.paho.client.mqttv3.TimerPingSender$PingTask.run(TimerPingSender.java:79) [org.eclipse.paho.client.mqttv3-1.2.2.jar!/:na]
2020-06-06T07:39:07.227276759Z at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_212]
2020-06-06T07:39:07.227280924Z at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_212]
2020-06-06T07:39:07.227284558Z

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the timeout with IMqttAsyncClient and setCallback, then read ClientState.checkForActivity, ClientComms.checkForActivity, and TimerPingSender.PingTask from the stack trace. Determine why the keep-alive exchange reports no response and document the expected behavior before adding a regression test and fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.