Plex Media server can't find itself on web client

Server Version#: Version 1.16.1.1291
Player Version#: Web client Version 3.95.2

I have an Ubuntu 18.04.2 LTS system running Plex Media Server.

Quite frequently - once a week or so - I will find that plex player clients can’t connect to the server.

If I access the server on :32400 then the web client is there and works but also cannot connect to the local plex media server.

I stop and start the plexmediaserver service and the problem is solved.

I found it in this broken state and grabbed the logs in the hope that someone can assist to find the cause. I’ll upload them on request but they are in debug mode per a previous request.

Judging by this I seem to be getting many crashes (though I don’t know if its related):

root@plex-server:/tmp/Plex Media Server/Logs# ls -l Plex\ Crash\ Uploader.*
-rw-r–r-- 1 plex plex 796 Jul 2 17:07 ‘Plex Crash Uploader.10.log’
-rw-r–r-- 1 plex plex 3699 Jul 1 02:14 ‘Plex Crash Uploader.11.log’
-rw-r–r-- 1 plex plex 2825 Jun 30 02:14 ‘Plex Crash Uploader.12.log’
-rw-r–r-- 1 plex plex 4463 Jun 27 20:14 ‘Plex Crash Uploader.13.log’
-rw-r–r-- 1 plex plex 3611 Jun 22 02:04 ‘Plex Crash Uploader.14.log’
-rw-r–r-- 1 plex plex 358 Jun 18 16:28 ‘Plex Crash Uploader.15.log’
-rw-r–r-- 1 plex plex 1481 Jun 18 02:05 ‘Plex Crash Uploader.16.log’
-rw-r–r-- 1 plex plex 1077 Jun 17 02:15 ‘Plex Crash Uploader.17.log’
-rw-r–r-- 1 plex plex 2333 Jun 16 02:05 ‘Plex Crash Uploader.18.log’
-rw-r–r-- 1 plex plex 7599 Jun 14 02:11 ‘Plex Crash Uploader.19.log’
-rw-r–r-- 1 plex plex 3612 Jul 17 02:06 ‘Plex Crash Uploader.1.log’
-rw-r–r-- 1 plex plex 2825 Jun 11 02:15 ‘Plex Crash Uploader.20.log’
-rw-r–r-- 1 plex plex 1078 Jul 14 02:21 ‘Plex Crash Uploader.2.log’
-rw-r–r-- 1 plex plex 3612 Jul 13 02:05 ‘Plex Crash Uploader.3.log’
-rw-r–r-- 1 plex plex 2760 Jul 9 23:08 ‘Plex Crash Uploader.4.log’
-rw-r–r-- 1 plex plex 2826 Jul 9 02:13 ‘Plex Crash Uploader.5.log’
-rw-r–r-- 1 plex plex 359 Jul 6 09:12 ‘Plex Crash Uploader.6.log’
-rw-r–r-- 1 plex plex 4038 Jul 6 02:04 ‘Plex Crash Uploader.7.log’
-rw-r–r-- 1 plex plex 3700 Jul 5 02:15 ‘Plex Crash Uploader.8.log’
-rw-r–r-- 1 plex plex 2826 Jul 4 02:14 ‘Plex Crash Uploader.9.log’
-rw-r–r-- 1 plex plex 1078 Jul 18 02:18 ‘Plex Crash Uploader.log’

Here’s the contents of one of those (the latest):

Jul 18, 2019 02:18:37.741 [0x7f2b83a38700] INFO - Crash Uploader - Platform: Linux ServerUUID: 493d8c257df9b5fc0227a49d5961f9a78c87f16d UserId: xxxxx Version: 1.16.1.1291-158e5b199
Jul 18, 2019 02:18:37.741 [0x7f2b89662740] DEBUG - HTTP requesting POST https://sentry.io/api/1233455/minidump?sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jul 18, 2019 02:18:39.864 [0x7f2b89662740] DEBUG - HTTP 429 response from POST https://sentry.io/api/1233455/minidump?sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jul 18, 2019 02:18:39.865 [0x7f2b89662740] ERROR - Failed to upload crashdump 38973a44-0f84-6e35-6953c8f0-02e40214: 429
Jul 18, 2019 02:18:39.865 [0x7f2b89662740] DEBUG - HTTP requesting POST https://sentry.io/api/1233455/minidump?sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jul 18, 2019 02:18:41.865 [0x7f2b89662740] DEBUG - HTTP 429 response from POST https://sentry.io/api/1233455/minidump?sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jul 18, 2019 02:18:41.866 [0x7f2b89662740] ERROR - Failed to upload crashdump 6720b9fa-d3a4-aa91-093326bf-31c533d7: 429

