Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jackett monitoring without using the /health endpoint #2292

Closed
2 tasks done
GedasBu opened this issue Nov 6, 2022 · 14 comments
Closed
2 tasks done

Jackett monitoring without using the /health endpoint #2292

GedasBu opened this issue Nov 6, 2022 · 14 comments

Comments

@GedasBu
Copy link

GedasBu commented Nov 6, 2022

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Hello,
I'm trying to monitor jackett instance which is running on windows vm in proxmox. Uptime-Kuma cannot detect it while I can open jackett web interface with no problem in chrome. My local path is http://192.168.1.36:9117/UI/Dashboard.
Maybe someone has experience with it?

🐻 Uptime-Kuma Version

1.18.5

💻 Operating System and Arch

Lroxmox lxc container

🌐 Browser

Chrome

🐋 Docker Version

No response

🟩 NodeJS Version

No response

@GedasBu GedasBu added the help label Nov 6, 2022
@louislam
Copy link
Owner

louislam commented Nov 6, 2022

Operating System and Arch
lxc container

Usually it is a network issue. Did you allow your Uptime Kuma LXC container to access your LAN (192.168.1.X)?

https://github.com/lxc/lxd/issues/1343

@GedasBu
Copy link
Author

GedasBu commented Nov 7, 2022

I have Radarr, plex, and sonarr on the same Vm and its working fine with Kuma. Only Jackett refuses to work.

@MrBlue90
Copy link

I experience the same issue.
A normal ping works, but checking the webpage doesn't.

@IRHM
Copy link

IRHM commented Jan 17, 2023

For anyone having this issue, I was able to fix it by disabling redirects and adding the 302 (Found) http status code to the monitor for jackett:
image

@GedasBu
Copy link
Author

GedasBu commented Jan 18, 2023

Thanks. That worked for me also.

@louislam
Copy link
Owner

For anyone having this issue, I was able to fix it by disabling redirects and adding the 302 (Found) http status code to the monitor for jackett: image

Do you know the reason? As normally, Uptime Kuma will follow redirects to the final page.

@IRHM
Copy link

IRHM commented Jan 18, 2023

Do you know the reason? As normally, Uptime Kuma will follow redirects to the final page.

Not 100% sure but it looks like Jacketts web server is setup weirdly.

Found this issue, could be why (uptime-kume gets redirected to login, but doesnt save cookie, goes back to dashboard, then because no cookie, back to login, infinite loop? Not even sure if kuma supports cookies, so I could be wrong): Jackett/Jackett#12475 (comment)

@pkishino
Copy link

pkishino commented Mar 5, 2023

Having the same problem as above..
jackett setup on baremetal.. neither accessing through reverse nginx nor directly is working with uptime Kuma, even after trying above tips..

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

@github-actions github-actions bot added the Stale label Jun 3, 2023
@github-actions
Copy link

github-actions bot commented Jun 6, 2023

This issue was closed because it has been stalled for 2 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2023
@pkishino
Copy link

pkishino commented Jun 7, 2023

This is still an issue

@CommanderStorm
Copy link
Collaborator

@pkishino
This issue has been closed because it was raised with the help tag.

Please open an issue with more details than the current issue.
If you decide to do so please attach this information:

  • Currently there sadly is no way this is reproducible what the response of jackett to the inital ping is. => include how jackett redirects
  • what cookies it sets

@AnonymousX86
Copy link

I have the same issue. Adding 302 response didn't work. (Probably because I can see "Request failed with status code 400".) I'm using Nginx Proxy Manager on Docker within same network as Jackett. Proxy host works, I can access web panel with no problem. Starr apps works also fine (Sonarr, Radarr). In the same virtual network Uptime Kuma is running.

App Address
Nginx Proxy Manager 172.18.0.1:8001
Uptime Kuma 172.18.0.1:8002
Jackett 172.18.0.1:8003

In Uptime Kuma I'm requesting http://172.18.0.1:8003 (and other ports for each app), Jackett is the only app that isn't monitored properly.

Same goes for NPM, I'm proxying to http://172.18.0.1:8003.

