Skip to content
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

Eclipse Paho MQTTv3 Java client loses working WebSocket connection to mosquitto 2.0.11 #2831

Open
42i opened this issue Jun 22, 2023 · 0 comments

Comments

@42i
Copy link

42i commented Jun 22, 2023

Setup:

  • mosquitto 2.0.11 (on Ubuntu)
  • Java client Eclipse Paho MQTTv3 version 1.2.5 (maven)

Connection:

  • WebSocket
  • no SSL (private network for test purposes)

Symptoms:

  • client can connect
  • client can receive data
  • after a while (a few minutes) the client disconnects
  • I see these exceptions on the client side:
Exception 'java.io.IOException' occurred in thread 'webSocketReceiver' at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketFrame.<init>(WebSocketFrame.java:193)
	at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketFrame.<init>(WebSocketFrame.java:193)
	at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketReceiver.run(WebSocketReceiver.java:104)
	at java.lang.Thread.run(Thread.java:833)
Exception 'java.io.EOFException' occurred in thread 'MQTT Rec: blech' at java.io.DataInputStream.readByte(DataInputStream.java:273)
	at java.io.DataInputStream.readByte(DataInputStream.java:273)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92)
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137)
	at java.lang.Thread.run(Thread.java:833)

The very same client under the same conditions works fine with a mosquitto broker 1.6.x .

I tried to locally build a 2.0.11 / 2.0.15 mosquitto on a rocky linux I have here, but did not succeed. My system's libwebsockets is not compiled with LWS_WITH_EXTERNAL_POLL and from there it went on and on and on... Should I manage the local build and gain more insights, I'll add them here later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant