Invoking DM on Leaf Device from module fails with System.Net.Http.CurlException:
See original GitHub issuewith IoT Edge set as a transparent gateway, invoking a Direct Method on the leaf device from a module fails with the exception shown in the logs
Expected Behavior
Expect Direct Method to be successfully invoked on the leaf device
Current Behavior
When the Direct Method is involved on the leaf device from the module, it throws the below exception which are captured in it’s logs… no seemingly related errors are captured in the edgeHub logs in the same timeframe
Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException: An error occurred while sending the request. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.Http.CurlException: SSL peer certificate or SSH remote key was not OK
at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference1 easyWrapper, CURLcode messageResult) --- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper.<ExecuteAsync>d__21.MoveNext()
— End of inner exception stack trace —
at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper.<ExecuteAsync>d__21.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper.<PostAsync>d__17`2.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Devices.Client.ModuleClient.<InvokeMethodAsync>d__57.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at alertmodule.Program.<PipeMessage>d__4.MoveNext() in /app/Program.cs:line 101
R
Steps to Reproduce
- setup IoT Edge as a transparent gateway per the documentation
- connect an IoT leaf device - in my case, I’m using this C# / AMQP client as a leaf device (after changing the device client version to 1.18.0 in csproj, changing protocol to AMQP, and updating the connstr
- create a module that invokes a DM on the leaf client… I’m using this code: var result = await moduleClient.InvokeMethodAsync(“iotTestDev01”, new MethodRequest(command));
(where command is a string containing the value “ON”, which is the name of my DM, and iotTestDev01 is the name of my leaf device)
Context (Environment)
Same environment as issue 203
(angelod) Copying environment: Ubuntu 18.04 VM in Azure i’ve tried my “leaf” device as both a python script and a dotnet core app, same results python device was created today with a fresh manual build of the python sdk C# leaf device was created today 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 today)
iotedged iotedge 1.0.1 (6e5e86d)
Edge Agent 1.0
Edge Hub 1.0
Docker (installed yesterday 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
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
I’m also seeing this on a Windows Edge host (Docker configured for Linux containers).
Thanks a lot for confirming Andre. Closing this issue here.