Bug 65946 - masked rsyslog.service is started
Summary: masked rsyslog.service is started
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 19:54 UTC by Michael Biebl
Modified: 2019-08-22 10:41 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Biebl 2013-06-19 19:54:43 UTC
Version: 204

Even though I masked rsyslog.service, the service can still be started:


root@pluto:~# systemctl status rsyslog.service syslog.socket
rsyslog.service - System Logging Service
   Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled)
   Active: active (running) since Mi 2013-06-19 21:53:10 CEST; 3s ago
 Main PID: 4416 (rsyslogd)
   CGroup: name=systemd:/system/rsyslog.service
           └─4416 /usr/sbin/rsyslogd -n

Jun 19 21:53:10 pluto systemd[1]: Starting System Logging Service...
Jun 19 21:53:10 pluto systemd[1]: Started System Logging Service.

syslog.socket - Syslog Socket
         Loaded: loaded (/lib/systemd/system/syslog.socket; static)
         Active: active (running) since Mi 2013-06-19 21:53:10 CEST; 3s ago
           Docs: man:systemd.special(7)
                 http://www.freedesktop.org/wiki/Software/systemd/syslog
                 man:systemd.special(7)
                 http://www.freedesktop.org/wiki/Software/systemd/syslog
         Listen: /run/systemd/journal/syslog (Datagram)

Jun 19 21:53:10 pluto systemd[1]: Stopping Syslog Socket.
Jun 19 21:53:10 pluto systemd[1]: Starting Syslog Socket.
Jun 19 21:53:10 pluto systemd[1]: Listening on Syslog Socket.
root@pluto:~# systemctl stop syslog.socket rsyslog.service
root@pluto:~# systemctl mask rsyslog.service 
ln -s '/dev/null' '/etc/systemd/system/rsyslog.service'
root@pluto:~# systemctl status rsyslog.service 
rsyslog.service - System Logging Service
   Loaded: loaded (/lib/systemd/system/rsyslog.service; masked)
   Active: inactive (dead) since Mi 2013-06-19 21:53:26 CEST; 11s ago
 Main PID: 4416 (code=exited, status=0/SUCCESS)
   CGroup: name=systemd:/system/rsyslog.service

Jun 19 21:53:10 pluto systemd[1]: Starting System Logging Service...
Jun 19 21:53:10 pluto systemd[1]: Started System Logging Service.
Jun 19 21:53:26 pluto systemd[1]: Stopping System Logging Service...
Jun 19 21:53:26 pluto systemd[1]: Stopped System Logging Service.
root@pluto:~# systemctl start rsyslog.service 
root@pluto:~# systemctl status rsyslog.service 
rsyslog.service - System Logging Service
   Loaded: loaded (/lib/systemd/system/rsyslog.service; masked)
   Active: active (running) since Mi 2013-06-19 21:53:47 CEST; 1s ago
 Main PID: 4464 (rsyslogd)
   CGroup: name=systemd:/system/rsyslog.service
           └─4464 /usr/sbin/rsyslogd -n

Jun 19 21:53:47 pluto systemd[1]: Starting System Logging Service...
Jun 19 21:53:47 pluto systemd[1]: Started System Logging Service.
Comment 1 Colin Guthrie 2013-06-20 08:10:27 UTC
Thinking out loud, this could also affect things like masking bus activated services where the busname Alias is the one that is typically used.

I guess a quick test would be to mask AND disable the service, that way the alias would be removed too.
Comment 2 Michael Biebl 2013-06-20 08:21:41 UTC
I'm posting this for completeness sake (already mentioned on the mailing list):

I've tried it with another socket activated service (avahi-daemon) and
could not reproduce the problem there.
So this might be specific to rsyslog / the sylsog integration.
Usually we have foo.service and a corresponding foo.socket.
With syslog, the rsyslog.service (or syslog-ng.service) use the
syslog.service Alias to map to syslog.socket
Maybe systemd get's confused because of this.
Comment 3 Colin Guthrie 2013-06-20 08:42:52 UTC
Actually my comment was really in reply to your mailing list comment about how it's maybe the alias name that's used to trigger the service start (which is how a lot of bus-activated services work - using the busname alias as the SystemdService).
Comment 4 conor mcgregor 2019-07-22 09:12:16 UTC
How do i fix wireless displays connections in windows 10 https://fixconnectionsbluetoothaudiodeviceswirelessdisplayswindows10.net if you want to add wireless speakers in window 10 PC.
Comment 5 Zbigniew Jedrzejewski-Szmek 2019-08-22 10:41:15 UTC
This should be fixed now. We are pretty careful to not start masked services:
$ systemctl start systemd-timedated.service
Failed to start systemd-timedated.service: Unit systemd-timedated.service is masked.
$ systemctl start systemd-timedated.socket
Job failed. See "journalctl -xe" for details.
$ journalctl -u systemd-timedated.socket
systemd[1]: systemd-timedated.socket: Socket service systemd-timedated.service not loaded, refusing.
systemd[1]: Failed to listen on systemd-timedated.socket.

OK, the message could be a bit better, but we refuse.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.