RPi headless plexamp service not running after update to 4.5

After running the script to update to 4.5, plexamp.service won’t start, I’m getting the following message when I query the service status:

plexamp.service - Plexamp
Loaded: loaded (/home/pi/plexamp/plexamp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-10-20 21:05:11 EDT; 2min 12s ago
Process: 644 ExecStart=/usr/bin/node /home/pi/plexamp/js/index.js (code=exited, status=1/FAILURE)
Main PID: 644 (code=exited, status=1/FAILURE)

Oct 20 21:05:11 plexamp systemd[1]: plexamp.service: Service RestartSec=100ms expired, scheduling re
Oct 20 21:05:11 plexamp systemd[1]: plexamp.service: Scheduled restart job, restart counter is at 5.
Oct 20 21:05:11 plexamp systemd[1]: Stopped Plexamp.
Oct 20 21:05:11 plexamp systemd[1]: plexamp.service: Start request repeated too quickly.
Oct 20 21:05:11 plexamp systemd[1]: plexamp.service: Failed with result ‘exit-code’.
Oct 20 21:05:11 plexamp systemd[1]: Failed to start Plexamp.

I’ve followed the thread on:

But everything seems configured correctly, “User=pi”

Same here, I had to obtain another Claim Code, enter:
./plexamp/node js/index.js

That makes it sound like the install is borked.

Should not have had to.

looks like your install might still be configured to run as a systemd --user service, not a system service … can you confirm?

network-online.target should now be listed as required in the unit file, and this target can’t be used in a --user service

can you also confirm which install/upgrade script you’re using?

Not sure why, but I had to. Didn’t have to with the prior 4.4, but needed a new token with 4.5

BTW, wouldn’t it be easier for us to just have apt-get update do the upgrade (like with PMS)

I’m a linux/debian newbie, so not sure how I’d change the service.
Using the following script, posted today:
bash <(wget -qO- https://raw.githubusercontent.com/odinb/bash-plexamp-installer/main/install_Plexamp_pi.sh)

copying @odinb1 here … he might be able to spot where things went wrong and advise how to use his script to fix

What does this give on yours:

root@plexamp3:~# ls -all /home/pi/plexamp/js/index.js
-rw-r--r-- 1 pi pi 2255099 Oct 19 23:28 /home/pi/plexamp/js/index.js
root@plexamp3:~#

Which user did you install as? Assuming pi? Did you ever install as a different user? If so, this could be your issue!

Did you answer yes to:

Do you want to prep for upgrade to new version "Plexamp-Linux-headless-v4.5.0", only run if you are upgrading [y/N]:

Answering yes to this will not hurt, but if it was run in the past, will not change anything (so needed for initial install, but not upgrades):

Do you want to install and configure Node.v12? Recommended/needed on RPi! [y/N]:

Did you answer yes to:

Do you want to install and configure "Plexamp-Linux-headless-v4.5.0" [y/N]:

The script will delete old apps-files and remove the old user service (not system file or any user config files), currently on line 399-401:

rm -rf /home/"$USER"/plexamp/
rm -rf /home/"$USER"/Plexamp-Linux-*
rm -rf /home/"$USER"/.config/systemd/user/plexamp.service

What does this give on yours?

root@plexamp3:~# cat /etc/systemd/system/plexamp.service
[Unit]
Description=Plexamp
After=network-online.target
Requires=network-online.target

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/plexamp
ExecStart=/usr/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure

[Install]
WantedBy=multi-user.target
root@plexamp3:~#

Also, assuming you have done this at the initial install:

sudo systemctl enable plexamp.service && sudo systemctl start plexamp.service

If you need to do it again, run it with restart instead of start.

If you never installed as a different user, just re-run the script and answer yes to the above 2 questions, and all should be good.

If you installed as a different user at any point, it is probably easier to start over unless you are good at troubleshooting, but most hints should be in above printouts.

You should not have to re-authorize, I did not have to on the 2 of mine!

I get those exact responses when I query. However, I may have installed both as pi and root. The clue is that when I run the script, during the section where it’s installing Plexamp it asks which user I want to authenticate as, pi or root.

What’s the best way to clear out the current installation and start from scratch?
Thanks!

Re-install from scratch would be the fastest. Then re-run the plexamp installer as root.

The fact that you state: “The clue is that when I run the script, during the section where it’s installing Plexamp it asks which user I want to authenticate as, pi or root.” tells me you did not run the script as root!

commands below or similar should clear out current files …

# disable and remove Plexamp systemd service
sudo systemctl stop plexamp.service
sudo systemctl disable plexamp.service
sudo rm /lib/systemd/system/plexamp.service
sudo systemctl daemon-reload
# remove Plexamp application files
rm -r $HOME/plexamp
rm -f -r $HOME/plexamp.last

I followed your instructions for removing plexamp, and then ran the script as root.

When I run the command “node /home/pi/plexamp/js/index.js”

I get the following error

pi@plexamp:~ $ node /home/pi/plexamp/js/index.js
internal/modules/cjs/loader.js:1057
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.29’ not found (required by /home/pi/plexamp/treble/linux-arm/treble.node)
at Object.Module._extensions…node (internal/modules/cjs/loader.js:1057:18)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.41673 (/home/pi/plexamp/js/index.js:2:346758)
at a (/home/pi/plexamp/js/index.js:2:2214600)
at Object.65631 (/home/pi/plexamp/js/index.js:2:341080)
at a (/home/pi/plexamp/js/index.js:2:2214600)
at Object.10546 (/home/pi/plexamp/js/index.js:2:326307)

are you by any chance running a 32 bit OS?

just saw another report with similar error messages from a 32 bit install of 4.5.0 (there might be a problem for devs to address, will find out if I can)

for now, will assume the removal/reinstall process worked as it should

64 bit OS - with all the OS updates. Perhaps an OS update broke things.

in your error messages, where it says plexamp/treble/linux-arm/...
i think that means 32 bits

if you were on 64 bit OS, it would say plexamp/treble/linux-arm64

format the SD card and reinstall from scratch as suggested by odin,

or consider that Plexamp also leaves hidden directories that tpavey didn’t list and I wouldn’t know the consequence, specifically .cache and .local and the visible Library. I also reboot the Pi before unpacking the new Plexamp. I want a very stock setup personally. My 4.5.0 went in without any hiccups.

pi@BerryDAC:~ $ ls -al
total 314268
drwxr-xr-x 6 pi   pi        4096 Oct 20 22:58 .
drwxr-xr-x 3 root root      4096 Apr  4  2022 ..
-rw-r--r-- 1 pi   pi        3521 Aug  1 21:55 .bashrc
drwxr-xr-x 3 pi   pi        4096 Oct 20 22:58 .cache
drwx------ 3 pi   pi        4096 Sep 17 15:37 Library
drwxr-xr-x 3 pi   pi        4096 Oct 20 22:51 .local
drwxr-xr-x 6 pi   pi        4096 Oct 19 21:28 plexamp
-rw-r--r-- 1 pi   pi    10795739 Oct 20 22:43 Plexamp-Linux-headless-v4.5.0.tar.bz2
-rw-r--r-- 1 pi   pi         807 Apr  4  2022 .profile

I started from scratch and reimaged, used it as an opportunity to use a larger SD card (16GB to 64GB). Used the 64bit OS. And now I’m playing music in my livingroom again.

Thanks for the help everyone!

good to hear that you’re back up and running again :slight_smile:

(I will still try to find out if there’s an issue with 32 bit on this release … update: confirmed that 4.5.0 works on a fresh 32 bit install of raspberry pi OS lite … so errors reported above and elsewhere might be compatibility issues related to using different/older OS etc.)

Might be a really silly question, but how do I get the service to continue running even when I close the SSH session? Whenever I close putty it seems like the service stops. I’ve run the “sudo systemctl enable plexamp.service && sudo systemctl start plexamp.service” command but it doesn’t seem to do anything?

Edit: I think I figured it out. For some reason I had to enable lingering on the user which in my case was default at “pi”

sudo loginctl enable-linger

How are you determining that the service stops after closing Putty?