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

Connect fails org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1 #23

Closed
jpvirolainen opened this issue Mar 24, 2017 · 6 comments
Closed

Comments

@jpvirolainen
Copy link

Today suddenly AWSIotMqttClient::connect started failing with:
com.amazonaws.services.iot.client.AWSIotException: null
at com.amazonaws.services.iot.client.core.AwsIotCompletion.get(AwsIotCompletion.java:213) ~[hdm-push-server-1.3.1-standalone.jar:1.3.1]
at com.amazonaws.services.iot.client.core.AbstractAwsIotClient.connect(AbstractAwsIotClient.java:112) ~[hdm-push-server-1.3.1-standalone.jar:1.3.1]
at com.amazonaws.services.iot.client.AWSIotMqttClient.connect(AWSIotMqttClient.java:501) ~[hdm-push-server-1.3.1-standalone.jar:1.3.1]
at com.amazonaws.services.iot.client.core.AbstractAwsIotClient.connect(AbstractAwsIotClient.java:93) ~[hdm-push-server-1.3.1-standalone.jar:1.3.1]
at com.amazonaws.services.iot.client.AWSIotMqttClient.connect(AWSIotMqttClient.java:463) ~[hdm-push-server-1.3.1-standalone.jar:1.3.1]

It seems org.eclipse.paho.client.mqttv3 got upgraded from 1.1.0 to 1.1.1. When forced back to 1.1.0 the connection works again

@fengsongAWS
Copy link
Contributor

fengsongAWS commented Mar 24, 2017

Hi @jpvirolainen ,
We are aware of this issue and this is an error thrown by paho mqtt v1.1.1.
This error seems to be related to the changes they made in this function: https://github.com/eclipse/paho.mqtt.java/blob/562593c35d6079bc55dc60cabdcb81cea30f4d7b/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketHandshake.java#L83

Please revert back to v1.1.0 for now and we will work on this in the future release.

Thanks

@knechtandreas
Copy link

Found out that my issue over here (https://forums.aws.amazon.com/thread.jspa?messageID=775065) was also caused by this... downgrading fixed the problem.

@knechtandreas
Copy link

For gradle this did the trick:

compile('com.amazonaws:aws-iot-device-sdk-java:1.0.1') {
exclude group: 'org.eclipse.paho', module: 'org.eclipse.paho.client.mqttv3'
}
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0'

@fengsongAWS
Copy link
Contributor

Hi,

Thanks for the suggestions.
We have Java SDK v1.1.0 which explicitly depends on paho v1.1.0 so it will not pull down the latest paho.

Thanks again for your interest in AWS IoT Device SDK.

@Typhlosaurus
Copy link

@knechtandreas this may be a simpler change to your gradle:

dependencies {
    // mqttv3 1.1.1 fails to connect for unknown reasons
    compile (group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version: '1.1.0'){force = true}
    compile 'com.amazonaws:aws-iot-device-sdk-java:1.1.0'
    ...

Also see: eclipse/paho.mqtt.java#345

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

6 participants
@jpvirolainen @knechtandreas @Typhlosaurus @liuszeng @fengsongAWS and others