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!

Exit Code 127 on raspberry pi

cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

So I followed this guide here and it went surprisingly smoothly, there were no errors while installing anything. When I restarted my Pi, I entered the IP followed by the plex port and everything, and nothing popped up, after googling I discovered the Plex server wasn't starting and said exit code 127, I tried doing more googling but nothing I found was able to work

Best Answer

Answers

  • uglymagoouglymagoo Posts: 977Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    @cooltop101@gmail.com said:
    So I followed this guide here and it went surprisingly smoothly, there were no errors while installing anything. When I restarted my Pi, I entered the IP followed by the plex port and everything, and nothing popped up, after googling I discovered the Plex server wasn't starting and said exit code 127, I tried doing more googling but nothing I found was able to work

    The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    @uglymagoo said:

    @cooltop101@gmail.com said:
    So I followed this guide here and it went surprisingly smoothly, there were no errors while installing anything. When I restarted my Pi, I entered the IP followed by the plex port and everything, and nothing popped up, after googling I discovered the Plex server wasn't starting and said exit code 127, I tried doing more googling but nothing I found was able to work

    The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.

    I should specify that I was using a RPi 2, but I also have a RPi 3

  • uglymagoouglymagoo Posts: 977Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited February 10

    @cooltop101@gmail.com said:

    The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.

    I should specify that I was using a RPi 2, but I also have a RPi 3

    Please post the output of uname -a on your RPi 2 to make sure it's really a RPi 2. Confusing a RPi Model B with a RPi 2 is the most common mistake here.

    Also please post the output of journalctl -u plexmediaserver. If it's really a RPi 2 it's something you did during trying to install Plex and we have to figure out what went wrong.

    Additionally, the guide you used is wrong in some aspects
    (1) Editing /etc/default/plexmediaserver.prev just does nothing. I have no idea why the authors would think this is the correct file :D
    (2) Do not try to run Plex as user pi but just leave it as plex

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    @uglymagoo said:

    @cooltop101@gmail.com said:

    The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.

    I should specify that I was using a RPi 2, but I also have a RPi 3

    Please post the output of uname -a on your RPi 2 to make sure it's really a RPi 2. Confusing a RPi Model B with a RPi 2 is the most common mistake here.

    Also please post the output of journalctl -u plexmediaserver. If it's really a RPi 2 it's something you did during trying to install Plex and we have to figure out what went wrong.

    Additionally, the guide you used is wrong in some aspects
    (1) Editing /etc/default/plexmediaserver.prev just does nothing. I have no idea why the authors would think this is the correct file :D
    (2) Do not try to run Plex as user pi but just leave it as plex

    @uglymagoo said:

    @cooltop101@gmail.com said:

    The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.

    I should specify that I was using a RPi 2, but I also have a RPi 3

    Please post the output of uname -a on your RPi 2 to make sure it's really a RPi 2. Confusing a RPi Model B with a RPi 2 is the most common mistake here.

    Also please post the output of journalctl -u plexmediaserver. If it's really a RPi 2 it's something you did during trying to install Plex and we have to figure out what went wrong.

    Additionally, the guide you used is wrong in some aspects
    (1) Editing /etc/default/plexmediaserver.prev just does nothing. I have no idea why the authors would think this is the correct file :D
    (2) Do not try to run Plex as user pi but just leave it as plex

    'uname -a' gives
    'Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux'
    I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B
    And the other command says
    '● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago
    Process: 9490 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv
    Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -
    Main PID: 9490 (code=exited, status=127)

    Feb 10 20:14:40 raspberrypi systemd[1]: Started Plex Media Server for Linux.
    Feb 10 20:14:40 raspberrypi systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
    Feb 10 20:14:40 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.
    Feb 10 20:14:40 raspberrypi systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
    Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
    Feb 10 20:14:45 raspberrypi systemd[1]: Stopped Plex Media Server for Linux.
    Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Start request repeated too quickly.
    Feb 10 20:14:45 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.
    Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.
    Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
    '

  • uglymagoouglymagoo Posts: 977Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited February 11

    @cooltop101@gmail.com said:
    'uname -a' gives
    'Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux'
    I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B

    OK. So it's not the hardware :) So lets see what we can do

    And the other command says
    '● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago
    Process: 9490 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv
    Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -
    Main PID: 9490 (code=exited, status=127)

    Did you do anything else, that's not in the tutorial? Did you change the owner of /var/lib/plexmediaserver? Did you mount /var/lib/plexmediaserver on a network storage? Did you setup some process monitoring for Plex or auto reboot cron jobs or other crazy stuff, that I now some other tutorials advise? Please post the directory listing ls -al /var/lib/plexmediaserver/ and the contents of /lib/systemd/system/plexmediaserver.service and tell me anything that comes to your mind, that might be special about your installation.

    Btw: you are using Raspbian as Operating System, right?

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    @uglymagoo said:

    @cooltop101@gmail.com said:
    'uname -a' gives
    'Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux'
    I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B

    OK. So it's not the hardware :) So lets see what we can do

    And the other command says
    '● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago
    Process: 9490 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv
    Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -
    Main PID: 9490 (code=exited, status=127)

    Did you do anything else, that's not in the tutorial? Did you change the owner of /var/lib/plexmediaserver? Did you mount /var/lib/plexmediaserver on a network storage? Did you setup some process monitoring for Plex or auto reboot cron jobs or other crazy stuff, that I now some other tutorials advise? Please post the directory listing ls -al /var/lib/plexmediaserver/ and the contents of /lib/systemd/system/plexmediaserver.service and tell me anything that comes to your mind, that might be special about your installation.

    Btw: you are using Raspbian as Operating System, right?

    @uglymagoo said:

    @cooltop101@gmail.com said:
    'uname -a' gives
    'Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux'
    I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B

    OK. So it's not the hardware :) So lets see what we can do

    And the other command says
    '● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago
    Process: 9490 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv
    Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -
    Main PID: 9490 (code=exited, status=127)

    Did you do anything else, that's not in the tutorial? Did you change the owner of /var/lib/plexmediaserver? Did you mount /var/lib/plexmediaserver on a network storage? Did you setup some process monitoring for Plex or auto reboot cron jobs or other crazy stuff, that I now some other tutorials advise? Please post the directory listing ls -al /var/lib/plexmediaserver/ and the contents of /lib/systemd/system/plexmediaserver.service and tell me anything that comes to your mind, that might be special about your installation.

    Btw: you are using Raspbian as Operating System, right?

    pi@raspberrypi:~ $ ls -al /var/lib/plexmediaserver total 12 drwxr-xr-x 3 plex plex 4096 Feb 7 23:44 . drwxr-xr-x 45 root root 4096 Feb 10 19:44 .. drwxr-xr-x 3 plex plex 4096 Feb 7 23:44 Library

    `[Unit]
    Description=Plex Media Server for Linux
    After=network.target

    [Service]
    Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
    Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
    Environment=PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
    Environment=PLEX_MEDIA_SERVER_TMPDIR=/tmp
    ExecStartPre=/bin/sh -c '/usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"'
    ExecStart=/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server"'
    Type=simple
    User=plex
    Group=plex
    Restart=on-failure
    RestartSec=5
    StartLimitInterval=60s
    StartLimitBurst=3

    [Install]
    WantedBy=multi-user.target`
    and yes I am using Rasbian , figured that would be the easiest,it was also brand new when I started trying to install Plex

  • uglymagoouglymagoo Posts: 977Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    @cooltop101@gmail.com said:
    [Install]
    WantedBy=multi-user.target`
    and yes I am using Rasbian , figured that would be the easiest,it was also brand new when I started trying to install Plex

    Everything looks good so far and the Library was created, so I hope Plex did also create a useful log file in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log. Please post the contents of this file.

    Please also try to restart plex with sudo systemctl restart plexmediaserver and then post the new contents of the above mentioned log file.

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    @uglymagoo said:

    @cooltop101@gmail.com said:
    [Install]
    WantedBy=multi-user.target`
    and yes I am using Rasbian , figured that would be the easiest,it was also brand new when I started trying to install Plex

    Everything looks good so far and the Library was created, so I hope Plex did also create a useful log file in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log. Please post the contents of this file.

    Please also try to restart plex with sudo systemctl restart plexmediaserver and then post the new contents of the above mentioned log file.

    There's nothing in /var/lib/plexmediaserver/Library/Application Support/ even when I use that command

  • uglymagoouglymagoo Posts: 977Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited February 11

    @cooltop101@gmail.com said:
    There's nothing in /var/lib/plexmediaserver/Library/Application Support/ even when I use that command

    Please issue sudo systemctl restart plexmediaserver again, take a look at the output of journalctl -u plexmediaserver again and also at sudo dmesg. Please also check the free memory with df -h and post the output. I have the suspicion, that there is something wrong with your sd card. Did you use the same sd card on your RPi 2 and 3?

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    My post was over 4,000 characters too long, so here's a link https://pastebin.com/W2hqKbUW

  • uglymagoouglymagoo Posts: 977Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja

    @cooltop101@gmail.com said:
    My post was over 4,000 characters too long, so here's a link https://pastebin.com/W2hqKbUW

    There it is:

    /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: >!not found

    The package installation was for whatever reason unsuccessful and the binaries are completely missing :smiley: Did you disrupt the package installation? I am quite sure there was an error message or warning. To fix this please try to reinstall my package and post the complete output:

    sudo apt-get install --reinstall plexmediaserver-installer

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    @uglymagoo said:

    @cooltop101@gmail.com said:
    My post was over 4,000 characters too long, so here's a link https://pastebin.com/W2hqKbUW

    There it is:

    /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: >!not found

    The package installation was for whatever reason unsuccessful and the binaries are completely missing :smiley: Did you disrupt the package installation? I am quite sure there was an error message or warning. To fix this please try to reinstall my package and post the complete output:

    sudo apt-get install --reinstall plexmediaserver-installer

    I ran that and got

    Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 51 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for plexmediaserver-installer:armhf

    so I tried installing plexmediaserver-installer and

    `pi@raspberrypi:~ $ sudo apt-get install plexmediaserver-installer
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    plexmediaserver-installer is already the newest version (1.10.1.4602-f54242b6b-1).
    plexmediaserver-installer set to manually installed.
    0 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.
    2 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Setting up plexmediaserver-installer (1.10.1.4602-f54242b6b-1) ...
    Downloading readynas package ...

    ################################################################## 100.0%

    Passed checksum test.
    Extracting readynas.deb ...
    Synchronizing state of plexmediaserver.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable plexmediaserver
    Job for plexmediaserver.service failed because the control process exited with error code.
    See "systemctl status plexmediaserver.service" and "journalctl -xe" for details.
    Setting up plexmediaserver (0.9.16.4.1911-ee6e505-2~jessie) ...
    W: APT had planned for dpkg to do more than it reported back (3 vs 7).
    Affected packages: plexmediaserver-installer:armhf
    `

    when I now try to start it it says

    pi@raspberrypi:~ $ sudo systemctl restart plexmediaserver Job for plexmediaserver.service failed because the control process exited with error code. See "systemctl status plexmediaserver.service" and "journalctl -xe" for details.
    `pi@raspberrypi:~ $ systemctl status plexmediaserver.service
    ● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/plexmediaserver.service.d
    └─override.conf
    Active: failed (Result: exit-code) since Sun 2018-02-11 16:41:10 MST; 3min 47s ago
    Process: 1134 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER
    Main PID: 4677 (code=exited, status=127)

    Feb 11 16:41:05 raspberrypi systemd[1]: plexmediaserver.service: Control process exited, code=exited status=217
    Feb 11 16:41:05 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.
    Feb 11 16:41:05 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.
    Feb 11 16:41:05 raspberrypi systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
    Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
    Feb 11 16:41:10 raspberrypi systemd[1]: Stopped Plex Media Server for Linux.
    Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Start request repeated too quickly.
    Feb 11 16:41:10 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.
    Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.
    Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
    `
    and the other command's results can be found here https://pastebin.com/ye9mxFPz

  • cooltop101cooltop101 Posts: 10Members, Plex Pass Plex Pass

    @uglymagoo said:

    @cooltop101@gmail.com said:

    2 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Setting up plexmediaserver-installer (1.10.1.4602-f54242b6b-1) ...

    As I told you, you had disrupted the original installation and the package state was in limbo ;) And by trying to fix this you made things worse. It's best just to start from scratch:

    # remove everything plex related
    sudo apt-get purge plexmediaserver-installer
    sudo rm /etc/systemd/system/plexmediaserver.service.d/override.conf
    sudo rm /etc/default/plexmediaserver
    
    # install plex from scratch
    sudo apt-get install plexmediaserver-installer
    

    Edit: I did not read your first comments correctly and removed my wrong remarks :blush:

    That finally worked, thanks

Sign In or Register to comment.