Sonarr fails to start after Windows Insider update

Version 2.0.0.4689
Windows 10 Build 16170.rs_prerelease.170331-1532
((Debug logs)):

17-4-8 12:54:42.0|Info|Bootstrap|Starting Sonarr - C:\ProgramData\NzbDrone\bin\NzbDrone.exe - Version 2.0.0.4689
17-4-8 12:54:42.4|Info|MigrationLogger|*** Migrating data source=C:\ProgramData\NzbDrone\nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
17-4-8 12:54:42.6|Info|MigrationLogger|*** Migrating data source=C:\ProgramData\NzbDrone\logs.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
17-4-8 12:54:42.8|Info|Router|Application mode: Interactive
17-4-8 12:54:42.8|Info|OwinHostController|Listening on the following URLs:
17-4-8 12:54:42.8|Info|OwinHostController| http://localhost:8989/
17-4-8 12:54:43.2|Info|NancyBootstrapper|Starting Web Server
17-4-8 12:54:44.3|Fatal|WindowsApp|EPIC FAIL

[v2.0.0.4689] NzbDrone.Host.Owin.PortInUseException: Port 8989 is already in use, please ensure NzbDrone is not already running. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Net.HttpListenerException: Access is denied
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func2 appFunc, IList1 addresses, IDictionary2 capabilities, Func2 loggerFactory)
at Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(Func2 app, IDictionary2 properties)
— End of inner exception stack trace —
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Owin.Hosting.ServerFactory.ServerFactoryAdapter.Create(IAppBuilder builder)
at Microsoft.Owin.Hosting.Engine.HostingEngine.StartServer(StartContext context)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at NzbDrone.Host.Owin.OwinAppFactory.CreateApp(List1 urls) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Owin\OwinServiceProvider.cs:line 52 --- End of inner exception stack trace --- at NzbDrone.Host.Owin.OwinAppFactory.CreateApp(List1 urls) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Owin\OwinServiceProvider.cs:line 63
at NzbDrone.Host.Owin.OwinHostController.StartServer() in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Owin\OwinHostController.cs:line 53
at NzbDrone.Host.NzbDroneServiceFactory.Start() in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\ApplicationServer.cs:line 55
at NzbDrone.Host.Router.Route(ApplicationModes applicationModes) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Router.cs:line 38
at NzbDrone.Host.Bootstrap.Start(ApplicationModes applicationModes, StartupContext startupContext) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Bootstrap.cs:line 74
at NzbDrone.Host.Bootstrap.Start(StartupContext startupContext, IUserAlert userAlert, Action`1 startCallback) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Bootstrap.cs:line 40
at NzbDrone.WindowsApp.Main(String[] args) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone\WindowsApp.cs:line 23

17-4-8 13:02:14.6|Info|RssSyncService|Starting RSS Sync
17-4-8 13:02:15.9|Info|DownloadDecisionMaker|Processing 200 releases
17-4-8 13:02:16.8|Info|RssSyncService|RSS Sync Completed. Reports found: 200, Reports grabbed: 0

Can’t actually get Sonarr to start to check or set anything
Description of issue:
Sonarr was updated to this version either yesterday or the day before. Last night Windows 10 was updated to the version shown. This morning sonarr will not start - gets error message pop up

PortInUseException: Port 8989 is already in use, please ensure NzbDrone is not already running.

Something is definitely going on in the background though as three entries were just added to the log

Something is indeed running - there is a task in the task manager. The web browser cannot connect to anything though - get

Firefox can’t establish a connection to the server at localhost:8989.

Killing and restarting the process made no difference. Starting it as administrator made no difference. A reboot made no difference

If you set a different port in the config file does that change anything?

Sounds like you went through the usual troubleshooting steps, offhand I’m not sure what else you can check, but it sounds like the Windows update may have caused issues with HTTP.sys (the underlying piece of Windows that the webserver uses).

How about checking netstat -anb and netsh http show urlacl?

Thanks both of you. I edited the xml file and changed to port 28989 and it seemed to come up OK. Running the commands suggested by Taloth gives the following results

netsh command

Reserved URL            : http://*:8989/
    User: \Everyone
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;WD)

I’m not sure of the meaning of this result but would get something other than Sonarr is using port 8989 after the most recent Windows Insider update

netstat command

[C:\WINDOWS\system32]netstat -anb | grep 8989
TCP 0.0.0.0:28989 0.0.0.0:0 LISTENING
TCP 127.0.0.1:58990 127.0.0.1:58989 TIME_WAIT
TCP [::]:28989 [::]:0 LISTENING
TCP [::1]:28989 [::1]:58292 ESTABLISHED
TCP [::1]:28989 [::1]:58293 ESTABLISHED
TCP [::1]:58217 [::1]:28989 TIME_WAIT
TCP [::1]:58292 [::1]:28989 ESTABLISHED
TCP [::1]:58293 [::1]:28989 ESTABLISHED
TCP [::1]:58294 [::1]:28989 TIME_WAIT
TCP [::1]:58295 [::1]:28989 TIME_WAIT
TCP [::1]:58296 [::1]:28989 TIME_WAIT

Lots of stuff on the new port 28989 but nothing showing up for the original port 8989

What does the netsh command show now for port 28989?

absolutely nothing - it doesn’t appear in the netsh output at all. Sonarr is running and I can successfully connect to it on port 28989

Any change after running netsh urlacl delete http://*:8989/ (from an admin command prompt), setting the Sonarr port back to 8989 and restarting Sonarr? That’ll remove the URL ACL and Sonarr can re-register it.

That worked - slightly different command syntax though than the example you gave

netsh http delete urlacl http://*:8989/

Whoops right, forgot the exact format. Glad to hear it’s back up and running.

With netsh http show urlacl do you see http://*:8989/ or http://+:8989/ listed?

The former

Reserved URL            : http://*:8989/
    User: \Everyone
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;WD)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.