1

The service is running:

» sudo service cntlm status

● cntlm.service - LSB: Authenticating HTTP accelerator for NTLM secured proxies
   Loaded: loaded (/etc/init.d/cntlm; bad; vendor preset: enabled)
   Active: active (exited) since Tue 2018-02-20 12:01:02 CET; 3min 33s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 9215 ExecStop=/etc/init.d/cntlm stop (code=exited, status=0/SUCCESS)
  Process: 9298 ExecStart=/etc/init.d/cntlm start (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0

Feb 20 12:01:02 host1 systemd[1]: Starting LSB: Authenticating HTTP accelerator for NTLM secured proxies...
Feb 20 12:01:02 host1 cntlm[9298]: Starting CNTLM Authentication Proxy: failed!
Feb 20 12:01:02 host1 systemd[1]: Started LSB: Authenticating HTTP accelerator for NTLM secured proxies.

But there is no process:

» ps -ef | grep cntlm
dangonfast 12466 13067  0 12:05 pts/19   00:00:00 grep --color=auto cntlm

Why is that?

U880D
  • 1,146
blueFast
  • 1,258
  • It seems active (exited) means "not running" (!?). The daemon was badly configured. I was confused by the active flag. – blueFast Feb 20 '18 at 11:19
  • This is the same as https://unix.stackexchange.com/questions/387310/ pretty much; and slightly different to https://unix.stackexchange.com/questions/386846/ . They both have much the same answer as here, though. It's largely the same thing every time. – JdeBP Feb 20 '18 at 19:49

2 Answers2

0

The .services generated by systemd-sysv-generator have the directive RemainAfterExit=yes set. According to the systemd.service manpage, RemainAfterExit:

Takes a boolean value that specifies whether the service shall be considered active even when all its processes exited. Defaults to no.

Bigon
  • 2,162
  • For more on which, see https://unix.stackexchange.com/questions/233468/ and https://unix.stackexchange.com/a/386876/5132. – JdeBP Feb 20 '18 at 19:37
-1

This service was executed and exited. This is a normal situation for services running in "one-shot" mode. Their definition in /etc/systemd/system/.service or /usr/lib/systemd/system/.service may for example include:

[Service]
Type=oneshot
RemainAfterExit=yes
tonioc
  • 2,069
  • You probably don't want Type=oneshot when running a daemon. Also, RemainAfterExit=yes is already set by systemd-sysv-generator generated services – Bigon Feb 20 '18 at 12:06