ukdtom / claimit Goto Github PK
View Code? Open in Web Editor NEWClaimIt 4 Plex Media Server
License: Mozilla Public License 2.0
ClaimIt 4 Plex Media Server
License: Mozilla Public License 2.0
If we try and claim an already claimed server, PMS returns 401
Sadly though, 401 is a tad generic, so suggest, that we before trying to claim the server, checks if it's claimed, and if so, abort
To check if a server is claimed, it should in the preference.xml have the email of the owner, and we can access that via:
http://PMS_IP:32400/:/prefs?X-Plex-Token=XXXXXX
and then look for PlexOnlineMail
Would be nice to do this check right before trying to claim the PMS
Looks like the endpoint /identity has an element named "claimed" :)
We should use that and abort if value is 1, and tell user to go here:
https://github.com/ukdtom/ClaimIt/wiki/Errors-and-Troubleshooting#401
running this against a PMS docker container
host is ubuntu 16.04 (in the process of building a new one)
Have tried it using the host ip, container ip and loopback, all giving the same results.
plex.tv Password:
plex.tv Password Repeated:
IP Address of PMS server: 127.0.0.1
Comparing entered passwords
Comparing entered passwords ok
Validating IP address
Getting PMS Server Identifier
Getting PMS Server Identifier ok
Getting User Token from plex.tv
Getting User Token from plex.tv ok
Getting PMS Claim Token
Getting PMS Claim Token ok
Claiming server
Fatal error happened
HTTP returned Status 401
As a heads up by using #!/bin/sh
you will have an error thrown on Ubuntu as it tries to execute the script with dash instead of bash. There shouldn't be any issue with specifying #!/bin/bash
with other distros but i didn't catch it on my read-through before running and had a headscratcher for a second.
Not going to do a pr for two letters, but anyone that is trying to use this wonderful script to solve a botched server claim on a buntu machine can easily fix it on their system by modifying line one and adding them so i figured id drop an issue as a heads up.
TLDR:
Change line 1 of the .sh to read #!/bin/bash
so you don't rely on the symbolic link for shell selection.
Windows has its own installer, and linux and mac, have theirs, there is also some documentation on how to claim to a nas from linux or mac, but absolutely nothing at all of any sort whatsoever even slightly mentioning about how to claim to a NAS from windows.
a little help please.
I had error 401 and I followed the instructions at plex.tv to remove the lines from Preferences.xml.
The I restarted my Linux box and my PC. Now I get error 500
any ideas? I realise that 500 is generic error, but I really have no idea. I have Apache2 on the same server as PMS so is it my web server that's returning the 500 or something else. Is there anything I can do to track the problem down.
Thanks
the-germ
LOGIN: Thunderdome## BENUTZERNAME:
Passwort: ####
Passwort: ####
IP: 192.168.178.77
Nothing happened.
Windows 10 Installation
We need a native Windows version of this as well
Plex Version: 1.40.0.7998
Latest ClaimIt version.
I'm unable to claim the server.
I tried ClaimIt, but it doesn't work (got error:500 and all fixes doesn't work to me)
I also tried reinstalling Plex a lot of times but still nothing.
It also says to update the server, but at least the OS doen't find any new update for it (so far i always updated it via OMV or directly via command line)
We need to check, if the entered IP Addy belongs to Private Address Space or loopback, since otherwise, we can't claim PMS
Hi,
Trying to run this on my linux server, getting the below error:
./claimpms.sh: 21: Syntax error: "(" unexpected
Permissions are set, not sure what else to do here.
Downloaded the script for it's purpose to reclaim my server.
I run it as root with the execute permission like it says in the wiki.
And the error I get is:
root@plex01:/home/username# ./claimpms.sh
./claimpms.sh: 21: Syntax error: "(" unexpected
root@plex01:/home/username#
Nothing happens further. I have no further scripting knowledge to do something with it. The script was pasted from the 'raw' view on the file.
We need to make a native windows exe file as well for this
We need to check, if the entered IP Addy belongs to Private Address Space or loopback, since otherwise, we can't claim PMS
I tried to run the latest version but it crashes when I try to open it.
There seems to be an issue with Windows.forms detecting PMS in
D:\repos\UKDTOM\ClaimPMS4Win\ClaimPMS4Win\Form1.cs:line 47.
Edit: It appears to run in a Win10 VM but I have no Plex server in the VM, so it fails to authenticate etc.
I added a PMS server to the VM and ClaimPMS4Win now crashes with the same error as shown on Win 11 above.
Edit 2: After making sure PMS in the Win10 VM was already signed in and Plex had finished site maintenance, ClaimPMS4Win worked as shown below:
It still crashes in Win 11 though, but if I click on the continue button in the crash dialogue, it runs properly and claims etc as shown in Win10VM image above.
Running ClaimPMS4Win a second time in Win 11, now shows below without any crash dialogue:
Win10 VM also shows the above when run a second time.
Installed plexmediaserver on my raspberry pi 4 recently and I've never had this issue before where it didn't claim the name when I had it setup on my raspberry pi 2. Same with setting it up on my Windows PC (didn't want to keep running it off my PC).
It's a complete fresh install. I've even uninstalled it, removed the directory, reinstalled it, rebooted the pi. Running the script with both 127.0.0.1 and the IP of the Pi (wired). DNS of the Pi is set to 8.8.8.8 and nslookup confirms that.
Have not touched Preferences.xml.
Any other ideas?
This is just a reminder that a better IP Address input box is needed for the Windows program.
The current box is somewhat confusing for inexperienced users.
I've just tried to use this script as my IP addressing is public and not private although quite why using public is an issue is beyond me but I digress...
username and password are correct and I use 127.0.0.1 as per the instructions but I get below:-
IP Address of PMS server: 127.0.0.1
Comparing entered passwords
Comparing entered passwords ok
Validating IP address
Getting PMS Server Identifier
Getting PMS Server Identifier ok
Getting User Token from plex.tv
******** ERROR ********
We failed to authenticate towards plex.tv
Please check username and password, as well as network access
I recently added 2FA to my Plex account after the password breach problem and it appears that this script was written before 2FA was available so it won't handle any 2FA responses.
Don't suppose anybody from Plex is looking to update this script?
Looks like the endpoint /identity has an element named "claimed" :)
We should use that and abort if value is 1, and tell user to go here:
https://github.com/ukdtom/ClaimIt/wiki/Errors-and-Troubleshooting#401
Linux script ref: https://github.com/ukdtom/ClaimIt/wiki/IP-Address-requirement
Above page doesn't exists, and should be:
https://github.com/ukdtom/ClaimIt/wiki/Errors-and-Troubleshooting
Hi, i'm running on Synology DS214+ DSM 6.2 PLEX 1.13.4.5271-200287a06
I test 127.0.0.1 and also 192.168.1.51, same result same error
i also test my login and password by loging off an loging on from the page http://192.168.1.51:32400/web/index.html# ([email protected])
Comparing entered passwords
Comparing entered passwords ok
Getting PMS Server Identifier
Getting PMS Server Identifier ok
Getting User Token from plex.tv
******** ERROR ********
We failed to authenticate towards plex.tv
Please check username and password, as well as network access
How can i pass this ?
Regards,
salutdiego
I am getting this error when trying to execute the script
./claimpms.sh: 17: ./claimpms.sh: Syntax error: "(" unexpected
root@FryC-RN204:/tmp# ./claimpms.sh
./claimpms.sh: line 7: syntax error near unexpected token newline' ./claimpms.sh: line 7:
'
Same when i start as bash:
root@FryC-RN204:/tmp# bash claimpms.sh
claimpms.sh: line 7: syntax error near unexpected token newline' claimpms.sh: line 7:
'
Thats what i've got after trying to start it on Netgear Readynas.
Any clues? Please...I'm trying to get it working for last 2 weeks, without success.
NAS have public IP address 91...* set up, it is connected straight to internet, without routers, NAT, etc.
All the time looking for servers, so claimpms is my last hope :)
plex.tv Username:
plex.tv Password:
plex.tv Password Repeated:
IP Address of PMS server: 127.0.0.1
Comparing entered passwords
Comparing entered passwords ok
Validating IP address
Getting PMS Server Identifier
Getting PMS Server Identifier ok
Getting User Token from plex.tv
Getting User Token from plex.tv ok
Getting PMS Claim Token
Getting PMS Claim Token ok
Claiming server
Fatal error happened
HTTP returned Status 401
blackops Plex Media Server #
Getting Can't Claim PMS... Job Aborted
Error Was: remote server returned error (500)
Running plex on freenas. This is from the windows claimit. Should I use the other one instead?
typing my working username and password into the script and it just says
We failed to authenticate towards plex.tv
Howdy:
Cool program. Trying to claim my plex server on Drobo 5N. Can't figure out why this error is throwing. I've installed curl via DroboPorts. Running the script on the Drobo itself utilizing 127.0.0.1 . The server is running.
./claimpms.sh: line 219: curl: not found
******** ERROR ********
We failed to get the Plex Media Server ID
Please check server is up and running, as well as the IP address entered
I tried to use this tool earlier today. For some strange reason, on my Win11 the ipAddress
entry was submitted with commas and not with periods, which made the app crash (separator must exist in ipAddress
). It did show period in the UI. I had to download the source to add the following to make it work.
Added comma
as a second separator on the string split.
int[] ipParts = ipAddress.Split(new String[] { ".", "," }, StringSplitOptions.RemoveEmptyEntries)
.Select(s => int.Parse(s)).ToArray();
ClaimIt/Windows/ClaimIt/Form1.cs
Line 278 in e979499
Hi there @trumpy81
If possible, and if time, you have an invite to https://github.com/ukdtom/ClaimPMS4Win pending
And if accepting, maybe pass the parts of the Wiki that's still relevant to that project?
And also go through this Wiki, and make sure it ref. the new repo when we talk about Wiki ?
I'm getting the error above.
Also:
Error was: The request was aborted: Could not create SSL/TLS secure channel
Any idea? Thanks
fix is below:
function GetLoginToken()
{
url="https://plex.tv/api/v2/users/signin"
local response=$(curl -X POST -i -k -L -s $url --data-urlencode "login=$1" --data-urlencode "password=$2" --data-urlencode "X-Plex-Client-Identifier=ClaimIt-$3")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.