Plex is unable to determine Public IP

Hi helpful Forum!

I have a plex server installed on a web server with a static ip / domain name. The plex server is inside a docker container. Until recently everything worked perfectly (<1.0) but recently I was unable to connect via plex.tv web app.
I noticed that the “Remote Access” page doesn’t show public ip’s. Although I can access the plex server page via https://DOMAIN-NAME:32400 without any problems, so I used that for the configuration “Network > Custom server access URLs” and now I can access it via plex.tv perfectly. So far so good! Yay!

Problem: I can’t scan any libraries, because the server says: “You are not connected to the internet …”.

Now I’m out of ideas, as it seems that plex determines this somehow… and also the public ips are determined somehow … I have no clue where to start - any suggestions?

Thanks!
Mark

@mark@markus-seidl.de said:

Problem: I can’t scan any libraries, because the server says: “You are not connected to the internet …”.

This arises if plex media server process fails to connect to pubsub.plex.tv

Reboot and wait 5 minutes after launch of plex media server then scan a premium music library, if you still get the error, get the server logs ( settings / server / help / zip logs) and attach here

Also do an ‘nslookup pubsub.plex.tv’ and copy the result and attach here

I’m still getting the error after a ‘reboot’. I’m unable to execute nslookup, because it’s a stripped down debian system. The host machine can successfully connect to pubsub.plex.tv.

> nslookup pubsub.plex.tv
Server:		213.133.100.100
Address:	213.133.100.100#53

Non-authoritative answer:
pubsub.plex.tv	canonical name = pubsub.plex.bz.
Name:	pubsub.plex.bz
Address: 82.94.168.15

The logs have been attached - thank so far!

@mark@markus-seidl.de said:
I’m still getting the error after a ‘reboot’. I’m unable to execute nslookup, because it’s a stripped down debian system. The host machine can successfully connect to pubsub.plex.tv.

> nslookup pubsub.plex.tv
Server:		213.133.100.100
Address:	213.133.100.100#53

Non-authoritative answer:
pubsub.plex.tv	canonical name = pubsub.plex.bz.
Name:	pubsub.plex.bz
Address: 82.94.168.15

The logs have been attached - thank so far!

Thanks. It has tried a couple of different IPs and same issue - basically the response received from the pubsub.plex.tv servers was not right

It started with the IP address it used previously

Oct 22, 2016 10:03:40.222 [0x7fc4717fd700] DEBUG - EventSource: Connecting to 139.162.202.171
Oct 22, 2016 10:03:40.222 [0x7fc4767fe700] DEBUG - EventSource: Resolved to 139.162.202.171
Oct 22, 2016 10:03:40.278 [0x7fc476fff700] DEBUG - EventSource: Connected in 39 ms.
Oct 22, 2016 10:03:40.278 [0x7fc476fff700] DEBUG - EventSource: Wrote data, reading reply.
Oct 22, 2016 10:03:40.369 [0x7fc4767fe700] DEBUG - EventSource: Read HTTP reply header.
Oct 22, 2016 10:03:40.369 [0x7fc4767fe700] DEBUG - EventSource: Failure in ParseHeader (0 - Success).
Oct 22, 2016 10:03:40.369 [0x7fc4767fe700] ERROR - EventSource: Retrying in 15 seconds.

kept on trying - with last 2 attempts

Oct 22, 2016 10:13:13.649 [0x7fc476fff700] ERROR - EventSource: Retrying in 15 seconds.

Oct 22, 2016 10:13:28.649 [0x7fc476fff700] DEBUG - EventSource: Connecting to 82.94.168.10
Oct 22, 2016 10:13:28.649 [0x7fc476fff700] DEBUG - EventSource: Resolved to 82.94.168.10
Oct 22, 2016 10:13:28.687 [0x7fc4767fe700] DEBUG - EventSource: Connected in 26 ms.
Oct 22, 2016 10:13:28.687 [0x7fc4767fe700] DEBUG - EventSource: Wrote data, reading reply.
Oct 22, 2016 10:13:28.784 [0x7fc476fff700] DEBUG - EventSource: Read HTTP reply header.
Oct 22, 2016 10:13:28.784 [0x7fc476fff700] DEBUG - EventSource: Failure in ParseHeader (0 - Success).

Oct 22, 2016 10:13:28.822 [0x7fc476fff700] DEBUG - PubsubServerManager: Switching to next host in region: 82.94.168.15
Oct 22, 2016 10:13:28.830 [0x7fc476fff700] DEBUG - EventSource: Stopping.

