<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 10, 2020 at 1:32 PM Zbigniew Jędrzejewski-Szmek <<a href="mailto:zbyszek@in.waw.pl">zbyszek@in.waw.pl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Apr 10, 2020 at 10:53:36AM -0500, Matt Zagrabelny wrote:<br>
> Greetings,<br>
> <br>
> I am hitting a confusing scenario with my system. I am running 245.4-2<br>
> (Debian).<br>
> <br>
> I have a user service, mpd, which is failing to start. It is enabled:<br>
> <br>
> $ systemctl --user is-enabled mpd<br>
> enabled<br>
> <br>
> And now that I look for the enabled unit within the filesystem, I don't see<br>
> it.<br>
> <br>
> I'm expecting to see something in ~/.config/systemd, but that directory<br>
> doesn't exist.<br>
> <br>
> $ stat ~/.config/systemd<br>
> stat: cannot stat '/home/z/.config/systemd': No such file or directory<br>
> <br>
> I have other systems with user services and ~/.config/systemd is where all<br>
> the details are.<br>
> <br>
> First question, where should I be looking (in the filesystem) for user<br>
> enabled services?<br>
<br>
Try 'systemctl --user cat mpd'.<br></blockquote><div><br></div><div>Sure. I was talking about the symlink for enabling it, but thanks anyhow! Michael answered it.</div><div><br></div><div>Is there a --is-global switch to see if a --user enabled service is enabled at the global level?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> After that I look to see why the user service isn't starting:<br>
> <br>
> $ systemctl --user status mpd<br>
> [...]<br>
> Apr 10 10:00:29 zipper mpd[16231]: exception: Failed to bind to '<br>
> <a href="http://192.168.0.254:6600" rel="noreferrer" target="_blank">192.168.0.254:6600</a>'<br>
> Apr 10 10:00:29 zipper mpd[16231]: exception: nested: Failed to bind<br>
> socket: Address already in use<br>
> Apr 10 10:00:29 zipper systemd[1982]: mpd.service: Main process exited,<br>
> code=exited, status=1/FAILURE<br>
> <br>
> Okay. Something is using that port.<br>
> <br>
> $ sudo fuser 6600/tcp<br>
> 6600/tcp: 1795<br>
> <br>
> $ ps -f -q 1795<br>
> UID PID PPID C STIME TTY TIME CMD<br>
> root 1795 1 0 08:24 ? 00:00:00 /lib/systemd/systemd<br>
> --user<br>
> <br>
> Is that "systemd --user" command running for the root user? or is that the<br>
> system level systemd?<br>
> <br>
> My system level mpd.* units are disabled and inactive:<br>
> <br>
> # systemctl is-active mpd.service<br>
> inactive<br>
> <br>
> # systemctl is-active mpd.socket<br>
> inactive<br>
<br>
Maybe it's running under user@0.service, i.e. the root's user manager?<br></blockquote><div><br></div><div>Indeed! I'd forgotten that I logged in (as root) while lightdm was starting.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
You can drill down from 'systemctl status 1795'.<br></blockquote><div><br></div><div>Cool!</div><div><br></div><div>Thanks for the help!</div><div><br></div><div>-m</div></div></div>