-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
.NET 5 RC1 breaks with "Address family not supported by protocol" in AWS Lambda but not in preview 8 and earlier #42233
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/ncl |
Pretty sure this is fixed in RC2 by #42075. Can you grab an RC2 build and confirm? |
Tagging subscribers to this area: @dotnet/ncl |
That is great if already fixed. I have tried to with the nightly builds of RC2 but since I have to do a self-contained published I get the following errors:
Any suggestions on how to do self contained publishes using a nightly build? |
Try this nuget.config -> https://github.com/dotnet/core/blob/master/samples/nuget.config Same as the one @ https://github.com/dotnet/installer#build-status |
Whoops, should a look a little harder and I would have seen the nuget.config. The good news is I did confirmed with |
@geoffkizer just curious I thought #42075 added new api and a code change would have been required to be affected by that change? @normj i guess we can close this? Thanks so much for reporting it! |
@danmosemsft Yeah, it's a little complicated... This bug was introduced when we did the original System.Net.Connections work in #39524. That was mostly reverted in #41648, but we kept some of the changes from #39524 to try to minimize code churn. Unfortunately, that included this bug. When reviewing #42075, @stephentoub noticed the issue here and so we fixed it as part of that PR -- meaning we reverted back to the original pre-#39524 behavior. I wish we had a test for this, but it would require an environment where IPv6 is not supported. Ideally, we'd add that to CI but it's probably far from trivial. |
Run the test in a docker container with |
@danmosemsft yes I'm good closing this now that it has been confirmed to be fixed in RC2. |
@geoffkizer ah.. |
Update to a prerelease version of .NET 5 RC2 to resolve the main branch being broken due to dotnet/runtime#42233.
Description
I apologize for not having all of the data yet but given the closeness to the GA release I wanted to get the conversation started as soon as possible. I'll add more information as I continue my research.
AWS Lambda, which is the serverless offering at AWS, allows users to deploy Lambda functions as a self contained publish bundle for .NET developers. It has been possible to use .NET 5 preview versions in Lambda up till the latest RC1. Now when users deploy their functions it fails right away access the Lambda API through the
HttpClient
with the following error messages.The address it is connecting to is Lambda's runtime API what all functions have to interact with.
My theory is the
HttpClient
is attempting to use IPv6 which Lambda does not support and the recent changes to the SocketsConnectionFactory are triggeringHttpClient
to use IPv6. In particular the following constructor that is defaulting the AddressFamily enum value for IPv6runtime/src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketsConnectionFactory.cs
Line 49 in 1341c35
Configuration
Running in AWS under Amazon Linux 2 in the Lambda environment with no IPv6 support.
Regression?
This has worked up through .NET 5 Preview 8.
The text was updated successfully, but these errors were encountered: