question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invoking DM on Leaf Device from module fails with System.Net.Http.CurlException:

See original GitHub issue

with 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.ConfiguredTaskAwaitable1.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

  1. setup IoT Edge as a transparent gateway per the documentation
  2. 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
  3. 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:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andrepodnozovcommented, Aug 28, 2018

I’m also seeing this on a Windows Edge host (Docker configured for Linux containers).

0reactions
aribeironovaescommented, Aug 30, 2018

Thanks a lot for confirming Andre. Closing this issue here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

transparent gateway - no "device id" from a leaf device #203
I have a module in edge that uses the message.ConnectionDeviceId property and it is null for any messages routed from a leaf device, ......
Read more >
Untitled
Android 2 jutaan terbaik 2014 world, Authanvil soft token download movies, Linux swap file system type, Zutter binding machine scrapbooking quotes, ...
Read more >
Untitled
Playbook blackberry price in south africa, Restore zfs file system, Real estate accounting made easy pdf, All star minii ger bul minii az...
Read more >
Untitled
Fermented spider eye minecraft recipe for fence, Congestive heart failure diet ... Share network folder android device, Jeevan rakshak plan 827 pdf file, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found