This has been asked 1000 times but ... how does someone fix this stupid issue of claiming the server

So it seems it my turn to mess with this ridiculous server authentication/claiming issue and I’ve spent the last few hours trying to follow all the fixes that are posted out there - to no avail. I’ve tried SSH with Putty, sending all kinds of commands that i simply do not understand only to get errors and messages back that are equally confusing

I have a QNAP - can anyone tell me exactly how to fix this issue?

or i’m even open to suggestions other than Plex as a media server - which i paid for but apparently Plex can’t be bothered to offer any direct support?

Thanks in advance!

What exact issue do you experience with claiming your server?
I don’t mean to be dismissive but it’s not clear from your post.

Hey thanks and you’re right - in my frustration i left out some details.

Basically I was getting the server not authenticated notice and so i tried the SSH route using these sorts of commands - curl -X POST http://192.168.1.155:32400/myplex/claim?token= claim-XXXXXXXXXXXXXXXXXXXX [mod-edit: removed claim token]

but all failed -it could be because logging in through Putty i’d get this message - Could not chdir to home directory /share/homes/

And then i thought, OK, screw it, I’ll delete it off the QNAP and start over - which initially looked good until it told me I needed to claim the server - which i tried to do repeatedly - this is on the local PMS browser log in. No errors, it would just spin for a bit and i’d have the ‘claim’ button back, hit it again and same thing.

And that’s when I threw in the towel and asked for some help :wink:

And i was hoping, perhaps in futility but that there was some ‘easy’ way to actually fix this problem

At least for the curl command you need to put quotes around the URL when it has query parameters.

curl -X POST "http://192.168.1.155:32400/myplex/claim?token=claim-XXXXXXXXXXXXXXXXXXXX"

[mod-edit: removed claim token]

Thank you - same issue though.

And this highlights where i was hoping someone had an easy or at least complete answer - that was a copy/paste from a QNAP forum and for someone like me who is barely capable of even following these sorts of instructions, leaving things out like this of course isn’t going to get me too far :wink:

This can happen when Plex Media Server cannot communicate with hosts at plex.tv (which is required to claim the server & associate it with your plex.tv account).

It shows up as “cannot resolve host” messages in the Plex Media Server.log file.

Verify the default gateway and DNS settings for the QNAP.

Try rebooting your internet router and/or the QNAP.

Hey there - thank you, you might be on to something!

I don’t have a ‘cannot resolve host’ but i do have this - Network: 192-168-1-155.abcdefghijklmnopqrstuvwxyz012345.plex.direct failed to resolve to 192.168.1.155 but instead yielded “10.0.0.1”

192.168.1.155 is my qnap, which i’ve rebooted and looking at the default gateway in the QNAP it’s set to my router IP and DNS primary is also to my router, 2nd to 8.8.8.8

Any thoughts?

How to Use Secure Server Connections

  1. Do you have anything with a Net 10 address?
    Wondering why it returned 10.0.0.1.

  2. See the part about DNS Rebinding in the above support document (in the “Why isn’t it working” section). Look in your router for a way to whitelist the plex.direct domain (or pfSense firewall, pihole, etc).

  3. Try placing a public DNS first in the QNAP.

  4. If your ISP has any network security offerings, try disabling them. For example, in the US, XFinity has xFi Security. It can definitely interfere with remote access working and might interfere with claiming as well. It is enabled / disabled in the account settings. Other ISPs have similar offerings. See Troubleshooting Remote Access.

On a separate note, take a look at the User Credential Reset utility for claiming a server. You still need all the DNS stuff worked out. But might be easier than manually issuing curl commands (it essentially does the same thing, just a different interface).

Thanks FordGuy!

  1. No Net 10 Address that i know of
  2. Done - Google Home/Nest Router - used Googles DNS
    3 Done - same as above
  3. should not be the case

And with these changes it seemed to make a difference but still no joy - feels like it got a token maybe but still saying i need to claim it

