The server is unreachable

Server Version 1.13.8.5395
The server is running on a linux machine, i can access the web interface via http://srv.lan:32400 but it shows that no server could be found.
I do not understand, because if i stop the plexmediaserver service the web interface stops. When i restart the web is ok, but no server found.
Is the server is running or not? If i can reach the main port :32400, why no media server access? What else should i start?
Note: sometimes it stars working but very inconsistent

Running processes:

root 9284 0.0 0.0 12784 980 pts/0 S+ 10:13 0:00 grep plex
plex 13704 0.0 0.0 4288 588 ? Ss Oct08 0:00 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server”
plex 13707 0.4 0.9 915784 79460 ? Sl Oct08 64:06 /usr/lib/plexmediaserver/Plex Media Server
plex 13725 0.2 1.8 1995556 147320 ? SNl Oct08 32:23 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-10d48da0d/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.13.8.5395-10d48da0d /usr/lib/plexmediaserver/Resources/Plug-ins-10d48da0d/System.bundle
plex 13789 0.1 0.2 362356 17472 ? Sl Oct08 21:42 /usr/lib/plexmediaserver/Plex DLNA Server
plex 13791 0.0 0.0 513688 2836 ? Sl Oct08 5:30 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.13.8.5395-10d48da0d 32600 /waitmutex
plex 23528 6.4 5.0 2392592 407740 ? Sl Oct11 691:34 Plex Plug-in [com.plexapp.agents.subzero] /usr/lib/plexmediaserver/Resources/Plug-ins-10d48da0d/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.13.8.5395-10d48da0d /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Sub-Zero.bundle

Is this an issue with a new install or a (once) up and running PMS?

Please check the logs for anything of interest. How to: https://support.plex.tv/articles/200250417-plex-media-server-log-files/

logs.zip (2.2 MB)

This is a once up and running instance. The problem appeared around a week ago

It looks like your server is reporting a somewhat strange access URL for your server. Check what connections Plex sees as available for your server:
#1
Find a Plex authentication token by following https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

#2
Go to https://plex.tv/api/resources?includeHttps=1&includeRelay=1&X-Plex-Token=xxxxxxxxxx

#3
Check the connection items listed.

<Connection protocol=“https” address=“[local-ip-address]” port=“[port]” uri=“https:// [local-ip-address].[server-domain].plex.direct :32400” local=“1”/>

What does that show?

For security reasons i cannot post my external ip or tokens.

And I’m not asking you to. Just check whether the URIs listed match the one you tried to access the server with.

My code disapperaed 2 times sorry

<Device name="nas" product="Plex Media Server" productVersion="1.13.8.5395-10d48da0d" platform="Linux" platformVersion="4.9.0-8-amd64 (#1 SMP Debian 4.9.110-3+deb9u5 (2018-09-30))" device="PC" clientIdentifier="xxxx" createdAt="1501242053" lastSeenAt="1539953635" provides="server" owned="1" accessToken="xxx" publicAddress="xxx" httpsRequired="0" synced="0" relay="1" publicAddressMatches="1" presence="1">
<Connection protocol="https" address="172.16.0.2" port="32400" uri="https://172-16-0-2.xxxx.plex.direct:32400" local="1"/>
<Connection protocol="http" address="srv.lan" port="32400" uri="http://srv.lan:32400" local="0"/>
<Connection protocol="https" address="xxxx" port="32400" uri="https://xxx.xxx.plex.direct:32400" local="0"/>
<Connection protocol="https" address="139.162.158.15" port="8443" uri="https://139-162-158-15.xxxx.plex.direct:8443" local="0" relay="1"/>
</Device>

Do you have srv.lan set up as a custom access url? And do you require secure connections?

It is just a local domain, no remote connection set up.
Secure connections set to prefered

Plex seems to think that this is public/remote domain (local=“0”). Did your PMS ever work properly with this setup? I have no idea whether this causes the issue, but it seems to somewhat confuse Plex.

