The server is unreachable

server-raspberry-pi

#1

i've got a peculiar problem that has just occured after years to smooth sailing.

"The server "NIKINOO" is unreachable. Make sure it's running, double check your network, and try again."
i am loading plex web from the pi itself (ie NOT from app.plex.tv), so from what i can see plex web is running, but it's saying it can't see the server?

the required port (32400) is still open and pointing to the correct local IP of the pi. (other services are still operating correctly - radarr, sonarr, etc etc).

any ideas?


#2

PMS version? This typically indicates a DNS or network problem, like your pi being unable to access or resolve Plex.tv. Please take a look at journalctl -u plexmediaserver and the server logs. Search for WARN or ERROR entries and post them here (or the full log).

https://support.plex.tv/articles/200250417-plex-media-server-log-files/


#3

it’s the current public version of PMS (not plex pass).

root@raspberrypi:~# journalctl -u plexmediaserver
– Logs begin at Thu 2018-03-29 21:15:29 BST, end at Fri 2018-03-30 15:45:23 BST. –
Mar 29 21:15:38 raspberrypi systemd[1]: Starting Plex Media Server for Linux…
Mar 29 21:15:39 raspberrypi systemd[1]: Started Plex Media Server for Linux.
Mar 29 21:15:48 raspberrypi sh[377]: Error in command line:the argument for option ‘–serverUuid’ should follow immediately after the equal sign
Mar 29 21:15:48 raspberrypi sh[377]: Crash Uploader options (all are required):
Mar 29 21:15:48 raspberrypi sh[377]: --directory arg Directory to scan for crash reports
Mar 29 21:15:48 raspberrypi sh[377]: --serverUuid arg UUID of the server that crashed
Mar 29 21:15:48 raspberrypi sh[377]: --userId arg User that owns this product
Mar 29 21:15:48 raspberrypi sh[377]: --platform arg Platform string
Mar 29 21:15:48 raspberrypi sh[377]: --url arg URL to upload to
Mar 29 21:15:48 raspberrypi sh[377]: --help show help message
Mar 29 21:15:48 raspberrypi sh[377]: --version arg Version of the product

i’ll check the server logs once i get home


#4

here’s the full “Plex Media Server.log”


#5

Certificate was not able to install --> secure connections won’t work at all --> that’s your problem.

Mar 29, 2018 21:15:48.643 [0x7455f000] ERROR - CERT: PKCS12_parse failed: error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure
Mar 29, 2018 21:15:48.643 [0x7455f000] ERROR - CERT: Found a certificate, but couldn't install it.
Mar 29, 2018 21:15:48.648 [0x7455f000] DEBUG - Relay: read 2 cached entries from hosts file
Mar 29, 2018 21:15:48.653 [0x7455f000] DEBUG - CERT: Certificate or intermediate did not exist, fetching a new one.
Mar 29, 2018 21:15:48.662 [0x7455f000] DEBUG - HTTP requesting POST https://plex.tv/devices/7ee109c57ca72cc56aee86ce8ade9d00f407a435/certificate?version=2&X-Plex-Token=
Mar 29, 2018 21:48:48.762 [0x7455f000] DEBUG - HTTP 401 response from POST https://plex.tv/devices/7ee109c57ca72cc56aee86ce8ade9d00f407a435/certificate?version=2&X-Plex-Token=
Mar 29, 2018 21:48:48.763 [0x7455f000] ERROR - CERT: Could not fetch certificate from the cloud: 401

Please restart the server and try to fetch a new certificate.


#6

How do you fetch a new certificate? The pi has been rebooted a few times


#7

A Plex service restart is typically enough sudo systemctl restart plexmediaserver. Then check the beginning of the current server log for the same error. You can also first try to delete the certificate.p12 from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache.


#8

Yep no luck with just restarting.
Still same problem.

I’ll try the deleting the certificate tomorrow.


#9

deleted the certificate file, restarted PMS and still the same issue
attached is new log file.


#10

@chenks said:
deleted the certificate file, restarted PMS and still the same issue

The new certificate has been installed and that problem has been fixed :slight_smile: However, your web requests are obviously tunneled through a proxy of some kind. All requests contain an “X-Forwarded-For” header. I believe, this could be the next issue. Do you use a proxy in your browser or on your server?


#11

the pi runs nginx, so that all the services can be accessed via “friendly” urls.

ie

