Azure / iotedge

The IoT Edge OSS project
MIT License
1.46k stars 459 forks source link

IoTEdge moduleClient.openAsync is not working. #2556

Closed shivakumarpunekar closed 4 years ago

shivakumarpunekar commented 4 years ago

I am trying to run IoTEdge code from VisualStudio dotnetcore version is 2.1, the moduleClient.openAsync() is stoped working and it wont' do next action after few minutes i recieved time out error and it is in local env. added exception below are:

StackTrace " at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest)\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Net.Security.SslState.ThrowIfExceptional()\r\n at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)\r\n
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)\r\n at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)\r\n at System.Net.Security.SslStream.<>c.b__46_2(IAsyncResult iar)\r\n at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Azure.Amqp.TaskHelpers.EndAsyncResult(IAsyncResult asyncResult)\r\n
at Microsoft.Azure.Amqp.Transport.TlsTransport.HandleOpenComplete(IAsyncResult result, Boolean syncComplete)\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)\r\n

                          at Microsoft.Azure.Amqp.AmqpObject.OpenAsyncResult.End(IAsyncResult result)\r\n   at Microsoft.Azure.Amqp.AmqpObject.EndOpen(IAsyncResult result)\r\n 
                          at Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.HandleTransportOpened(IAsyncResult result)\r\n  

                          at Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.OnTransportOpened(IAsyncResult result)\r\n
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
                          at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpConnector.<InitializeTransport>d__12.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
                          at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
                          at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpConnector.<OpenConnectionAsync>d__11.MoveNext()\r\n  
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
                          at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
                          at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpConnectionHolder.<EnsureConnection>d__16.MoveNext()\r\n 
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
                          at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpConnectionHolder.<AmqpSessionCreator>d__14.MoveNext()\r\n 
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
                          at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpUnit.<OpenAsync>d__27.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  
                          at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  
                          at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpTransportHandler.<OpenAsync>d__10.MoveNext()\r\n 
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
                          at Microsoft.Azure.Devices.Client.Transport.ProtocolRoutingDelegatingHandler.<OpenAsync>d__5.MoveNext()\r\n  
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
                          at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.<>c__DisplayClass22_0.<<ExecuteWithErrorHandlingAsync>b__0>d.MoveNext()\r\n 
                          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
                          at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.<ExecuteWithErrorHandlingAsync>d__23`1.MoveNext()"               string

The VisualStudio output window details below:

'dotnet.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326\source\repos\AzureIotEdgeApp13\IotEdgeModule1\bin\Debug\netcoreapp2.1\IotEdgeModule1.dll'. Symbols loaded. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Threading.Tasks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Runtime.Loader.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Console.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Step into: Stepping over non-user code 'IotEdgeModule1.Program.<>c__DisplayClass1_0..ctor' 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326.nuget\packages\microsoft.azure.devices.client\1.20.1\lib\netstandard2.0\Microsoft.Azure.Devices.Client.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\netstandard.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Cryptography.X509Certificates.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Cryptography.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Runtime.InteropServices.RuntimeInformation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326.nuget\packages\dotnetty.codecs.mqtt\0.6.0\lib\netstandard1.3\DotNetty.Codecs.Mqtt.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.Security.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326.nuget\packages\microsoft.azure.amqp\2.4.1\lib\netstandard1.3\Microsoft.Azure.Amqp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Diagnostics.Tracing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Text.RegularExpressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Reflection.Emit.ILGeneration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Reflection.Emit.Lightweight.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Reflection.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326.nuget\packages\microsoft.azure.devices.shared\1.16.0\lib\netstandard2.0\Microsoft.Azure.Devices.Shared.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326.nuget\packages\system.configuration.configurationmanager\4.4.1\lib\netstandard2.0\System.Configuration.ConfigurationManager.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Collections.Specialized.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.IO.FileSystem.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Xml.ReaderWriter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Private.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.WebClient.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.ComponentModel.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Threading.Thread.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Memory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Cryptography.Algorithms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Text.Encoding.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.ComponentModel.TypeConverter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.WebSockets.Client.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.WebSockets.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.Sockets.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Threading.Overlapped.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.NameResolution.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\Microsoft.Win32.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Globalization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Threading.Timer.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Collections.NonGeneric.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Cryptography.Encoding.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Principal.Windows.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Claims.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Security.Principal.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Resources.ResourceManager.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Reflection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Diagnostics.Debug.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\11016326.nuget\packages\dotnetty.transport\0.6.0\lib\netstandard1.3\DotNetty.Transport.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.15\System.Net.Requests.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. The thread 0x3bfc has exited with code 0 (0x0). The thread 0x485c has exited with code 0 (0x0). The thread 0x38b8 has exited with code 0 (0x0). The thread 0x8558 has exited with code 0 (0x0). The thread 0x20a8 has exited with code 0 (0x0). The thread 0x82c0 has exited with code 0 (0x0). The thread 0x5b88 has exited with code 0 (0x0). The thread 0x77e8 has exited with code 0 (0x0). Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in System.Private.CoreLib.dll Exception thrown: 'System.AggregateException' in System.Private.CoreLib.dll The thread 0x7a68 has exited with code 0 (0x0). The thread 0x8bc0 has exited with code 0 (0x0). The thread 0x756c has exited with code 0 (0x0). The thread 0x8a0c has exited with code 0 (0x0).

Docker log below:   Name Value Type
InnerException {"Authentication failed because the remote party has closed the transport stream."} System.Exception {System.IO.IOException}

Transient network error occurred, please retry.

<4> 2020-02-19 16:50:19.574 +05:30 [WRN] - TLS handshake failed.,
vipeller commented 4 years ago

@shivakumarpunekar Hi, you are writing it stopped working, so I assume that it was working before. How long you have been using this? Isn't it possible that the certificate you are using expired?

shivakumarpunekar commented 4 years ago

I was using past 4 month it was working fine even last two days before it was working.

vipeller commented 4 years ago

@shivakumarpunekar does your module use certificate based authentication? If so, can you check the validity of the certificate it uses?

shivakumarpunekar commented 4 years ago

I am trying to run default templet from VisualStudio given.

varunpuranik commented 4 years ago

@shivakumarpunekar - Can you please provide us the all the information needed to help you out by filling in the issue template we provide? The important pieces of information are - 1. Scenario, 2. Repro steps, 3. Versions of components involved, and 4. Logs for all 3 Edge runtime components (iotedged, EdgeHub and EdgeAgent)

shivakumarpunekar commented 4 years ago
  1. I am running VisualStudion DotnetCore 2.1 version with default templet IoTEdge using window.

2.Reproducting is nothing just i run the application in the code "ioTHubModuleClient.OpenAsync();" the console window it will stop like freez console window and it won't do next function.

  1. Microsoft Windows [Version 10.0.18363.657] (c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\11016326>docker logs -f edgeHubDev 2020-02-24 11:04:17.263 +00:00 Edge Hub Main() [02/24/2020 11:04:17.622 AM] Found intermediate certificates: [CN=Edge Agent CA, OU=Default Edge Organization, O=Default Edge Organization, L=Redmond, S=Washington, C=US:2/22/2021 3:06:15 PM],[CN=Edge Test Device CA, OU=Default Edge Organization, O=Default Edge Organization, L=Redmond, S=Washington, C=US:2/23/2021 3:06:12 PM]

<6> 2020-02-24 16:34:19.204 +05:30 [INF] - Created persistent store at C:\Windows\TEMP\edgeHub <6> 2020-02-24 16:34:19.251 +05:30 [INF] - Created device scope identities cache <6> 2020-02-24 16:34:19.257 +05:30 [INF] - Starting refresh of device scope identities cache <6> 2020-02-24 16:34:19.259 +05:30 [INF] - Initializing Edge Hub <6> 2020-02-24 16:34:19.260 +05:30 [INF] - █████╗ ███████╗██╗ ██╗██████╗ ███████╗ ██╔══██╗╚══███╔╝██║ ██║██╔══██╗██╔════╝ ███████║ ███╔╝ ██║ ██║██████╔╝█████╗ ██╔══██║ ███╔╝ ██║ ██║██╔══██╗██╔══╝ ██║ ██║███████╗╚██████╔╝██║ ██║███████╗ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ██╗ ██████╗ ████████╗ ███████╗██████╗ ██████╗ ███████╗ ██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██╔════╝ ██╔════╝ ██║██║ ██║ ██║ █████╗ ██║ ██║██║ ███╗█████╗ ██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║╚██████╔╝ ██║ ███████╗██████╔╝╚██████╔╝███████╗ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═════╝ ╚══════╝ <6> 2020-02-24 16:34:19.261 +05:30 [INF] - Version - 1.0.8.5.28262167 (b5de730c6020b852f9636b7117138de6c6fced36) <6> 2020-02-24 16:34:19.261 +05:30 [INF] - OptimizeForPerformance=True <6> 2020-02-24 16:34:19.264 +05:30 [INF] - Loaded server certificate with expiration date of "2021-02-21T15:06:15.0000000+05:30" <6> 2020-02-24 16:34:19.302 +05:30 [INF] - Created new message store <6> 2020-02-24 16:34:19.307 +05:30 [INF] - Started task to cleanup processed and stale messages <6> 2020-02-24 16:34:19.453 +05:30 [INF] - Created DeviceConnectivityManager with connected check frequency 00:05:00 and disconnected check frequency 00:02:00 <6> 2020-02-24 16:34:19.559 +05:30 [INF] - Initialized storing twin manager <6> 2020-02-24 16:34:19.585 +05:30 [INF] - Initializing configuration <6> 2020-02-24 16:34:19.754 +05:30 [INF] - Created cloud endpoint iothub with max batch size 10 and fan-out factor of 10. <6> 2020-02-24 16:34:19.765 +05:30 [INF] - Starting periodic operation Get EdgeHub config... <6> 2020-02-24 16:34:19.845 +05:30 [INF] - Started operation Get EdgeHub config <6> 2020-02-24 16:34:19.845 +05:30 [INF] - Initialized edge hub configuration <6> 2020-02-24 16:34:19.857 +05:30 [INF] - Starting timer to authenticate connections with a period of 300 seconds <6> 2020-02-24 16:34:19.983 +05:30 [INF] - Set the following 2 route(s) in edge hub <6> 2020-02-24 16:34:19.983 +05:30 [INF] - r1: FROM /messages/modules/IotEdgeModule1/outputs/* INTO $upstream <6> 2020-02-24 16:34:19.983 +05:30 [INF] - r2: FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint("/modules/IotEdgeModule1/inputs/input1") <6> 2020-02-24 16:34:19.985 +05:30 [INF] - Updated message store TTL to -1 seconds <6> 2020-02-24 16:34:19.985 +05:30 [INF] - Updated the edge hub store and forward configuration <6> 2020-02-24 16:34:19.986 +05:30 [INF] - Successfully completed periodic operation Get EdgeHub config <6> 2020-02-24 16:34:20.011 +05:30 [INF] - Scheduling server certificate renewal for "2021-02-21T15:03:45.0001810Z". <6> 2020-02-24 16:34:20.014 +05:30 [INF] - Starting protocol heads - (MQTT, AMQP, HTTP) <6> 2020-02-24 16:34:20.038 +05:30 [INF] - Starting MQTT head <6> 2020-02-24 16:34:20.092 +05:30 [INF] - Initializing TLS endpoint on port 8883 for MQTT head. <6> 2020-02-24 16:34:20.174 +05:30 [INF] - Starting AMQP head <6> 2020-02-24 16:34:20.186 +05:30 [INF] - Started MQTT head <6> 2020-02-24 16:34:20.269 +05:30 [INF] - Started AMQP head <6> 2020-02-24 16:34:20.271 +05:30 [INF] - Starting HTTP head <6> 2020-02-24 16:34:20.378 +05:30 [INF] - User profile is available. Using '"C:\\Users\\ContainerUser\\AppData\\Local\\ASP.NET\\DataProtection-Keys"' as key repository and Windows DPAPI to encrypt keys at rest. <6> 2020-02-24 16:34:20.404 +05:30 [INF] - Creating key {1252a6d8-0888-4dd9-912d-01b8bd6822ad} with creation date 2020-02-24 11:04:20Z, activation date 2020-02-24 11:04:20Z, and expiration date 2020-05-24 11:04:20Z. <6> 2020-02-24 16:34:20.447 +05:30 [INF] - Writing data to file '"C:\\Users\\ContainerUser\\AppData\\Local\\ASP.NET\\DataProtection-Keys\\key-1252a6d8-0888-4dd9-912d-01b8bd6822ad.xml"'. <4> 2020-02-24 16:34:20.827 +05:30 [WRN] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead. <6> 2020-02-24 16:34:20.849 +05:30 [INF] - Started HTTP head <4> 2020-02-24 16:34:24.432 +05:30 [WRN] - TLS handshake failed., System.IO.IOException: Channel is closed, 67d2aa6b ---- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3b27381174b5 mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0 "dotnet SimulatedTem…" 10 minutes ago Up 2 minutes SimulatedTemperatureSensor 67d440cc1ee1 mcr.microsoft.com/azureiotedge-hub:1.0 "dotnet Microsoft.Az…" 11 minutes ago Up 10 minutes 0.0.0.0:443->443/tcp, 0.0.0.0:5671->5671/tcp, 0.0.0.0:8883->8883/tcp edgeHubDev
vipeller commented 4 years ago

@shivakumarpunekar at this moment I think that the client certificate your system is using expired adding @shizn : could you please take a look and help out how to have client certs regenerated with visual studio? It worked for 4 months and stopped working, according to the logs, the server disconnects when the client presents its certificate. From that, I suspect that the certificate expired.

shizn commented 4 years ago

@shivakumarpunekar could you follow these steps to init the cert again? Make sure you copy paste a valid IoT Edge device connectionstring. Hope this can solve the problem. Thanks!

shivakumarpunekar commented 4 years ago

@shizn I tried with the steps https://docs.microsoft.com/en-us/azure/iot-edge/how-to-visual-studio-develop-module#initialize-iotedgehubdev-with-iot-edge-device-connection-string, I given proper connectionstring. then also not working then also moduleClient initialization is not happening.

SLdragon commented 4 years ago

Hi, @shivakumarpunekar , I cannot Reproduce your issue on my local machine. But from error message, I think it is related to the certificate.

Please try the following steps:

image

There is a simular issue maybe you can refer: https://github.com/Azure/iotedgehubdev/issues/266

shivakumarpunekar commented 4 years ago

Hi, @SLdragon , I tried with above suggestion it's not working the issue is" AuthenticationException: The remote certificate is invalid according to the validation procedure" this is shwoing in exception even i tried making cert to trusted cert then also not working.

SLdragon commented 4 years ago

Hi, @shivakumarpunekar, my teammate also try to repro this issue on her dev machine, however, she cannot reproduce it.

So can you share some information about your dev env:

  1. Which version of Azure IoT C# SDK you're using?
  2. Which Azure IoT Edge extension for Visual Studio you're using?
  3. Switch the protocal to MQTT, did the issue still exist?
  4. Can you use VSCode to create C# edge project and try to run it to see whether it works.

Thanks

SLdragon commented 4 years ago

Currently, there is another user who meet similar errors when start simulator on Windows:

"AuthenticationException: The remote certificate is invalid according to the validation procedure"  

"UnauthorizedException: Put token failed. status-code: 401, status-description: The specified SAS token is expired."

And finally found it is related to the time drift between the VM used for containers on Windows machines.

You can refer this issue for more details: https://github.com/Azure/iotedgehubdev/issues/266#issuecomment-595233648

SLdragon commented 4 years ago

Hi, @shivakumarpunekar, did you solve your problems now? If you still have issue with this, feel free to contact us

SLdragon commented 4 years ago

Hi, @shivakumarpunekar, we will close this issue due to no activity, feel free to contact us if you still have problems, thank you!

shivakumarpunekar commented 4 years ago

Hi, @SLdragon , Issue is resolved, it was internal network issue blocking the IoTEdge moduleClient.OpenAsync() connection.

shivakumarpunekar commented 4 years ago

Resolved issue. Thanks for lot's of support to all involved resolving issue.

rajashekar2012 commented 4 years ago

Hi, @SLdragon , Issue is resolved, it was internal network issue blocking the IoTEdge moduleClient.OpenAsync() connection.

can u pls tell me how u have resolved from that issue

eja-git commented 4 years ago

Hi, @SLdragon , Issue is resolved, it was internal network issue blocking the IoTEdge moduleClient.OpenAsync() connection.

@shivakumarpunekar can you tell what steps you took to resolve this? I'm having the same issue, thanks!

shivakumarpunekar commented 4 years ago

Hi, @SLdragon , Issue is resolved, it was internal network issue blocking the IoTEdge moduleClient.OpenAsync() connection.

@shivakumarpunekar can you tell what steps you took to resolve this? I'm having the same issue, thanks!

@eja-git , i have disabled internal network service which is umbrela client.

SLdragon commented 4 years ago

Thank you very much for your feedback!

eja-git commented 4 years ago

I didn't have Umbrella service running, but I did have DNS servers set on my network adapter. Removing this solved my issue.