# Service not starting on one server

**URL:** <https://forum.ansible.com/t/service-not-starting-on-one-server/25965>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [November 8, 2017, 10:17pm UTC](https://forum.ansible.com/t/service-not-starting-on-one-server/25965 "2017-11-08T22:17:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 8, 2017, 10:17pm UTC](https://forum.ansible.com/t/service-not-starting-on-one-server/25965/1 "2017-11-08T22:17:49Z")

</div>

I have a playbook that configures ldap for linux servers via sssd. It runs against OEL 6, 7 and RHEL 6. One OEL sssd is enabled and running when the playbook is done; however, on RHEL6 the service is only enabled and not running. I can start the service without incident and it works as expected. Have any of you seen something similar? I have been watching it via logs and verbose output, but I can’t find anything to tell me why it isn’t running on RHEL6. I am assuming it is some type of a race issue. Maybe I will put in a pause in my ansible playbook to see if that helps.

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 8, 2017, 10:26pm UTC](https://forum.ansible.com/t/service-not-starting-on-one-server/25965/2 "2017-11-08T22:26:05Z")

</div>

Update: If I stop sssd on the RHEL6 box, and run the playbook again, the services start fine. It is only after I have installed sssd for the first time that it doesn’t seem to start.  
The pause doesn’t do any good.  
Running the playbook a second time always seems to start the service.

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 8, 2017, 10:40pm UTC](https://forum.ansible.com/t/service-not-starting-on-one-server/25965/3 "2017-11-08T22:40:31Z")

</div>

Update: RHEL7 does NOT have the same problem, only RHEL6

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 10, 2017, 10:33pm UTC](https://forum.ansible.com/t/service-not-starting-on-one-server/25965/4 "2017-11-10T22:33:17Z")

</div>

I found the culprit and thought I would post the update for posterity’s sake. Tailing the /var/log/messages file on the managed rhel6 host I noticed that sssd was starting, but authconfig was running after the startup and you see sssd shut down. I reversed the order of my handlers file so that the authconfig handler ran first, and then the restart of my sssd service. It is working now.

I had all sorts of code to show you, but google groups wont let me post it for some reason.

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 10, 2017, 10:35pm UTC](https://forum.ansible.com/t/service-not-starting-on-one-server/25965/5 "2017-11-10T22:35:05Z")

</div>

I found the culprit. I thought I would post my findings for posterity.

Following the /var/log/messages file on the rhel6 managed host:

`  
Nov 10 15:18:58 ansibletest-rhel6 sssd: Starting up  
Nov 10 15:18:58 ansibletest-rhel6 sssd[be[[nspnet.net](http://nspnet.net)]]: Starting up  
Nov 10 15:18:59 ansibletest-rhel6 sssd[pam]: Starting up  
Nov 10 15:18:59 ansibletest-rhel6 sssd[nss]: Starting up  
Nov 10 15:19:00 ansibletest-rhel6 ansible-command: Invoked with warn=True executable=None \_uses\_shell=True \_raw\_params=authconfig --enablesssd --enablesssdauth --enablemkhomedir --update removes=None creates=None chdir=None stdin=None  
Nov 10 15:19:00 ansibletest-rhel6 sssd[pam]: Shutting down  
Nov 10 15:19:00 ansibletest-rhel6 sssd[nss]: Shutting down

`

You notice sssd does indeed start, but after authconfig it shuts down (unexepcted). Here is what my handlers file looked like:

`
