Skip to content

Kestrel ListenAnyIP error #21423

Closed
Closed
@JamesNK

Description

@JamesNK

Potentially a bug introduced by #21072

https://dev.azure.com/dnceng/internal/_build/results?buildId=626982&view=logs&j=ab336984-fd17-5476-0984-4a0b5ed8658e&t=89066a81-cbc6-5313-1cbd-e2259a0b7533

Error:

[STDERR] Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
[STDERR]    at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.ApplyConfigurationDefaults(ListenOptions listenOptions)
[STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.ApplyEndpointDefaults(ListenOptions listenOptions)
[STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.ListenAnyIP(Int32 port, Action`1 configure)
[STDERR]    at GrpcAspNetCoreServer.Program.<>c__DisplayClass1_0.<CreateHostBuilder>b__3(WebHostBuilderContext context, KestrelServerOptions options) in C:\Users\Administrator\AppData\Local\Temp\benchmarks-agent\benchmarks-server-5140\etf3ezdi.lfc\grpc-dotnet\perf\benchmarkapps\GrpcAspNetCoreServer\Program.cs:line 68
[STDERR]    at Microsoft.AspNetCore.Hosting.WebHostBuilderKestrelExtensions.<>c__DisplayClass4_1.<ConfigureKestrel>b__1(KestrelServerOptions options)
[STDERR]    at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name, TOptions options)
[STDERR]    at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
[STDERR]    at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
[STDERR]    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
[STDERR]    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
[STDERR]    at System.Lazy`1.CreateValue()
[STDERR]    at System.Lazy`1.get_Value()
[STDERR]    at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
[STDERR]    at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
[STDERR]    at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
[STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.CreateServiceContext(IOptions`1 options, ILoggerFactory loggerFactory)
[STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer..ctor(IOptions`1 options, IEnumerable`1 transportFactories, IEnumerable`1 multiplexedFactories, ILoggerFactory loggerFactory)

Usage:
https://github.com/grpc/grpc-dotnet/blob/54add4f70f9154024573c1bb99c8450f5ee2a132/perf/benchmarkapps/GrpcAspNetCoreServer/Program.cs#L68

@halter73 @sebastienros

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.feature-kestrel

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions