New installation of Plex on Ubuntu but can't create libraries

Server Version#: 4.53.0
Player Version#: NA

This is a brand new installation. I created some directories under my home directory to house TV Shows but when I go to add this directory via the browse interface I find it but when I click add I receive a message that I have 0 libraries again.

Each time I do this I can see the new library in the interface but with an error that says You Must Be Lost. I have tried creating a new folder in my home directory with the name plex and then added a Television sub directory to that. Before trying to add again I did a chown to change the owner to the plex user but that also didn’t help.

Other things I have tried is to add plex to my user group to see if that gave it access.

Any help in adding libraries (I need somewhere to store DVR shows) and how I can delete now the phantom libraries that I can’t see in the settings but are there in the interface would be appreciated.

Thanks,
Abel

@abelardo_gmail_com

Did you create a username plex prior to installing PMS ?

No, it looks like it was created during installation.

Yes, it should be created during installation.

What my scripting does is to create the user, whose home directory is /var/lib/plexmediaserver. I add user plex to the group which owns /dev/dri/renderD128 (for HW transcoding). I then configure for the OS (startup routines) as needed.

During a new installation, I’ll start PMS.

Usually, from the time the installer launches PMS until you open the browser to PMS, there is enough time for PMS to complete its first-run setup of the data structures and databases.

If this is rushed & doesn’t complete, problems like this can happen.

There are a few ways of dealing with this.

Have you indexed any / much media at this point?

Have you tried other directories with full read write permissions (777), outside of the home directory?

I have not indexed any media and the libraries that exist are only visible in the interface and no way of deleting them in the setting->libraries. I have no media on this server as it was only going to be used as the DVR.

Yeah tried that and modifying permissions too

OK…

B.F.H time :smiling_imp:

  1. Stop Plex

  2. https://app.plex.tv

  3. Settings - Authorized Devices - Server (dropdown)

  4. REMOVE the server

  5. Sign out of Plex.tv

  6. sudo rm -rf /var/lib/plexmediaserver/Library

  7. Start PMS

  8. Wait 1 minute for it to create data structures and start

  9. Open Plex via http://127.0.0.1:32400/web

  10. Begin normal setup again.

If it fails, manually create a .tar.gz of the “Logs” directory and attach

Unfortunately, I went through the setup and added the library where I had created a folder where I changed the owner to plex and I get the same error and can’t see the library in the libraries section.

Oddly enough it did record into the original folder I had created and I see two recordings that I had scheduled earlier to test it.

PlexLogs.tar.gz (84.4 KB)

I am using a script to compress the files after recording so it could have been the script that did the file writing.

There should be no user data files under /var/ilb/plexmediaserver.
Everything there is for Plex use.
As such, there’s no reason for any scripting to be modifying any contents there

@abelardo_gmail_com

The first thing I see is that your PMS updates its schema.

Do you have a mechanism which resets PMS to as-installed each time?

There definitely appears to be 3rd party interference here. The challenge will be in finding it.

  1. How “stock” is this installation? (do you customize anything)
  2. Is this a VM or bare machine?
  3. What is this scripting you have ?

I meant in the DVR settings, there is a place to run a script after a recording has been done to reduce the size. It lives where the web interface tells me to put it in the Post Processing Script location.

As for stock: I just installed Ubuntu on a Lenovo box and decided to use it for the DVR, it’s not a VM. The script I put in is this: GitHub - nebhead/PlexPostProc: Plex PostProcessing Script for DVR(Beta)

I have to step away so won’t be able to troubleshoot more for a couple of hours.

Fair enough.

Thanks for clarifying the scripting. I wanted to make certain PMS itself wasn’t being reset and causing this problem.

I do think it’s a permissions / ownership problem in /var/lib/plexmediaserver.

we can investigate further (sudo chown -R plex:plex /var/lib/plexmediaserver ; systemctl restart plexmediaserver) when you return

I think that did it! I am able to see the libraries now and the two shows that were recorded are there. Thank you so much for your help. I’ll test it out further but I can also see the two libraries in the Settings->Libraries where I couldn’t see them before.

Enjoy the rest of your Sunday!

-Abel

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