Ombi: Stuck "Loading..." when using reverse proxy

Created on 29 Nov 2017  路  13Comments  路  Source: tidusjar/Ombi

Ombi build Version:

3.0.2409

Update Branch:

Open Beta

Media Sever:

Plex

Media Server Version:

1.10.0.4523

Operating System:

Ubuntu Server 16.04

Ombi Applicable Logs (from /logs/ directory or the Admin page):


2017-11-29 01:00:19.795 +01:00 [Warning] Failed to process the job '395': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:18.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 219
2017-11-29 01:00:41.240 +01:00 [Information] 1 scheduled job(s) enqueued.
2017-11-29 01:02:02.095 +01:00 [Error] Failed to process the job '395': an exception occurred.
System.ComponentModel.Win32Exception (0x80004005): Permission denied
   at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 219
2017-11-29 07:00:21.550 +01:00 [Warning] Failed to process the job '439': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:19.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 219
2017-11-29 07:00:40.889 +01:00 [Information] 1 scheduled job(s) enqueued.
2017-11-29 07:02:06.409 +01:00 [Error] Failed to process the job '439': an exception occurred.
System.ComponentModel.Win32Exception (0x80004005): Permission denied
   at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 219
2017-11-29 11:27:02.373 +01:00 [Warning] Failed to process the job '474': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:39.
System.ComponentModel.Win32Exception (0x80004005): Permission denied
   at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 219
2017-11-29 11:27:47.315 +01:00 [Information] 1 scheduled job(s) enqueued.
2017-11-29 11:28:17.957 +01:00 [Error] Failed to process the job '474': an exception occurred.
System.ComponentModel.Win32Exception (0x80004005): Permission denied
   at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 219
2017-11-29 11:30:53.547 +01:00 [Information] Hangfire Server stopped.
2017-11-29 11:30:58.827 +01:00 [Information] Start installing Hangfire SQL objects...
2017-11-29 11:30:58.882 +01:00 [Information] Hangfire SQL objects installed.
2017-11-29 11:30:58.906 +01:00 [Information] Starting Hangfire Server
2017-11-29 11:30:58.909 +01:00 [Information] Using job storage: 'SQLite Server: Schedules.db'
2017-11-29 11:30:58.909 +01:00 [Information] Using the following options for Hangfire Server:
2017-11-29 11:30:58.909 +01:00 [Information]     Worker count: 1
2017-11-29 11:30:58.910 +01:00 [Information]     Listening queues: 'default'
2017-11-29 11:30:58.910 +01:00 [Information]     Shutdown timeout: 1.00:00:00
2017-11-29 11:30:58.910 +01:00 [Information]     Schedule polling interval: 00:00:15

And here is my browser logs:

Refused to execute script from 'https:/RETRACTED.duckdns.org/dist/vendor.js?v=BLsFJHi_Nwj2isjkuxJav3Xcuw6QzO1u7L0QDpxWl6E' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
ombi:1 
Refused to execute script from 'https://RETRACTED.duckdns.org/dist/main.js?v=O8hxyowEoly38BP_2k2GbbhI19G-HXK-ikjUsxlpCGU' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Problem Description:

Accessing Ombi directly through the local IP adress works fine, but as soon as you try to access Ombi behind a Nginx reverse proxy it's stuck at a white page that says "Loading . . ." forever. I tried both the Nginx examples in the wiki. This happens on all browsers and platforms.

Reproduction Steps:

Access Ombi behind a Nginx reverse proxy. Not sure if it has to be HTTPS.

help wanted

Most helpful comment

After changing the base url Ombi needs a restart.

All 13 comments

Please post your Nginx config

# listening on port 80 disabled by default, remove the "#" signs to enable
# redirect all traffic to https

server {
    listen         80;
    return 301 https://$host$request_uri;
}


# main server block
server {
    listen 443 ssl default_server;

    root /config/www;
    index index.html index.htm index.php;

    server_name _;

    ssl_certificate /config/keys/letsencrypt/fullchain.pem;
    ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
    ssl_dhparam /config/nginx/dhparams.pem;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
    ssl_prefer_server_ciphers on;

    client_max_body_size 0;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # With php7-cgi alone:
        fastcgi_pass 127.0.0.1:9000;
        # With php7-fpm:
        #fastcgi_pass unix:/var/run/php7-fpm.sock;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
    }

        location /plexpy {
                include /config/nginx/proxy.conf;
                proxy_pass http://172.17.0.1:8181/plexpy;
        }

    location / {
        include /config/nginx/proxy.conf;
        proxy_pass http://172.17.0.1:3000;
    }

        location /ombi {
                proxy_pass http://172.17.0.1:5000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection keep-alive;
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }

# sample reverse proxy config for password protected couchpotato running at IP 192.168.1.50 port 5050 with base url "cp"
# notice this is within the same server block as the base
# don't forget to generate the .htpasswd file as described on docker hub
#   location ^~ /cp {
#       auth_basic "Restricted";
#       auth_basic_user_file /config/nginx/.htpasswd;
#       include /config/nginx/proxy.conf;
#       proxy_pass http://192.168.1.50:5050/cp;
#   }

}

# sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
# notice this is a new server block, you need a new server block for each subdomain
#server {
#   listen 443 ssl;
#
#   root /config/www;
#   index index.html index.htm index.php;
#
#   server_name cp.*;
#
#   ssl_certificate /config/keys/letsencrypt/fullchain.pem;
#   ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
#   ssl_dhparam /config/nginx/dhparams.pem;
#   ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
#   ssl_prefer_server_ciphers on;
#
#   client_max_body_size 0;
#
#   location / {
#       auth_basic "Restricted";
#       auth_basic_user_file /config/nginx/.htpasswd;
#       include /config/nginx/proxy.conf;
#       proxy_pass http://192.168.1.50:5050;    
#   }
#}

And this is my proxy.conf if it matters

client_max_body_size 10m;
client_body_buffer_size 128k;

#Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;

# Advanced Proxy Config
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;

# Basic Proxy Config
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect  http://  $scheme://;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 32 4k;

I鈥檓 seeing the same behavior trying to access Omni behind nginx from any browser. Ombi DotNetCore 3.0.2408
Tried both nginx configurations on the wiki as well as simply having the proxy_pass line for the /ombi location. I have sonarr, radarr, and couchpotato behind nginx as well and they鈥檙e working fine.

You guys have set the base URL in the ombi settings? There is a placeholder so it may look like it has been set.

I just manually set it to /ombi and pointed nginx to IP:5000/ombi and I'm experiencing the same problem still. My old Nginx config was just IP:5000 so having no base URL was correct AFAIK.

Edit: Hmmmmm.... When I restarted it after changing base URL it's working!

After changing the base url Ombi needs a restart.

Actually, now Ombi is not loading half of the stuff. For example there's barely any text anywhere. Pressing F5 (refresh) brings back the white page with "Loading . . ."

Browser log:

Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.css Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.js Failed to load resource: the server responded with a status of 404 (Not Found)
main.js Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.css Failed to load resource: the server responded with a status of 404 (Not Found)
loading.css Failed to load resource: the server responded with a status of 404 (Not Found)

Is it still working locally?

Yep! I think I have fixed it for now though. Set the base URL to /ombi but make Nginx config look like this:

        location / {
                proxy_pass http://172.17.0.1:5000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection keep-alive;
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }

Keep in mind, when nginx is determining what location block to apply, /ombi and /ombi/ are different locations.

Because of this, I have the following in my config

    location = /ombi {
        return 301 https://FQDN/ombi/;
    }

    location /ombi/ {
        proxy_pass http://127.0.0.1:3579;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Ssl on;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout  90;
        proxy_redirect http://127.0.0.1:3579 https://$host;
    }

Try removing

proxy_set_header Upgrade $http_upgrade;

The following works fine for me. I have /ombi set as Base URL in the app.
Running Ombi V3.

location /ombi {
    proxy_pass_header Authorization;
    proxy_pass http://192.168.1.8:5000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection keep-alive;
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Connection "";
    proxy_redirect off;
}

Hey, I was having the same problem and this thread while helpful didn't really clearly explain the solution so I wanted do that in case anyone else stumbles across this thread.

Your nginx config should look like this:

#OMBIV3 CONTAINER location /ombi { proxy_pass http://192.168.2.10:5000/ombi; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
It is incredibly important that you don't add a / at the end of your "location /ombi" because that will cause loading errors.

Next in Ombi, you need to go to Settings > Configuration > Customization > Application URL and set your Application URL to your domain name i.e: https://pigsdofly.com .

Then go to Settings > Ombi > Base URL and set that to /ombi. The tricky thing about this is it looks like it's pre-set to /ombi, but it actually isn't.

Finally, restart ombi and nginx and then everything should work fine. This will also work on Organizr.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CBers picture CBers  路  5Comments

theg1nger picture theg1nger  路  3Comments

ThePaulMichaels picture ThePaulMichaels  路  4Comments

weirdcrap picture weirdcrap  路  5Comments

tidusjar picture tidusjar  路  5Comments