Oct 22, 2016 10:13:28.830 [0x7fc476fff700] DEBUG - EventSource: Connecting to 82.94.168.15
Oct 22, 2016 10:13:28.831 [0x7fc4767fe700] DEBUG - EventSource: Resolved to 82.94.168.15
Oct 22, 2016 10:13:28.868 [0x7fc476fff700] DEBUG - EventSource: Connected in 26 ms.
Oct 22, 2016 10:13:28.868 [0x7fc476fff700] DEBUG - EventSource: Wrote data, reading reply.
Oct 22, 2016 10:13:28.967 [0x7fc4767fe700] DEBUG - EventSource: Read HTTP reply header.
Oct 22, 2016 10:13:28.967 [0x7fc4767fe700] DEBUG - EventSource: Failure in ParseHeader (0 - Success).

Oct 22, 2016 10:13:28.967 [0x7fc4767fe700] ERROR - EventSource: Retrying in 15 seconds.

Could you get me the output from this request
https://plex.tv/services/pubsub/servers

Are you in Germany ?

Yes I’m from Germany!

I am raising this with our ops team. Please double check that you do not have some proxy / firewall / security addons that is blocking traffic between the Plex Media Server and these pubsub servers

Having a similar issue, but I get certificate errors when I try to pull the pubsub list from my plex server:

root@plexmediaserver_2:/ # wget https://plex.tv/services/pubsub/servers
--2016-10-22 13:17:30--  https://plex.tv/services/pubsub/servers
Resolving plex.tv (plex.tv)... 54.229.134.212, 52.212.139.125, 52.51.103.217, ...
Connecting to plex.tv (plex.tv)|54.229.134.212|:443... connected.
ERROR: cannot verify plex.tv's certificate, issued by '/C=US/O=DigiCert     Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA':
Unable to locally verify the issuer's authority. To connect to plex.tv insecurely, use `--no-check-certificate'.

Hallo mark@markus-seidl.de
Hast du einen V-Server oder Dedicated von Hetzner?

Bringt es was wenn du den IPv6 Support aktivierst? Netzwerk->Serverunterstützung für IPv6 aktivieren

Falls du Plesk Onyx mit dem Docker-Plugin verwendest … Hast du das automatische Port-Mapping ausgestellt und den port auf 32400 gesetzt? den Fehler hatte ich anfangs bei Plexrequests.

@kgleason@gmail.com said:
Having a similar issue, but I get certificate errors when I try to pull the pubsub list from my plex server:

root@plexmediaserver_2:/ # wget https://plex.tv/services/pubsub/servers
--2016-10-22 13:17:30--  https://plex.tv/services/pubsub/servers
Resolving plex.tv (plex.tv)... 54.229.134.212, 52.212.139.125, 52.51.103.217, ...
Connecting to plex.tv (plex.tv)|54.229.134.212|:443... connected.
ERROR: cannot verify plex.tv's certificate, issued by '/C=US/O=DigiCert     Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA':
Unable to locally verify the issuer's authority. To connect to plex.tv insecurely, use `--no-check-certificate'.

http://thenubbyadmin.com/2014/01/29/solving-wget-error-cannot-verify-site-certificate-unable-to-locally-verify-the-issuers-authority/

@mark@markus-seidl.de said:

Yes I’m from Germany!

Could you restart the server to try again - fresh logs if still failing to communicate with the pubsub servers. The pubsub servers have just got rebooted

