Installation not working

Hello, im trying to setup a new plex media server but its not working for some reason. soon after i go to the web url and login using my email email im getting an error :

Not authorized
You do not have access to this server.

You may be able to claim it by choosing “Open Plex…” from the Plex menu in the macOS menu bar or Windows system tray. For more troubleshooting tips, see our .

I tried all sort of method to troubleshoot including using a claim code but its just not working. i also reinstalled plex media server twice in my ubuntu server. Any idea what could be the issue? I was able to access theweb and login once. But I couldn’t add my media directory so i reinstalled the media server.

root@server # journalctl -u plexmediaserver -n 50 --no-pager
Jul 29 18:09:48 server systemd[1]: Starting Plex Media Server…
Jul 29 18:09:48 server systemd[1]: Started Plex Media Server.
Jul 29 18:22:28 server systemd[1]: Stopping Plex Media Server…
Jul 29 18:22:28 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 18:22:28 server systemd[1]: Stopped Plex Media Server.
Jul 29 18:22:28 server systemd[1]: plexmediaserver.service: Consumed 23.181s CPU time.
Jul 29 18:22:28 server systemd[1]: Starting Plex Media Server…
Jul 29 18:22:28 server systemd[1]: Started Plex Media Server.
Jul 29 18:39:10 server systemd[1]: Stopping Plex Media Server…
Jul 29 18:39:10 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 18:39:10 server systemd[1]: Stopped Plex Media Server.
Jul 29 18:39:10 server systemd[1]: plexmediaserver.service: Consumed 4.962s CPU time.
Jul 29 18:41:05 server systemd[1]: Starting Plex Media Server…
Jul 29 18:41:05 server systemd[1]: Started Plex Media Server.
Jul 29 18:46:25 server systemd[1]: Stopping Plex Media Server…
Jul 29 18:46:25 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 18:46:25 server systemd[1]: Stopped Plex Media Server.
Jul 29 18:46:25 server systemd[1]: plexmediaserver.service: Consumed 22.616s CPU time.
Jul 29 18:48:52 server systemd[1]: Starting Plex Media Server…
Jul 29 18:48:52 server systemd[1]: Started Plex Media Server.
Jul 29 18:51:32 server systemd[1]: Stopping Plex Media Server…
Jul 29 18:51:32 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 18:51:32 server systemd[1]: Stopped Plex Media Server.
Jul 29 18:51:32 server systemd[1]: plexmediaserver.service: Consumed 3.553s CPU time.
Jul 29 18:51:32 server systemd[1]: Starting Plex Media Server…
Jul 29 18:51:32 server systemd[1]: Started Plex Media Server.
Jul 29 18:55:36 server systemd[1]: Stopping Plex Media Server…
Jul 29 18:55:36 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 18:55:36 server systemd[1]: Stopped Plex Media Server.
Jul 29 18:55:36 server systemd[1]: plexmediaserver.service: Consumed 3.383s CPU time.
Jul 29 18:55:36 server systemd[1]: Starting Plex Media Server…
Jul 29 18:55:36 server systemd[1]: Started Plex Media Server.
Jul 29 18:56:33 server systemd[1]: Stopping Plex Media Server…
Jul 29 18:56:33 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 18:56:33 server systemd[1]: Stopped Plex Media Server.
Jul 29 18:56:33 server systemd[1]: plexmediaserver.service: Consumed 2.801s CPU time.
Jul 29 19:00:37 server systemd[1]: Starting Plex Media Server…
Jul 29 19:00:37 server systemd[1]: Started Plex Media Server.
Jul 29 19:03:54 server systemd[1]: Stopping Plex Media Server…
Jul 29 19:03:54 server systemd[1]: plexmediaserver.service: Deactivated successfully.
Jul 29 19:03:54 server systemd[1]: Stopped Plex Media Server.
Jul 29 19:03:54 server systemd[1]: plexmediaserver.service: Consumed 3.187s CPU time.

Probably best to use ChuckPA’s User Credential Reset Tool:
https://github.com/ChuckPa/UserCredentialReset

I would start with a copy of your server logs. could be DNS issues, or a host of other things that need addressed in your setup.

Definitely need the server logs ZIP / tar.gz to start

Get into "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server" (if using the native package).

sudo tar cfz /tmp/PlexLogs.tar.gz ./Logs

Next, upload / attach the /tmp/PlexLogs.tar.gz here

Thanks for the replies. I tried to use that password reset utility but it was not successful -

root@server /var/lib/plexmediaserver/Library/Application Support/Plex Media Server # ./UserCredentialReset.sh
./UserCredentialReset.sh: line 7: syntax error near unexpected token newline' ./UserCredentialReset.sh: line 7:

@ChuckPa I have gathered the logs as requested. My requirement is simple, I just wanted to install Plex, add a library path (/home/mediia/Downloads) and let it detect the files within this directory path.

@johnchristy387

Thank you for the logs.

I found the error immediately.