[Req#2482/HCl#113] HTTP requesting POST https://plex.tv/api/claim/exchange?token=xxxxxxxxxxxxxxxxxxxx28fn9y
Jan 05, 2023 12:50:21.620 [0x7fdaf6706b38] DEBUG - Killing job.
Jan 05, 2023 12:50:21.620 [0x7fdaf6706b38] DEBUG - Signalling job ID 15818 with 9
Jan 05, 2023 12:50:21.620 [0x7fdaf6706b38] DEBUG - Media Analyzer: Background analysis completed in 30.0 seconds, removing 1 IDs
Jan 05, 2023 12:50:21.622 [0x7fdafca94b38] DEBUG - Jobs: ‘/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Media Scanner’ exit code for process 15818 is -9 (signal: Killed)
Jan 05, 2023 12:50:23.061 [0x7fdaf6503b38] DEBUG - Request: [127.0.0.1:37808 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=221&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=analyzing (4 live) #2483 GZIP
Jan 05, 2023 12:50:23.061 [0x7fdafc879b38] DEBUG - Completed: [127.0.0.1:37808] 200 GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=221&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=analyzing (4 live) GZIP 0ms 195 bytes (pipelined: 2)
Jan 05, 2023 12:50:23.061 [0x7fdaf6503b38] DEBUG - Request: [127.0.0.1:37808 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=221&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=thumbnailing (4 live) #2488 GZIP
Jan 05, 2023 12:50:23.062 [0x7fdafc879b38] DEBUG - Completed: [127.0.0.1:37808] 200 GET /:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=221&metadataType=1&state=-1&parentID=-1&rootID=-1&mediaState=thumbnailing (4 live) GZIP 0ms 195 bytes (pipelined: 3)
Jan 05, 2023 12:50:23.776 [0x7fdafb199b38] DEBUG - [HttpClient/HCl#113] HTTP simulating 408 after curl timeout
Jan 05, 2023 12:50:23.776 [0x7fdaf5af4b38] DEBUG - [Req#2482] MyPlex: Did token exchange for claim (returnCode: 408)
Jan 05, 2023 12:50:23.814 [0x7fdaf5af4b38] DEBUG - [Req#2482] MyPlex: Got a token poked, let’s act on it.

And thank you, i had stumbled on GitHub - ChuckPa/UserCredentialReset: User Credential Reset utility for Plex - but was totally lost on how to actually use it - I think i need the ‘For Dummies’ instructions on how to execute it.

It looks like it is still timing out.

Plex Media Server must be stopped when the utility is launched. If PMS is running, the utility will say “Please stop Plex” and exit.

  1. Go to https://github.com/ChuckPa/UserCredentialReset

  2. Click on “Latest” under Releases on the right.

  3. Click on UserCredentialReset.sh to download.

  4. It downloads as a .sh file, so no need to uncompress/untar/etc.

  5. Move it to /share/Public on the QNAP.

  6. SSH to the QNAP.

  7. Become root: sudo sh

  8. Make the utility executable: chmod +x UserCredentialReset.sh

  9. Run it. ./UserCredentialReset.sh

  10. You should be prompted to enter the claim code from https://plex.tv/claim.

    Scroll to the bottom of the GitHub page. It shows how it looks when running on a QNAP.

  11. The utility will tell you if it completes successfully. If so, you can then start PMS.

Thanks for all this, FordGuy!

Getting closer but i don’t think i have that sh file in the right location

[admin@MB-NAS /]# /chmod +x UserCredentialReset.sh
sh: /chmod: No such file or directory

i don’t seem to have a share/public folder - just a /public folder - do i need to create a share/public? (somehow)

image

I also changed the permissions to include ‘execute’ - same error

No slash before chmod.

[admin@MB-NAS /]# chmod +x UserCredentialReset.sh

You do want the ./ when running the utility in the next step.

[admin@MB-NAS /]# ./UserCredentialReset.sh

Give it a try using /public.

not sure how that / go there - is this the right format?

[admin@MB-NAS /]# chmod +x UserCredentialReset.sh
chmod: UserCredentialReset.sh: No such file or directory

You should be running as the root user.

Did you issue the su root command?

Here’s a clean session - thinking perhaps its the first ‘error’ message - could not chdir /share/homes/?

login as: MbNa$
MbNa$@192.168.1.155’s password:
Could not chdir to home directory /share/homes/MbNa$: No such file or directory
[MbNaMB-NAS /]$ sudo sh
Password:
[admin@MB-NAS /]# chmod +x UserCredentialReset.sh
chmod: UserCredentialReset.sh: No such file or directory
[admin@MB-NAS /]#

The “Could not chdir…” means there is no home directory for MbNa, which is not a problem.

When you issue sudo sh and become root, you are also placed in the root directory, /.

You need to change directory to where the utility is located (I should have put that between steps 7 & 8 above).

  1. sudo sh

7a. cd /share/Public

  1. chmod +x UserCredentialReset.sh

  2. ./UserCredentialReset.sh

So close! Any thoughts on what Error 28 - it took abo 5 min to come up?

      Plex Media Server user credential reset and reclaim tool (QNAP)

This utility will reset the server’s credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim

Please enter Plex Claim Token copied from http://plex.tv/claim : claim-Tzxxxxxxxxx
Clearing Preferences.xml
Getting new credentials from Plex.tv
ERROR: Could not get credentials from plex.tv (Error: 28)

That’s a timeout error. The NAS is having trouble communicating with hosts at plex.tv.

Issue the command nslookup plex.tv.

You should get back something similiar to this:

# nslookup plex.tv
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   plex.tv
Address: 52.19.183.102
Name:   plex.tv
Address: 34.243.47.112
Name:   plex.tv
Address: 52.48.60.59
Name:   plex.tv
Address: 52.49.138.125

Seems you’re on to something - and back to the other day when this 10.0.0.1 popped up in the error log

[admin@MB-NAS Public]# nslookup plex.tv
Server: 127.0.1.1
Address: 127.0.1.1#53

Name: plex.tv
Address: 10.0.0.1

Not sure what i’m doing but checked my routers address pool and it’s 192.168.1.20 to 1.250 - so not sure where this 10.0.0.1 is coming from

There is a configuration problem on your QNAP (or maybe in your network).

This is the same problem that appeared earlier in the thread with the “failed to resolve…” error message.

You previously set your DNS to use Google (8.8.8.8), so that should be OK.

Let’s take a look at the hosts file. Issue cat /etc/hosts. What does it show?

# cat /etc/hosts
127.0.0.1       localhost
127.0.0.1       kiowa