I’m guessing you have tried all the options listed here? https://support.plex.tv/articles/204604227-why-can-t-the-plex-app-find-or-connect-to-my-plex-media-server/

Edit: Just took another look at your logs. Your PMS is basically running in circles quite a few times. This exact set of logs occurs over and over again. log-repeat.txt (2.7 KB)

Maybe one the mods/team members can help you interpret those log entries, I’m not sure what to make of them.

Sometimes works instantly, sometimes i have to open the web interface for like 15minutes and suddenly it will find the server.
But a few weeks ago it worked good, this problem is new.
How can i change that domain to identify as local?
I cant understand the repeating log entities
Edit: yes, i visited that troubleshooting site, and found that maybe the router interfering with dns rebind. But i added an exception and still not working

Please do the following:

  1. Stop the server
  2. Start the server
  3. Wait 60 seconds
  4. Attempt to connect to it by IP address (bypass your .lan DNS)
  5. If still unsuccessful, tar cfz /tmp/logs.tar.gz "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs" and attach

Some feedback

That is not an issue. It was decided when custom server access url feature was implemented, that it would be flagged as local="0". It has no consequence

These repeated errors show an issue with communications with the plex.tv pubsub servers. These are used for getting connectivity test results for remote access as well as establishing if there is an internet connection or not (needed for Premium Music Libraries scanning).

Oct 19, 2018 12:42:51.261 [0x7fec32bfe700] ERROR - EventSource: Retrying in 15 seconds.

Oct 19, 2018 12:43:06.261 [0x7fec32bfe700] DEBUG - EventSource: Resolving 172.104.133.220 port 443s
Oct 19, 2018 12:43:06.262 [0x7fec32bfe700] DEBUG - EventSource: Resolved 172.104.133.220 to 172.104.133.220
Oct 19, 2018 12:43:06.359 [0x7fec32bfe700] DEBUG - EventSource: Connected in 67 ms.
Oct 19, 2018 12:43:06.360 [0x7fec32bfe700] DEBUG - EventSource: Wrote data, reading reply.
Oct 19, 2018 12:43:06.505 [0x7fec333ff700] DEBUG - EventSource: Read HTTP reply header.

Oct 19, 2018 12:45:02.332 [0x7fec333ff700] DEBUG - EventSource: Successfully connected to 172.104.133.220.
Oct 19, 2018 12:45:02.332 [0x7fec333ff700] DEBUG - EventSource: Failure in IdleTimeout (0 - Success).
Oct 19, 2018 12:45:02.332 [0x7fec333ff700] ERROR - EventSource: Retrying in 15 seconds.

Oct 19, 2018 12:45:17.333 [0x7fec32bfe700] DEBUG - EventSource: Resolving 172.104.133.220 port 443s
Oct 19, 2018 12:45:17.333 [0x7fec32bfe700] DEBUG - EventSource: Resolved 172.104.133.220 to 172.104.133.220
Oct 19, 2018 12:45:17.434 [0x7fec32bfe700] DEBUG - EventSource: Connected in 69 ms.
Oct 19, 2018 12:45:17.434 [0x7fec32bfe700] DEBUG - EventSource: Wrote data, reading reply.
Oct 19, 2018 12:45:17.577 [0x7fec333ff700] DEBUG - EventSource: Read HTTP reply header.

Oct 19, 2018 12:47:13.404 [0x7fec333ff700] DEBUG - EventSource: Successfully connected to 172.104.133.220.
Oct 19, 2018 12:47:13.404 [0x7fec333ff700] DEBUG - EventSource: Failure in IdleTimeout (0 - Success).
Oct 19, 2018 12:47:13.404 [0x7fec333ff700] ERROR - EventSource: Retrying in 15 seconds.

