Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Connect to Azure IOT - exception 32109(subscribe Microsoft Azure doesn't work (exception 32109))
Connect to Azure IOT - exception 32109 [message #1796305] Wed, 10 October 2018 07:08 Go to next message
Paolo Cornacchia is currently offline Paolo CornacchiaFriend
Messages: 1
Registered: October 2018
Junior Member
I am trying to use Paho MQTT Java for connecting to azure iot hub.
I connect sucessful to IoT-Hub and I publish connectly data to endpoint devices/{client ID}/messages/events.
I have a problem when subscrive to endpoint devices/{client ID}/messages/deviceBound/#.
When subscription send I obtain this exception:
Connection lost (32109) - java.io.EOFException
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:146)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(Unknown Source)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:65)
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:107)

Extracted from my source:

MqttFactory factory;

private void connect() {
try {
factory.setHostname("xxx.azure-devices.net");
factory.setPort(8883);
factory.setClientId("myClient");
factory.setUsername("");
factory.setPassword("");
factory.setPrimaryKey("81ODMIS/bMAjPS+GNnDJ6w8M36ISLcAa+HgzZVZ7WXa+");
factory.setUseSasToken(true);
factory.connect();
}
....
}
private void publish() {
try {
factory.setPubTopic("devices/myClient/messages/events/");
factory.setContent("test");
factory.publish();
}
.....
}


private void subscribe() {
try {
factory.setSubTopic(devices/myClient/messages/devicebound/#);
factory.subscribe();
}
......
}

Re: Connect to Azure IOT - exception 32109 [message #1796415 is a reply to message #1796305] Fri, 12 October 2018 14:36 Go to previous messageGo to next message
James Sutton is currently offline James SuttonFriend
Messages: 71
Registered: July 2015
Member
Hi,

What do you see if you look up the disconnection following these instructions: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-troubleshoot-connectivity
Re: Connect to Azure IOT - exception 32109 [message #1800654 is a reply to message #1796415] Fri, 04 January 2019 13:44 Go to previous message
Gerred Jhon is currently offline Gerred JhonFriend
Messages: 6
Registered: August 2018
Junior Member
Mentioned below article will help you in resolving the issue as we are using MQTT Azure client which helps to send the data of wireless temperature sensor to Azure IoT hub and create stream analytics using Power Bi

https://ncd.io/getting-started-with-microsoft-azure-and-wireless-temperature-humidity-sensor/

[Updated on: Fri, 04 January 2019 13:47]

Report message to a moderator

Previous Topic:Mqtt yielding and MQTTCloseSession at the end of cycle function
Next Topic:Reverse MQTT-SN transparent gateway
Goto Forum:
  


Current Time: Sat Apr 27 03:21:19 GMT 2024

Powered by FUDForum. Page generated in 0.03070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top