Getting HTTP 401 error during server setting up

Server Version#: plexmediaserver_1.18.2.2041-3d469cb32_amd64
Player Version#:

Getting HTTP 401 error during server setting up.

http://127.0.0.1:32400/media/providers?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=XYZMASKED&X-Plex-Platform=Chrome&X-Plex-Platform-Version=78.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=OSX&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1629x506%2C1680x1050&X-Plex-Language=en

I am also seeing this issue recently. Not a new server though.
Version 1.18.2.2058

I wonder if it has to do with the work going on to implement the changes for TVDB v3

@ChuckPa Any chance you can take a quick look?

It appears that we are getting it where hits to http://:32400/media come back as 401 Unauthorized. If I add my IP as allowed without auth on my server it will then load the page without issue.

Before you ask. Yes I am logged in and this issue happens across multiple devices and browsers.

Here are some relevant log entries from when I access just : and allow redirection to /web/index.

If you want a full log I can provide it.

Nov 27, 2019 21:25:32.966 [0x147931d8a700] Debug — Completed: [10.15.0.114:57619] 401 GET / (33 live) TLS GZIP 0ms 435 bytes
Nov 27, 2019 21:25:34.179 [0x147931d8a700] Debug — Completed: [10.15.0.114:57643] 401 GET /media/providers (32 live) TLS GZIP 0ms 357 bytes
Nov 27, 2019 21:25:34.181 [0x147931b89700] Debug — Completed: [10.15.0.114:57645] 401 GET / (32 live) TLS GZIP 0ms 435 bytes

I will need a full logs. All the above shows me is 3 GET statements failed.
I don’t see the requests nor other traffic preceding it.

Here you are.

I caused the 401 Error at 16:58 on 2019-11-28 so you can find it easily. I intentionally used the IP address of the server rather than my reverse proxy in order to take that out of the equation.

MODERATOR EDIT: Log files retrieved; posted has been deleted

Please let me know once you’ve grabbed the file

Thank you for the logs.

Getting a 401 during a Docker setup is not unusual. (I wish you had stated it was docker upfront as it makes a difference).

To cover all bases, I will presume you don’t have the server signed in / linked to your account yet? If that’s the case, then the 401 on GET /media , isn’t surprising even if it might seem intermittent.

Presuming attaching to account not yet complete, did you connect it using the Plex Claim Token as described here in the GitHub info?

Sorry about not mentioning docker. Also of note, I do not have remote access enabled. The container is setup with a dedicated IP separate from the unRAID host.

My server has been signed in for over a year now working without issue.

I just tried signing out, setting a new claim token and rebooting. The server claims successfully but still gets the 401 error on /media.

The 401 error on /media is consistent. I can never get to /media unless I exempt my IP from authentication.
/media gets hit every time the redirect to /web/index happens and you see the 401 error flash for a moment before the plex logo. It also happens every time without fail if you manually go to /media.

I just checked another (older) server I have at a family members place and it also exhibits the 401 error on /media. The setup is nearly identical to my main server but is about 3 years old.

Also worth noting. This doesn’t affect the usability of the server. Everything seems to work fine.

Unfortunately, I know nothing of unraid and how they are setup.

I am redoing my infrastructure here and Unraid is on my list to configure in a VM enviornment

Unraid should be irrelevant here.

The requests are getting to the Plex media server and the server is responding with a 401 error. As I mentioned, if I whitelist my IP on the Plex Server Network Page it will make the 401 error go away.

To me it seems as though the Plex server is unaware that I am logged in as a trusted user. When I am not logged in it seems like the /media page is failing to redirect me to the login page.

can you pull the logs so we can see what PMS is seeing?

I presume there is a shell back door ?

You lost me on what you mean. Log from where?

In the container, where PMS is running, which I presume is mapped to a real disk, accessible from the native (host) OS layer, Plex will have an entire directory structure.

In that structure (usually starts with /config in docker), there is a Logs directory.

I would like to see a tar.gz or ZIP of that directory, if possible.

Oh okay. I figured that was already what I provided.

I think I can safely say that this issue is not related to my config or the docker server.

I just spun up a test server on my Windows desktop and claimed it.

I then go to http://127.0.0.1:32400/media and I get a 401 error. same on localhost. I tried adding both the loopback IP and localhost to the allowed without auth and it does not work.

I try my internal IP and get a 401. I add my internal IP to the allowed without auth list and lo and behold /media loads.

Here are some logs from that test.

The correct user-facing url is 127.0.0.1/web
/media is internal and requires additional parameters.

I understand that /media is internal and requires additional parameters. When I access simply 127.0.0.1:32400 and it redirects to https://127.0.0.1:32400/web/intex.html it also throws out 401 errors in the console relating to /media.

GET http://127.0.0.1:32400/media/providers?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=glj5e4piw6sarda186u6um7s&X-Plex-Platform=Chrome&X-Plex-Platform-Version=78.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=Windows&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1677x1358%2C5120x1440&X-Plex-Language=en 401 (Unauthorized)
GET http://127.0.0.1:32400/?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=glj5e4piw6sarda186u6um7s&X-Plex-Platform=Chrome&X-Plex-Platform-Version=78.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=Windows&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1677x1358%2C5120x1440&X-Plex-Language=en 401 (Unauthorized)

There is some form of an problem here.
Why is /media Unauthorized while logged in?
Why does it work when I enable my IP to access without auth?
Why is plex hitting /media when it redirects to /web?
Why is a completely stock install of a plex server giving 401 errors?

Maybe another team member or employee will know why this is happening. I am sure its not intended to throw out a 401 error every time you load the web UI. @BigWheel Any input?

@ChuckPa Took this to a PM and continued to insist that the issue is with my config by scrutinizing every part of it but ignoring that I replicated the issue on a brand new Windows server. Chuck ended the conversation with the following quote.

Plex requires constant connection. period. so you can let go of that argument.

On the windows server I installed to confirm this issue is cross platform I went as far as to expose port 32400 and got it fully accessible outside my network using the official means. This test server is configured completely stock and exhibits a 401 error on /media. As before if I add the clients IP to the List of IP addresses and networks that are allowed without auth field then all the 401 errors go away.

The main issue is why does plex try accessing the following two URLs before I am even logged in? If I am not yet logged in and these URLs need auth/token. Why is Plex trying to call them?

http://10.15.0.114:32400/media/providers?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=k7eyy6a0m5iykaulga7q8mum&X-Plex-Platform=Chrome&X-Plex-Platform-Version=78.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=Windows&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1675x1351%2C5120x1440&X-Plex-Language=en
http://10.15.0.114:32400/?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=k7eyy6a0m5iykaulga7q8mum&X-Plex-Platform=Chrome&X-Plex-Platform-Version=78.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=Windows&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1675x1351%2C5120x1440&X-Plex-Language=en

Chuck Mentioned @OttoKerner may be able to help. Please reach out because I would like to see if you can replicate the issue and send it off to the devs be addressed

So is nobody from Plex even going to acknowledge that Plex throws up errors on a stock install?
It’s not hard to replicate. Just open the F12 console in chrome and load the Plex server hosted webUI.

Wish I could re-tag this to include server-windows and plex-web…

1 Like

It’s exhausting. I have the same problem and there is no solution since a long time (or it happens periodically). There is no SERVER tab on settings, so I cannot whitelist anything. I may access the server page on 32400 port but I cannot see the server to claim it (401 error on debug). As far as I understand, there is no solution from this point. The Plex team doesn’t look willing to provide a solution an not even to receive those requests, but directing us to the “support & forum” where there’s no solution but a long list of complains.

I’m having this same issue, it was working perfectly inside of a docker container, and recently even though I am navigating directly to my plex media server I get 401s on media even after logging in

1 Like