Can't access Web UI. Any help?

Hi all, I have Sonarr installed on a Raspberry Pi 2. It has been up and running for many months with no issue. I tried to access it today and I get a connection refused error.

I haven’t changed anything about my install in some time. I logged in to access my pi’s desktop using Tight VNC, and can’t access it from the browser on the pi either.

Checked logs, and found the following:

17-9-14 21:01:03.5|Info|Bootstrap|Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.4855
17-9-14 21:01:39.9|Info|MigrationLogger|*** Migrating data source=/home/pi/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
17-9-14 21:01:43.4|Info|MigrationLogger|*** Migrating data source=/home/pi/.config/NzbDrone/logs.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
17-9-14 21:01:44.2|Info|Router|Application mode: Interactive
17-9-14 21:01:44.2|Info|OwinHostController|Listening on the following URLs:
17-9-14 21:01:44.2|Info|OwinHostController|  http://*:58846/
17-9-14 21:01:46.3|Info|NancyBootstrapper|Starting Web Server
17-9-14 21:02:06.4|Fatal|ConsoleApp|Address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions
17-9-14 21:18:15.2|Info|Bootstrap|Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.4855

I checked and killed all mono instances, and restarted. Same error. (this log is after I ensured that I didn’t have multiple instances running).

The other weird thing is that it’s connecting to port 58846. I have always used 38082 in the past. Not sure how or why that changed.

I checked my config file and all looks right there. Here’s what it shows:

<Config>
  <Port>58846</Port>
  <UrlBase></UrlBase>
  <BindAddress>*</BindAddress>
  <SslPort>9898</SslPort>
  <EnableSsl>False</EnableSsl>
  <ApiKey>5df8cd859a8c4395b30cfb87b1f471e1</ApiKey>
  <AuthenticationMethod>Basic</AuthenticationMethod>
  <LogLevel>Debug</LogLevel>
  <Branch>master</Branch>
  <LaunchBrowser>True</LaunchBrowser>
  <SslCertHash></SslCertHash>
  <UpdateMechanism>BuiltIn</UpdateMechanism>
</Config>

Any feedback on what might be the problem?

The config file shows the port set to 58846, which is why Sonarr is using it. Sonarr doesn’t change the port automatically so it was likely changed via the UI (and saved) and it took effect on restart.

Understood. I mentioned that because I thought it might be pertinent. I didn’t change it and I’m the only person with access to my sonarr setup, which makes me wonder if something got corrupted.

I can’t get the webUI to load using either port. I get connection refused on the port I had been using (presumably because nothing is accessing the port on the router), and an Empty Response using 58846.

Have you tried stopping Sonarr, resettitng the port in the config file and re-opening Sonarr?

Yes, I did that, have restarted the pi several times, etc. Killed all mono processes in case of a conflict and restarted sonarr, etc.

What does the broswer show when you’re unable to connect to Sonarr?

Set the LogLevel in the config file to trace and restart Sonarr, that will log all connection attempts and the responses so we can see if they’re reaching Sonarr, clearing the logs and then posting the fresh logs after trying to connect to hastebin/pastebin would be helpful.

Here are the logs:

sonarr.trace.txt
sonarr.txt
sonarr.debug.txt

When I attempt to access the UI at port 58846 using chrome, I get
"This page isn’t working
192.168.1.151 didn’t send any data.
ERR_EMPTY_RESPONSE"

I get similar responses using Firefox and edge, and using the raspbian browser on the local machine I get a “response corrupt” page.

Edit: Also, in regard to line 97 in the trace file, “|Fatal|ConsoleApp|Address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions”:

I just verified that only one instance of DZBdrone is running, that it has the correct permissions, and that nothing else is using the same port.

That’d explain why it’s not working properly.

The error is most commonly caused by another instance (or something else running on the same port), though can happen if Sonarr doesn’t have permissions to bind to the port.

If you change the port and restart Sonarr do you get the exact same error?
Is there anything else using that port? (sudo netstat -pln https://serverfault.com/a/357328/91777)

There was nothing else on the port. I had tried changing the port before ever posting here with no success.

However, I just tried again, and somehow it started working again. Totally weird, because the only thing I did tonight was change the port in the config file, which I did previously when I noticed it had gotten changed from the port I have always used.

Super weird, but thanks for sticking with me to resolve it.

Actually, there IS something else on the previous port. That’s the port my torrent client uses. No idea why it didn’t show up in either of the netstat queries I ran.

I guess that’s problem solved… stupid on my part that I didn’t catch that from the Deluge connection screen. Still weird that it didn’t correct the problem when I changed it previously. Now I’m wondering if I skipped restarting after editing the config file the other day.

1 Like

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