Your LAN adapter is a 94.x.x.x address.
This is a WAN IP range. It’s not in the expected RFC-1918 block as defined by IETF

What is your network topology?

ISP → Modem/Router → PMS server?

-or-

ISP → PMS server ?

Hi @ChuckPa I’m gonna be honest. I have no idea. This is a dedicated server I bought from a service provider. Not something I host personally. The IP you shared is the public IP address of the dedi server.

@johnchristy387

About to go offline for the night here but wanted to give some help.

  1. Download my UserCredentialReset.sh script on your computer then upload to the server machine you have
  2. Extract the tar file
  3. Give the .sh file permission to execute (All in the README.md)

Now, to use.

  1. Make certain Plex is stopped
  2. “scp” the tar.gz to the machine
  3. “ssh” into it (login) and get the command line.
  4. On the ssh session, extract the tar file contents. (per the README on github)
  5. Make the script “executable” so you can run it.
  6. As root, use sudo command to do it
sudo chmod +x UserCredentialReset.sh
sudo ./UserCredentialReset.sh
  1. it will wait for you to get a Claim Token
  2. Go to https://plex.tv/claim
  3. It gives a token
  4. Click to copy it into your browser
  5. Return to the ssh session
  6. PASTE the token from the browser into the ssh session
  7. Hit enter after you see the text showing there
  8. After a few seconds, you’ll see your username and password
    confirmed by the script ( it has authenticated and attached the server to your account)
  9. Start Plex
  10. Now open it using https://app.plex.tv
  11. You can close the SSH session.

Setup the machine however you deem appropriate.

Hi @ChuckPa thanks so much it worked..

root@server # ./UserCredentialReset.sh -p “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml”

      Plex Media Server user credential reset and reclaim tool (User-Defined)

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

Using given Preferences path: ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml’
Please enter Plex Claim Token copied from http://plex.tv/claim : claim-xxxxxxxxxxxxxx
Clearing Preferences.xml
Getting new credentials from Plex.tv
Claim completed without errors.
Username: xxxxxxxxxxx
Email: xxxxxxxxx

Now I’m able to access the web panel. But may I know why you asked me to access https://app.plex.tv/ instead http://myip:32400/web/index.html?

May be this is a very silly question, but this is the reason i messed up the install and tried to reinstall it again. How do I configure my media path in plex? I saw online guides where it’s asking users to add library etc but I don’t see such an option. I simply need plex to scan this directory for media files: /home/media/Downloads

Thanks so much

Don’t let Plex scan folders which could potentially contain half-downloaded files.
Don’t point Plex to folders which contain a mix of media types.
Movies are different from series, are different from music, is different from photos.

When you create your libraries in Plex, you tell the library which folder(s) it shall scan for media.
https://support.plex.tv/articles/categories/plex-media-server/libraries/
https://support.plex.tv/articles/categories/your-media/

Ok that;s fine. But how to I add the library and to go through that setup guide? I read this article - https://support.plex.tv/articles/200288926-creating-libraries/ but couldn’t find the setting icon?

When i clicked the server icon it’s saying something unrelated:

app.plex.tv is unable to connect to “server” securely
Its “Secure connections” setting may be set to disabled, or you may need to adjust some settings on your network.
Then it’s asking me to download windows server?

I’m sorry if im missing something very very basic here, but it;s really confusing. Where is this “Browse for media folder” wizard? how do I access it?

The fact that your server’s name still appears with a red exclamation mark on the left side bar means, that you still haven’t succeeded with claiming the server.
Try clicking on it, to see if there is more than one item to select.

Hm the bash script says I have successfully claimed it. And im able to access the web app. when i click that’s it shows this :

Which doesnt make any sense because my media server is Ubuntu

As far as I can see, you have not claimed that server – at least not with the account that you use to post in this here forum.
But I defer to @ChuckPa for further investigation, as I have no big clue of Linux in general.

Ok, I just ran the bash script again - can you check now?

      Plex Media Server user credential reset and reclaim tool (User-Defined)

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

Using given Preferences path: ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml’
Please enter Plex Claim Token copied from http://plex.tv/claim : claim-xxxxxxxxxxxxx
Clearing Preferences.xml
Getting new credentials from Plex.tv
Claim completed without errors.
Username: xxxxxxxxxxx
Email: xxxxxxxxxx

Complete. You may restart PMS.

:confused:

Nope. It looks like you are using a Gmail account for authentication, and don’t have a Plex.tv password. That might be important.

Thank you for your reply, but I am not sure how that is relevant. Google SSO is a common integration method on many platforms now. However, I have manually set a password. After attempting to claim it, I received a success message, but I still encounter an error when I click the server.

app.plex.tv is unable to connect to “server” securely.

Do I need to have an active Plex Pass subscription for this to work? I wanted to purchase that but only after trying. Right now I only have " Remote Watch Pass".

Can you post a copy of your server logs?

Thank you for your willingness to help. I previously shared the server logs but later deleted them, as they contained the IP details of the media server.

@ChuckPa if you have any insights on this, please let me know.