Brand new install database failure

Server Version#: 1.19.4.2935
Player Version#:

Brand-new install on Ubuntu 18.04, but the library is failing to load. I have a similar problem to that in this thread/: Plex 1.18 corrupted DB (Fix in thread)
I’ve tried the database troubleshooting guide but ./Plex\ Media\ Scanner --list continues to throw the error about a missing column:

terminate called after throwing an instance of 'soci::soci_error'
  what():  sqlite3_statement_backend::prepare: no such column: library_sections.content_changed_at for SQL: select library_sections.id as 'library_sections_id', library_sections.library_id as 'library_sections_library_id', library_sections.name as 'library_sections_name', library_sections.name_sort as 'library_sections_name_sort', library_sections.section_type as 'library_sections_section_type', library_sections.language as 'library_sections_language', library_sections.agent as 'library_sections_agent', library_sections.scanner as 'library_sections_scanner', library_sections.user_thumb_url as 'library_sections_user_thumb_url', library_sections.user_art_url as 'library_sections_user_art_url', library_sections.user_theme_music_url as 'library_sections_user_theme_music_url', library_sections.created_at as 'library_sections_created_at', library_sections.updated_at as 'library_sections_updated_at', library_sections.scanned_at as 'library_sections_scanned_at', library_sections.user_fields as 'library_sections_user_fields', library_sections.query_xml as 'library_sections_query_xml', library_sections.query_type as 'library_sections_query_type', library_sections.uuid as 'library_sections_uuid', library_sections.changed_at as 'library_sections_changed_at', library_sections.content_changed_at as 'library_sections_content_changed_at' from library_sections
****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /home/medwards/Library/Application Support/Plex Media Server/Crash Reports/1.19.4.2935-79e214ead/PLEX MEDIA SCANNER/562f445b-ebdc-d63f-72835ceb-49b0734d.dmp
Error in command line:the argument for option '--serverUuid' should follow immediately after the equal sign
Crash Uploader options (all are required):
  --directory arg       Directory to scan for crash reports
  --serverUuid arg      UUID of the server that crashed
  --userId arg          User that owns this product
  --platform arg        Platform string
  --platformVersion arg Platform version string
  --vendor arg          Vendor string
  --device arg          Device string
  --model arg           Device model string
  --sentryUrl arg       Sentry URL to upload to
  --sentryKey arg       Sentry Key for the project
  --version arg         Version of the product
Aborted (core dumped)

You need to supply a couple of environment variables on the command line when running the process manually: LD_LIBRARY_PATH and PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR. On a default installation, the command would look something like this:

LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib/ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application\ Support/ ./Plex\ Media\ Scanner --list

Thank you. And you have to run it as the plex user, right? Now I don’t get the error, but if I run it with --scan -p or --scan -v, I get no feedback. I can’t tell if it’s silently dying or if it really is scanning in the background, but the web view shows an empty library. I had this working a few years ago on another box, so I’m obviously missing something.

I tested, and I can run it as my user or plex. Running a scan doesn’t produce any command-line output; you’ll need to check “Plex Media Scanner.log” for that. Or, if you want to be sure it’s doing something, you can write the log with a custom suffix:

sudo -u plex LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib/ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application\ Support/ ./Plex\ Media\ Scanner --scan --log-file-suffix " Manual Scan"

May we rewind a bit please?

  1. What is this installed on? CPU & Distro/Version.
  2. Is there a service override? (Installation installs to /var/lib/plexmediaserver by default)
  3. Were any of the directories or Plex user created in advance or did the installer do all the work?
  1. Installed on Ubuntu 18.04 LTS with a Intel i7-3820 CPU @ 3.60GHz from downloaded deb file.
  2. No service override. Just went with defaults.
  3. My Music directory was pre-existing. I granted read perms to all users after the install as part of my troubleshooting. Plex user was added as part of the installer.

I ran tail -f Plex\ Media\ Scanner.log and then started a scan via the web interface, but nothing was logged.

If no overrides are in use,

