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

Java Service SDK - Cloud 2 Device client hanging and doesn't throw any error when the connection string is incorrect #11

Closed
tameraw opened this issue Jan 12, 2017 · 6 comments
Labels
CSS enhancement fix checked in Fix checked into main or preview, but not yet released.

Comments

@tameraw
Copy link
Contributor

tameraw commented Jan 12, 2017

From @dluc on November 9, 2016 20:48

code: https://gist.github.com/dluc/adb431f0cfd67e55e4bf6dbd30e039ae

Note: the code is a copy of the sample code from the SDK, with a fake connection string and a fake deviceID for the purpose of the test.

The code as is doesn't throw any error and the client seems to hang forever.
It's not possible to understand if a message is delivered.

Output:

Preparing message...
HostName=iothubreact-demo5p-temper.azure-devices.net;SharedAccessKeyName=service;SharedAccessKey=7YMwcekzZdESRB9OcNJiUH61f+N3mj1K//T1jFyejP8=
Creating client to iothubreact-demo5p-temper.azure-devices.net...
Connecting to iothubreact-demo5p-temper.azure-devices.net...
Sending message...
Nov 09, 2016 12:39:27 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory getClass
WARNING: unable to load org.bouncycastle.openssl.PEMReader
Nov 09, 2016 12:39:27 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory getClass
WARNING: unable to load org.bouncycastle.openssl.PasswordFinder
Nov 09, 2016 12:39:27 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory <clinit>
WARNING: unable to load bouncycastle provider

Using com.microsoft.azure.iothub-java-client:iothub-java-service-client:1.0.10

Copied from original issue: Azure/azure-iot-sdks#938

@tameraw
Copy link
Contributor Author

tameraw commented Jan 12, 2017

From @enuysa-msft on November 10, 2016 16:3

Hi @dluc

I have tested your code by changing connection string and a deviceID
As seen below I can receive feedback information
1
And I can also see below that my message is recived by device
2

@tameraw
Copy link
Contributor Author

tameraw commented Jan 12, 2017

From @enuysa-msft on November 14, 2016 9:19

Closing. Please re-activate if you still are having issues. Thanks !

@tameraw Could you please close this?

@tameraw
Copy link
Contributor Author

tameraw commented Jan 12, 2017

From @dluc on November 17, 2016 19:7

hi @enuysa-msft

with a correct connection string and device ID the sample works. The issue I reported is different though:

when using a wrong connection string, the sample doesn't fail

The SDK should report an error to the user, something like "authentication failed".

@tameraw
Copy link
Contributor Author

tameraw commented Jan 12, 2017

From @dluc on November 17, 2016 19:9

I think the issue should be addressed, could you reopen it?

@tameraw
Copy link
Contributor Author

tameraw commented Jan 12, 2017

From @cwrenniks on November 17, 2016 20:22

This should definitely be re-opened, as the issue is about incorrect connection string and the lack of messaging around it.

@tameraw
Copy link
Contributor Author

tameraw commented Jan 12, 2017

From @enuysa-msft on November 18, 2016 9:21

Hi @dluc,

Sorry for misunderstanding, You are right it is not showing an error to the user, something like "authentication failed". I will working on it now.

enuysa-msft added a commit to enuysa-msft/azure-iot-sdk-java that referenced this issue Jan 16, 2017
Fix for Cloud 2 Device client hanging and doesn't throw any error when the connection string is incorrect on Developer branch
Azure#11 (comment)
enuysa-msft added a commit to enuysa-msft/azure-iot-sdk-java that referenced this issue Feb 13, 2017
Fix for Cloud 2 Device client hanging and doesn't throw any error when the connection string is incorrect on Developer branch
Azure#11 (comment)
enuysa-msft added a commit to enuysa-msft/azure-iot-sdk-java that referenced this issue Feb 16, 2017
Fix for Cloud 2 Device client hanging and doesn't throw any error when the connection string is incorrect 

Azure#11
prmathur-microsoft pushed a commit that referenced this issue Feb 18, 2017
Fix for Cloud 2 Device client hanging and doesn't throw any error when the connection string is incorrect

#11
@tameraw tameraw added the fix checked in Fix checked into main or preview, but not yet released. label Feb 22, 2017
@tameraw tameraw closed this as completed Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS enhancement fix checked in Fix checked into main or preview, but not yet released.
Projects
None yet
Development

No branches or pull requests

1 participant