Plex Media server not authorized after wake from sleep

I’ve got my media library & Plex media server running on a machine that I usually sleep to reduce cost/noise when not in use.

When I wake the machine from sleep, no apps can access the media server (such as from my smart TV), and even opening the browser locally on the machine says it’s “not authorized”. But if I then restart the server app, it immediately works

How can I resolve this? I’ve dug through all the settings and can’t see anything that would explain this behaviour.

1 Like

Have you given your server machine a static IP address on your LAN? If the IP changes when the machine wakes, Plex is still using the old IP so nothing can connect. Restarting PMS causes it to check for the new IP.

I’m not sure. I haven’t switched or messed around with any router settings so it’s odd to me that this would randomly start happening after using Plex for 10 years without ever having this problem.

Also, I should have clarified. This doesn’t happen every single time I wake my machine. Plex still works most times after my computer wakes. I’m just not sure why it keeps happening at random.

The next time I get the “not authorized” message, I’ll see if my IP changed. Thanks for the reply.

There could be other reasons but you’d have to do some diagnostics to look around. The IP thing is just 1 possibility and something that can be easily checked.

Got the “not authorized” message again just now and my IP address is the same as when the Plex server was working, so I think I can rule out the IP address changing.

I’ve noticed a small handful of others are experiencing this issue too. Is this on Plex’s radar?

You’re going to need to provide some logs so we can look into this.

Thanks for taking a look. Sorry for the delay, I had to wait until I got the “not authorized” message again. See attached for my Plex log.

Plex Log.zip (3.2 MB)

When did it sleep and when did it wake up?

I’m pretty sure I retrieved these logs when I first tried to access Plex after opening my laptop, which may have been a little while after I actually woke up my laptop.

I actually opened my laptop and discovered my sever wasn’t working when I went to use the Prism app on my iPhone. When I checked the web app shortly thereafter, I received the “not authorized” message.

Ok. I see where you are getting 401 errors (not authorized).

Looks to me like your network connection is dropped whenever it goes to sleep. This causes a delay when waking up to renegotiate the connection. Unfortunately, PMS is faster then that so it thinks there is no internet at the time and can’t authenticate your user. A few things you can try:

  • Check your network card settings and see if you can keep that on when the laptop is asleep. It will use a little more power, but should make things more stable.

  • Looks like you are accessing Plex Web via the local IP address. Try using 127.0.0.1 instead.

Thank you. I’ll try both of these things and see if it stops happening.

I got the “not authorized” message when trying to access Plex using 127.0.0.1. I know it wasn’t a sleep/wake issue because I was using my computer for 30 minutes beforehand.

Do you have any other ideas as to what could be causing this to happen over and over?

Thanks!

Can you get me new server logs and let me know what time you got the message?

Hi. See attached. I got the message shortly before my last post. So around June 20th at like 12:15 am CDT-ish?

Thanks!

Plex Media Server Logs_2022-06-21_12-58-42.zip (3.2 MB)

For what it’s worth, my library is “not authorized” right now but I am listening to songs on my iPhone using Plexamp. I’m on the same wifi network as my plex server. Strange…

I have this exact same issue but happening in the Windows version. I’m cross-posting this on Reddit if anyone find a solution for this. I already tried all the workarounds on this thread, except for the one saying to keep the network card is on, I already wake this system from LAN access.

2 Likes

Also having this issue - I upgraded to Windows 11 about 7 months ago - this started happening intermittently maybe 3 months ago. When the error occurs, no devices can connect to PMS, whether local or remote - all show as “unauthorized.”

I hate that so many of us are experiencing this, but I hope that means it’s a widely known problem and Plex can fix it in a future update.

Good day all. I also have this issue. My server goes to sleep after an hour of no use. I use wake on lan to wake up the server to use plex. Not authorized and need to reboot the sever to works again, assuming a new token needs generated. Seems to me our tokens expire randomly after the server goes offline

Is this something users can manually fix, or does Plex need to fix it in an update?