server.com/web/index.html for plex
server.com/sonarr for sonarr
server.com/radar for radarr
etc etc

sonarr and radarr are all working fine, so i assume nginx is operating correctly.
no config has changed in nginx since plex stopped working

see attached nginx config file


#12

@chenks said:
server.com/web/index.html for plex

Your simple setup won’t work with Plex secure connections at all and it is also not necessary. Just use plex.tv (also a very friendly url :smiley: ) to access your server and you are fine. That’s the way all official Plex clients do it :slight_smile:

A working nginx configuration for plex is rather complicated. I don’t use nginx myself, but you might want to take a look at other users’ nginx threads in the forum.

However, your problems are caused by your nginx setup and not by PMS. I cannot help with that.


#13

it’s worked fine up until a couple of days ago, with secure connections.
app.plex.tv also gives the same problem with the server not being accessible.
and so does blah.com:32400/web/index.html or ipaddress:32400/web/index.html

so i think nginx is a red herring here.
as i said, this all worked fine (for years, and with nginx) up until a couple of days go.


#14

To debug this issue further, please only use app.plex.tv for the time being. Is your server even listed in the top left server selection list? If not, we have to “re-claim” your server.


#15

the server is listed in the top left

“The server “NIKINOO” is unreachable. Make sure it’s running, double check your network, and try again.”
another server has also just appeared below it called “raspberrypi” which is also showing as unavailable - no idea where this one has came from. NIKINOO is the only server there has ever been.


#16

@chenks said:
another server has also just appeared below it called “raspberrypi” which is also showing as unavailable -
How did you install PMS? And did you upgrade just recently from a rather old version to 1.12.1? Some high ranked web tutorials tell people to install process monitoring tools to restart PMS automatically or to use a cron job to restart plex daily. These things interfere with systemd and the current package and cause e.g. a second installation appearing in your account :confused:

Other tutorials tell people to use the user “pi” as Plex user, which is also grossly wrong. Also this could cause your second server. Do you have a “Library” or “Plex Application Support” in /home/pi? Did you have to add your libraries again, recently?


#17

i always upgrade when each new version is released, so no upgrade from an really old version.
PMS was originally installed (and has been for years) via the guides on htpcguides.com and server image that has the pre-installed installation scripts.
plex is only restarted when it either upgrates (via manually run apt-get update/apt-get upgrade commands), or the server is completely rebooted manually.

nothing has changed with regards to plex other than the incremental plex updates. no new libraries, to config changes, nothing at all.


#18

@chenks said:
PMS was originally installed (and has been for years) via the guides on htpcguides.com and server image that has the pre-installed installation scripts.

So you do not really know what else is running on your server (e.g. process monitoring) :confused: I don’t know the htpcguides images very well and there could be some old scripts interfering with PMS right now. E.g. the old image first was created, when we still used the lsb init scripts and the binary package. We have moved to systemd by now and the old stuff could interfere with systemd. And because of the second server appearing in your plex account, it obviously did at some time, or still does.

So we first have to make sure your overall setup is OK. Please post the output of systemctl status plexmediaserver and of the override.conf file, if it is mentioned in the output of systemctl.

And remove the second server from your account using app.plex.tv.

Edit2: Have you upgraded your system to Raspbian Jessie by now? Kernel 4.9.


#19

there isn’t any process monitoring.
it’s just jessie with pre-set installation scripts for each app.
jessie is bang up to update, not outstanding updates to be installed.

i will post the results of those later today.
trying to remove that server results in

“If this server is restarted, it will automatically be added to your account again.”


#20

@chenks said:
jessie is bang up to update, not outstanding updates to be installed.>
i will post the results of those later today.

OK. Sorry for some “stupid” questions. It’s always hard to access the overall knowledge of the user and the quality of the setup. However, I would not know that there is a nginx server in between, if I had not asked, and the faulty certificate was also huge problem :slight_smile: I suppose your nginx setup was only working OK all the time, because secure connections were not possible at all (missing certificate).

So, assuming that everything else is OK by now, you have to access your Pi server from the local network (same subnet as the server) on local-ip:32400/web and check the remote access. It might also be a good idea to log out of your server and to reclaim it afterwards.

To complete the setup, you have to make sure DNS rebinding protection is disabled in your router / local PC. It’s best, if you just read the whole secure connections article, because most of this might be new to you.

https://support.plex.tv/articles/206225077-how-to-use-secure-server-connections/