Oct 19, 2018 12:47:28.404 [0x7fec333ff700] DEBUG - EventSource: Resolving 172.104.133.220 port 443s
Oct 19, 2018 12:47:28.405 [0x7fec333ff700] DEBUG - EventSource: Resolved 172.104.133.220 to 172.104.133.220
Oct 19, 2018 12:47:28.504 [0x7fec32bfe700] DEBUG - EventSource: Connected in 68 ms.
Oct 19, 2018 12:47:28.505 [0x7fec32bfe700] DEBUG - EventSource: Wrote data, reading reply.
Oct 19, 2018 12:47:28.644 [0x7fec333ff700] DEBUG - EventSource: Read HTTP reply header.

There is also some evidence of delayed or lost events from this pubsub server

Oct 18, 2018 18:10:22.851 [0x7fec28ffd700] DEBUG - HTTP requesting POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx&async=1&asyncIdentifier=878e7d6f-b4fa-44fc-b9b2-f49a88e01e51
Oct 18, 2018 18:10:23.338 [0x7fec28ffd700] DEBUG - HTTP 201 response from POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx&async=1&asyncIdentifier=878e7d6f-b4fa-44fc-b9b2-f49a88e01e51
Oct 18, 2018 18:10:23.639 [0x7fec28ffd700] DEBUG - Request: [34.245.172.51:52300 (WAN)] GET /identity (7 live) TLS Signed-in Token (Szajkop)
Oct 18, 2018 18:10:23.641 [0x7fec333ff700] DEBUG - Completed: [34.245.172.51:52300] 200 GET /identity (7 live) TLS 1ms 357 bytes

Oct 18, 2018 18:12:33.916 [0x7fec333ff700] DEBUG - EventSource: Got event [data] '<Message address="178.xxx.xxx.xxx" port="32400" asyncIdentifier="878e7d6f-b4fa-44fc-b9b2-f49a88e01e51" connectivity="1" command="notifyConnectivity"/>'

The above shows a connectivity test was carried out immediately and was successful - but the event was not received till over 2 minutes larer.

Oct 19, 2018 10:02:23.829 [0x7fec0dffa700] DEBUG - HTTP requesting PUT https://plex.tv/api/servers/de1a8ec35b7f4e221e1748797b4ee2cfa0f26347/connectivity?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx&asyncIdentifier=2d03945a-7b4c-4aed-9c0e-229c2f47b9bc
Oct 19, 2018 10:02:24.242 [0x7fec0dffa700] DEBUG - HTTP 200 response from PUT https://plex.tv/api/servers/de1a8ec35b7f4e221e1748797b4ee2cfa0f26347/connectivity?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx&asyncIdentifier=2d03945a-7b4c-4aed-9c0e-229c2f47b9bc
Oct 19, 2018 10:02:24.435 [0x7fec08ff0700] DEBUG - Request: [34.241.199.208:37524 (WAN)] GET /identity (12 live) TLS Signed-in Token (Szajkop)
Oct 19, 2018 10:02:24.437 [0x7fec333ff700] DEBUG - Completed: [34.241.199.208:37524] 200 GET /identity (12 live) TLS 1ms 357 bytes

The above shows a connectivity test made immediately when requested - but no event was received

Oct 19, 2018 10:12:12.728 [0x7fec19bff700] DEBUG - HTTP requesting PUT https://plex.tv/api/servers/de1a8ec35b7f4e221e1748797b4ee2cfa0f26347/connectivity?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx&asyncIdentifier=7c7fb4ad-a1c5-443d-9395-28ffcd7664bc
Oct 19, 2018 10:12:12.985 [0x7fec19bff700] DEBUG - HTTP 200 response from PUT https://plex.tv/api/servers/de1a8ec35b7f4e221e1748797b4ee2cfa0f26347/connectivity?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx&asyncIdentifier=7c7fb4ad-a1c5-443d-9395-28ffcd7664bc
Oct 19, 2018 10:12:13.167 [0x7fec28ffd700] DEBUG - Request: [52.49.250.227:47634 (WAN)] GET /identity (16 live) TLS Signed-in Token (Szajkop)
Oct 19, 2018 10:12:13.168 [0x7fec333ff700] DEBUG - Completed: [52.49.250.227:47634] 200 GET /identity (16 live) TLS 1ms 357 bytes

