[GH-ISSUE #26] [Installation Help]: Most videos don't show in Plex, Metadata sync errors #9

Closed
opened 2026-03-23 20:32:55 +00:00 by mirror · 39 comments
Owner

Originally created by @micaharies on GitHub (Oct 28, 2023).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/26

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

Ubuntu Server, docker

Your installation or setup question

Hi! I'm having issues getting Plex and TA to play nice. I have around 1500~ videos archived right now, but only 4 channels show up with less than 20 videos for each. The plugin is throwing an error as well. I'm assuming I did something wrong during setup of either TA or this plugin but I haven't been able to track down exactly what is wrong. When I use the docker internal IP for the ta_config.json file and plex library, it throws the 111 error. when I use the reverse proxy URL it 403s. When I use the host IP, it 400s. Maybe a docker network issue?

Any help would be massively appreciated!
Thanks!!

Relevant log output

URLError: <urlopen error [Errno 111] Connection refused>

Error in Python: Running scanner:

Traceback (most recent call last):

  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 314, in Scan

    TA_CONFIG['online'], TA_CONFIG['version'] = test_ta_connection()

  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 222, in test_ta_connection

    raise e



HTTPError: HTTP Error 403: Forbidden

Error in Python: Running scanner:

Traceback (most recent call last):

  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 314, in Scan

    TA_CONFIG['online'], TA_CONFIG['version'] = test_ta_connection()

  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 222, in test_ta_connection

    raise e


HTTPError: HTTP Error 400: Bad Request

Error in Python: Running scanner:

Traceback (most recent call last):

  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 314, in Scan

    TA_CONFIG['online'], TA_CONFIG['version'] = test_ta_connection()

  File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 222, in test_ta_connection

    raise e
Originally created by @micaharies on GitHub (Oct 28, 2023). Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/26 ### 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 Ubuntu Server, docker ### Your installation or setup question Hi! I'm having issues getting Plex and TA to play nice. I have around 1500~ videos archived right now, but only 4 channels show up with less than 20 videos for each. The plugin is throwing an error as well. I'm assuming I did something wrong during setup of either TA or this plugin but I haven't been able to track down exactly what is wrong. When I use the docker internal IP for the ta_config.json file and plex library, it throws the 111 error. when I use the reverse proxy URL it 403s. When I use the host IP, it 400s. Maybe a docker network issue? Any help would be massively appreciated! Thanks!! ### Relevant log output ```Shell URLError: <urlopen error [Errno 111] Connection refused> Error in Python: Running scanner: Traceback (most recent call last): File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 314, in Scan TA_CONFIG['online'], TA_CONFIG['version'] = test_ta_connection() File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 222, in test_ta_connection raise e HTTPError: HTTP Error 403: Forbidden Error in Python: Running scanner: Traceback (most recent call last): File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 314, in Scan TA_CONFIG['online'], TA_CONFIG['version'] = test_ta_connection() File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 222, in test_ta_connection raise e HTTPError: HTTP Error 400: Bad Request Error in Python: Running scanner: Traceback (most recent call last): File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 314, in Scan TA_CONFIG['online'], TA_CONFIG['version'] = test_ta_connection() File "/config/Library/Application Support/Plex Media Server/Scanners/Series/TubeArchivist Series Scanner.py", line 222, in test_ta_connection raise e ```
mirror 2026-03-23 20:32:55 +00:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@lamusmaser commented on GitHub (Nov 9, 2023):

There is currently an issue where the Agent cannot handle IP addresses as part of the request. Beyond this, we would have expected that the reverse proxy should have gone through, so I would ask if you can reach out to that same URL in a browser what kind of response you get.

Docker internal IP would only work if they are on the same Docker network, but also see issue 1, where IP addresses are currently not able to be handled.

<!-- gh-comment-id:1804301307 --> @lamusmaser commented on GitHub (Nov 9, 2023): There is currently an issue where the Agent cannot handle IP addresses as part of the request. Beyond this, we would have expected that the reverse proxy should have gone through, so I would ask if you can reach out to that same URL in a browser what kind of response you get. Docker internal IP would only work if they are on the same Docker network, but also see issue 1, where IP addresses are currently not able to be handled.
Author
Owner

@micaharies commented on GitHub (Nov 9, 2023):

signal-2023-11-09-144155_002
signal-2023-11-09-144155_003
signal-2023-11-09-144155_004
screenshot_204

from what I can tell it still seems to be broken even with the proper URL

<!-- gh-comment-id:1804533500 --> @micaharies commented on GitHub (Nov 9, 2023): ![signal-2023-11-09-144155_002](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/af169127-0d41-46bf-ad5c-d9e88a611ff1) ![signal-2023-11-09-144155_003](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/b9d4af2b-0d82-4897-83e0-150cd993e181) ![signal-2023-11-09-144155_004](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/30b7efe7-183a-4b96-a3d7-e707f1ca955c) ![screenshot_204](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/ad3b132a-53a0-4307-b276-063352ec6ebe) from what I can tell it still seems to be broken even with the proper URL
Author
Owner

@lamusmaser commented on GitHub (Nov 9, 2023):

Looks like the log snippet is not showing the full set. Can you include a more complete log response, at the very least from the "Attempting to connecting to TubeArchivist..." statement forward? I think there are details that are being missed based on that section of code.

Just as a quick check, as well, can you also provide the permissions of the ta_config.json file?

<!-- gh-comment-id:1804684145 --> @lamusmaser commented on GitHub (Nov 9, 2023): Looks like the log snippet is not showing the full set. Can you include a more complete log response, at the very least from the "Attempting to connecting to TubeArchivist..." statement forward? I think there are details that are being missed based on that section of code. Just as a quick check, as well, can you also provide the permissions of the `ta_config.json` file?
Author
Owner

@micaharies commented on GitHub (Nov 9, 2023):

Not seeing the "Attempting to connecting to TubeArchivist..." part in Plex logs at all.
screenshot_205
Perms for the ta_config file are the same as Plex

<!-- gh-comment-id:1804703768 --> @micaharies commented on GitHub (Nov 9, 2023): Not seeing the "Attempting to connecting to TubeArchivist..." part in Plex logs at all. ![screenshot_205](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/06e489e9-9fce-43de-a491-4d3c936070a5) Perms for the ta_config file are the same as Plex
Author
Owner

@lamusmaser commented on GitHub (Nov 9, 2023):

OK, can we review the full logs, then? There is definitely something still missing that isn't allowing me to troubleshoot this fully.

<!-- gh-comment-id:1804706429 --> @lamusmaser commented on GitHub (Nov 9, 2023): OK, can we review the full logs, then? There is definitely something still missing that isn't allowing me to troubleshoot this fully.
Author
Owner

@micaharies commented on GitHub (Nov 9, 2023):

this is what shows after a reboot and scanning the folder
screenshot_206

<!-- gh-comment-id:1804711001 --> @micaharies commented on GitHub (Nov 9, 2023): this is what shows after a reboot and scanning the folder ![screenshot_206](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/431b41fa-45fa-4da9-b860-a5eed104f93b)
Author
Owner

@lamusmaser commented on GitHub (Nov 9, 2023):

Gotcha. Can we get the logs from /config/Library/Application Support/Plex Media Server/Logs/TubeArchivist Scanner/_root_.scanner.log from within the container? This should be the location of the Scanner's logs based on the details presented.

<!-- gh-comment-id:1804715471 --> @lamusmaser commented on GitHub (Nov 9, 2023): Gotcha. Can we get the logs from `/config/Library/Application Support/Plex Media Server/Logs/TubeArchivist Scanner/_root_.scanner.log` from within the container? This should be the location of the Scanner's logs based on the details presented.
Author
Owner

@micaharies commented on GitHub (Nov 9, 2023):

screenshot_207
just repeats those few lines over and over

<!-- gh-comment-id:1804718642 --> @micaharies commented on GitHub (Nov 9, 2023): ![screenshot_207](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/893b06d0-75e8-493f-a67b-b0d5276b855b) just repeats those few lines over and over
Author
Owner

@lamusmaser commented on GitHub (Nov 9, 2023):

Just running through that section again manually, it does look like it instantiates the Request object, which is then passed on to the read_url function, and that should be able to make the request using the header that supplies the Authorization Token. So, what we need to determine is why it is running differently for you and passing back a Forbidden response. Additionally, I need to look into why it isn't handling that response.

Based on the earlier images, it looks like the API key is expected to be the same between the two, but please just validate that all of the characters are the same, again.

Next steps would be attempting to make the same connection attempt from within the Plex container and see if it is getting stuck from there.

If you want to try that, I would attempt to make a curl request from the Plex container to the reverse proxy URL you are trying to reach. Let me know if you need help formatting a full request.

<!-- gh-comment-id:1804771905 --> @lamusmaser commented on GitHub (Nov 9, 2023): Just running through that section again manually, it does look like it instantiates the Request object, which is then passed on to the `read_url` function, and that should be able to make the request using the header that supplies the Authorization Token. So, what we need to determine is why it is running differently for you and passing back a Forbidden response. Additionally, I need to look into why it isn't handling that response. Based on the earlier images, it looks like the API key is expected to be the same between the two, but please just validate that all of the characters are the same, again. Next steps would be attempting to make the same connection attempt from within the Plex container and see if it is getting stuck from there. If you want to try that, I would attempt to make a curl request from the Plex container to the reverse proxy URL you are trying to reach. Let me know if you need help formatting a full request.
Author
Owner

@micaharies commented on GitHub (Nov 9, 2023):

I just double checked that those are the correct API keys and they are. I probably do need help with the curl request, honestly not super familiar with all that

<!-- gh-comment-id:1804853776 --> @micaharies commented on GitHub (Nov 9, 2023): I just double checked that those are the correct API keys and they are. I probably do need help with the curl request, honestly not super familiar with all that
Author
Owner

@lamusmaser commented on GitHub (Nov 10, 2023):

You can utilize it following the following format:
curl -L -H "Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXX" https://subdomain.example.com/api/ping

Let's just walk through each of these flags, more details found here.
-L is for Location, which follows a redirection. Many reverse proxies enforce a redirection of some kind. This follows their recommendation for where to go with that request.
-H is for Headers, which allows custom headers to be included. We are only providing the Authorization header, along with the token. You only need to replace the XXXXXXXXXXXXXXXXXXXXXXXXXXX section with your API key.
Finally, the end is the full URL that you are pointing to. We are, as you know from your request earlier, pointing to the /api/ping endpoint.

This should allow it to request the JSON response. If curl does not exist on the Plex container, let me know and I'll get a copy of the container to determine next steps.

<!-- gh-comment-id:1804916603 --> @lamusmaser commented on GitHub (Nov 10, 2023): You can utilize it following the following format: ```curl -L -H "Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXX" https://subdomain.example.com/api/ping``` Let's just walk through each of these flags, more details found [here](https://linux.die.net/man/1/curl). `-L` is for `Location`, which follows a redirection. Many reverse proxies enforce a redirection of some kind. This follows their recommendation for where to go with that request. `-H` is for `Headers`, which allows custom headers to be included. We are only providing the `Authorization` header, along with the token. You only need to replace the `XXXXXXXXXXXXXXXXXXXXXXXXXXX` section with your API key. Finally, the end is the full URL that you are pointing to. We are, as you know from your request earlier, pointing to the `/api/ping` endpoint. This should allow it to request the JSON response. If curl does not exist on the Plex container, let me know and I'll get a copy of the container to determine next steps.
Author
Owner

@micaharies commented on GitHub (Nov 10, 2023):

screenshot_385
thanks for the explanation! this is what it returned with

<!-- gh-comment-id:1804932965 --> @micaharies commented on GitHub (Nov 10, 2023): ![screenshot_385](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/691f7026-0f92-4b48-9d5d-f55aca2282f5) thanks for the explanation! this is what it returned with
Author
Owner

@lamusmaser commented on GitHub (Nov 10, 2023):

In terms of what we were expecting, that's great! It means that the connection is working as expected and the Plex container can reach out to the TubeArchivist endpoint successfully. What it also means is that there is some other reason why it is getting a 403 error, and I'm not sure why that is occurring, but it could be several things. Let me look into it more and I'll get back to you about what we can do for a next step.

In the meantime, could you follow these instructions and let's rule out an issue from the Plex Token? I might need to add those instructions back in if this does work:

Setup the X-Plex-Token file. This should be a file in the Plex Media Server directory, so the file would be /config/Library/Application Support/Plex Media Server/X-Plex-Token for your configuration.

<!-- gh-comment-id:1804950142 --> @lamusmaser commented on GitHub (Nov 10, 2023): In terms of what we were expecting, that's great! It means that the connection is working as expected and the Plex container can reach out to the TubeArchivist endpoint successfully. What it also means is that there is some other reason why it is getting a 403 error, and I'm not sure why that is occurring, but it could be several things. Let me look into it more and I'll get back to you about what we can do for a next step. In the meantime, could you follow these instructions and let's rule out an issue from the Plex Token? I might need to add those instructions back in if this does work: Setup the [`X-Plex-Token` file](https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token). This should be a file in the `Plex Media Server` directory, so the file would be `/config/Library/Application Support/Plex Media Server/X-Plex-Token` for your configuration.
Author
Owner

@micaharies commented on GitHub (Nov 10, 2023):

I am aware of how to find the token with the XML file but I don't see a file anywhere in that folder. Is it just supposed to be a text file with the token or something like that?

<!-- gh-comment-id:1804958978 --> @micaharies commented on GitHub (Nov 10, 2023): I am aware of how to find the token with the XML file but I don't see a file anywhere in that folder. Is it just supposed to be a text file with the token or something like that?
Author
Owner

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

You have to create the file if it doesn't exist.

Let me know if generating that and restarting Plex starts working. If not, I'll finish my code review and figure out what else might be potentially causing this issue.

<!-- gh-comment-id:1809204900 --> @lamusmaser commented on GitHub (Nov 13, 2023): You have to create the file if it doesn't exist. Let me know if generating that and restarting Plex starts working. If not, I'll finish my code review and figure out what else might be potentially causing this issue.
Author
Owner

@micaharies commented on GitHub (Nov 13, 2023):

screenshot_389

sorry, is this supposed to be a text file with the X-Plex-Token in it? There is no file in the directory. How do I generate this? That Plex article didnt really say anything about generating a file.

<!-- gh-comment-id:1809266389 --> @micaharies commented on GitHub (Nov 13, 2023): ![screenshot_389](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/ac14828e-1cf6-4824-813b-32c61faf4b97) sorry, is this supposed to be a text file with the X-Plex-Token in it? There is no file in the directory. How do I generate this? That Plex article didnt really say anything about generating a file.
Author
Owner

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

Correct. So, the easiest way would be to create the file and add the token inside.

Something like:

vi X-Plex-Token
<i>
<paste>
<esc>
<:wq!>

In order, that would open the file in the text editor, vi, then sends it to Insert Mode. Paste in the token value by itself, no changes, then hit the escape key to exit Insert Mode. Finally, the last set of characters will save and exit vi. I can provide instructions for other Linux text editors if you feel more comfortable in another one or vi is not available on your system.

<!-- gh-comment-id:1809270212 --> @lamusmaser commented on GitHub (Nov 13, 2023): Correct. So, the easiest way would be to create the file and add the token inside. Something like: ``` vi X-Plex-Token <i> <paste> <esc> <:wq!> ``` In order, that would open the file in the text editor, `vi`, then sends it to `Insert Mode`. Paste in the token value by itself, no changes, then hit the `escape` key to exit `Insert Mode`. Finally, the last set of characters will save and exit `vi`. I can provide instructions for other Linux text editors if you feel more comfortable in another one or `vi` is not available on your system.
Author
Owner

@micaharies commented on GitHub (Nov 13, 2023):

screenshot_391
went ahead and generated that and restarted the container and I'm still getting this error in the scanner logs

<!-- gh-comment-id:1809276880 --> @micaharies commented on GitHub (Nov 13, 2023): ![screenshot_391](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/5f449c9d-7ce8-4b67-9f10-e45756bb2a0a) went ahead and generated that and restarted the container and I'm still getting this error in the scanner logs
Author
Owner

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

OK, thank you for testing that. Just wanted to see if that was causing it.

I'll draft up a next step for troubleshooting, which will probably be Python-based, to see what is causing it. Give me some time - I'm focused on another task at the moment and I will probably run out of time today to get to drafting that here.

<!-- gh-comment-id:1809278962 --> @lamusmaser commented on GitHub (Nov 13, 2023): OK, thank you for testing that. Just wanted to see if that was causing it. I'll draft up a next step for troubleshooting, which will probably be Python-based, to see what is causing it. Give me some time - I'm focused on another task at the moment and I will probably run out of time today to get to drafting that here.
Author
Owner

@micaharies commented on GitHub (Nov 13, 2023):

No worries, thank you so much!! I really appreciate the help so far

<!-- gh-comment-id:1809279930 --> @micaharies commented on GitHub (Nov 13, 2023): No worries, thank you so much!! I really appreciate the help so far
Author
Owner

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

Alright, on the system that is hosting Plex, start a python2.7 console. Running python2 should get you into the IDE (confirm it is running the Python 2 version in the preamble). Once there, run through the following steps, one line at a time. I will only need the response at the end and any associated errors. I went through these exact steps on my Plex hosting system, so they should be similar.

import json, ssl
from urllib2 import urlopen, Request
from ssl import PROTOCOL_SSLv23 as SSL_PROTOCOL

SSL_CONTEXT       = ssl.SSLContext(SSL_PROTOCOL)

TA_CONFIG = {}
TA_CONFIG['ta_url'] = "<InsertHere>"
TA_CONFIG['ta_api_key'] = "<InsertHere>"

request_url = Request("{}/api/ping".format(TA_CONFIG['ta_url']), headers={"Authorization": "Token {}".format(TA_CONFIG['ta_api_key'])})
url_content = urlopen(request_url,context=SSL_CONTEXT).read()
response = json.loads(url_content)
print(response)

I would expect it to be similar to mine:

>>> print(response)
{u'version': [0, 4, 2], u'response': u'pong', u'user': 1}
<!-- gh-comment-id:1809311149 --> @lamusmaser commented on GitHub (Nov 13, 2023): Alright, on the system that is hosting Plex, start a python2.7 console. Running `python2` should get you into the IDE (confirm it is running the Python 2 version in the preamble). Once there, run through the following steps, **one line at a time**. I will only need the response at the end and any associated errors. I went through these exact steps on my Plex hosting system, so they should be similar. ``` import json, ssl from urllib2 import urlopen, Request from ssl import PROTOCOL_SSLv23 as SSL_PROTOCOL SSL_CONTEXT = ssl.SSLContext(SSL_PROTOCOL) TA_CONFIG = {} TA_CONFIG['ta_url'] = "<InsertHere>" TA_CONFIG['ta_api_key'] = "<InsertHere>" request_url = Request("{}/api/ping".format(TA_CONFIG['ta_url']), headers={"Authorization": "Token {}".format(TA_CONFIG['ta_api_key'])}) url_content = urlopen(request_url,context=SSL_CONTEXT).read() response = json.loads(url_content) print(response) ``` I would expect it to be similar to mine: ``` >>> print(response) {u'version': [0, 4, 2], u'response': u'pong', u'user': 1} ```
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

screenshot_392
I keep getting this when I run the url_content part, is it supposed to include the https part of the URL?

<!-- gh-comment-id:1809355562 --> @micaharies commented on GitHub (Nov 14, 2023): ![screenshot_392](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/9a69e54f-6489-40d2-b0f0-2a5b495cd967) I keep getting this when I run the `url_content` part, is it supposed to include the https part of the URL?
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

Ah, yes, I should have specified. Try it again as https://tube.mhaire.net.

<!-- gh-comment-id:1809395048 --> @lamusmaser commented on GitHub (Nov 14, 2023): Ah, yes, I should have specified. Try it again as `https://tube.mhaire.net`.
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

screenshot_395
still seems to be doing it

<!-- gh-comment-id:1809397876 --> @micaharies commented on GitHub (Nov 14, 2023): ![screenshot_395](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/6b9327fb-c571-45a5-8a32-b9a0864347a6) still seems to be doing it
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

Oh, I see it. Remove the < and > around the URL. That will help it out.

<!-- gh-comment-id:1809399661 --> @lamusmaser commented on GitHub (Nov 14, 2023): Oh, I see it. Remove the `<` and `>` around the URL. That will help it out.
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

screenshot_398
sorry about that, this is where I'm at now

<!-- gh-comment-id:1809427503 --> @micaharies commented on GitHub (Nov 14, 2023): ![screenshot_398](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/5b412ac2-9324-49cd-b8bf-c27a4da88380) sorry about that, this is where I'm at now
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

The only time that I am getting the Error 403 on my side is when I remove the headers, so that tells me that the issue probably stemming from the header section. There is only one thing in the header, so can you provide the screenshot that includes:

  • Setting the TA_CONFIG['ta_api_key'], showing the first three characters and last three characters of the key (you can blur the rest, just want to make sure there isn't something extraneous).
  • Setting the request_url with the full line (contains no details, just string-format replacements for earlier variables).
  • Attempting the url_content request via urlopen.
  • Any errors that occur, in full, after that.

If an error does occur, provide the following, as well:

  • request_url.get_host()
  • request_url.get_method()
  • request_url.get_type()
  • request_url.header_items() [showing the first three characters and last three characters of the key (you can blur the rest, just want to make sure there isn't something extraneous)]
<!-- gh-comment-id:1810595722 --> @lamusmaser commented on GitHub (Nov 14, 2023): The only time that I am getting the Error 403 on my side is when I remove the headers, so that tells me that the issue probably stemming from the header section. There is only one thing in the header, so can you provide the screenshot that includes: - Setting the `TA_CONFIG['ta_api_key']`, showing the first three characters and last three characters of the key (you can blur the rest, just want to make sure there isn't something extraneous). - Setting the `request_url` with the full line (contains no details, just string-format replacements for earlier variables). - Attempting the `url_content` request via `urlopen`. - Any errors that occur, in full, after that. If an error does occur, provide the following, as well: - `request_url.get_host()` - `request_url.get_method()` - `request_url.get_type()` - `request_url.header_items()` [showing the first three characters and last three characters of the key (you can blur the rest, just want to make sure there isn't something extraneous)]
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

screenshot_208
This is what I got, same error I believe

<!-- gh-comment-id:1811135358 --> @micaharies commented on GitHub (Nov 14, 2023): ![screenshot_208](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/33c5b0b2-7249-4ea2-b0ed-c61eacff994d) This is what I got, same error I believe
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

Which reverse proxy do you have in front of this? I am able to fully replicate those steps and it comes back with a 200 Response, so it would either have to be the application rejecting it (which we can verify from the TubeArchivist logs) or the proxy rejecting it or some aspect of the response (in which I need more details to understand which details I need to look for).

<!-- gh-comment-id:1811246226 --> @lamusmaser commented on GitHub (Nov 14, 2023): Which reverse proxy do you have in front of this? I am able to fully replicate those steps and it comes back with a 200 Response, so it would either have to be the application rejecting it (which we can verify from the TubeArchivist logs) or the proxy rejecting it or some aspect of the response (in which I need more details to understand which details I need to look for).
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

I'm using Apache, would there be logs somewhere I could check to see if that's the problem?

<!-- gh-comment-id:1811249409 --> @micaharies commented on GitHub (Nov 14, 2023): I'm using Apache, would there be logs somewhere I could check to see if that's the problem?
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

There might be some in the Apache logs, but results for mod_proxy are limited when discussing logs. By default, it seems they would be in either /var/log/apache2 or /var/log/httpd. Alternatively, do you have Order operator? If so, do you have it set to Order allow, deny or Order deny, allow? Additionally, do you have an Allow operator, and is the Plex host configured to be allowed access?

<!-- gh-comment-id:1811258113 --> @lamusmaser commented on GitHub (Nov 14, 2023): There might be some in the Apache logs, but results for `mod_proxy` are limited when discussing logs. By default, it seems they would be in either `/var/log/apache2` or `/var/log/httpd`. Alternatively, do you have `Order` operator? If so, do you have it set to `Order allow, deny` or `Order deny, allow`? Additionally, do you have an `Allow` operator, and is the Plex host configured to be allowed access?
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

Looking through logs in the /var/log/apache2 folder there doesn't seem to be anything. I checked the error.log, error.log.1, and access.log there wasn't anything regarding the TA proxy. The httpd folder doesn't seem to exist at all. I don't have the Order operator used afaik, that was never anything I personally setup

<!-- gh-comment-id:1811291519 --> @micaharies commented on GitHub (Nov 14, 2023): Looking through logs in the `/var/log/apache2` folder there doesn't seem to be anything. I checked the `error.log`, `error.log.1`, and `access.log` there wasn't anything regarding the TA proxy. The httpd folder doesn't seem to exist at all. I don't have the Order operator used afaik, that was never anything I personally setup
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

Can I review the configuration that you have for the TA proxy?

<!-- gh-comment-id:1811353785 --> @lamusmaser commented on GitHub (Nov 14, 2023): Can I review the configuration that you have for the TA proxy?
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

screenshot_209
this is what i've got, basically everything I use that's reverse proxied is effectively the same thing with ports and URL changed

<!-- gh-comment-id:1811359716 --> @micaharies commented on GitHub (Nov 14, 2023): ![screenshot_209](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/6c51fba7-fa86-4c5b-a424-c8105a186fd4) this is what i've got, basically everything I use that's reverse proxied is effectively the same thing with ports and URL changed
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

This does look like it is a good configuration that shouldn't be overzealous. Do you have a mod_security module that is in use somewhere? That's the only thing that I can see.

Beyond this, I would say that we should do some testing from the TA side and see if that is where the 403 is being thrown from.

<!-- gh-comment-id:1811368752 --> @lamusmaser commented on GitHub (Nov 14, 2023): This does look like it is a good configuration that shouldn't be overzealous. Do you have a `mod_security` module that is in use somewhere? That's the only thing that I can see. Beyond this, I would say that we should do some testing from the TA side and see if that is where the 403 is being thrown from.
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

screenshot_210
I don't have mod security, though now that I think about it I do run everything proxied behind CloudFlare. Any chance that would be an issue?

<!-- gh-comment-id:1811373363 --> @micaharies commented on GitHub (Nov 14, 2023): ![screenshot_210](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/f30f81c0-9e2a-40a2-87d4-ad9d94bd6a12) I don't have mod security, though now that I think about it I do run everything proxied behind CloudFlare. Any chance that would be an issue?
Author
Owner

@lamusmaser commented on GitHub (Nov 14, 2023):

Oh, that could be it. Does CloudFlare have any restrictions on hosts that can access the site?

<!-- gh-comment-id:1811376289 --> @lamusmaser commented on GitHub (Nov 14, 2023): Oh, that could be it. Does CloudFlare have any restrictions on hosts that can access the site?
Author
Owner

@micaharies commented on GitHub (Nov 14, 2023):

I don't believe so? Honestly I haven't had a problem like this before, even with 40+ docker containers currently installed with tons of internet facing websites and systems. I can turn proxy off and try again and see what happens

<!-- gh-comment-id:1811379049 --> @micaharies commented on GitHub (Nov 14, 2023): I don't believe so? Honestly I haven't had a problem like this before, even with 40+ docker containers currently installed with tons of internet facing websites and systems. I can turn proxy off and try again and see what happens
Author
Owner

@micaharies commented on GitHub (Nov 15, 2023):

image
I opened Plex this morning and it appears it's working! I guess the CloudFlare proxy did break it. Never would've guessed that was the problem. Thank you so much for your help, it's super appreciated!!

<!-- gh-comment-id:1812536656 --> @micaharies commented on GitHub (Nov 15, 2023): ![image](https://github.com/tubearchivist/tubearchivist-plex/assets/77802123/d5022aa4-501f-4e0d-af7e-4ac93931e2aa) I opened Plex this morning and it appears it's working! I guess the CloudFlare proxy did break it. Never would've guessed that was the problem. Thank you so much for your help, it's super appreciated!!
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#9
No description provided.