Plexamp Raspberry Pi Service Issue

I’ve got Plexamp up and running on a Pi4. Thanks to all who helped.
I can’t seem to get the plexamp.service to work when rebooting.
I ran: sudo systemctl status plexamp.service and received the following in case someone call tell what the issue is:

● plexamp.service - Plexamp
Loaded: loaded (/lib/systemd/system/plexamp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-05-04 17:51:31 EDT; 11min ago
Process: 632 ExecStart=/usr/bin/node /home/pi/plexamp/js/index.js (code=exited, status=203/EXEC)
Main PID: 632 (code=exited, status=203/EXEC)
CPU: 4ms

May 04 17:51:31 pi4Plex systemd[1]: plexamp.service: Scheduled restart job, restart counter is at 5.
May 04 17:51:31 pi4Plex systemd[1]: Stopped Plexamp.
May 04 17:51:31 pi4Plex systemd[1]: plexamp.service: Start request repeated too quickly.
May 04 17:51:31 pi4Plex systemd[1]: plexamp.service: Failed with result ‘exit-code’.
May 04 17:51:31 pi4Plex systemd[1]: Failed to start Plexamp.

What’s the content of /lib/systemd/system/plexamp.service?

[Unit]
Description=Plexamp
After=network.target

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

[Install]
WantedBy=multi-user.target

What errors do you get when you run /usr/bin/node /home/pi/plexamp/js/index.js ?

are you by chance using RaspberryPi OS lite? Somebody wrote in a different post about changing the target in plexamp.service to make it work on the Lite version. I did that and it worked for me.

also in that same thread you have to run sudo systemctl enable plexamp.service That step was initially missed on some of the posts.

Hopefully one of those two things will get it working for you.

1 Like

I get:
bash: /usr/bin/node: No such file or directory

Hi.
I’m not running the lite version, and I’m pretty sure I’ve done the enable plexamp step.

Is there a way to group Raspberry Pi players? i.e. a player in the kitchen and a player in the living room could be grouped as “main floor”.

When I quit the Terminal Plexamp quits playing music. Is that expected? Does the Terminal have to remain open in order for Plexamp to work?

No. It is a symptom that you did not successfully activate the plexamp daemon.

I’m wondering if I wasn’t in the right directory when I performed the commands listed below…
Before I do them, what should I change the directory to?

$ sudo cp plexamp.service /lib/systemd/system/
$ sudo systemctl daemon-reload
$ sudo systemctl enable plexamp
$ sudo systemctl start plexamp

After extracting the .tar.gz in your home folder, the primary copy of the plexamp.service file is supposed to be located inside of
/home/pi/plexamp. (if your user name is indeed pi)
This is the folder into which you must dive.
However, the first command should fail if you aren’t in there. As it won’t find the source file to copy into /lib/systemd/system.

I can’t figure it out.
I changed the directory to plexamp/
Ran the commands straight from Elan’s instructions, but whenever I quit Terminal Plexamp quits and when I reboot Plexamp doesn’t boot.
I’m sure I’m missing something simple, but I can’t figure it out.

type this into your terminal: which node and paste the output here.

I had the same issue, Try using a User Service (not a System Service)

See: Future of Plexamp on Raspberry Pi? - #219 by tpavey (edit: this was already linked above)

And…

See: Plexamp Raspberry Pi Beta - HDMI Audio was working until I restarted now It does not - #8 by Tony_T

/home/pi/.config/nvm/versions/node/v12.22.12/bin/node

ok, edit the file /lib/systemd/system/plexamp.service and change its contents to this:

[Unit]
Description=Plexamp
After=network.target

[Service]
Type=simple
User=pi
ExecStart=/home/pi/.config/nvm/versions/node/v12.22.12/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

…and then re-do these commands:

$ sudo systemctl daemon-reload
$ sudo systemctl enable plexamp
$ sudo systemctl start plexamp
1 Like

I think this did the trick!!!
But now the audio out doesn’t work properly.
I’m not using digital out, just the stereo mini.
Prior to this change the audio was perfect. Now it’s digital interference. Audio from Youtube works fine.

OK, up and running as expected.
Thank you all for your help.
The bad audio was fixed by changing the output in Plexamp to the Headphone output and strict sample rate matching.
Thanks again for your patience.

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