Nobody else has any ideas about this?
My /etc/mpd.conf file contains:
- Code: Select all
music_directory "/home/radio/Library"
playlist_directory "/home/radio/Library/playlists"
Audio_output {
# type "shout"
encoding "mp3"
type "httpd"
name "My Radio"
description "My Radio"
host "localhost"
mount "/mpd.mp3"
port "8000"
tags "yes"
# quality "5.0"
bitrate "192"
user "<user>"
When I try to start the service:
- Code: Select all
root@radio:~# service mpd start
Job for mpd.service failed because the control process exited with error code.
See "systemctl status mpd.service" and "journalctl -xe" for details.
root@radio:~# systemctl status mpd.service
● mpd.service - Music Player Daemon
Loaded: loaded (/lib/systemd/system/mpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-03-22 19:36:08 PDT; 48s ago
Docs: man:mpd(1)
man:mpd.conf(5)
file:///usr/share/doc/mpd/user-manual.html
Process: 648 ExecStart=/usr/bin/mpd --no-daemon $MPDCONF (code=exited, status=1/FAILURE)
Main PID: 648 (code=exited, status=1/FAILURE)
Mar 22 19:36:07 radio systemd[1]: Starting Music Player Daemon...
Mar 22 19:36:08 radio mpd[648]: Mar 22 19:36 : exception: Failed to create pid file "/run/mpd/pid": Permission denied
Mar 22 19:36:08 radio systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Mar 22 19:36:08 radio systemd[1]: mpd.service: Failed with result 'exit-code'.
Mar 22 19:36:08 radio systemd[1]: Failed to start Music Player Daemon.
root@radio:~# journalctl -xe
-- The process' exit code is 'exited' and its exit status is 1.
Mar 22 19:34:59 radio systemd[1]: mpd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit mpd.service has entered the 'failed' state with result 'exit-code'.
Mar 22 19:34:59 radio systemd[1]: Failed to start Music Player Daemon.
-- Subject: A start job for unit mpd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mpd.service has finished with a failure.
--
-- The job identifier is 700 and the job result is failed.
Mar 22 19:35:00 radio dhclient[385]: No DHCPOFFERS received.
Mar 22 19:35:00 radio dhclient[385]: No working leases in persistent database - sleeping.
Mar 22 19:35:00 radio root[624]: /etc/dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd returned non-zero exit status 1
Mar 22 19:36:07 radio systemd[1]: Starting Music Player Daemon...
-- Subject: A start job for unit mpd.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mpd.service has begun execution.
--
-- The job identifier is 816.
Mar 22 19:36:08 radio mpd[648]: Mar 22 19:36 : exception: Failed to create pid file "/run/mpd/pid": Permission denied
Mar 22 19:36:08 radio systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit mpd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Mar 22 19:36:08 radio systemd[1]: mpd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit mpd.service has entered the 'failed' state with result 'exit-code'.
Mar 22 19:36:08 radio systemd[1]: Failed to start Music Player Daemon.
-- Subject: A start job for unit mpd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mpd.service has finished with a failure.
--
-- The job identifier is 816 and the job result is failed.
After changing the ownership of /run/mpd/ to the radio user, I was able to start the service. I am still unable to connect to it, however. I have my router port forwarded to port 8000 for the IP of my fit-PC, but that is behind my room mate's modem/gateway. My router's IP address is configured as DMZ on his gateway. Does that even help?
Also, it appears that if the fit-PC ever reboots, the ownership of /run/mpd/ reverts back to root and the mpd fails to start. How do I fix that?
- Code: Select all
root@radio:~# service mpd status
● mpd.service - Music Player Daemon
Loaded: loaded (/lib/systemd/system/mpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-03-22 19:58:35 PDT; 32s ago
Docs: man:mpd(1)
man:mpd.conf(5)
file:///usr/share/doc/mpd/user-manual.html
Process: 454 ExecStart=/usr/bin/mpd --no-daemon $MPDCONF (code=exited, status=1/FAILURE)
Main PID: 454 (code=exited, status=1/FAILURE)
Mar 22 19:58:30 radio systemd[1]: Starting Music Player Daemon...
Mar 22 19:58:35 radio mpd[454]: Mar 22 19:58 : exception: Failed to create pid file "/run/mpd/pid": Permission denied
Mar 22 19:58:35 radio systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Mar 22 19:58:35 radio systemd[1]: mpd.service: Failed with result 'exit-code'.
Mar 22 19:58:35 radio systemd[1]: Failed to start Music Player Daemon.
root@radio:~# service mpd start
Job for mpd.service failed because the control process exited with error code.
See "systemctl status mpd.service" and "journalctl -xe" for details.
root@radio:~# chown -R radio:radio /run/mpd/
root@radio:~# service mpd start
root@radio:~# service mpd status
● mpd.service - Music Player Daemon
Loaded: loaded (/lib/systemd/system/mpd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-03-22 20:00:00 PDT; 2s ago
Docs: man:mpd(1)
man:mpd.conf(5)
file:///usr/share/doc/mpd/user-manual.html
Main PID: 578 (mpd)
Tasks: 3 (limit: 4915)
Memory: 7.8M
CGroup: /system.slice/mpd.service
└─578 /usr/bin/mpd --no-daemon
Mar 22 19:59:59 radio systemd[1]: Starting Music Player Daemon...
Mar 22 20:00:00 radio systemd[1]: Started Music Player Daemon.