Hello
something wrong happened, plexamp service is down and cannot restart it.
I’ve made a clean install with the script, everything went right but after token claim written, i reboot and impossible to start plexamp service:
What’s wrong?
Here the prompt dialogs for manually start and auto start:
Error: Cannot find module ‘/home/pi/plexamp/js/index.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
}
Or when i enable the service:
root@raspberrypi:/# systemctl --user enable plexamp.service && systemctl --user start plexamp.service
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=@.host --user to connect to bus of other user)
“node /home/pi/plexamp/js/index.js” is working but not the “systemctl --user enable plexamp.service && systemctl --user start plexamp.service” after sudo -i
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=@.host --user to connect to bus of other user)
Hello,
thanks for helping me. Yes i read Elan post.
What i did exactly:
1 - I format32 SD card
2 - I installed Raspberry OS 64bits light and connect SSH via puTTy
3 - sudo -i (as mentionned in the readme.md plexamp installer github page)
4 - run the script install
5 - wget the beta file in /home/pi dir
6 - tar -xf the beta file from /home/pi dir
7 - node /home/pi/plexamp/js/index.js (Starting Plexamp 4.3.1-beta.7 prompted)
8 - enter the claim token
9 - systemctl --user enable plexamp.service && systemctl --user start plexamp.service
10 - error: Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
ps: i also run Elan post commands, no error prompted but the service is not started
$ sudo cp plexamp.service /lib/systemd/system/
$ sudo systemctl daemon-reload
$ sudo systemctl enable plexamp
$ sudo systemctl start plexamp
regarding upgrade.sh not working, you probably need to install jq first (it’s not there by default on Raspberry Pi OS Lite, and it’s needed to produce a usable download link for the plexamp archive)
for the systemd service issues …
your initial install set up a --user service in /home/pi/.config/systemd/plexamp.service, but you’re trying to enable/start it while running as root … and while troubleshooting it looks like you also set up another system service in /lib/systemd/system/plexamp.service
first, look to make sure the /home/pi/.config/systemd/plexamp.service file is still there with contents as expected
then, get rid of the duplicate system service …
$ sudo systemctl stop plexamp
$ sudo systemctl disable plexamp
$ sudo systemctl daemon-reload
$ sudo rm /lib/systemd/system/plexamp.service
now, login as your pi user (not root) and re-enable the --user service …
$ systemctl --user daemon-reload
$ systemctl --user enable plexamp.service
$ systemctl --user start plexamp.service
I don’t know if it was working with this user file.
I just followed the readme.cmd and i did all the commands in root user (sudo -i).
After i extract beta file and node command, always in root privilege.
I wrote your lines,
get rif of → no error
create/enable → no error