In new incognito browser tab I can see it sets only TestCookie=1.

@CommanderStorm CommanderStorm reopened this May 7, 2024
@CommanderStorm CommanderStorm changed the title Jackett monitoring does not work Support persisting cookies set during Redirects May 7, 2024
@CommanderStorm
Copy link
Collaborator

I used https://hub.docker.com/r/linuxserver/jackett/ and getting curl to cooperate was a bit harder:

curl -v --cookie-jar -b cookiefile --junk-session-cookies --location http://localhost:9117
Resulting log

* Host localhost:9117 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:9117...
* Connected to localhost (::1) port 9117
> GET / HTTP/1.1
> Host: localhost:9117
> User-Agent: curl/8.6.0
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Content-Length: 0
< Date: Tue, 07 May 2024 18:40:36 GMT
< Server: Kestrel
< Location: /UI/Dashboard
< 
* Ignoring the response-body
* Connection #1 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9117/UI/Dashboard'
* Found bundle for host: 0x5593ad409ea0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection with host localhost
> GET /UI/Dashboard HTTP/1.1
> Host: localhost:9117
> User-Agent: curl/8.6.0
> Accept: */*
> 
< HTTP/1.1 302 Found
< Content-Length: 0
< Date: Tue, 07 May 2024 18:40:36 GMT
< Server: Kestrel
< Location: http://localhost:9117/UI/Login?ReturnUrl=%2FUI%2FDashboard
< 
* Ignoring the response-body
* Connection #1 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9117/UI/Login?ReturnUrl=%2FUI%2FDashboard'
* Found bundle for host: 0x5593ad409ea0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection with host localhost
> GET /UI/Login?ReturnUrl=%2FUI%2FDashboard HTTP/1.1
> Host: localhost:9117
> User-Agent: curl/8.6.0
> Accept: */*
> 
< HTTP/1.1 302 Found
< Content-Length: 0
< Date: Tue, 07 May 2024 18:40:36 GMT
< Server: Kestrel
< Cache-Control: no-store,no-cache
< Location: TestCookie
< Pragma: no-cache
* Added cookie TestCookie="1" for domain localhost, path /, expire 0
< Set-Cookie: TestCookie=1; path=/
< 
* Ignoring the response-body
* Connection #1 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9117/UI/TestCookie'
* Found bundle for host: 0x5593ad409ea0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection with host localhost
> GET /UI/TestCookie HTTP/1.1
> Host: localhost:9117
> User-Agent: curl/8.6.0
> Accept: */*
> Cookie: TestCookie=1
> 
< HTTP/1.1 302 Found
< Content-Length: 0
< Date: Tue, 07 May 2024 18:40:36 GMT
< Server: Kestrel
< Cache-Control: no-store,no-cache
< Location: Login?cookiesChecked=1
< Pragma: no-cache
< 
* Ignoring the response-body
* Connection #1 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9117/UI/Login?cookiesChecked=1'
* Found bundle for host: 0x5593ad409ea0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection with host localhost
> GET /UI/Login?cookiesChecked=1 HTTP/1.1
> Host: localhost:9117
> User-Agent: curl/8.6.0
> Accept: */*
> Cookie: TestCookie=1
> 
< HTTP/1.1 302 Found
< Content-Length: 0
< Date: Tue, 07 May 2024 18:40:36 GMT
< Server: Kestrel
< Cache-Control: no-cache,no-store
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Location: Dashboard
< Pragma: no-cache
* Added cookie Jackett="CfDJ8KRxCoQqb95MnzVHT7NPkrhBWPC9s_3rW_h8K7jkpvmbbapBmeVF5G-kYvyPVMb36bWxVxX1nnrxqLaJD3w5w9xCBVmT4y3XBdYc7YIn0cO-c4j15e_IwYx1gYEpohNlMMvAzjLp2JSTgdQhvN_6XcbVDj6wQ1gtNTA0PxVhiqvmskmgbKJG_kZ9jcdu2OD3-OQnQIBaVaUQIGvuk-M-VGAPFngNxNwFN5r0H-03Fe5X4MYUUGyOcOWsdurSme9_WfsrszeM4UqE5yp49zdBr30aHhBL2ICAJByy1W8iywgnC6JGgvdYkiHgCC3Z6dU2LuoUwp7p_V0nZlgU4-QD3Tc" for domain localhost, path /, expire 1716316837
< Set-Cookie: Jackett=CfDJ8KRxCoQqb95MnzVHT7NPkrhBWPC9s_3rW_h8K7jkpvmbbapBmeVF5G-kYvyPVMb36bWxVxX1nnrxqLaJD3w5w9xCBVmT4y3XBdYc7YIn0cO-c4j15e_IwYx1gYEpohNlMMvAzjLp2JSTgdQhvN_6XcbVDj6wQ1gtNTA0PxVhiqvmskmgbKJG_kZ9jcdu2OD3-OQnQIBaVaUQIGvuk-M-VGAPFngNxNwFN5r0H-03Fe5X4MYUUGyOcOWsdurSme9_WfsrszeM4UqE5yp49zdBr30aHhBL2ICAJByy1W8iywgnC6JGgvdYkiHgCC3Z6dU2LuoUwp7p_V0nZlgU4-QD3Tc; expires=Tue, 21 May 2024 18:40:37 GMT; path=/; samesite=lax; httponly
< 
* Ignoring the response-body
* Connection #1 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9117/UI/Dashboard'
* Found bundle for host: 0x5593ad409ea0 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection with host localhost
> GET /UI/Dashboard HTTP/1.1
> Host: localhost:9117
> User-Agent: curl/8.6.0
> Accept: */*
> Cookie: TestCookie=1; Jackett=CfDJ8KRxCoQqb95MnzVHT7NPkrhBWPC9s_3rW_h8K7jkpvmbbapBmeVF5G-kYvyPVMb36bWxVxX1nnrxqLaJD3w5w9xCBVmT4y3XBdYc7YIn0cO-c4j15e_IwYx1gYEpohNlMMvAzjLp2JSTgdQhvN_6XcbVDj6wQ1gtNTA0PxVhiqvmskmgbKJG_kZ9jcdu2OD3-OQnQIBaVaUQIGvuk-M-VGAPFngNxNwFN5r0H-03Fe5X4MYUUGyOcOWsdurSme9_WfsrszeM4UqE5yp49zdBr30aHhBL2ICAJByy1W8iywgnC6JGgvdYkiHgCC3Z6dU2LuoUwp7p_V0nZlgU4-QD3Tc
> 
< HTTP/1.1 200 OK
< Content-Length: 44176
< Content-Type: text/html
< Date: Tue, 07 May 2024 18:40:36 GMT
< Server: Kestrel
< Cache-Control: no-store,no-cache
< Last-Modified: Tue, 07 May 2024 05:58:38 GMT
< Pragma: no-cache
< 
<!DOCTYPE html>

Extracted request flow

  • GET /
  • => 301 to Location=/UI/Dashboard
  • GET /UI/Dashboard
  • => 302 to Location=/UI/Login?ReturnUrl=%2FUI%2FDashboard
  • GET /UI/Login?ReturnUrl=%2FUI%2FDashboard
  • => 302 to Location=TestCookie with Set-Cookie=TestCookie=1; path=/
  • GET /UI/TestCookie with Cookie=TestCookie=1
  • => 302 to Location=Dashboard with Set-Cookie=Jackett=Cf...D3Tc; expires=Tue, 21 May 2024 18:40:37 GMT; path=/; samesite=lax; httponly
  • GET /UI/Dashboard with Cookie=TestCookie=1;Jackett=Cf...D3Tc
  • => 200 with html

So the real request flow is super weird.
Please use an api endpoint instead to monitor the health such as GET /health mentioned in Jackett/Jackett#12784 (comment)

Persising cookies during rediects is already tracked in #2309 => re-closing as resolved (due to /health)

@CommanderStorm CommanderStorm changed the title Support persisting cookies set during Redirects Jackett monitoring without using the /health endpoint May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants