HTTP 503 Service is unavailable when trying to browse signalr/hubs
Solution 1
I was able to reproduce this locally with the following setup:
- Use NetSh.exe or similar tool to reserve
http://localhost:8080/
- Call
WebApp.Start<Startup>("http://*:8080")
- Browse to
http://localhost:8080/
What happens is that Http.Sys accepts the incoming request, examines the host header, decides that there is a reservation for localhost:8080, but realizes that no application is listening to localhost:8080, only *:8080. Http.Sys then returns the 503.
Solutions:
- Try
WebApp.Start<Startup>("http://+:8080")
- Remove the Http.Sys/NetSh registration
Solution 2
I also had same issue. I rectified it by changing
const string url = "http://*:8080";
TO
const string url = "http://+:8080"; // * replaced by +
Solution 3
I also realised, that in one of the PCs, port 8080 was in use.
Changing the port from
const string url = "http://*:8080";
to
const string url = "http://*:8088";
solved the issue
Related videos on Youtube
Comments
-
Null Reference over 1 year
I have a windows hosted SignalR hub created in VS2012:
public class Startup { public void Configuration(IAppBuilder app) { app.UseCors(CorsOptions.AllowAll); app.MapSignalR(); } } public static class SignalR { public static void Start() { const string url = "http://*:8080"; WebApp.Start<Startup>(url); } } public class Broadcaster : Hub { public void SendDownloadResult(bool result, string device, string description, string connectionId, string task) { var context = GlobalHost.ConnectionManager.GetHubContext<Broadcaster>(); context.Clients.Client(connectionId).sendDownloadResult(result, device, description, task); } }
I have deployed this windows service on 3 different PCs, it works fine on two PCs, but on the other, I get HTTP 503 Service is unavailable when I try to browse
http://localhost:8080/signalr/hubs
No exception thrown when the code is executed on all 3 PCs.
I have checked IIS's features in add/remove windows features, they're all the same.
What am I missing?
-
Null Reference about 10 yearsHow do I "remove the Http.Sys/NetSh registration"?
-
halter73 about 10 yearsExecuting
netsh http delete urlacl url=http://localhost:8080/
from an administrator prompt should do the trick. -
Tratcher about 10 yearsHere are several links to docs and tools for configuring Http.Sys: katanaproject.codeplex.com/…
-
Mr Heelis about 6 yearsno he means
*
When the host element of a UrlPrefix consists of a single plus sign (+), the UrlPrefix matches all possible host names in the context of its scheme, port and relativeURI elements, and falls into the strong wildcard category.
When an asterisk (*) appears as the host element, then the UrlPrefix falls into the weak wildcard category. This kind of UrlPrefix matches any host name associated with the specified scheme, port and relativeURI that has not already been matched by a strong-wildcard
-
Tratcher almost 5 years