[GH-ISSUE #32] [Installation Help]: ERROR - Error connecting to TubeArchivist with URL https://tube.mydomain.com | Exception: 'HTTP Error 403: Forbidden' #14

Closed
opened 2026-03-23 20:33:17 +00:00 by mirror · 6 comments
Owner

Originally created by @Wh1t3Rose on GitHub (Dec 13, 2023).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/32

Installation instructions

  • I'm running the latest version of the TubeArchivist Plex Integration Scanner and Agent. I have read the latest release notes and installation instructions.

Operating System

Unraid 6.12.5

Your installation or setup question

I am running my domain behind cloudflare. My domain is proxied and is behind a cloudflare tunnel. I can not use DNS only with CF Tunnels.

I made sure my API key matches with TubeArchivist and is correct both in the Plex Library Adavnced tab as well as in the ta_config.json file

The domain is correct as well. I changed it in the log for security reasons

Relevant log output

2023-12-12 23:00:06,730 [TubeArchivist Scanner] ERROR - Error reading or accessing url '<urllib2.Request instance at 0x15312dcf75f0>', Exception: 'HTTP Error 403: Forbidden'
2023-12-12 23:00:06,730 [TubeArchivist Scanner] ERROR - Error connecting to TubeArchivist with URL 'https://tube.mydomain.com', Exception: 'HTTP Error 403: Forbidden'
2023-12-12 23:00:06,740 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist at https://tube.mydomain.com with provided token from `ta_config.json` file.
2023-12-12 23:00:06,863 [TubeArchivist Scanner] ERROR - Error reading or accessing url '<urllib2.Request instance at 0x15312d6fb190>', Exception: 'HTTP Error 403: Forbidden'
2023-12-12 23:00:06,864 [TubeArchivist Scanner] ERROR - Error connecting to TubeArchivist with URL 'https://tube.mydomain.com', Exception: 'HTTP Error 403: Forbidden'
Originally created by @Wh1t3Rose on GitHub (Dec 13, 2023). Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/32 ### Installation instructions - [X] I'm running the latest version of the TubeArchivist Plex Integration Scanner and Agent. I have read the latest release notes and installation instructions. ### Operating System Unraid 6.12.5 ### Your installation or setup question I am running my domain behind cloudflare. My domain is proxied and is behind a cloudflare tunnel. I can not use DNS only with CF Tunnels. I made sure my API key matches with TubeArchivist and is correct both in the Plex Library Adavnced tab as well as in the ta_config.json file The domain is correct as well. I changed it in the log for security reasons ### Relevant log output ```Shell 2023-12-12 23:00:06,730 [TubeArchivist Scanner] ERROR - Error reading or accessing url '<urllib2.Request instance at 0x15312dcf75f0>', Exception: 'HTTP Error 403: Forbidden' 2023-12-12 23:00:06,730 [TubeArchivist Scanner] ERROR - Error connecting to TubeArchivist with URL 'https://tube.mydomain.com', Exception: 'HTTP Error 403: Forbidden' 2023-12-12 23:00:06,740 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist at https://tube.mydomain.com with provided token from `ta_config.json` file. 2023-12-12 23:00:06,863 [TubeArchivist Scanner] ERROR - Error reading or accessing url '<urllib2.Request instance at 0x15312d6fb190>', Exception: 'HTTP Error 403: Forbidden' 2023-12-12 23:00:06,864 [TubeArchivist Scanner] ERROR - Error connecting to TubeArchivist with URL 'https://tube.mydomain.com', Exception: 'HTTP Error 403: Forbidden' ```
Author
Owner

@Wh1t3Rose commented on GitHub (Dec 13, 2023):

Dug into CF firewall logs and found it is being picked up as a bot and being blocked.

I have to go to bed now but will see if I can whitelist this via IP + UserAgent. It's coming from my IP obviously so should be safe unless I have a different rouge python script on my network lol

image

<!-- gh-comment-id:1853403039 --> @Wh1t3Rose commented on GitHub (Dec 13, 2023): Dug into CF firewall logs and found it is being picked up as a bot and being blocked. I have to go to bed now but will see if I can whitelist this via IP + UserAgent. It's coming from my IP obviously so should be safe unless I have a different rouge python script on my network lol ![image](https://github.com/tubearchivist/tubearchivist-plex/assets/4251482/7cd9c583-ebba-474c-b452-0cc961f94889)
Author
Owner

@Wh1t3Rose commented on GitHub (Dec 13, 2023):

Yep I was right. Was able to solve it quickly. Everything is starting to populate in Plex now. I have over 5K videos so it is gonna take a while to populate into Plex

Here is what my rule looks like in CF Firewall for future people using Cloudflare Proxied domains or CF Tunnels

image

I know other people are gonna have this issue as most people using Cloudflare are using Firewall + Bot Protection so I am gonna leave all this here.

<!-- gh-comment-id:1853414439 --> @Wh1t3Rose commented on GitHub (Dec 13, 2023): Yep I was right. Was able to solve it quickly. Everything is starting to populate in Plex now. I have over 5K videos so it is gonna take a while to populate into Plex Here is what my rule looks like in CF Firewall for future people using Cloudflare Proxied domains or CF Tunnels ![image](https://github.com/tubearchivist/tubearchivist-plex/assets/4251482/67e2c2fc-353b-451e-aeee-a2bd195a6a08) I know other people are gonna have this issue as most people using Cloudflare are using Firewall + Bot Protection so I am gonna leave all this here.
Author
Owner

@Wh1t3Rose commented on GitHub (Dec 13, 2023):

Screenshot_20231213-032543.png

Screenshot_20231213-032647.png

<!-- gh-comment-id:1853493558 --> @Wh1t3Rose commented on GitHub (Dec 13, 2023): ![Screenshot_20231213-032543.png](https://github.com/tubearchivist/tubearchivist-plex/assets/4251482/5b53b70b-ec8c-49d2-9aea-617067a4e7e1) ![Screenshot_20231213-032647.png](https://github.com/tubearchivist/tubearchivist-plex/assets/4251482/cd9a44cb-97f5-447c-b705-04d52a940230)
Author
Owner

@lamusmaser commented on GitHub (Dec 13, 2023):

Thanks for the additional details. I'll close the ticket, but it's a good resource for the future.

<!-- gh-comment-id:1854613814 --> @lamusmaser commented on GitHub (Dec 13, 2023): Thanks for the additional details. I'll close the ticket, but it's a good resource for the future.
Author
Owner

@mylogon341 commented on GitHub (Mar 13, 2025):

Thanks @Wh1t3Rose for this. I've been banging my head against the wall on this one for hours since my config broke after migrating my docker config and changing the TA url to a url rather than IP address - it didn't even cross my mind that Cloudflare would be causing these 403s.

I know it's a bit of a niche issue @lamusmaser, but considering how unhelpful the logs are on this, would it be fair to add this to the troubleshooting section in the readme, or even to add a log output in the script that catches 403 with something like
"HTTP 403: Forbidden. Your instance may be behind a firewall such as Cloudflare"

<!-- gh-comment-id:2721080862 --> @mylogon341 commented on GitHub (Mar 13, 2025): Thanks @Wh1t3Rose for this. I've been banging my head against the wall on this one for hours since my config broke after migrating my docker config and changing the TA url to a url rather than IP address - it didn't even cross my mind that Cloudflare would be causing these 403s. I know it's a bit of a niche issue @lamusmaser, but considering how unhelpful the logs are on this, would it be fair to add this to the troubleshooting section in the readme, or even to add a log output in the script that catches 403 with something like "HTTP 403: Forbidden. Your instance may be behind a firewall such as Cloudflare"
Author
Owner

@lamusmaser commented on GitHub (Mar 13, 2025):

Because 403 can happen for a lot of reasons, and because it isn't recommended to use Cloudflare in relation to media sharing, I don't think adding the noted error to the logs is appropriate.

Can you (@mylogon341 or @Wh1t3Rose ) open a new Issue, referencing this, to add this as an edge case troubleshooting step to the README? Then I can properly plan for it with a future release when I'm updating the README.

<!-- gh-comment-id:2721095819 --> @lamusmaser commented on GitHub (Mar 13, 2025): Because 403 can happen for a lot of reasons, and because it isn't recommended to use Cloudflare in relation to media sharing, I don't think adding the noted error to the logs is appropriate. Can you (@mylogon341 or @Wh1t3Rose ) open a new Issue, referencing this, to add this as an edge case troubleshooting step to the README? Then I can properly plan for it with a future release when I'm updating the README.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tubearchivist/archived-tubearchivist-plex#14
No description provided.