Error message: failed to save general settings

Hello all,

I have recently installed Sonarr on a CentOS minimal install, which I access remotely via a reverse proxy (Nginx). The issue is that I am unable to save any settings via the UI. Attempting to change a setting either fails with no message or returns “failed to save general settings”.

Essentially this is the same issue discussed in this post on the Sonarr forums, but no solution was found.

Any suggestions?

Additional information:

CentOS version: 7.2.1511 (Core)
Nginx version: 1.6.3
Sonarr Version: 2.0.0.3732
Mono Version: 4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Nov 12 04:43:41 EST 2015)
AppData directory/apps/data/.sonarr
Startup directory/apps/sonarr

Nginx Config:

location /sonarr {

    auth_basic               "Restricted";
    auth_basic_user_file     /etc/nginx/users/.htpasswd;
    proxy_pass                http://localhost:8988/sonarr;
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header         X-Forwarded-Scheme   $scheme;
    
}

Hi

I’m using Sonarr on CentOS with the same version of Mono and it works fine so it’s possibly not your Sonarr setup.
I’m not reverse proxy-ing through nginx but I’d be happy to give that go this weekend and see if I can repro this and produce a workaround.

Are you able to see if settings save OK when you’re not trying to use the Sonarr web UI directly? (through port 8988? according to your config there)

You have CLI access? What’s the output of
sudo getenforce

Enforcing? Permissive?
Bert

Hello Bert,

Thanks for the reply and your offer to test a proxy on your setup.

SELinux is disabled on my machine so that isn’t the culprit, but thanks for the suggestion. It was causing drama with other software on the machine so it was disabled early on.

When I get home from work today I’ll test accessing the GUI directly on the same LAN.

Can you double check that you aren’t getting any errors saving using the browser dev tools? Easiest would be to get to the general settings page, open them up, clear anything from the network tab and try saving.

Hello Markus,

Thanks for the suggestion. It appears there is an error on the PUT host command saying that it was aborted when I attempted to save the settings.

What information do you need from the error screen to diagnose the issue further?

You can inspect the response to see why it failed, likely one of the properties failed validation (though they should show up in the UI, so thats something we’ll need to look into one we figure out what failed).

Does this help?

Error: put download aborted

Then the following two lines are colored red:

downloadClientWorkingFolders "UNPACK|FAILED"
downloadedEpisodesFolder “”

That is for a different settings page so I don’t think its a validation failure I was thinking it might be, but something else.

Ah yes it is for a different page. It seems settings from different pages result in separate PUT errors to appear. At a guess I would say that it is not just a single setting that is failing validation and causing the issue.

What other information can I provide?

Try connecting without going through the reverse proxy, if you can save that way you can investigate why the reverse proxy is causing issues.

Hi Shiro,

OK well if SELinux is set to permissive, then that’s a whole lotta headache to not have to worry about :slightly_smiling: though I would never disable it completely. (You’ve set SELinux to permissive right?, not completely disabled it?)

I can report I can use Sonarr OK with a nginx reverse proxy, and I can change a few of the settings on ALL the tabs, got the little “settings saved” popup. I can browse my library etc. fine too. I did have to set SELinux to permissive mode otherwise it wouldn’t work. I’m not going to investigate that further but I suspect tuning some SELinux policy switch on to allow nginx to do [insert denied function here - open a socket, act as a proxy etc.] would solve that one.

What’s different to your setup?
I’m running Sonarr on port 8989, using Sonarr to do HTTP auth stuff, rather than using nginx to handle the auth. I also had to specify the machines LAN IP rather than “localhost” in the proxy config - though I guess that might be due to firewalld.

Here’s my nginx conf:

location /sonarr {

                proxy_pass              http://192.168.5.1:8989;
                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header         X-Forwarded-Scheme   $scheme;

        }

Here’s my Sonarr config (general tab, advanced settings SHOWN)
Bind Address *
Port Number 8989
URL Base /sonarr
Enable SSL NO
Open Browser NO

Authentication Basic (Brower popup)
Username [whatever]
Password [whatever]

So… what do you want to try next?

Hello all,

First of all thanks for the Nginx config, but it has sadly not resolved my issue.

I have also accessed Sonarr directly over the local LAN and unfortunately the settings are still not saving properly. It therefore seems that my issue is not due to the reverse proxy.

What can I try next?

When you bypass the reverse proxy what error do you get in the network tab of the developer tools?

Hello Markus,

My apologies but I seem to have led us up the garden path a little. The internal IP of my Sonarr system is 192.168.1.10. Accessing it via 192.168.1.10/sonarr has the saving error, but accessing it directly via 192.168.1.10:8989 has no saving error.

It seems therefore that the issue is back to my Nginx configuration.

So back to accessing it via Nginx, I test on the Settings page changing the Analytics setting from off to on and then click the save button.

The error is reported as: jquery.js:9664 PUT https://mydomain.com/sonarr/api/config/host net::ERR_EMPTY_RESPONSE

Changing other settings on other screens returns the same error but with a different URL path and the same line in the JQUERY code.

Any ideas what this means?

Means nginx returned an empty response instead of a proper response, not sure why it would break on saving settings, but loading works, but definitely a problem with the proxy.

should be proxy_pass http://localhost:8988;

Hello Delphi,

Thank you for the idea, but alas that doesn’t work. For the record I have tried every combination that I could think of in my Nginx config using the following settings:

Location:
/sonarr
/sonarr/

Proxy pass:
http://localhost:8988/sonarr
http://localhost:8988/sonarr/
http://localhost:8988/
http://localhost/sonarr
http://localhost/sonarr/

And the same above but replaced with the IP address. Unfortunately the saving issue persists.

Any other thoughts on what I can try?

@shiro did you set URL Base under Settings -> General -> URL Base?

it should be /sonarr according to your nginx.conf but needs to be set in sonarr as well…

Yes, the base URL has been set to Sonarr

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