# Runit cookbook error: Chef::Exceptions::Exec: /usr/bin/chpst

**URL:** <https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694>\
**Category:** Chef Infra (archive)\
**Created:** [April 18, 2012, 4:46pm UTC](https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694 "2012-04-18T16:46:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Montgomery](https://discourse.chef.io/u/David_Montgomery)\
**Post date:** [April 18, 2012, 4:46pm UTC](https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694/1 "2012-04-18T16:46:14Z")

</div>

Hi,

When I use the runit cookbook, about 10% of the time I get the below  
error and it kills the run. When I log int the box and I start, stop,  
restart manually there is not a problem. So, why is there this issue  
with the runit cookbook?

Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete  
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to  
/var/chef/cache/chef-stacktrace.out  
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:  
service[pixelServerMonitor] (rtb\_server::default line 147) had an  
error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv  
restart /etc/service/pixelServerMonitor returned 1, expected 0

---

<div class="post-metadata">

**Author:** ![Akzhan\_Abdulin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/akzhan_abdulin/32/465_2.png) [@Akzhan\_Abdulin](https://discourse.chef.io/u/Akzhan_Abdulin)\
**Post date:** [April 18, 2012, 4:55pm UTC](https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694/2 "2012-04-18T16:55:32Z")

</div>

1. Runit cookbook has some assumptions like timings before start.

2. I suppose that You use "user 'root'" property. Try to remove it to  
exclude any chpst-behaviour (but chpst can't do your original behaviour).

2012/4/18 David Montgomery [davidmontgomery@gmail.com](mailto:davidmontgomery@gmail.com)

> Hi,
> 
> When I use the runit cookbook, about 10% of the time I get the below  
> error and it kills the run. When I log int the box and I start, stop,  
> restart manually there is not a problem. So, why is there this issue  
> with the runit cookbook?
> 
> Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete  
> [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to  
> /var/chef/cache/chef-stacktrace.out  
> [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:  
> service[pixelServerMonitor] (rtb\_server::default line 147) had an  
> error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv  
> restart /etc/service/pixelServerMonitor returned 1, expected 0

---

<div class="post-metadata">

**Author:** ![David\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Montgomery](https://discourse.chef.io/u/David_Montgomery)\
**Post date:** [April 18, 2012, 5:22pm UTC](https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694/3 "2012-04-18T17:22:41Z")

</div>

What does that mean?

I do this

include\_recipe "runit"  
runit\_service "pixelServer"

Why the variability? There should be no variance for runit deciding to work.

On Thu, Apr 19, 2012 at 12:55 AM, Akzhan Abdulin  
[akzhan.abdulin@gmail.com](mailto:akzhan.abdulin@gmail.com) wrote:

> 1. Runit cookbook has some assumptions like timings before start.
> 
> 2. I suppose that You use "user 'root'" property. Try to remove it to  
> exclude any chpst-behaviour (but chpst can't do your original behaviour).
> 
> 2012/4/18 David Montgomery [davidmontgomery@gmail.com](mailto:davidmontgomery@gmail.com)
> 
> > Hi,
> > 
> > When I use the runit cookbook, about 10% of the time I get the below  
> > error and it kills the run. When I log int the box and I start, stop,  
> > restart manually there is not a problem. So, why is there this issue  
> > with the runit cookbook?
> > 
> > Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete  
> > [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to  
> > /var/chef/cache/chef-stacktrace.out  
> > [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:  
> > service[pixelServerMonitor] (rtb\_server::default line 147) had an  
> > error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv  
> > restart /etc/service/pixelServerMonitor returned 1, expected 0

---

<div class="post-metadata">

**Author:** ![Adam\_Jacob](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/adam_jacob/32/292_2.png) [@Adam\_Jacob](https://discourse.chef.io/u/Adam_Jacob)\
**Post date:** [April 18, 2012, 6:00pm UTC](https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694/4 "2012-04-18T18:00:37Z")

</div>

It's a race on whether runsvdir has picked up the new service or not.  
You likely need to set a retries value on the service resource that  
causes the error, as it will succeed later.

Adam

On Wed, Apr 18, 2012 at 10:22 AM, David Montgomery  
[davidmontgomery@gmail.com](mailto:davidmontgomery@gmail.com) wrote:

> What does that mean?
> 
> I do this
> 
> include\_recipe "runit"  
> runit\_service "pixelServer"
> 
> Why the variability? There should be no variance for runit deciding to work.
> 
> On Thu, Apr 19, 2012 at 12:55 AM, Akzhan Abdulin  
> [akzhan.abdulin@gmail.com](mailto:akzhan.abdulin@gmail.com) wrote:
> 
> > 1. Runit cookbook has some assumptions like timings before start.
> > 
> > 2. I suppose that You use "user 'root'" property. Try to remove it to  
> > exclude any chpst-behaviour (but chpst can't do your original behaviour).
> > 
> > 2012/4/18 David Montgomery [davidmontgomery@gmail.com](mailto:davidmontgomery@gmail.com)
> > 
> > > Hi,
> > > 
> > > When I use the runit cookbook, about 10% of the time I get the below  
> > > error and it kills the run. When I log int the box and I start, stop,  
> > > restart manually there is not a problem. So, why is there this issue  
> > > with the runit cookbook?
> > > 
> > > Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete  
> > > [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to  
> > > /var/chef/cache/chef-stacktrace.out  
> > > [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:  
> > > service[pixelServerMonitor] (rtb\_server::default line 147) had an  
> > > error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv  
> > > restart /etc/service/pixelServerMonitor returned 1, expected 0

--  
Opscode, Inc.  
Adam Jacob, Chief Customer Officer  
T: (206) 619-7151 E: [adam@opscode.com](mailto:adam@opscode.com)

---

<div class="post-metadata">

**Author:** ![David\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Montgomery](https://discourse.chef.io/u/David_Montgomery)\
**Post date:** [April 18, 2012, 6:08pm UTC](https://discourse.chef.io/t/runit-cookbook-error-chef-exceptions-exec-usr-bin-chpst/2694/5 "2012-04-18T18:08:57Z")

</div>

Yeah..I agree but how, in a chef bootstrap, do I ignore that error so  
I dont have to redo the bootstrap automatically? Like an try except  
clause for \>\> runit\_service "pixelServer"

thanks

On Thu, Apr 19, 2012 at 2:00 AM, Adam Jacob [adam@opscode.com](mailto:adam@opscode.com) wrote:

> It's a race on whether runsvdir has picked up the new service or not.  
> You likely need to set a retries value on the service resource that  
> causes the error, as it will succeed later.
> 
> Adam
> 
> On Wed, Apr 18, 2012 at 10:22 AM, David Montgomery  
> [davidmontgomery@gmail.com](mailto:davidmontgomery@gmail.com) wrote:
> 
> > What does that mean?
> > 
> > I do this
> > 
> > include\_recipe "runit"  
> > runit\_service "pixelServer"
> > 
> > Why the variability? There should be no variance for runit deciding to work.
> > 
> > On Thu, Apr 19, 2012 at 12:55 AM, Akzhan Abdulin  
> > [akzhan.abdulin@gmail.com](mailto:akzhan.abdulin@gmail.com) wrote:
> > 
> > > 1. Runit cookbook has some assumptions like timings before start.
> > > 
> > > 2. I suppose that You use "user 'root'" property. Try to remove it to  
> > > exclude any chpst-behaviour (but chpst can't do your original behaviour).
> > > 
> > > 2012/4/18 David Montgomery [davidmontgomery@gmail.com](mailto:davidmontgomery@gmail.com)
> > > 
> > > > Hi,
> > > > 
> > > > When I use the runit cookbook, about 10% of the time I get the below  
> > > > error and it kills the run. When I log int the box and I start, stop,  
> > > > restart manually there is not a problem. So, why is there this issue  
> > > > with the runit cookbook?
> > > > 
> > > > Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete  
> > > > [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to  
> > > > /var/chef/cache/chef-stacktrace.out  
> > > > [Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:  
> > > > service[pixelServerMonitor] (rtb\_server::default line 147) had an  
> > > > error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv  
> > > > restart /etc/service/pixelServerMonitor returned 1, expected 0
> 
> --  
> Opscode, Inc.  
> Adam Jacob, Chief Customer Officer  
> T: (206) 619-7151 E: [adam@opscode.com](mailto:adam@opscode.com)
