7

Why is sssd an unrecognized service, even though it is installed and can be restarted? BTW: This concerns Ubuntu 14.04.1 LTS, it was not like that in 12.04 I will show what I mean below, I think it is a bug but I am interested in an explanation and/or workaround.

root@tauriel:~/scripts# service sssd
**sssd: unrecognized service**
root@tauriel:~/scripts# service sssd status
sssd start/running, process 22454
root@tauriel:~/scripts# service sssd restart
sssd stop/waiting
sssd start/running, process 22485
root@tauriel:~/scripts# service sssd status
sssd start/running, process 22485
root@tauriel:~/scripts# service sssd
**sssd: unrecognized service**
root@tauriel:~/scripts# 

BTW: sssd is apparently a new tag, it would be nice if it was added.

1 Answer 1

7

When you run service, if there's a sysv init script, it will call that script (or call Upstart, if it's an Upstart job):

$ service ssh
 * Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}
$ service gdm
/etc/init.d/gdm: 79: /etc/init.d/gdm: Syntax error: "fi" unexpected (expecting "}")

Naturally if you don't pass a command (restart, status, etc.), only these scripts will be able to respond. If the init file for a service is Upstart-only, this will fail:

$ service tty1
tty1: unrecognized service

SSSD only offers an Upstart init script, as you can see from the list of files in sssd-common.


This behaviour is not exactly well documented in the manpage. However, if you examine the service command, which is a shell script:

118 if [ -r "/etc/init/${SERVICE}.conf" ] && which initctl >/dev/null \
119    && initctl version | grep -q upstart
120 then
121    # Upstart configuration exists for this job and we're running on upstart
122    case "${ACTION}" in  

The actions in this case consists of exec calls of initctl (via its symlinked versions - start, stop, etc.). Since the ACTION variable is empty and doesn't match any case, it falls through to:

138 
139 # Otherwise, use the traditional sysvinit
140 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
141    exec env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" ${ACTION} ${OPTIONS}
142 else
143    echo "${SERVICE}: unrecognized service" >&2
144    exit 1
145 fi

Here you can see why it produces that error.

3
  • Thank you for the answer muru. I also noticed that it is not listed when doing a "service --status-all" What is the best current method to see the status of all/any deamons, when they are started and how can you control it? (update-rc.d doesn't work since the /etc/init.d/sssd does not exist)
    – jringoot
    Dec 10, 2014 at 12:09
  • 1
    I'm afraid you'll have to use a combination of methods. For the status of all services, do service --status-all; initctl list. initctl is used to handle Upstart services, and list will show the current status as well. To control the starting of an Upstart service try using override files.
    – muru
    Dec 10, 2014 at 13:00
  • 1
    I just noticed that after an apt-update && apt-upgrade (Ubuntu 14.04) sssd didn't want to start automatically anymore. Following your instructions, I looked inside /etc/init/sssd.conf and found a difference with another host: "start on (filesystem and net-device-up and starting autofs)" ================= I changed it into ================= "start on (filesystem and net-device-up)" ================= And now sssd starts up on boot again. I know it is kluge, but an interesting workaround I think.
    – jringoot
    May 30, 2017 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.