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

App failed to talk to MQTT broker, but can establish TCP connection to it. #1968

Open
TheHolm opened this issue Jan 27, 2025 · 1 comment
Open
Labels
needs-more-info A little more info requested from the submitter question

Comments

@TheHolm
Copy link

TheHolm commented Jan 27, 2025

Symptoms: The app is unable to send any info to MQTT broker.

App is failing with error message as bellow. I run packed capture on the broker for non encrypted MQTT. Tcp connection get established then instantly closed by client without transmitting any data. There is no FW on the way, server and client are in same subnet. I getting similar logs when using websocket, and MQTT+SSL. But I did not run packet capture for these cases. IOS app is working without problem in same setup.

Android version: 10
App version: 2.5.3 (420503003)

Please let me know if you need more info.

Error message:

2025-01-28 09:48:14.019 I [DefaultDispatcher-worker-1] MessageProcessor$resendDelayWait: Waiting for 2m before retrying send
2025-01-28 09:48:14.041 I [DefaultDispatcher-worker-3] MQTTReconnectWorker: MQTT reconnect worker job started
2025-01-28 09:48:14.376 I [DefaultDispatcher-worker-3] MQTTMessageProcessorEndpoint$connectToBroker: Connecting to ssl://owntracks.example.com:8883?# timeout = 30s
2025-01-28 09:48:15.044 E [DefaultDispatcher-worker-3] MQTTMessageProcessorEndpoint$connectToBroker: MQTT client unable to connect to endpoint because the connection was lost
java.lang.IllegalArgumentException: Invalid UTF-8 char: [a]
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage.validateUTF8String(SourceFile:111)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage.encodeUTF8(SourceFile:1)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttConnect.getPayload(SourceFile:22)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage.getHeader(SourceFile:19)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttOutputStream.write(SourceFile:6)
	at org.eclipse.paho.client.mqttv3.internal.CommsSender.run$org$eclipse$paho$client$mqttv3$internal$CommsSender(SourceFile:117)
	at org.eclipse.paho.client.mqttv3.internal.CommsSender.run(SourceFile:376)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:929)
@ckrey
Copy link
Member

ckrey commented Jan 28, 2025

There is a hint in the error messages java.lang.IllegalArgumentException: Invalid UTF-8 char: [a]

Would you double check your parameters for the connection (clientId, user, password, topics, etc.) do not contain special characters?

@jpmens jpmens added needs-more-info A little more info requested from the submitter question labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info A little more info requested from the submitter question
Projects
None yet
Development

No branches or pull requests

3 participants