Sample Header Ad - 728x90

Can't find where the mpd service is started

0 votes
1 answer
1601 views
I installed mpd (Music Player Daemon) a long time ago on my systemd Arch Linux (I don't remember the installation/setup details). The mpd server is started during boot, but I can't find where/how it is started. It may be run by my own personal init scripts, but I didn't find anything inside them.
$ systemctl status
[...]
   CGroup: /
           ├─user.slice
           │ └─user-1000.slice
           │   ├─user@1000.service
           │   │ ├─session.slice
           │   │ │ └─pulseaudio.service
           │   │ │   ├─2028 /usr/bin/pulseaudio --daemonize=no --log-target=journal
           │   │ │   └─2072 /usr/lib/pulse/gsettings-helper
           │   │ ├─app.slice
           │   │ │ ├─mpd.service
           │   │ │ │ └─1963 /usr/bin/mpd --no-daemon
[...]

$ systemctl status mpd.service
○ mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: man:mpd(1)
             man:mpd.conf(5)
In the commands above, I don't understand why systemctl status shows that mpd was started from mpd.service, but systemctl status mpd.service shows that mpd.service is inactive/dead. If I kill mpd, then start mpd.service, then $ systemctl status mpd.service shows the service as "active":
$ killall mpd
$ systemctl start mpd.service
$ systemctl status mpd.service
● mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
     Active: active (running) since Sun 2021-10-17 20:01:57 CEST; 4min 55s ago
       Docs: man:mpd(1)
             man:mpd.conf(5)
   Main PID: 4237 (mpd)
      Tasks: 3 (limit: 18719)
     Memory: 8.9M
        CPU: 96ms
     CGroup: /system.slice/mpd.service
             └─4237 /usr/bin/mpd --no-daemon

oct. 17 20:07:59 pad systemd: Starting Music Player Daemon...
oct. 17 20:07:59 pad mpd: exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use
oct. 17 20:07:59 pad mpd: config: Found database setting without music_directory - disabling database
oct. 17 20:07:59 pad mpd: output: No 'audio_output' defined in config file
oct. 17 20:07:59 pad mpd: output: Successfully detected a alsa audio device
oct. 17 20:07:59 pad systemd: Started Music Player Daemon.
oct. 17 20:08:00 pad mpd: avahi: Service 'Music Player @ pad' successfully established.
As an extra, I don't understand the error bind to '0.0.0.0:6600' failed above, because lsof -i :6600 gives no output:
$ lsof -i :6600
$
Could somehow give me clues on how to find where mpd service is started? Thanks in advance
Asked by yolenoyer (519 rep)
Oct 17, 2021, 06:26 PM
Last activity: Oct 18, 2021, 05:57 AM