Oct 19, 2018 10:14:18.367 [0x7fec32bfe700] DEBUG - EventSource: Got event [data] '<Message address="178.xxx.xxx.xxx" port="32400" asyncIdentifier="7c7fb4ad-a1c5-443d-9395-28ffcd7664bc" connectivity="1" command="notifyConnectivity"/>'

The above is similar to the first one, a delay of over 2 minutes in getting the event.

Possible causes:

  • use of security of filters that may be blocking some IP Addresses
  • vpn/proxy intercepting some communications
  • an actual issue with the pubsub server the PMS is using (pubsub server with IP address 172.104.133.220) - the 2 minute delays suggests that there may have been an issue here

We can try and see if a different one gets picked up by deleting references to this pubsub server (172.104.133.220) and restarting PMS and see if it switches to a different pubsub server. For each region there are a number of pubsub servers and selection would be of fastest

To do this, shutdown Plex Media Server and carefully edit Preferences.xml to delete these items

PubSubServer
PubSubServerPing
PubSubServerRegion

Then restart Plex Media Server

and as @ChuckPa suggested - do try without the custom server access url. I did a quick test adding a custom server access url to one of my servers and it worked fine from Plex web on another machine.

1 Like

Also was going to mention that your WAN IP changed on October 18th between 14:11:19 and 14:51:31 - the new IP was confirmed as being reachable by a connectivity test at 18:10:23-18:12:33

My isp changing the wan ip very often, even when the router is always on so i cannot do anything with that.
I tried to delete what u said above, (it was set to france) then restarted the server and after 5 minutes the pubsub entites still not regenerated, just the ping and set to 76. When i restart the server again just the ping value changes, nothing else
(Web ui still not finds, now trying on the ip)

Update: after a few more restarts the france server got detected again. Is there a list to manually assign theese parameters?

Logs for the above?

If an entry gets into the Preferences.xml with a ping value and IP address and region then it means the server did find a pubsub server and did connect to it

If we are continuously getting errors and 15 second retry then need to see what that is and logs together with wireshark capture (would need to be sent privately by PM) may give clues. Not sure how easy it is to do that on a linux box.

Do you have a windows PC you can do a test install of PMS and replicate the setup? Much easier to run wireshark on windows

Plex Media Server gets the list from https://plex.tv/services/pubsub/servers
(Note that different IP addresses may get returned each time this is run)
Plex Media Server tests all these IP addresses and picks the server that gets connected fastest

I can run a wireshark on my windows pc to monitor the server (this is how ethernet works)
When i get to home i will try it. Last time i used to debug plex i got into some problems, because everything is encrypted and i got no usable/readable communication data

Here some new logs if this helps something
logs.zip (897.4 KB)

wireshark will prove if the event is coming from the pubsub server and Plex Media Server is not picking it up straightaway

I have actually found what might the problem here. I have found that we have transient deadlocks in Plex Media Server that hold up requests for up to 2 minutes leading to plex client apps timing out and I believe also the pubsub server events not being processed when they arrive.

we can prove it is the cause of the delayed pubsub server evetns with wireshark +corresponding logs

The forum threads posts where I investigated the issue that I have identified as transient deadlocks are

and

These other guys that you have linked are having the exactly same problem so i am sure that this is not just a local problem at my network.
Unfortunately (or fortunately) it started to work last night and so far (knock, knock) it is working good like used to before. Do you really need those wireshark captures? I am afraid it will capture passords, and other sensitive data if i just give it a go. I read up an article when they create a virtual network adapter and use that for only a specific program and with this setup you can capture eg. only plex related data. But it is complicated, but i will do it if i have to.

Also, i found another strange behavior when the problem was still up, maybe it is connected to each other, so: when you go to the remote access section at the webgui/server menu it say that someting like configured/not connected/remote not available. And if i try to apply a manual port (which is the default 32400) it just times out and makes the server unaccessable again