找不到mpd服务在哪里启动

找不到mpd服务在哪里启动

mpd很久以前在我的 systemd Arch Linux 上安装了(音乐播放器守护进程)(我不记得安装/设置细节)。

服务器mpd在启动过程中启动,但我找不到它在哪里/如何启动。它可能是由我自己的个人初始化脚本运行的,但我没有在其中找到任何内容。

$ systemctl status
[...]
   CGroup: /
           ├─user.slice
           │ └─user-1000.slice
           │   ├─[email protected]
           │   │ ├─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)

在上面的命令中,我不明白为什么systemctl status显示 that mpdwas started from mpd.service,但systemctl status mpd.service显示 that mpd.serviceis inactive/dead 。

如果我杀死mpd,然后启动mpd.service,然后$ systemctl status mpd.service将服务显示为“活动”:

$ 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[1]: Starting Music Player Daemon...
oct. 17 20:07:59 pad mpd[4237]: 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[4237]: config: Found database setting without music_directory - disabling database
oct. 17 20:07:59 pad mpd[4237]: output: No 'audio_output' defined in config file
oct. 17 20:07:59 pad mpd[4237]: output: Successfully detected a alsa audio device
oct. 17 20:07:59 pad systemd[1]: Started Music Player Daemon.
oct. 17 20:08:00 pad mpd[4237]: avahi: Service 'Music Player @ pad' successfully established.

另外,我不明白bind to '0.0.0.0:6600' failed上面的错误,因为lsof -i :6600没有给出输出:

$ lsof -i :6600
$

可以以某种方式给我有关如何找到mpd服务启动位置的线索吗?

提前致谢

答案1

这是一项用户服务,只需使用systemctl --user而不是systemctl.

相关内容