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

Python leaf device (amqp) - Could not find desired SASL mechanism in the list presented by server #215

Closed
stevebus opened this issue Aug 27, 2018 · 6 comments

Comments

@stevebus
Copy link

IoT Edge setup as a transparent gateway.. When I connect a leaf device to it via python and AMQP as a transport, I get the errors listed under Current Behavior. A C# leaf device on the same box works fine.

Expected Behavior

Expect my python script client to connect and successfully send messages to Edge Hub (has worked fine for months, including with preview bits).

Current Behavior

When I run the python script, I get the following exceptions in the script itself. Nothing is reflected in the Edge Hub logs related to it...

Connected to IoTHub gateway
sending message: [50.33,70.67]
Error: Time:Mon Aug 27 21:38:43 2018 File:/home/stevebus/azure-iot-sdk-python/c/uamqp/src/saslclientio.c Func:on_sasl_frame_received_callback Line:767 Could not find desired SASL mechanism in the list presented by server
Error: Time:Mon Aug 27 21:38:43 2018 File:/home/stevebus/azure-iot-sdk-python/c/uamqp/src/amqp_management.c Func:amqp_management_close Line:1018 AMQP management instance not open
Error: Time:Mon Aug 27 21:38:43 2018 File:/home/stevebus/azure-iot-sdk-python/c/iothub_client/src/iothubtransport_amqp_connection.c Func:on_cbs_open_complete Line:153 CBS open failed
Error: Time:Mon Aug 27 21:38:43 2018 File:/home/stevebus/azure-iot-sdk-python/c/c-utility/adapters/tlsio_openssl.c Func:decode_ssl_received_bytes Line:785 SSL channel closed in decode_ssl_received_bytes.
Error: Time:Mon Aug 27 21:38:43 2018 File:/home/stevebus/azure-iot-sdk-python/c/uamqp/src/saslclientio.c Func:on_underlying_io_error Line:243 Error callback received in unexpected state
Error: Time:Mon Aug 27 21:38:43 2018 File:/home/stevebus/azure-iot-sdk-python/c/c-utility/adapters/tlsio_openssl.c Func:on_underlying_io_bytes_received Line:834 Error in decode_ssl_received_bytes.
s

Steps to Reproduce

  1. Set up IoT Edge as a Transparent Gateway as instructed in the documentation
  2. clone and build the latest python device SDK
  3. write python iot leaf device (the one I'm using can be found here (fill in connection string and change protocol to AMQP.. you also need to get the iothub_client_args.py script from that folder) -> https://github.com/AzureIoTGBB/azure-iot-edge-hol-linux/blob/master/module2/iotdevice.py
  4. run the script, see the error

Context (Environment)

Ubuntu 18.04 VM in Azure
python device was created late last week with a fresh manual build of the python sdk
C# leaf device was created late last week with 1.18.0 version of the device client.

Device (Host) Operating System
Ubuntu 18.04

Architecture
amd64

Container Operating System
Linux

Runtime Versions
latest (installed late last week)
iotedged
iotedge 1.0.1 (6e5e86d)

Edge Agent
1.0.1

Edge Hub
1.0.1

Docker
(installed mid-last week from the MS provided moby install)

Client:
Version: 18.06.0-dev
API version: 1.37
Go version: go1.10.2
Git commit: daf021fe
Built: Mon Jun 25 21:07:53 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: dev
API version: 1.37 (minimum version 1.12)
Go version: go1.10.2
Git commit: 9aac187
Built: Mon Jun 25 20:43:05 2018
OS/Arch: linux/amd64
Experimental: false

@varunpuranik
Copy link
Contributor

Thanks for reporting this issue @stevebus. We will investigate.
@pierreca as fyi.

@myagley
Copy link
Contributor

myagley commented Oct 17, 2018

I believe this was fixed here: #402
@varunpuranik ?

@varunpuranik
Copy link
Contributor

Yes, I believe this should now be fixed with the bits in master.

@stevebus
Copy link
Author

I can test this.. I assume I just need to pull down the fresh python SDK from master (recursively), rebuild, and use the new *.so file to test?

@varunpuranik
Copy link
Contributor

The fix was in EdgeHub, not in the Python SDK.

@myagley
Copy link
Contributor

myagley commented Nov 5, 2018

This fix is in 1.0.4 of the Edge Hub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants