You are not logged in.
After updating to mpdscribble 0.23 on September 4, I can no longer use mpdscribble. MPD still runs as expected. When I run my systemd service file for the system or I directly run /usr/bin/mpdscribble --no-daemon, /usr/bin/mpdscribble/ --no-daemon --conf /etc/mpdscribble.conf, or /usr/bin/mpdscribble I get an error saying:
Section has neither 'file' nor 'url'
for calling /usr/bin/mpdscribble directly with and without sudo.
I get this when using starting the service
● mpdscribble.service - {Libre,Last}.fm updater for MPD (Added by mjd119)
Loaded: loaded (/etc/systemd/system/mpdscribble.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2020-09-05 16:16:27 EDT; 4min 53s ago
Process: 8815 ExecStart=/usr/bin/mpdscribble --no-daemon (code=exited, status=1/FAILURE)
Main PID: 8815 (code=exited, status=1/FAILURE)
Sep 05 16:16:27 Arch systemd[1]: Started {Libre,Last}.fm updater for MPD (Added by mjd119).
Sep 05 16:16:27 Arch mpdscribble[8815]: Section has neither 'file' nor 'url'
Sep 05 16:16:27 Arch systemd[1]: mpdscribble.service: Main process exited, code=exited, status=1/FAILURE
Sep 05 16:16:27 Arch systemd[1]: mpdscribble.service: Failed with result 'exit-code'.
Adding "--conf /etc/mpdscribble.conf" as a flag didn't make a difference.
My service file is similar to what's provided on the AUR page
[Unit]
Description={Libre,Last}.fm updater for MPD (Added by mjd119)
After=mpd.service
[Service]
User=mpd
ExecStart=/usr/bin/mpdscribble --no-daemon
[Install]
WantedBy=multi-user.target
and is unchanged from before the update when it worked properly.
My /etc/mpdscribble.conf file is:
# Copied from Arch Wiki
[mpdscribble]
#host = your mpd host
#host is optional, defaults to $MPD_HOST or localhost
#port = your mpd port
#port is optional, defaults to $MPD_PORT or 6600
#log = /home/YOUR_USERNAME/.mpdscribble/mpdscribble.log
verbose = 2
#proxy = your proxy
# proxy is optional, e. g. http://your.proxy:8080, defaults to none
[last.fm]
# last.fm section, comment if you do not use last.fm
url = http://post.audioscrobbler.com/
username = MY_USERNAME
password = MY_PASSWORD
journal = /home/MY_USERNAME/.mpdscribble/lastfm.journal
#[libre.fm]
# libre.fm section, comment if you do not use libre.fm
#url = http://turtle.libre.fm/
#username = your libre.fm username
#password = your libre.fm password
#journal = /home/YOUR_USERNAME/.mpdscribble/librefm.journal
I am unsure if this should be posted here or somewhere else, but I didn't want to ask in the other official forums since I'm asking about an AUR package.
Last edited by mjd119 (2020-09-06 01:08:31)
Offline
What if you comment out [mpdscribble] so it becomes:
#[mpdscribble]
Offline
I'm not sure if I needed to do this, but I redid my mpdscribble.conf file and my systemd file. I copied the files from the mpdscribble GitHub, created an mpdscribble user, and used chown to make the mpdscribble program run as its own user and read/write to/from specific files. The configuration is better now anyway.
My /etc/mpdscribble.conf is:
pidfile = /var/run/mpdscribble.pid
verbose = 1
[last.fm]
url = http://post.audioscrobbler.com/
username = MY_USERNAME
password = MY_PASSWORD
journal = /var/cache/mpdscribble/lastfm.journal
[file]
file = /var/log/mpdscribble/log
and my /etc/systemd/system/mpdscribble.service is:
[Unit]
Description=AudioScrobbler for MPD
Documentation=man:mpdscribble(1)
After=mpd.service
[Service]
Type=notify
ExecStart=/usr/bin/mpdscribble --no-daemon
User=mpdscribble
MemoryMax=64M
MemorySwapMax=64M
TasksMax=4
DevicePolicy=closed
ProtectSystem=yes
NoNewPrivileges=yes
ProtectKernelTunables=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes
[Install]
WantedBy=multi-user.target
I am marking this issue as solved.
EDIT: I commented out the pidfile line because I was having an issue where the directory would disappear after a reboot since /var/run makes temporary directories that can be accessed at runtime.
Last edited by mjd119 (2020-09-08 15:53:53)
Offline
pacman -Ql mpdscribble | grep "conf\|service"
Offline