hivemq-mqtt-client icon indicating copy to clipboard operation
hivemq-mqtt-client copied to clipboard

com.hivemq.client.mqtt.exceptions.ConnectionClosedException: Timeout while waiting for PINGRESP

Open acaliaro opened this issue 4 years ago • 5 comments

Expected behavior

On a Datalogic Joya Touch I change the wifi network. When I switch from network A to B, MqttClient reconnect. The device is online (if I open the browser I see web pages) but I have the exception

Actual behavior

com.hivemq.client.mqtt.exceptions.ConnectionClosedException: Timeout while waiting for PINGRESP

To Reproduce

Switch from wifi A to B, the mqtt reconnect but publish message goes to timeout

Steps

Reproducer code

Details

  • Affected HiveMQ MQTT Client version(s):
  • implementation 'com.hivemq:hivemq-mqtt-client:1.2.1'
    
    implementation 'net.sourceforge.streamsupport:android-retrostreams:1.7.2' implementation 'net.sourceforge.streamsupport:android-retrofuture:1.7.2' implementation 'org.threeten:threetenbp:1.4.4'
  • Used JVM version:
  • Used OS (name and version): Android 7.1.2
  • Used MQTT version:
  • Used MQTT broker (name and version):

acaliaro avatar Oct 13 '21 07:10 acaliaro

Hi @acaliaro - it's been a while since this issue has been posted. Is this still an issue for you?

I would think this is actually the correct behavior indicating that the socket connection from wifi A is no longer active/valid.

If you'd like me to take a look, could you share a snippet of code to reproduce how you are using the client?

pglombardo avatar Mar 10 '23 08:03 pglombardo

HI It's been a long time and I honestly can't remember whether or not this problem has been fixed. We are not currently using this type of device, but we will probably have to go back to testing soon. I will update you thanks

acaliaro avatar Mar 10 '23 11:03 acaliaro

Hi @acaliaro - understood. Thanks for the update. Let us know if so. I'd be happy to investigate.

pglombardo avatar Mar 28 '23 09:03 pglombardo

i use ssh connect to device ,monitor same issue ,during this period ,the ssh connection work fine ,at same time ,another device connect to same broker also work fine

com.hivemq.client.mqtt.exceptions.ConnectionClosedException: Timeout while waiting for PINGRESP Server mqtt disconnected /{ip}:{port} com.hivemq.client.mqtt.exceptions.ConnectionFailedException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: null: /{ip}:{port}

shanjunmei avatar Nov 06 '23 05:11 shanjunmei

Hi all, I've added a feature request #623 to improve the PINGREQ <--> PINGRESP behaviour during network changes.

Thanks for pointing this out!

pglombardo avatar Mar 05 '24 13:03 pglombardo