The problem still persists. I can access the plex via my domain directly (https://DOMAIN-NAME:32400) and the plex panel accessed directly does show “Fully Accessible From Outside the Network”. It still says “Not connected to the internet” when trying to scan a library. So plex must be able to access the internet.

Also pings and wgets do also work flawlessly.

> ping google.de
PING google.de (216.58.214.67): 56 data bytes
64 bytes from 216.58.214.67: icmp_seq=0 ttl=55 time=5.261 ms
64 bytes from 216.58.214.67: icmp_seq=1 ttl=55 time=5.138 ms
64 bytes from 216.58.214.67: icmp_seq=2 ttl=55 time=5.193 ms
64 bytes from 216.58.214.67: icmp_seq=3 ttl=55 time=5.128 ms
64 bytes from 216.58.214.67: icmp_seq=4 ttl=55 time=5.128 ms
64 bytes from 216.58.214.67: icmp_seq=5 ttl=55 time=5.173 ms
^C--- google.de ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max/stddev = 5.128/5.170/5.261/0.047 ms

wget:

> wget https://plex.tv/services/pubsub/servers
converted 'https://plex.tv/services/pubsub/servers' (ANSI_X3.4-1968) -> 'https://plex.tv/services/pubsub/servers' (UTF-8)
--2016-10-23 15:42:29--  https://plex.tv/services/pubsub/servers
Resolving plex.tv (plex.tv)... 52.31.49.122, 52.51.103.217, 52.50.37.29, ...
Connecting to plex.tv (plex.tv)|52.31.49.122|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.

The last one is expected, as wget isn’t authorized. But the connection from the plex machine does work!

New logs after reboot of the plex machine and reboot of the pubservers.

@mymoviespw said:
Hallo mark@markus-seidl.de
Hast du einen V-Server oder Dedicated von Hetzner?

Bringt es was wenn du den IPv6 Support aktivierst? Netzwerk->Serverunterstützung für IPv6 aktivieren

Falls du Plesk Onyx mit dem Docker-Plugin verwendest … Hast du das automatische Port-Mapping ausgestellt und den port auf 32400 gesetzt? den Fehler hatte ich anfangs bei Plexrequests.

Hey! Danke für die Hinweise, ich verwende kein Plesk sondern blank Ubuntu mit Shell :). Die Ports sind gemappt und ich komme von außen auf den Docker Container über https://domain:32400 und da funktioniert die Plex Oberfläche ja. Nur Library scanning (“… no internet accesss…”) und plex.tv klappen nicht.

@mark@markus-seidl.de said:
New logs after reboot of the plex machine and reboot of the pubservers.

Thanks. Do you have any security software that may be intercepting the requests and responses ?
Any proxy in the way?

@mark@markus-seidl.de said:
wget:

wget https://plex.tv/services/pubsub/servers
converted ‘https://plex.tv/services/pubsub/servers’ (ANSI_X3.4-1968) → ‘https://plex.tv/services/pubsub/servers’ (UTF-8)
–2016-10-23 15:42:29-- https://plex.tv/services/pubsub/servers
Resolving plex.tv (plex.tv)… 52.31.49.122, 52.51.103.217, 52.50.37.29, …
Connecting to plex.tv (plex.tv)|52.31.49.122|:443… connected.
HTTP request sent, awaiting response… 401 Unauthorized

Username/Password Authentication Failed.

The last one is expected, as wget isn’t authorized. But the connection from the plex machine does work!

Probably needs ?auth_token=xxxxxxxxxxxxxxxxxxxx where xxxxxxxxxxxxxxxxxxxxxxx is server token
Might also need the ssl certificate check exclusion argument to wget

There is ufw on the host system installed and I disabled it to check if this may be the problem. Still the same Eventsource Failure - retry cycle happening.
To my best knowledge the box must have internet access as it’s downloading trailers upfront and connecting to the Plex panel in the logs. Also the box is a internet server hosting webpages on the same machine. I can access the plex panel of this machine (32400) directly from the internet… Hm, I still don’t have a clue what’s wrong.
It’s a very “old” plex Installation (>2 years) can this be the problem with old settings or so?

The problem is that Plex media server does not like the response header content it is receiving in response to the message it sent the pubsub server

Thought of getting a packet trace but I think the header is encrypted

So I removed the plex config directory, rebooted the machine and plex works now.
I can’t see any difference in plex settings in the configuration panel under “Remote Access” and “Network”.

If I restore the old plex-config directory plex is showing the same problems in log (Eventsource failed - retry - …)

@mark@markus-seidl.de said:
So I removed the plex config directory, rebooted the machine and plex works now.
I can’t see any difference in plex settings in the configuration panel under “Remote Access” and “Network”.

If I restore the old plex-config directory plex is showing the same problems in log (Eventsource failed - retry - …)

That is interesting. Can you send by private message the Preferences.xml from the two setups.
Also would like to see the logs when it is working - after a restart,

@mark@markus-seidl.de said:
So I removed the plex config directory, rebooted the machine and plex works now.
I can’t see any difference in plex settings in the configuration panel under “Remote Access” and “Network”.

If I restore the old plex-config directory plex is showing the same problems in log (Eventsource failed - retry - …)

Thank you for sending me the Preferences.xml files. The server switched to new server identifier string and new token

It is very possible that there was an issue with the token used for the connection to the pubsub server - the way Plex Media Server verifies internet connectivity.

Next time this issue arises, we can get users to do a specific test using curl to see what errors are returned. Plex Media Server logs would be needed to work out the required tests