Re: [systemd-devel] user service conflict and confusion

2020-04-10 Thread Matt Zagrabelny
On Fri, Apr 10, 2020 at 1:32 PM Zbigniew Jędrzejewski-Szmek <
zbys...@in.waw.pl> wrote:

> On Fri, Apr 10, 2020 at 10:53:36AM -0500, Matt Zagrabelny wrote:
> > 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?
>
> Try 'systemctl --user cat mpd'.
>

Sure. I was talking about the symlink for enabling it, but thanks anyhow!
Michael answered it.

Is there a --is-global switch to see if a --user enabled service is enabled
at the global level?



>
> > 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  PIDPPID  C STIME TTY  TIME CMD
> > root1795   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
>
> Maybe it's running under user@0.service, i.e. the root's user manager?
>

Indeed! I'd forgotten that I logged in (as root) while lightdm was starting.


> You can drill down from 'systemctl status 1795'.
>

Cool!

Thanks for the help!

-m
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] user service conflict and confusion

2020-04-10 Thread Matt Zagrabelny
On Fri, Apr 10, 2020 at 12:16 PM Michael Biebl  wrote:

> Am Fr., 10. Apr. 2020 um 17:59 Uhr schrieb Matt Zagrabelny <
> mzagr...@d.umn.edu>:
> >
> > 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.
>
> I suspect it is enabled system wide, i.e. in /etc/systemd/user
>

Super!

Thanks for the tip. There it is. This solves the problem. Thank you Michael!

-m
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] user service conflict and confusion

2020-04-10 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Apr 10, 2020 at 10:53:36AM -0500, Matt Zagrabelny wrote:
> 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?

Try 'systemctl --user cat mpd'.

> 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  PIDPPID  C STIME TTY  TIME CMD
> root1795   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

Maybe it's running under user@0.service, i.e. the root's user manager?
You can drill down from 'systemctl status 1795'.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] user service conflict and confusion

2020-04-10 Thread Michael Biebl
Am Fr., 10. Apr. 2020 um 17:59 Uhr schrieb Matt Zagrabelny :
>
> 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.

I suspect it is enabled system wide, i.e. in /etc/systemd/user
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] user service conflict and confusion

2020-04-10 Thread Matt Zagrabelny
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  PIDPPID  C STIME TTY  TIME CMD
root1795   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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel