Plex Media Server segfaults at boot

  • This evening plex stopped responding, so I rebooted, and pms refused to start. I tried manually starting plex from putty, and it force closed with a segfaul, but I tried again and pms started, however it acted like it was a brand new install. I added the start command to rc.local, but plex still didn't start on boot. Looking through the logs I found this error:

    Code
    Plex Media Serv[1737]: segfault at fffffffffffffff8 ip 00007fa5f582addb sp 00007fffd2b15ab0 error 4 in libstdc++.so.6.0.13[7fa5f5782000+f6000]


    Previously, my system had been running perfectly for several months, and I haven't changed any settings in several months. Before plex failed tonight, my most recent manual updating was at least 2 weeks ago. Is there any way to identify (and fix) the source of this error, and how do I restore my plex library?


    Thank you.

  • I have removed it from rc.local, but it still does not auto start. Are you asking what my hardware is for the system drive? I have a 480gb intel SSD, but the Plex library is on my media storage hdd.

  • Can you give me the output of this command:


    cat /etc/default/plexmediaserver


    First give me the output of that and try this. I think the home folder for your plex user is messed up:


    usermod -d /media/UUID/plexmediaserver -m plex (where UUID is the filesystem of the data drive to which you want to move the home folder)
    /etc/init.d/plexmediaserver start


    If that does not work I need to see the ownership of the plexmediaserver folder:


    cd /media/UUID/ (UUID for the filesystem, data drive, where the plexmediaserver folder is located)
    stat plexmediaserver


    PS- I see the mistake the other guy was making in the other thread now too. In the /etc/default/plexmediaserver file he should not have taken the comment out, #, and just changed his home folder location with usermod -d command above.

  • Here is the output of cat /etc/default/plexmediaserver:



    # the number of plugins that can run at the same time
    PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6


    # ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
    PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000


    # where the mediaserver should store the transcodes
    PLEX_MEDIA_SERVER_TMPDIR=/tmp


    # uncomment to set it to something else
    # PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application\ Support"


    # the user that PMS should run as, defaults to 'plex'
    # note that if you change this you might need to move
    # the Application Support directory to not lose your
    # media library
    PLEX_MEDIA_SERVER_USER=plex


    I'm on my tablet right now so i will run the other changes tomorrow evening.


    As for the 480gb ssd, I won one at a product seminar, but intel accidentally sent me a second one. The first is in my laptop, and the second is in my omv server. I wouldvd used a hdd, but my case didn't have room for another 3.5" drive, and the ssd was the only working 2.5" drive that I had. I would love to switch to a 16 or 32gb msata drive for the boot drive, but I was concerned by the numerous warnings about using flashdrives.

  • That is a damn nice ssd to be using in OMV. It is good to use a ssd but you don't need anywhere near that big... You only need 10 gigs really but the sweet spot is about a 60 gig now.

  • So Plex is working totally fine this evening when I got home. Without me doing anything. My library is still completely missing, but it starts up fine and everything.


    I ran

    Code
    cd /media/UUID/ (UUID for the filesystem, data drive, where the plexmediaserver folder is located)
    stat plexmediaserver

    and it gave me this:


    Code
    File: `plexmediaserver/'
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: 97fh/2431d      Inode: 100139009   Links: 2
    Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (  100/   users)
    Access: 2014-05-27 21:07:37.689470033 -0500
    Modify: 2014-02-03 23:18:48.591144168 -0600
    Change: 2014-02-03 23:24:30.118940233 -0600


    I did not run

    Code
    usermod -d /media/UUID/plexmediaserver -m plex

    yet. Do I still need to?

  • You had a hand in messing up your plex. This does not happen by itself. This plexmediaserver folder should not be ownership (chown) root:users.


    Code
    File: `plexmediaserver/'
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: 97fh/2431d      Inode: 100139009   Links: 2
    Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (  100/   users)


    PlexMediaServer is supposed to be run by the plex user. You need to chown the plexmediaserver folder as such:


    cd /media/UUID/ (where UUID is data drive the plexmediaserver folder is located)
    chown -R plex:nogroup plexmediaserver


    Then give me stat command on plexmediaserver folder again and also give me:
    id -u plex

  • I did that so long ago that I have no idea why the ownership of that folder is wrong. (I'm sure I did it for some reason, I just don't remember why :D)


    Here is the result of 'stat...':

    Code
    File: `plexmediaserver/'
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: 97fh/2431d      Inode: 100139009   Links: 2
    Access: (0755/drwxr-xr-x)  Uid: (  111/    plex)   Gid: (65534/ nogroup)
    Access: 2014-05-27 21:07:37.689470033 -0500
    Modify: 2014-02-03 23:18:48.591144168 -0600
    Change: 2014-05-28 20:12:23.497599744 -0500


    And id -u plex returns:

    Code
    111


    Any idea why this would have screwed up plex now after working perfectly for so long?


    Thanks for the help.

  • Nope, is it working now? You want it this way so it is run by the plex user instead of the root user.


    You media shares (folders where you keep your media) should be:


    chown -R root:users
    chmod -R 775

  • check /etc/default/plexmediaserver for the line


    PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application\ Support" -


    try to delete the backslash in red above. this was causing segment faults for me and stopping plex from starting.

  • NO, that line should be commented out. DO NOT follow his instructions.


    You need to do this to fix your plex user's home folder location:


    /etc/init.d/plexmediaserver stop
    usermod -d /media/UUID/plexmediaserver -m plex (where UUID is the data drive where your plexmedia server is located.)
    /etc/init.d/plexmediaserver start

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!