It appears to be the Plex Media Scanner than is crashing with a SIGABORT:

Jul 18, 2019 02:18:38.455 [0x7f8b03e91700] DEBUG - Jobs: ‘/usr/lib/plexmediaserver/Plex Media Scanner’ exit code for process 22094 is -6 (signal: Aborted)

My Plex Media Scanner logs don’t go far back enough to see what that logged at 02:18.

In my logs I have one crash logged like this, and quite a few with “signal: Killed” for Plex Transcoder.

If I grep the logs for ERROR there are many many errors.

Here’s the 15 most common error types:

root@plex-server:/tmp/Plex Media Server/Logs# grep ERROR * | sed -e ‘s/^.*ERROR - /ERROR - /’ | sort | uniq -c | sort -nr
grep: PMS Plugin Logs: Is a directory
11388 ERROR - Analysis: Codec error ‘Invalid data found when processing input’.
3108 ERROR - downloadContainer: expected MediaContainer element, found html
2734 ERROR - [FFMPEG] - Reserved bit set.
2106 ERROR - [FFMPEG] - Inconsistent channel configuration.
2106 ERROR - [FFMPEG] - get_buffer() failed
2104 ERROR - Analysis: Codec error ‘Invalid argument’.
2048 ERROR - [FFMPEG] - Prediction is not allowed in AAC-LC.
648 ERROR - Analysis: Codec error ‘Not yet implemented in FFmpeg, patches welcome’.
393 ERROR - [FFMPEG] - invalid band type
328 ERROR - [FFMPEG] - SBR was found before the first channel element.
199 ERROR - [FFMPEG] - channel element 2.9 is not allocated
199 ERROR - [FFMPEG] - channel element 2.4 is not allocated
197 ERROR - [FFMPEG] - channel element 2.5 is not allocated
193 ERROR - [FFMPEG] - channel element 3.6 is not allocated
190 ERROR - Gracenote: Exception at line 1036, error -1870593912 (The connection was refused by the server.)

Its scary to see all these errors since my server appears to be working OK except for this problem where it goes “offline”.

I’ve probably overshared but I don’t really know what to look for…

Thanks,
Steve

Please grab and add the tar.gz of the entire Logs directory here please ?

plexlogs-stuck.tar.gz (11.9 MB)

Thanks Chuck - here you go.

Thank you for the logs:

I see normal Connect-Query-Reply operation here for the WebClient.

