-
Notifications
You must be signed in to change notification settings - Fork 235
Open
Labels
IoTSDKUnderlying Library IssueIssue is a result of a known issue with a 3rd party library that we useIssue is a result of a known issue with a 3rd party library that we usebuginvestigation-required
Description
Context
- OS and version used: BuildRoot Linux 2022.02.7
- Java runtime used: openjdk version "1.8.0_352"
- SDK version used: iot-device-client 1.31.0, can reproduce with 2.1.3
Description of the issue
Hi, Several of our devices in Australia are unable to connect to Azure via 3G. We think that the problems are related to a higher network latency there. When we simulate a high latency here, the logs look the same as the ones from Australia. To do that, we use the following command on Linux:
tc qdisc add dev usb0 root netem delay 200ms
Note that the higher latency only causes problems when using the MQTT_WS protocol. When using MQTT, the connection can be established without problems in our test setup.
Code sample exhibiting the issue
We can reproduce the issue with the following code. It uses iot-device-client 2.1.3. The command above needs to be executed first to reproduce the issue.
SSLContext sslContext = new AzureSslContextFromCredentials().apply(PUB_KEY_CERT, PRIV_KEY, null);
ClientOptions clientOptions = ClientOptions.builder().sslContext(sslContext).build();
DeviceClient client = new DeviceClient(CONNECTION_STRING, PROTOCOL, clientOptions);
try {
client.open(false);
System.out.println("Connected successfully!");
} catch (IotHubClientException e) {
System.out.println("Error connecting!");
e.printStackTrace();
}
System.out.println("finished");
Console log of the issue
Metadata
Metadata
Assignees
Labels
IoTSDKUnderlying Library IssueIssue is a result of a known issue with a 3rd party library that we useIssue is a result of a known issue with a 3rd party library that we usebuginvestigation-required