[systemd-devel] user service conflict and confusion

Matt Zagrabelny mzagrabe at d.umn.edu
Fri Apr 10 15:53:36 UTC 2020


Greetings,

I am hitting a confusing scenario with my system. I am running 245.4-2
(Debian).

I have a user service, mpd, which is failing to start. It is enabled:

$ systemctl --user is-enabled mpd
enabled

And now that I look for the enabled unit within the filesystem, I don't see
it.

I'm expecting to see something in ~/.config/systemd, but that directory
doesn't exist.

$ stat ~/.config/systemd
stat: cannot stat '/home/z/.config/systemd': No such file or directory

I have other systems with user services and ~/.config/systemd is where all
the details are.

First question, where should I be looking (in the filesystem) for user
enabled services?

After that I look to see why the user service isn't starting:

$ systemctl --user status mpd
[...]
Apr 10 10:00:29 zipper mpd[16231]: exception: Failed to bind to '
192.168.0.254:6600'
Apr 10 10:00:29 zipper mpd[16231]: exception: nested: Failed to bind
socket: Address already in use
Apr 10 10:00:29 zipper systemd[1982]: mpd.service: Main process exited,
code=exited, status=1/FAILURE

Okay. Something is using that port.

$ sudo fuser 6600/tcp
6600/tcp:             1795

$ ps -f -q 1795
UID          PID    PPID  C STIME TTY          TIME CMD
root        1795       1  0 08:24 ?        00:00:00 /lib/systemd/systemd
--user

Is that "systemd --user" command running for the root user? or is that the
system level systemd?

My system level mpd.* units are disabled and inactive:

# systemctl is-active mpd.service
inactive

# systemctl is-active mpd.socket
inactive

So I am expecting those to not be listening on the port and causing the
resource contention.

Any help is very appreciated.

Thanks!

-m
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200410/d6159704/attachment.htm>


More information about the systemd-devel mailing list