Skip to content

kestrel - intermittent error - Unable to bind - EACCES permission denied #10107

@Aardvark71

Description

@Aardvark71

We are running our asp.net core apps in production on Windows in IIS.
We are hosting out-of-process.

Now since a few weeks we have seen the following error in production :

Unable to bind to http://localhost:24834 on the IPv4 loopback interface: 'Error -4092 EACCES permission denied'.

(obviously, the exact port number differs between events)

It is clear that somewhere the assignment of the dynamic port went wrong. but I haven't found any info on how kestrel determines it's port to use.

Also clueless on how to troubleshoot this (when it occurs again).

I do know that the dynamic port range for tcp/ip has recently been changed by our webadmins.
( MaxUserPort increased from 16K to 32K, meaning that the dynamic port range is now 49152 to 65535 )
The intermittent errors have all happened after this change, but … port numbers that failed to bind are all still lower than 49152

So…. My question is… how does kestrel ‘get’ it’s port numer assigned and is it possible that our webadmins messed this up by adapting the MaxUserPort ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions