Search code examples
c#visual-studioasp.net-corevisual-studio-2017azure-service-fabric

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix 'https://+:44384/' is already registered


I was able to run my asp.net core web app on my local service fabric cluster successfully for some time at https://localhost:44384. But now I started seeing error message "'https://+:44384/' is already registered" and my application won't start the browser window. On my local machine I am not using this port 44384 for any other apps. So why I am getting the above error message? Even if I change port to some other number, I am still getting the same error message mentioning the smae port error message "'https://+:44384/' is already registered" .

Any suggestiongs to resolve this error ?

Error message :

Microsoft.Net.Http.Server.WebListener: Information: Listening on prefix: https://+:44384/ Microsoft.Net.Http.Server.WebListener: Error: Start

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix 'https://+:44384/' is already registered. at Microsoft.Net.Http.Server.UrlGroup.RegisterPrefix(String uriPrefix, Int32 contextId) at Microsoft.Net.Http.Server.UrlPrefixCollection.RegisterAllPrefixes(UrlGroup urlGroup) at Microsoft.Net.Http.Server.WebListener.Start() Microsoft.Net.Http.Server.WebListener: Error: Start

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix 'https://+:44384/' is already registered. at Microsoft.Net.Http.Server.UrlGroup.RegisterPrefix(String uriPrefix, Int32 contextId) at Microsoft.Net.Http.Server.UrlPrefixCollection.RegisterAllPrefixes(UrlGroup urlGroup) at Microsoft.Net.Http.Server.WebListener.Start() Microsoft.Net.Http.Server.WebListener: Error: Start

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix 'https://+:44384/' is already registered. at Microsoft.Net.Http.Server.UrlGroup.RegisterPrefix(String uriPrefix, Int32 contextId) at Microsoft.Net.Http.Server.UrlPrefixCollection.RegisterAllPrefixes(UrlGroup urlGroup) at Microsoft.Net.Http.Server.WebListener.Start()


Solution

  • I suspect you're running a five node development cluster. (Perhaps this was a 1 node cluster before?). If you are, you'll run into trouble when deploying services to those nodes, as they all use the same network stack. Solution:

    Deploy 1 instance of your web app - service locally

    when you run a web service locally, you need to ensure that only one instance of the service is running. Otherwise, you run into conflicts from multiple processes that are listening on the same path and port. As a result, the web service instance count should be set to "1" for local deployments.

    more info here

    and here