Signing into remote server for first time doesn't let me set it up

Server Version#: plexmediaserver_1.16.6.1592-b9d49bdb7_amd64.deb
Player Version#: ???

logs: plex-logs - Google Drive

I recently installed plex media server on my Ubuntu 18.04 server. It seems to be running properly, using sudo systemctl status plexmediaserver.service shows it’s running.

And I can see that it’s running on port 32401 (and doing something on port 32400?)

$ sudo netstat -lnpt | grep Plex
tcp 0 0 127.0.0.1:46301 0.0.0.0:* LISTEN 16411/Plex Plug-in
tcp 0 0 0.0.0.0:1469 0.0.0.0:* LISTEN 16063/Plex DLNA Ser
tcp 0 0 127.0.0.1:37247 0.0.0.0:* LISTEN 16356/Plex Plug-in
tcp 0 0 127.0.0.1:39495 0.0.0.0:* LISTEN 16364/Plex Plug-in
tcp 0 0 127.0.0.1:33607 0.0.0.0:* LISTEN 16094/Plex Plug-in
tcp 0 0 127.0.0.1:34157 0.0.0.0:* LISTEN 16015/Plex Plug-in
tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN 15983/Plex Media Se
tcp 0 0 127.0.0.1:44083 0.0.0.0:* LISTEN 16095/Plex Plug-in
tcp 0 0 0.0.0.0:32469 0.0.0.0:* LISTEN 16063/Plex DLNA Ser
tcp 0 0 127.0.0.1:32600 0.0.0.0:* LISTEN 16066/Plex Tuner Se
tcp 0 0 127.0.0.1:37497 0.0.0.0:* LISTEN 16166/Plex Plug-in
tcp6 0 0 :::32400 :::* LISTEN 15983/Plex Media Se

Following the install instructions: https://support.plex.tv/articles/200288586-installation/

It seems to suggest that if I’m on the same local network (which I am), I should be able to go to ip.address:32401/web to set up the server but it refused to connect, as did ip.address:32400/web (ip.address == the local ip address of the ubuntu server)

So I tried the ssh tunnel:

ssh myuser@ip.address -L 8888:localhost:32401

And then I go to localhost:8888/web and I’m greeted in with a login screen - success! Until I log in with either my usual account, or a fresh account, and am greeted with either my pre-existing server, or a blank web app, respectively.

I then tried the same thing, except replace 32401 with 32400 in the ssh tunnel command, then trying everything on my laptop (again the same network). Still no success, I’m never presented with a screen to set up the server, it just takes me to what I would expect to see if I just logged into app.plex.tv

Any thoughts as to what’s going wrong? Am I doing something silly?

blank how? like totally black? Is there a house icon with a + sign under it on the top left. if so that is to create a new library.

is this a fresh install or was the server ever installed on this machine previously? if it was isntalled previously stop the server then find the file preferences.xml delete it and start server again. this will clear out any previous settings and log in info. (I am assuming you want to start with a blank slate on this server)

(use 32400 btw)

Thanks for the response! Sorry, blank web app probably wasn’t a great descriptions, here’s a screenshot, it asks me to install plex media server: https://imgur.com/a/RYmRmFv

I started with a fresh install, but have been re-installing a few times to see if that helps and it doesn’t. I’ve been wiping the entire /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ directory each time, which I presume is supposed to include the preferences.xml file, but I don’t see one anywhere on my file system even with plex actively running.

When I use port 32400 I just get the following XML, not sure what to make of it, I get this either when I go directoly to “server.ip.address:32400” or I ssh tunnel to that port:

Actually, very interestingly, I’m finding that I’m able to find an unclaimed server if I first ssh tunnel into the 32401 port, access the web app, and then ssh tunnel to the 32400 port. But when I click the “claim” button, it just spins around for like half a minute before presumably timing out Imgur: The magic of the Internet

I’ve disabled my firewall so that’s not getting in the way :neutral_face:

Yeah it should be in that PMS directory

very strange the file is not here. when you claim server it should be writing some login info to that file. it also contains the flag if it is a first run or not to know if it should give you the initial setup wizard. more info about that file can be found here

I am not a linux person by any means but maybe a permissions issue?

If I may add:

  1. Sign out your local browser from Plex/Web
  2. SSH tunnel to it
ssh -L 8888:127.0.0.1:32400  ip.addr.of.remote
sign-in
let sit idle
  1. back on local browser
  2. open incognito window
  3. http://127.0.0.1:8888/web
  4. Now you can sign in and claim it.

Should this fail,

  1. Stop remote Plex using the currently idle ssh session.
  2. Delete Preferences.xml
  3. Start remote Plex
  4. Repeat the above sequence starting at step 4 above
2 Likes

Thanks @ChuckPa!

Using the first set of instructions, I find myself in the same state of seeing the “claim server” button in the general settings page and pressing it not actually claiming the server.

Using the second set of instructions, I’m able to go through the initial server setup screens now, but at the end of it the server is still marked as unclaimed in settings, and trying to claim it again shows the loading spinner for about a minute before timing out.

I do have a Preferences.xml file now (and deleted it as part of the second set of instructions, and it’s back), is there some token or something I can copy over from my existing server on my desktop to the new server to force claim it manually?

Looking at the server logs, it seems that the request to the /myplex/claim endpoint is failing. Ie if you look at the log at Sep 21, 2019 04:50:48.179 there’s a post request, and at Sep 21, 2019 04:51:50.284 it’s completed with a 500 response:

logs: https://drive.google.com/file/d/18ZMSMt19y0l7amxfT5DdIlCgmVUfU_sc/view?usp=sharing

Not sure what more to make of the logs.

It can’t talk to Plex.tv

Sep 21, 2019 05:08:05.166 [0x7f426b7fe700] DEBUG - HTTP requesting GET https://plex.tv/updater/products/5/check.xml?build=linux-x86_64&channel=16&distribution=debian&version=1.17.0.1709-982421575
Sep 21, 2019 05:08:06.948 [0x7f4213fff700] ERROR - Error issuing curl_easy_perform(handle): 28
Sep 21, 2019 05:08:06.948 [0x7f4213fff700] DEBUG - HTTP simulating 408 after curl timeout
Sep 21, 2019 05:08:06.948 [0x7f4213fff700] DEBUG - MyPlex: Did token exchange for claim (returnCode: 408)

408 = timeout.
Check the default route of the host and DNS lookup. Something isn’t right.

You can get in but it’s not getting out. It tries to register but there is no reply.

1 Like

Switching to Google DNS solved everything, I have the server claimed now.

Thanks a ton for the help! I really appreciate it!!! :slight_smile:

1 Like

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