A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/aspnet/KestrelHttpServer/issues/419 below:

UNIX sockets not cleaned up on exit · Issue #419 · aspnet/KestrelHttpServer · GitHub

I'm using Supervisord to run Kestrel for my site. This is my Supervisor config:

[program:dan]
command=/var/www/.dnx/runtimes/dnx-mono.1.0.0-rc1-final/bin/dnx --appbase /var/www/dan.cx/live/site/approot/packages/Daniel15.Web/1.0.0/root Microsoft.Dnx.ApplicationHost --configuration Release web-live
environment=ASPNET_ENV=Production
user=www-data
directory=/var/www/dan.cx/live/site/

Command in project.json:

"web-live": "Microsoft.AspNet.Server.Kestrel --server.urls http://unix:/run/dan-live.sock",

This is working fine, but when I stop Kestrel (supervisorctl stop dan, "dan" being the name of the site in the Supervisor config), it does not clean up the UNIX socket (/run/dan-live.sock). The next time I try to start it, I get an "address already in use" error:

Microsoft.AspNet.Server.Kestrel.Networking.UvException: Error -98 EADDRINUSE address already in use
  at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Check (Int32 statusCode) <0x41d3a2a0 + 0x00063> in <filename unknown>:0
  at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.pipe_bind (Microsoft.AspNet.Server.Kestrel.Networking.UvPipeHandle handle, System.String name) <0x41d3e0e0 + 0x00053> in <filename unknown>:0
  at Microsoft.AspNet.Server.Kestrel.Networking.UvPipeHandle.Bind (System.String name) <0x41d3e0a0 + 0x00027> in <filename unknown>:0
  at Microsoft.AspNet.Server.Kestrel.Http.PipeListener.CreateListenSocket () <0x41d3d9c0 + 0x00087> in <filename unknown>:0
  at Microsoft.AspNet.Server.Kestrel.Http.Listener+<>c__DisplayClass5_0.<StartAsync>b__0 (System.Object _) <0x41d3d8c0 + 0x00030> in <filename unknown>:0

I need to manually rm /run/dan-live.sock before I can start Kestrel again. I think Kestrel simply needs to delete the socket on exit.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4