Our forum migration to Discourse is underway and scheduled to last through June 21. During the migration, the forums will be read-only, except for a single temporary forum (contents of which will not be getting transferred). Read our announcement post for more information about the forum migration.
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex Media Scanner returning nothing on "--list"

jjkakakkjjkakakk Members, Plex Pass Posts: 30 Plex Pass

My plex is working normally with a tv section, and a movies section etc.

However, on running "/usr/lib/plexmediaserver/Plex\ Media\ Scanner --list" - it returns nothing, and doesn't show my various sections; however the plex server proper still sees / serves content properly.

I've recently changed the 'PLEX_MEDIA_SERVER_USER' account that the plex server runs under in /etc/default/plexmediaserver - would that be related?

How can i fix this (or debug it), so that i can manually update libraries when required? The log (cat '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex\ Media\ Scanner.log') does not show any errors that i can see, relating to having zero sections?

thank you

Never attribute to malice that which is adequately explained by stupidity.

Answers

  • TheCli3ntTheCli3nt Members, Plex Pass Posts: 75 Plex Pass

    I too am having this issue. Running the following commands does nothing.

    export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
    /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list

    Jay "The Cli3nt" Bishop
    Father, Geek, Gamer, Bleeder
    Blogger
    TheCli3nt.com
    jay@thecli3nt.com

    Hardware: GLaDOS (PMS): AMD - FX-8300 CPU @ 3.3GHz × 8, 8GB DDR3, Root: 500GB, Media: 46TB OS: Ubuntu 16.04.1 64-bit, Lucy (Coverter): AMD FX-8320 @ 3.5GHz × 8, 8GB DDR3, Root: 1TB, Media: 4TB, OS: Ubuntu 17.04 64-bit
    Clients: Xbox 360 & One, PlayStation 3 & 4, Roku Stick, Express+, 3 and Premiere, Windows 10 PC (Windows 10 Plex app and Chrome web browser), Android Tablets & Phones
    Media: 5,918 Movies, 1,261 TV Shows, 168 Documentary Movies, 175 Documentary Series, 439 Books (Audio/eBooks), 95 Stand-up Comedy Specials, 3.1M+ Music Tracks

  • hthighwayhthighway Members, Plex Pass, Plex Ninja Posts: 6,480 Plex Ninja
    edited August 2016

    You may be running into the issue of needing a plex token.
    Open a browser and try:
    http://[PMS_IP_Address]:32400/library/sections
    If you get 401 Unauthorized then you do indeed need your Plex Token

    Then from the CLI use curl -X GET "http://127.0.0.1:32400/library/sections?X-Plex-Token=XXXXXXXXXX"

    REF: https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token

    • Paul
  • TheCli3ntTheCli3nt Members, Plex Pass Posts: 75 Plex Pass

    And if I don't get the 401 Unauthorized?

    Jay "The Cli3nt" Bishop
    Father, Geek, Gamer, Bleeder
    Blogger
    TheCli3nt.com
    jay@thecli3nt.com

    Hardware: GLaDOS (PMS): AMD - FX-8300 CPU @ 3.3GHz × 8, 8GB DDR3, Root: 500GB, Media: 46TB OS: Ubuntu 16.04.1 64-bit, Lucy (Coverter): AMD FX-8320 @ 3.5GHz × 8, 8GB DDR3, Root: 1TB, Media: 4TB, OS: Ubuntu 17.04 64-bit
    Clients: Xbox 360 & One, PlayStation 3 & 4, Roku Stick, Express+, 3 and Premiere, Windows 10 PC (Windows 10 Plex app and Chrome web browser), Android Tablets & Phones
    Media: 5,918 Movies, 1,261 TV Shows, 168 Documentary Movies, 175 Documentary Series, 439 Books (Audio/eBooks), 95 Stand-up Comedy Specials, 3.1M+ Music Tracks

  • TheCli3ntTheCli3nt Members, Plex Pass Posts: 75 Plex Pass

    This is what I get when trying to update from the CL

    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ export LD_LIBRARY_PATH="/usr/lib/plexmediaserver"
    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ export LANG="en_US.UTF-8"
    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6"
    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ export PLEX_MEDIA_SERVER_TMPDIR="/tmp"
    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ export PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver"
    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/var/lib/plexmediaserver/Library/Application Support"
    logged_in_user@MediaServer:/usr/lib/plexmediaserver$ /usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan --refresh --section 1
    terminate called after throwing an instance of 'std::runtime_error'
    what(): Codecs: Initialize: 'Failed to create UUID file'
    ****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Crash Reports/2ff58c4b-ce26-74eb-487b1f4c-14ffe8f9-v-1.0.3.2461-35f0caa.dmp
    Aborted (core dumped)

    Jay "The Cli3nt" Bishop
    Father, Geek, Gamer, Bleeder
    Blogger
    TheCli3nt.com
    jay@thecli3nt.com

    Hardware: GLaDOS (PMS): AMD - FX-8300 CPU @ 3.3GHz × 8, 8GB DDR3, Root: 500GB, Media: 46TB OS: Ubuntu 16.04.1 64-bit, Lucy (Coverter): AMD FX-8320 @ 3.5GHz × 8, 8GB DDR3, Root: 1TB, Media: 4TB, OS: Ubuntu 17.04 64-bit
    Clients: Xbox 360 & One, PlayStation 3 & 4, Roku Stick, Express+, 3 and Premiere, Windows 10 PC (Windows 10 Plex app and Chrome web browser), Android Tablets & Phones
    Media: 5,918 Movies, 1,261 TV Shows, 168 Documentary Movies, 175 Documentary Series, 439 Books (Audio/eBooks), 95 Stand-up Comedy Specials, 3.1M+ Music Tracks

  • hthighwayhthighway Members, Plex Pass, Plex Ninja Posts: 6,480 Plex Ninja

    @TheCli3nt said:
    And if I don't get the 401 Unauthorized?

    So entering that URL in a browser would return your library list if a plex token isn't required.
    Did you get the library list returned?

    • Paul
  • TheCli3ntTheCli3nt Members, Plex Pass Posts: 75 Plex Pass

    yes, I get the library list returned. But as you can see above, when I try to run the command from the terminal, it crashes

    Jay "The Cli3nt" Bishop
    Father, Geek, Gamer, Bleeder
    Blogger
    TheCli3nt.com
    jay@thecli3nt.com

    Hardware: GLaDOS (PMS): AMD - FX-8300 CPU @ 3.3GHz × 8, 8GB DDR3, Root: 500GB, Media: 46TB OS: Ubuntu 16.04.1 64-bit, Lucy (Coverter): AMD FX-8320 @ 3.5GHz × 8, 8GB DDR3, Root: 1TB, Media: 4TB, OS: Ubuntu 17.04 64-bit
    Clients: Xbox 360 & One, PlayStation 3 & 4, Roku Stick, Express+, 3 and Premiere, Windows 10 PC (Windows 10 Plex app and Chrome web browser), Android Tablets & Phones
    Media: 5,918 Movies, 1,261 TV Shows, 168 Documentary Movies, 175 Documentary Series, 439 Books (Audio/eBooks), 95 Stand-up Comedy Specials, 3.1M+ Music Tracks

  • Roneal.azRoneal.az Members Posts: 1

    @TheCli3nt Did you ever get this resolved? I am stuck, same exact issue. Trying to update from linux command line.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    Plex Media Scanner is UID sensitive.

    It must be invoked as user plex
    There are two libraries on this test server.

    [chuck@lizum ~.68]$ su - plex
    Password: 
    -sh-4.4$ export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
    -sh-4.4$ export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/var/lib/plexmediaserver/Library/Application Support"
    -sh-4.4$ cd /usr/lib/plexmediaserver
    -sh-4.4$ ./Plex\ Media\ Scanner --list
      2: TV
      1: Movies
    -sh-4.4$ 
    

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • h9dw0lslwleh9dw0lslwle Members, Plex Pass Posts: 2 Plex Pass
    edited March 13

    Another way is to run it with:

    sudo su -l plex -s /bin/bash -c "LD_LIBRARY_PATH=/usr/lib/plexmediaserver PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR='/var/lib/plexmediaserver/Library/Application Support' /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list"
    
Sign In or Register to comment.