why is it in:

/home/medwards/Library/Application Support/Plex Media Server/Crash Reports/1.19.4.2935-79e214ead/PLEX MEDIA SCANNER/562f445b-ebdc-d63f-72835ceb-49b0734d.dmp

This is not where PMS should be.

Please explain.

Given the post above about the scanner, please check /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs (or /home/medwards.... ) and gather all log files there in a tar.gz or ZIP

Explain? Like I said, I just accepted all defaults when installing from the command line. If that path is not standard, I don’t know how it was set. Logs attached.logs.tar.gz (308.5 KB)

Your logs show that Plex is looking for media under /home/medwards/Music; by default, user plex doesn’t have access to anything under /home/username. You can give it access by modifying the ACLs for your user’s home directory. Something like:

'sudo setfacl -m u:plex:rx /home/medwards`

Edit: Scratch that. I was confusing /media/username with /home/username for a moment there. But you do need to ensure that plex has at least read and execute permissions to wherever the media is stored.

Jul 18, 2020 11:40:36.317 [0x7f0af3d112c0] ERROR - Couldn't get size of file "/home/medwards/Music/Django Reinhardt and Stephane Grappelly": boost::filesystem::file_size: Permission denied: "/home/medwards/Music/Django Reinhardt and Stephane Grappelly"

Please allow me to explain.

  1. I wrote the installer for Debian.
  2. There are no options to set with dpkg -i plexmediaserver_blah-blah.deb
  3. If you have not yet rebooted the system, and installed the DEB file from plex.tv/downloads, there will be a log file /tmp/plexinstaller.log. Please share that file here as it will tell me what it found.
  4. If this system is INIT based, the override is rather silent and exists in /etc/default/plexmediaserver else the override is in /etc/systemd/system/plexmediaserver.service.d/override.conf unless a non-standard modification was made to /lib/systemd/system/plexmediaserver.service

From your logs,

  1. User plex does not have proper permission to read the media files, in your home directory, which you’ve pointed it at.
Jul 18, 2020 11:29:32.440 [0x7f2781ffb700] DEBUG - Scanning Music using en(Plex Music) with 0 current media items and 1 section locations in the database...
Jul 18, 2020 11:29:32.440 [0x7f2781ffb700] DEBUG - Performing a scan with 'Plex Music' (language: en virtual: 0).
Jul 18, 2020 11:29:32.440 [0x7f2781ffb700] DEBUG -   * Scanning /home/medwards/Music
Jul 18, 2020 11:29:32.440 [0x7f2781ffb700] DEBUG - Scanner: Processing directory /home/medwards/Music (parent: no)
Jul 18, 2020 11:29:32.441 [0x7f2781ffb700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/home/medwards/Music/Django Reinhardt and Stephane Grappelly"
Jul 18, 2020 11:29:32.441 [0x7f2781ffb700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/home/medwards/Music/Patton Oswalt"
Jul 18, 2020 11:29:32.441 [0x7f2781ffb700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/home/medwards/Music/kdps2-2.mp3"
Jul 18, 2020 11:29:32.441 [0x7f2781ffb700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/home/medwards/Music/Porcupine Tree"
Jul 18, 2020 11:29:32.441 [0x7f2781ffb700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/home/medwards/Music/sandbox"
Jul 18, 2020 11:29:32.441 [0x7f2781ffb700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/home/medwards/Music/John Mayall, E

I hope these logs came from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs. If not, then there is something very strange going on.

The existence of /home/medwards/Library/ will not be there whatsoever without the use of an override.

What I’m hoping to understand, so I can help you better,

  1. Is the /home/medwards/Library something you attempted which failed? If so, please remove it.
  2. Do you need help with permissions for user plex to read your media or do you wish to customize the configuration to make life easier?

OK, so the perms must be the culprit. Thanks for the detailed explanation. I think I’ll modify where I mount my music drive and start over. to eliminate the $HOME/Library directory issue. (The box has been rebooted.)

Thank you both for taking the time to assist!

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