I have had to reverse back to 9.41 if I want to be able to reach Jackett GUI via Nginx outside of my LAN, as it is not parsing the information and showing a Lost connection. I only noticed as I do most of my viewing locally, and it has been working fine, all the way up to 10.37, which updated automatically last night (8/14 @ 2:37AM EST). It works in the background, meaning, it will still search and find indexers, and parse them to Deluge, via Sonarr, Radarr, Lidarr, but there is no GUI. I reversed back to 9.41 to give information regarding this issue, as that one works both LAN and WAN via Organizr, behind Nginx. I am using the same jackett.conf as found on the Wiki here, and as soon as 9.41 was installed, the GUI worked again. For testing purposes, I upgraded to 10.1, 10.5, 10.36, 10.37, and the newly 10.47, and they are all doing the same, showing a Lost connection, yet they do search behind the scene and parse to Deluge.
https://i.imgur.com/5TV7g7G.jpg
Thanks for everything you guys do!
Jackett version: 9.41
Mono version (if not using Windows): 5.12.0.301 on Raspbian Stretch
@D4rkSl4ve i new pre-release is out
10.49 still doing the same thing. Works LAN no issues, page shows, searches, everything. WAN it will search, as I can have it search via Sonarr, Radarr, Lidarr, and it will search, find, send the data to Deluge; but it still shows:
Secure Connection Failed
The connection to xxx.xxx.xx.xxx was interrupted while the page was loading.
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
The IP shown is my static VPN, which works with everything behind Nginx and how I get to Jackett, via Organizr.
Revert back to 9.41, and I can see the page again.
Just to give some info, here is my Nginx jackett.conf that works with all up to 9.41, but has never worked on WAN with any of the 10.x
# Jackett Reverse Proxy by Organizr
location /jackett/ {
auth_request /auth-4;
proxy_pass http://127.0.0.1:9117/jackett/;
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-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;
}
10.54 still broke, just as any other 10.x just as the notes above; just FYI
It seems that it has something to do with SSL. I am not using SSL, but for some reason it keeps changing my http://myExternalIP/jackett to https. The error: The connection was reset....
Running into similar (if not the same) issues with my setup. Runs in docker and uses nginx as a TLS proxy. Had to pin to linuxserver/jackett:223 (0.9.41.0) as the newer builds disregard the proxy schema and force http instead of https, breaking the UI login process.
10.x does search properly via the API interface. It seems only the UI is generating this kind of problem.
pertinent proxy configs:
location /jackett {
proxy_pass http://jackett;
include /etc/nginx/proxy_params;
include /etc/nginx/allow-restrict_params;
include /etc/nginx/header_params;
}
proxy_params:
proxy_connect_timeout 59s;
proxy_send_timeout 600;
proxy_read_timeout 3000;
proxy_buffer_size 64k;
proxy_buffers 16 32k;
proxy_pass_header Set-Cookie;
proxy_hide_header Vary;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_set_header Accept-Encoding '';
proxy_ignore_headers Cache-Control Expires;
proxy_set_header Referer $http_referer;
proxy_set_header Host $host;
proxy_set_header Scheme $scheme;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port '443';
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_redirect default;
port_in_redirect off;
For what it's worth, this is what journalctl is showing when the web ui fails to load:
Aug 17 23:43:46 mono[42166]: info: Microsoft.AspNetCore.Server.Kestrel[17]
Aug 17 23:43:46 mono[42166]: Connection id "0HLG4HA1EG5K5" bad request data: "Multiple Host headers."
Aug 17 23:43:46 mono[42166]: Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Multiple Host headers.
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw (Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason) [0x00006] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.EnsureHostHeaderExists () [0x0003f] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TryParseRequest (System.IO.Pipelines.ReadResult result, System.Boolean& endConnection) [0x000be] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__186`1[TContext].MoveNext () [0x000b3] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: --- End of stack trace from previous location where exception was thrown ---
Aug 17 23:43:46 mono[42166]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__185`1[TContext].MoveNext () [0x00087] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: 08-17 23:43:46 Info Connection id "0HLG4HA1EG5K5" bad request data: "Multiple Host headers." Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Multiple Host headers.
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw (Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason) [0x00006] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.EnsureHostHeaderExists () [0x0003f] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TryParseRequest (System.IO.Pipelines.ReadResult result, System.Boolean& endConnection) [0x000be] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__186`1[TContext].MoveNext () [0x000b3] in <844df72ac0f04271b5a530bdc873ad1e>:0
Aug 17 23:43:46 mono[42166]: --- End of stack trace from previous location where exception was thrown ---
Aug 17 23:43:46 mono[42166]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <a6f810169ec746eeb2789b925e2858c0>:0
Aug 17 23:43:46 mono[42166]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__185`1[TContext].MoveNext () [0x00087] in <844df72ac0f04271b5a530bdc873ad1e>:0
Thanks @liaralabs
Connection id "0HLG4HA1EG5K5" bad request data: "Multiple Host headers."
That helps pinpoint the issue
@alron @D4rkSl4ve
Can you please run Jackett, try accessing via web ui and the grab the log file as @liaralabs has done
If it would be good to know if you all have the same issue or different ones
@flightlevel 0.10.69.0 fixed the proxy related problems for me. It appears to respect schema now and doesn't try and redirect me to my server via http.
I'm not getting the stacks showing up in my logs like liarlabs, but I was also having login issues until I dug through the cookies. Found one 'JACKETT' from July 1st which was rather invalid, also found 'Jackett' from today which was valid. Nuked the oldest one and the webui let me in instantly.
Not sure if this is the same issue (let me know if not I can make another issue), but I just upgraded to 10+ and am no longer able to access the webgui through nginx.
I am getting redirected to _
, the url ends up looking like this http://_/jackett/UI/Login?ReturnUrl=%2Fjackett%2FUI%2FDashboard
.
In the logs I am seeing
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.0 GET http://mydomain.com/jackett/UI/Dashboard
08-18 20:32:56 Info Request starting HTTP/1.0 GET http://mydomain.com/jackett/UI/Dashboard
info: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler[7]
Cookies was not authenticated. Failure message: Unprotect ticket failed
08-18 20:32:56 Info Cookies was not authenticated. Failure message: Unprotect ticket failed
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Route matched with {action = "Dashboard", controller = "WebUI"}. Executing action Jackett.Server.Controllers.WebUIController.Dashboard (JackettConsole)
08-18 20:32:56 Info Route matched with {action = "Dashboard", controller = "WebUI"}. Executing action Jackett.Server.Controllers.WebUIController.Dashboard (JackettConsole)
08-18 20:32:56 Info Authorization failed.
08-18 20:32:56 Info Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter'.
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[3]
Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter'.
08-18 20:32:56 Info Executing ChallengeResult with authentication schemes ().
info: Microsoft.AspNetCore.Mvc.ChallengeResult[1]
Executing ChallengeResult with authentication schemes ().
info: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler[12]
AuthenticationScheme: Cookies was challenged.
08-18 20:32:56 Info AuthenticationScheme: Cookies was challenged.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action Jackett.Server.Controllers.WebUIController.Dashboard (JackettConsole) in 0.8888ms
08-18 20:32:56 Info Executed action Jackett.Server.Controllers.WebUIController.Dashboard (JackettConsole) in 0.8888ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 2.2462ms 302
08-18 20:32:56 Info Request finished in 2.2462ms 302
I am using the docker image linuxserver/jackett:236
to host it.
If I access the local url (http://localhost:9117
) it works fine.
@flightlevel that bit stuck out to me as well and I removed the proxy_set_header Host $proxy_host;
from my nginx config yesterday. I must've botched the attempt somehow because yesterday it didn't work. I tried the same again today and it did.
Idk if we're all facing the same issue here, but in my case, removing the extra host header allowed the UI to load. This is all I'm rolling with right now and it's working without further changes from your end:
location /jackett/ {
include /etc/nginx/snippets/proxy.conf;
proxy_pass http://127.0.0.1:9117/jackett/;
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;
auth_basic "What's the password?";
auth_basic_user_file /etc/htpasswd;
}
Edit: I just noticed my config was using the proxy snippets, when it shouldn't have been. There is a duplicate host header in there, so it's likely my fault entirely. I guess the old web server was more lenient as it had been working for me for a while :blush:
I have another one related to nginx reverse proxy but with a different error on a different os. Do you want I open a new issue ?
OS : Synology 6.1
Jackett : 0.10.69.0
Error : 400
My issue is due to websocket configuration for nginx. I have the following lines and if I comment out, it works. But the problem is that my NAS is shuting down every night and when it starts, my nginx config is overwritten.
# Websocket
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
Here is my var/jackett.log
:
info: Microsoft.AspNetCore.Server.Kestrel[17]
Connection id "0HLG6CR4AE1HC" bad request data: "Requests with 'Connection: Upgrade' cannot have content in the request body."
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Requests with 'Connection: Upgrade' cannot have content in the request body.
at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw (Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason) [0x00006] in <844df72ac0f04271b5a530bdc873ad1e>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody.For (Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion httpVersion, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestHeaders headers, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) [0x0005e] in <844df72ac0f04271b5a530bdc873ad1e>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.CreateMessageBody () [0x0000c] in <844df72ac0f04271b5a530bdc873ad1e>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__186`1[TContext].MoveNext () [0x000c6] in <844df72ac0f04271b5a530bdc873ad1e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__185`1[TContext].MoveNext () [0x00087] in <844df72ac0f04271b5a530bdc873ad1e>:0
08-20 09:07:55 Info Connection id "0HLG6CR4AE1HC" bad request data: "Requests with 'Connection: Upgrade' cannot have content in the request body." Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Requests with 'Connection: Upgrade' cannot have content in the request body.
at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw (Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason) [0x00006] in <844df72ac0f04271b5a530bdc873ad1e>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody.For (Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion httpVersion, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestHeaders headers, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) [0x0005e] in <844df72ac0f04271b5a530bdc873ad1e>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.CreateMessageBody () [0x0000c] in <844df72ac0f04271b5a530bdc873ad1e>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__186`1[TContext].MoveNext () [0x000c6] in <844df72ac0f04271b5a530bdc873ad1e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <cb410c64c7fa4e8d9841a0cbe4173d66>:0
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__185`1[TContext].MoveNext () [0x00087] in <844df72ac0f04271b5a530bdc873ad1e>:0
type:
10.1.1.60:8080/jackett/
and it changes it to:
http://10.1.1.60/jackett/UI/Login?ReturnUrl=%2Fjackett%2FUI%2FDashboard
and it gives error page: This site can't be reached.
simply add the :8080 to the same above line to:
http://10.1.1.60:8080/jackett/UI/Login?ReturnUrl=%2Fjackett%2FUI%2FDashboard
and logs in.
Jackett Version 0.10.69.0
Mono: 5.12.0.301
OS: Raspbian Stretch Lite (cli only)
Nginx is setup to listen to port 8080, and that goes directly to Organizr, yet the testing below is skipping that portion, as I am going straight to 10.1.1.60:8080/jackett/
My Nginx conf is the following:
# Jackett Reverse Proxy
location /jackett/ {
proxy_pass http://localhost:9117/jackett/;
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-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
My ServerConfig.json is the following:
{
"Port": 9117,
"AllowExternal": true,
"APIKey": "################################",
"AdminPassword": null,
"InstanceId": "##############################################################",
"BlackholeDir": "",
"UpdateDisabled": false,
"UpdatePrerelease": false,
"BasePathOverride": "/jackett",
"OmdbApiKey": "",
"OmdbApiUrl": "",
"ProxyUrl": "",
"ProxyType": 0,
"ProxyPort": null,
"ProxyUsername": "",
"ProxyPassword": "",
"ProxyIsAnonymous": true
}
I just want to let you know that I added the following code to Organizr's tab and it worked from LAN and WAN.
/jackett/UI/Login?ReturnUrl=%2Fjackett%2FUI%2FDashboard
and also added the 'Proxy port: 8080' to Jackett's configuration, as before I had nothing in there either, yet it used to work up to v9.41
before it was simply:
/jackett/
and blank for 'Admin password', 'Proxy url:', 'Proxy port', 'Proxy username' and 'Proxy password'
So for now, I guess I'll be using such so it works from LAN and WAN, being called by Organizr.
https://i.imgur.com/bbnPpT2.jpg
EDITED: This was just done via WAN, which was one of the original problems, adding the additional long url after the normal url fixed the issue, and I am able to also update to pre-releases.
https://i.imgur.com/r6U2V9p.jpg
I'm getting a similar issue:
`08-22 12:22:23 Info Route matched with {action = "Dashboard", controller = "WebUI"}. Executing action Jackett.Server.Controllers.WebUIController.Dashboard (JackettConsole)
08-22 12:22:23 Info Authorization failed.
08-22 12:22:23 Info Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter'.
08-22 12:22:23 Info Executing ChallengeResult with authentication schemes ().
08-22 12:22:23 Info AuthenticationScheme: Cookies was challenged. `
The readme has been updated with an updated nginx example which works fine for me (using basepath=/jackett):
please try it:
location /jackett {
proxy_pass http://127.0.0.1:9117;
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 $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_redirect off;
}
Especially the X-Forwarded-Host and X-Forwarded-Proto headers are important.
Most helpful comment
The readme has been updated with an updated nginx example which works fine for me (using basepath=/jackett):
please try it:
Especially the X-Forwarded-Host and X-Forwarded-Proto headers are important.