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.

[QUERY] Blocked on SocketException when migrating from .NET Core 3.1 to .NET 6, seeking next steps

See original GitHub issue

Library name and version

Azure.Messaging.ServiceBus 7.5.1, Microsoft.Azure.Functions.Extensions 1.1.0, Microsoft.Azure.KeyVault 3.05, Microsoft.Azure.AppAuthentication 1.6.2, Microsoft.Azure.WebJobs.Extensions.ServiceBus 5.2.0, Microsoft.Azure.WebJobs.Extensions.Storage 5.0.0, Microsoft.Azure.WebJobs.Host.Storage 4.0.4, Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 1.2.0, Microsoft.Extensions.Configuration.AzureKeyVault 3.1.22, WindowsAzure.Storage 9.3.3

Query/Question

I’m in process of migrating our project to .NET 6 and Azure Functions v4, so I’m unable to determine where the failure point is, but I’ve been iteratively solving issues as possible and after squaring away all of the other issues.

Nothing has been done on the Azure side, this is all local project level.

Problems solved:

  • Property binding in he the trigger function endpoints
  • Azurite emulation working
  • Verified nslookup <*>.servicebus.windows.net
  • Verified tnc <*>.servicebus.windows.net -port for 5671 and 5672

And am currently blocked on the following exception/stacktrace error after startup, and am looking for any direction as to how to proceed or maybe point to a gap in usable error logging.

[2022-01-26T17:32:02.288Z] An exception occurred while creating receive link for Identifier: <function_topic_name>/Subscriptions/FunctionTopicProject-de692a10-6176-47da-9ce7-49bf59441558. Error Message: 'System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[2022-01-26T17:32:02.292Z]    at Microsoft.Azure.Amqp.Transport.TransportStream.EndRead(IAsyncResult asyncResult)
[2022-01-26T17:32:02.304Z]    at Microsoft.Azure.Amqp.Transport.TransportStream.<>c__DisplayClass22_0.<ReadAsync>b__1(IAsyncResult a)
[2022-01-26T17:32:02.306Z]    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
[2022-01-26T17:32:02.309Z] --- End of stack trace from previous location ---
[2022-01-26T17:32:02.313Z]    at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|187_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
[2022-01-26T17:32:02.315Z]    at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
[2022-01-26T17:32:02.317Z]    at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
[2022-01-26T17:32:02.319Z]    at System.Threading.Tasks.TaskToApm.End(IAsyncResult asyncResult)
[2022-01-26T17:32:02.322Z]    at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
[2022-01-26T17:32:02.324Z]    at Microsoft.Azure.Amqp.Transport.TlsTransport.HandleOpenComplete(IAsyncResult result, Boolean syncComplete)
[2022-01-26T17:32:02.330Z] --- End of stack trace from previous location ---
[2022-01-26T17:32:02.334Z]    at Microsoft.Azure.Amqp.ExceptionDispatcher.Throw(Exception exception)
[2022-01-26T17:32:02.337Z]    at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)
[2022-01-26T17:32:02.344Z]    at Microsoft.Azure.Amqp.AmqpObject.OpenAsyncResult.End(IAsyncResult result)
[2022-01-26T17:32:02.347Z]    at Microsoft.Azure.Amqp.AmqpObject.EndOpen(IAsyncResult result)
[2022-01-26T17:32:02.351Z]    at Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.HandleTransportOpened(IAsyncResult result)
[2022-01-26T17:32:02.354Z]    at Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.OnTransportOpened(IAsyncResult result)
[2022-01-26T17:32:02.359Z] --- End of stack trace from previous location ---
[2022-01-26T17:32:02.365Z]    at Microsoft.Azure.Amqp.ExceptionDispatcher.Throw(Exception exception)
[2022-01-26T17:32:02.367Z]    at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)
[2022-01-26T17:32:02.368Z]    at Microsoft.Azure.Amqp.Transport.AmqpTransportInitiator.ConnectAsyncResult.End(IAsyncResult result)
[2022-01-26T17:32:02.370Z]    at Microsoft.Azure.Amqp.Transport.AmqpTransportInitiator.<>c.<ConnectAsync>b__17_1(IAsyncResult r)
[2022-01-26T17:32:02.380Z]    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
[2022-01-26T17:32:02.382Z] --- End of stack trace from previous location ---
[2022-01-26T17:32:02.384Z]    at Azure.Messaging.ServiceBus.Amqp.AmqpConnectionScope.CreateAndOpenConnectionAsync(Version amqpVersion, Uri serviceEndpoint, ServiceBusTransportType transportType, IWebProxy proxy, String scopeIdentifier, TimeSpan timeout)
[2022-01-26T17:32:02.391Z]    at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
[2022-01-26T17:32:02.393Z]    at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
[2022-01-26T17:32:02.397Z]    at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
[2022-01-26T17:32:02.399Z]    at Azure.Messaging.ServiceBus.Amqp.AmqpConnectionScope.OpenReceiverLinkAsync(String identifier, String entityPath, TimeSpan timeout, UInt32 prefetchCount, ServiceBusReceiveMode receiveMode, String sessionId, Boolean isSessionReceiver, CancellationToken cancellationToken)
[2022-01-26T17:32:02.403Z]    at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.OpenReceiverLinkAsync(TimeSpan timeout, UInt32 prefetchCount, ServiceBusReceiveMode receiveMode, String identifier, CancellationToken cancellationToken)'

Environment

.NET SDK (reflecting any global.json): Version: 6.0.101 Commit: ef49f6213a

Runtime Environment: OS Name: Windows OS Version: 10.0.19042 OS Platform: Windows RID: win10-x64

Host (useful for support): Version: 6.0.1 Commit: 3a25a7f1cc

Microsoft Visual Studio Enterprise 2022 (64-bit) - LTSC 17.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:36 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
Prinsncommented, Jan 28, 2022

@JoshLove-msft Awesome, glad that I wasn’t being too demanding. @jsquire both of you were invaluable in getting over these hurdles.

1reaction
JoshLove-msftcommented, Jan 28, 2022

You should be able to bind directly to the ServiceBusReceivedMessage and then just use the messageActions method as you mentioned.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate from ASP.NET Core 3.1 to 6.0
This article outlines the prerequisites and most common steps for migrating an ASP.NET Core 2.1 project to ASP.NET Core 2.2. Learn how to...
Read more >
You're (probably still) using HttpClient wrong and it is ...
I try to optimize the fetching and deserialization of data in dotnet core as much as possible. HttpClientFactory and streams are my best ......
Read more >
Release Notes | Couchbase Docs
Release notes and download archive for the Couchbase .NET Client. These pages cover the 3.x versions of the Couchbase .NET SDK. For release...
Read more >
How to Properly Migrate From Net Core 3.1 to Net 6
Here's how to migrate from net core 3.1 to net 6 seamlessly using the migration tool provided you have an up-to-date Windows version....
Read more >
How Socket Error Codes Depend on Runtime and ...
It works fine with .NET Framework and Mono. However, once we migrated to .NET Core, this method no longer correctly detects the “connection ......
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