# Ansible 0.8 :: Debian Lenny :: handler :: unable to find service binary

**URL:** <https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038>\
**Category:** Ansible Project\
**Created:** [October 26, 2012, 10:32pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038 "2012-10-26T22:32:35Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tchoum](https://forum.ansible.com/u/Tchoum)\
**Post date:** [October 26, 2012, 10:32pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/1 "2012-10-26T22:32:35Z")

</div>

When I try to restart a service on Debian Lenny (whatever the service) I get this out :

NOTIFIED: [restart munin-node] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
failed: [176.31.85.177] =\> {“failed”: true, “item”: “”, “msg”: “unable to find service binary”}

This is my hanlder :

- name: restart munin-node  
action: service name=munin-node state=restarted

And this works fine on Debian Squeeze

Thanks!

---

<div class="post-metadata">

**Author:** ![Daniel\_Hokka\_Zakriss](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Daniel\_Hokka\_Zakriss](https://forum.ansible.com/u/Daniel_Hokka_Zakriss)\
**Post date:** [October 26, 2012, 10:36pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/2 "2012-10-26T22:36:30Z")

</div>

Tchoum wrote:

> When I try to restart a service on Debian Lenny (whatever the service) I  
> get this out :

You know Lenny hasn't even been getting security updates since February,  
right? If it works on current distributions, it seems rather pointless to me  
to try to fix it on ancient things...

Daniel

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [October 26, 2012, 10:37pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/3 "2012-10-26T22:37:02Z")

</div>

ansible service module relies on a redhat/derivatives program called ‘service’ which doesn’t work on debian/derivatives.

command /etc/init.d/ should work until someone has time to make the service module more generic.

---

<div class="post-metadata">

**Author:** ![Tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tchoum](https://forum.ansible.com/u/Tchoum)\
**Post date:** [October 26, 2012, 10:40pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/4 "2012-10-26T22:40:40Z")

</div>

so why does it work on debian squeeze?

2012/10/27 Brian Coca \<[briancoca@gmail.com](mailto:briancoca@gmail.com)\>

---

<div class="post-metadata">

**Author:** ![Tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tchoum](https://forum.ansible.com/u/Tchoum)\
**Post date:** [October 26, 2012, 10:42pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/5 "2012-10-26T22:42:01Z")

</div>

I know… and I don’t agree with you… sometimes you can not simply migrate…

2012/10/27 Daniel Hokka Zakrisson \<[daniel@hozac.com](mailto:daniel@hozac.com)\>

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 26, 2012, 10:43pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/6 "2012-10-26T22:43:20Z")

</div>

This is not true. It also is aware of upstart if installed.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 26, 2012, 10:45pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/7 "2012-10-26T22:45:04Z")

</div>

the service program works on Debian, it sounds like your install of  
Lenny just doesn't have it.

I'll gladly take patches to make the module more backwards compatible  
with older (admittedly, unsupported) versions.

I recognize everyone can't migrate instantly and we need to support  
that within reason.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [October 26, 2012, 11:27pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/8 "2012-10-26T23:27:47Z")

</div>

Sorry, had not tested this in a long time, had missed the upstart support. My previous answer still applies to older versions.

Brian Coca

---

<div class="post-metadata">

**Author:** ![Seth\_Vidal](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Post date:** [October 27, 2012, 4:55am UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/9 "2012-10-27T04:55:01Z")

</div>

the service command is an lsb requirement. All debian distributions should have it available. Look for lsb compliance packages for it.

-sv

---

<div class="post-metadata">

**Author:** ![Zack\_Perry](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Post date:** [October 27, 2012, 5:01am UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/10 "2012-10-27T05:01:17Z")

</div>

> the service command is an lsb requirement. All debian distributions should  
> have it available. Look for lsb compliance packages for it.
> 
> -sv

Yes. Indeed:

$ lsb\_release -a  
No LSB modules are available.  
Distributor ID: Ubuntu  
Description: Ubuntu 11.04  
Release: 11.04  
Codename: natty  
$ which service  
/usr/sbin/service  
$ dpkg -S /usr/sbin/service  
sysvinit-utils: /usr/sbin/service

Regards,

– Zack

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [October 27, 2012, 5:47am UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/11 "2012-10-27T05:47:20Z")

</div>

For modern debian and derivatives I was wrong in my initial post, but many are stuck with lenny and even sarge which don’t may not have the service command or upstart available.

For all those and people with BSD derivatives currently using the init/rc scripts directly is the easiest option. I have on my list to add them as fallback to the service module but it might take me a while to get to it.

---

<div class="post-metadata">

**Author:** ![Seth\_Vidal](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Post date:** [October 27, 2012, 3:44pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/12 "2012-10-27T15:44:04Z")

</div>

Odd - this post seems to suggest it is there for Lenny, too.

[http://www.sizledcore.com/2010/04/how-to-configure-startup-services-in-debian-lenny/](http://www.sizledcore.com/2010/04/how-to-configure-startup-services-in-debian-lenny/)

Look for the chkconfig pkg in lenny:

Package: chkconfig  
Priority: optional  
Section: admin  
Installed-Size: 76  
Maintainer: Peter Eisentraut \<petere@debian.org\>  
Architecture: all  
Version: 11.0-79.1-1  
Depends: perl  
Recommends: insserv  
Conflicts: sysvconfig  
Filename: pool/main/c/chkconfig/chkconfig\_11.0-79.1-1\_all.deb  
Size: 11888  
MD5sum: 6e6b27d42b770798aef201a994e11cab  
SHA1: c5752d1c015231ad0d9c08be8b6cec832c12ea30  
SHA256: e84feba1ea8b6705ae0a35f180fe22a4adaefb0d501aea6886673253cf3b599e  
Description: system tool to enable or disable system services  
&nbsp;&nbsp;Chkconfig is a utility to update and query runlevel information for system  
&nbsp;&nbsp;services. Chkconfig manipulates the numerous symbolic links in /etc/init.d/,  
&nbsp;&nbsp;to relieve system administrators of some of the drudgery of manually editing  
&nbsp;&nbsp;the symbolic links.  
&nbsp;&nbsp;.  
&nbsp;&nbsp;This package also contains the program "service" for running init scripts in  
&nbsp;&nbsp;a predictable environment.  
&nbsp;&nbsp;.  
&nbsp;&nbsp;In Debian, there are several tools with similar functionality, but users  
&nbsp;&nbsp;coming from other Linux distributions will find the tools in this package  
&nbsp;&nbsp;more familiar.  
Tag: admin::configuring, implemented-in::perl, implemented-in::shell, role::program, scope::utility, use::configuring

good luck  
-sv

---

<div class="post-metadata">

**Author:** ![Romeo\_Theriault](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Romeo\_Theriault](https://forum.ansible.com/u/Romeo_Theriault)\
**Post date:** [November 9, 2012, 10:33pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/13 "2012-11-09T22:33:59Z")

</div>

+1 I think this would be great. It would certainly help for Solaris.  
While the newer Solaris's support SMF there is still a need for rc  
script support for older versions of Solaris as well as some software  
on newer solaris's that haven't been upgraded to use SMF.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [November 9, 2012, 11:15pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/14 "2012-11-09T23:15:11Z")

</div>

The service module has been patched, it now handles rc dirs and init dirs as well as rc.conf in BSD.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [November 9, 2012, 11:17pm UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/15 "2012-11-09T23:17:48Z")

</div>

I should also mention, more work is planned to make it OS sensitive and load specific classes that deal with each case as a recent update to the user module does.

---

<div class="post-metadata">

**Author:** ![Romeo\_Theriault](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Romeo\_Theriault](https://forum.ansible.com/u/Romeo_Theriault)\
**Post date:** [November 10, 2012, 7:19am UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/16 "2012-11-10T07:19:29Z")

</div>

Hi Brian, I see in your fork of ansible you have patched the service  
module bit it doesn't seem to be in ansible proper. Intended?

Thanks,

---

<div class="post-metadata">

**Author:** ![Romeo\_Theriault](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Romeo\_Theriault](https://forum.ansible.com/u/Romeo_Theriault)\
**Post date:** [November 10, 2012, 7:20am UTC](https://forum.ansible.com/t/ansible-0-8-debian-lenny-handler-unable-to-find-service-binary/12038/17 "2012-11-10T07:20:56Z")

</div>

Please disregard, I was looking at an old branch. Thanks very much for  
your efforts here!

Romeo