Jul 18, 2019 14:20:45.341 [0x7f8b02e8f700] DEBUG - Auth: authenticated user 1 as elbow
Jul 18, 2019 14:20:45.342 [0x7f8ab2ffd700] DEBUG - Request: [127.0.0.1:44496 (Loopback)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (13 live) GZIP Signed-in Token (elbow)
Jul 18, 2019 14:20:53.760 [0x7f8accff9700] DEBUG - Request: [10.64.5.131:59427 (WAN)] GET /web (14 live) GZIP Signed-in
Jul 18, 2019 14:20:53.761 [0x7f8b02e8f700] DEBUG - Completed: [10.64.5.131:59427] 301 GET /web (14 live) GZIP 1ms 233 bytes (pipelined: 1) -> http://10.64.16.2:32400/web/index.html
Jul 18, 2019 14:20:53.770 [0x7f8accff9700] DEBUG - Request: [10.64.5.131:59427 (WAN)] GET /web/index.html (14 live) GZIP Signed-in
Jul 18, 2019 14:20:53.771 [0x7f8accff9700] DEBUG - Final path: "/usr/lib/plexmediaserver/Resources/Plug-ins-158e5b199/WebClient.bundle/Contents/Resources/index.html"
Jul 18, 2019 14:20:53.773 [0x7f8accff9700] DEBUG - Content-Length of /usr/lib/plexmediaserver/Resources/Plug-ins-158e5b199/WebClient.bundle/Contents/Resources/index.html is 9986.
Jul 18, 2019 14:20:53.774 [0x7f8b0268e700] DEBUG - Completed: [10.64.5.131:59427] 200 GET /web/index.html (14 live) GZIP 3ms 9986 bytes (pipelined: 2)

From other portions in your log, I find several different errors;

  1. LPE (Local Path Evaluator) which means a file PMS is expecting to be in a particular location is no longer there. This most commonly happens if the DB has been recovered from a backup and not brought back into sync properly with the supporting file data structures -OR- sync jobs are disassociated with the actual files.

  2. I see the obvious Gracenote errors - to be expected until Engineering replaces that

  3. DVR grabber issues where it goes for a file which isn’t there. I do not know how to address this except by rescheduling the recording.

Plex Media Server.1.log:Jul 18, 2019 12:59:26.244 [0x7f8a6cff1700] ERROR - DVR:Grabber: Failed to inspect file: Could not parse /nas/Plex/series/.grab/13c9c0e91f7b451cbebf188de3b6f249d8aa04a0/Escape to the Country (2002) - S14E20 - Episode 20.ts (error=-2): No such file or directory
Plex Media Server.1.log:Jul 18, 2019 12:59:26.274 [0x7f8a717fa700] ERROR - DVR:Grabber: Error processing files: boost::filesystem::directory_iterator::construct: No such file or directory: "/nas/Plex/series/.grab/13c9c0e91f7b451cbebf188de3b6f249d8aa04a0"

My recommendation:

Update to 1.16.2.1321 – A lot got fixed since 1291.

For each library section

  1. Scan files / Empty Trash / Clean Bundles
  2. Highlight all the media items in it and re-analyze it

For DVR recording.

  1. If you don’t have many things / don’t mind a reinit – Remove and readd the DVR (there has been a lot of work there)
  2. Basic double-check of NAS mounts to make certain TCP and NFSv4 (or other locking mount) - something missing here as those files should not be ‘gone’.

Hi @ChuckPa,

I updated my PMS to Version 1.16.3.1402 the other day.

I tried to access my server again now - multiple times between 2019-07-22 19:22 and 19:25 local time (UTC+0200) both from the web client on the server and from my TV. The server did not show up. I tarred up the logs that I attach here, and then did “service plexmediaserver stop” and then “start” and immediately it became available again.

Can you look at the logs and tell me why it could not be found at that time?

plex-dead-again.tar.gz (10.0 MB)

This is the same problem I had before but you didn’t comment on the “unfindeable” problem (which I’m not alone in having) so perhaps you can see why at that specific time it could not be found.

Thanks,
Steve

Hi,

I tried now again to connect to my Plex server and could not.

I tried to connect at about 21:27 2019-07-22.

Again, here are my logs.

plex-dead-again-again.tar.gz (10.3 MB)

Again, after restarting plexmediaserver it became available.

Sorry - just to be clear:

  • My Plex processes appear to be there
  • I can login to the web client (10.64.16.2:32400) fine
  • But it can’t find the server on the host - connects to another that I have.
  • Other clients I have behave the same.

Ok… This is a server instance (ID number) problem. Not entirely sure why but we can take care of it.

  1. Stop Plex.
  2. Open https://app.plex.tv/desktop
  3. Left side -> Authorized devices
  4. Change the ALL -> Server
  5. If you’re like me, you have multiple entries for the same name.
  6. Delete all but the most recent for the server. Plex/web is likely looking for an older one. If there is only one, delete it. If you see other junk there in the other tabs, feel free to delete that too.
  7. Sign Plex/web out of your account.
  8. Close the browser
  9. Open fresh
  10. Open private/incognito window
  11. Start Plex
  12. Open http://ip.addr.of.server:32400/web
  13. It will want you to sign in and it should darn well find THAT server in the drop-down list on the left.

Hi @ChuckPa,

MY server couldn’t be found again this evening, so I came here and was happy to see a reply.

Unfortunately, there is only one entry in the list for steves-plex.

As per this screenshot:

What should I do?

Maybe you can help me learn to help myself by showing me what you saw in my logs that got to this diagnosis.

Thanks,
Steve

Oh - I see that you want me to delete all 1 or more entries.

We’re watching now but I’ll follow your steps later on and holding thumbs.

Not sure where this problem came from.

Steve

I was hoping this wouldn’t be a problem but at this point, it must be the root cause. They exist throughout your log files in many places.

Plex Media Server.log:Jul 22, 2019 21:26:01.653 [0x7fd3b5ffb700] WARN - HTTP error requesting GET https://197-155-17-6.edae9a9e1f464f98b8c04e166dc049a1.plex.direct:32400/identity (0, No error) (Failed to connect to 197-155-17-6.edae9a9e1f464f98b8c04e166dc049a1.plex.direct port 32400: Connection refused)

In your modem/router (DNS resolver), you need to add an exception to allow Private Domain plex.direct. Your modem/router (DNS Resolver) is blocking the creation of a private domain on your LAN. This is known as DNS rebinding protection. It’s done to safeguard against malware but in Plex’s case, it is needed.

Also, if this is your LAN IP, it’s definitely not RFC-1918 compliant. Plex.direct is only used on the LAN so Plex is detecting the IP as your local IP and not remote.

RFC-1918 compliant LAN is

10.x.x.x
172.16.x.x - 172.31.x.x
192.168.x.x

Hi,

Thanks for your continued interest.

Can I say that “ellie” is another Plex Media Server running on the same LAN on a QNAP NAS and I don’t have problems with that one. And of course steves-plex does work at least some of the time.

My house network is 10.64.16.0/24. The “steves-plex” runs on an Ubuntu 18.04.2 server which is 10.64.16.2.

I have a Mikrotik router/switch (RouterOS) that is that gateway router for all my equipment and also is the main DNS for the network. It is on 10.64.16.254.

From there the default route goes to 10.64.16.252 which is my ISP supplied fibre router and is also where that 197.155.17.6 address lives - its the public address allocated to me by my ISP and is the address my internet traffic uses.

My Mikrotik has other routes for other private network ranges that connect back to my office etc. But they should not be relevant here.

Can you explain by which protocol Plex “requests the creation of a private domain plex.direct ? I can then look at the Mikrotik RouterOS docs to see what I need to do. RouterOS is not really a consumer platform so it is possible that it doesn’t allow it.

I did find https://forum.mikrotik.com/viewtopic.php?t=115330

(On the other hand how does it ever work, and how does the ellie server on the QNAP work reliably?)

The P

Post #3 on that link about declaring the private domain as “OK” is the next best step.

What happens when PMS can’t see other clients is a Relay (out and back in) is forced and likely why I’m seeing public IP.plex.direct addresses popping in.

Hi Chuck,

I’m not clear about your diagnosis. My clients don’t see steves-plex as “Remote”, or “Relay” or something like that, they just don’t see it at all.

Steve

Steve, Please see post #3, referenced above. In that post, he talks about adding private domain and declaring “Ok-private-domain” (or similar words) for plex.direct. You need that. It may not be the root problem but it definitely will help.

Hi,

I noticed that when “steves-plex” can be seen then my old plex instance “ellie” doesn’t show. As I test I shut that plex server down and I’ve had no problems with “steves-plex” disappearing ever since.

I suppose both servers then must have the same server instance uuid.

How do I change the server uuid of a server?

Thanks!

They were overlapping? Ouch… that is annoying.

They overlapped because they had the same UUID , ProcessedMachineID, and AnonymousID in Preferences.xml

If you stop the server, edit Preferences.xml as root (preserve ownership for user plex:plex), remove those values, when restarted, it will assign new.

It is best you then go to Authorized Devices and clean up all the old instances of everything.
(I do this every 3 months else the different things I do becomes a mess)

OK, thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.