Unable to Claim Server with tunnel open to NAS

I can’t claim my server.

I’m running Plex on a Synology NAS set up according to the directions of the second half of this thread https://forums.plex.tv/discussion/275047/looking-for-servers-not-finding-local-server-host

So I have my tunnel set up so i can access plex via 127.0.0.1:8888/web. I can see and play my libraries as normal, but when i attempt to claim the server it never succeeds in doing so.

This is what I run in to.

  1. https://ibb.co/nQXNi8
  2. https://ibb.co/by2Ni8
  3. https://ibb.co/hoQWbT

Alternatively, clicking claim server tries to work but never succeeds

  1. https://ibb.co/nq7Ni8

I can’t access plex through the server IP address 62.x.x.x:32400. Its stuck at looking for servers until i can claim it through the local host tunnel.

I have tried deleting preferences.xml as suggested in this thread

How do I claim my server with a tunnel open?

The normal tunnel sequence is:

ssh -L 8888:127.0.0.1:32400  ip.addr.of.remote
sign-in
let sit open and idle

In existing browser tab: SIGN OUT the browser app

In a new browser tab

http://127.0.0.1:8888/web

If you do not see PMS, return to your SSH session and see if it’s running ps -ef | grep -i plex

No dice.

I opened the tunnel.
Signed out of the browser app.
Then closed the browser tab.
Opened a new browser tab
Entered http://127.0.0.1:8888/web
Clicked claim server which prompted me to sign in.
Claim server tried but failed to claim server.

@ChuckPA said:
If you do not see PMS, return to your SSH session and see if it’s running ps -ef | grep -i plex

I do see PMS. I can use it to locally play media with the tunnel open.
I don’t know what ps -ef | grep -i plex is.

At this point, we perform a ‘soft reset’ of the ownership.

In the terminal session

# Stop PMS
systemctl stop plexmediaserver     # if a systemd based linux machine (ubuntu 16+ ,  centos 7, or fedora)

# Remove the ownership info / reset it 
rm -f "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml"

# Start it
systemctl start plexmediaserver

Return to the SSH-tunnel browser tab and CTRL-F5 (referesh it.)

You should be greeted with the sign-in and setup wizard
As you progress through the setup wizard, DO NOT CREATE NEW LIBRARIES (they were not reset and are at the Dashboard waiting for you)
When you click Finish, you’ll arrive at the Dashboard and see your libraries

Go to Settings - Server and review all settings. Some (those stored in the Preferences file) will have been reset to default.

So we enter those commands into the terminal session?

I just got a command not found on the first one

what is the system running on? (Which distro?)

cat /proc/1/comm will tell us the other info I need. Based on the error above, I expect you’ll see init returned

If init is returned, the correct command as root not admin is service plexmediaserver stop and later service plexmediaserver start

your right. it returned init

I now have to find the password. If you know, that’d be great. if not, i’ll update when i’ve made progress.

I saw where you signed in as admin but don’t know anything else about the machine.

What can you tell me about this system?

Most NAS boxes (especially Synology and QNAP) have the same password for root as admin).

Can’t tell you much. Its a Synology DS916+. I can access the DSM web interface normally. The Plex app needs the tunnel until the server is claimed.

Tried login as root. password as admin. Access Deined.

root access by doing this
https://www.synology.com/en-us/knowledgebase/DSM/tutorial/General/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet

and command not found, :frowning:

I apologize, I missed the Synology part because you had opened this in Linux and not the Synology forum. (VERY long day here but not your problem)

On Synology, all package (app) start/stop control is done in Package Center.

The sequences I gave you above apply to regular Linux. On Synology it’s this way.

If you have Web UI access (port 5000) directly, great. Here’s the sequence

  1. Stop Plex in Package Center
  2. Control Panel - Shared Folders - Edit the Plex share. Give your username R/W permission
  3. Open FileStation and navigate Plex/Library/Application Support/Plex Media Server
  4. You will see Preferences.xml. Right-click and delete it
  5. Back to Package Center and Start PMS

The ssh tunnel to the Syno is different:

ssh -l admin -L 8888:127.0.0.1:32400  ip.addr.of.syno

Sign in with the admin password
sudo -su root
Let it sit there until/if needed

Back on your workstation you still do the 127.0.0.1:8888/web

Please let me know if this has helped now that i’m in proper sync with reality :confused:

PS: You don’t need to upload images to a third site. you can drag/drop them here or ‘attach’ at the top of this reply window

Sadly, that didn’t work. I tried it again, but that process is exactly what led me to my initial post. I’ve got access as long as the tunnel is up. My sever is “unclaimed and not secure” but following normal steps doesn’t claim anything. It just thinks for a minute then ends back at the start.

I’ve got to run, but I’ll be back in a week and we’ll pick this up then. Thanks for your help.