Port in use exception error

Sonarr version (exact version): v2.0.0.5085
Mono version (if Sonarr is not running on Windows):
OS: Windows 10 x64
Debug logs: N/A
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue:

Whenever I try to start Sonarr, I receive the error “PortInUseException: Port xxxx is already in use, please ensure NzbDrone is not already running.” I have tried the following:

  1. Running application as administrator
  2. making sure that netsh http show urlacl does not have any associations for the sonarr port
  3. Uninstalling
  4. Deleting all registry keys associated with the word nzbdrone
  5. Deleting remaining folders after uninstalling
  6. Rebooting
  7. Reinstalling
  8. Changing the port to any random number in the config.xml
  9. Enabling / Disabling the service

I should note that sonarr was working just fine the last few days. The last thing I did before any of this happened was click the restart button in the UI. If anyone has any suggestions on how to fix this it would be most appreciated.

Please post the trace logs from a startup as well as your config file (edit the API key in there, but leave everything else intact).

Config.xml:
https://drive.google.com/open?id=13ghpB1EsspSrj-BPCMH0ItogJaOuF26L

trace log:
https://drive.google.com/open?id=1q0NXJNDyyVrVIN9FviH8wRIOY7JZ2oHO

Previously I’ve seen that error when the BindAddress has been set to something unexpected.

Have you ever set the bind address?

The existing entries fromnetsh.exe http show urlacl appear okay.
Deleting/renaming the config.xml and letting Sonarr recreate it may help, though I don’t see anything broken in there at first glance.

I have set the bind address from * to the IP of the computer in question but nothing outside of that. I reverted it back shortly after without any issues. Deleting the config.xml and having Sonarr recreate it has the same result

Based on the logs it looks like it’s not currently being run as an admin and only binding to localhost.

When you ran Sonarr as admin did you get the same error?
If you register the URL before starting Sonarr with netsh http add urlacl http://*:8989 sddl=D:(A;;GX;;;S-1-1-0) does it still fail? (replace 8989 if you want to use a different port and make sure Sonarr’s config matches).

Running as administrator shows the same error. Manually adding the urlacl still fails with the same error message

Best guess one of the existing reservations is causing issues or some failure with http.sys. The few that I checked against my own setup all appear there, so I’m not sure what could actually be wrong with one of them.

Probably worth looking at Windows’ event viewer to see if there is anything more there.

After looking at the event log, Sonarr is attempting to bind to the IP address that I’ve been remotely accessing it from. Deleting the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList now allows me to run the application as administrator. Not running in administrator mode still shows the bind error.

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