Re: [Puppet Users] Puppet can''t start service (dropbox) but init.d command works manually

Nan Liu
2012-01-31T17:19:04Z

On Mon, Jan 30, 2012 at 6:05 PM, Richard K. Miller
<richardkmiller@gmail.com> wrote:
> I''m using Dropbox''s command-line daemon on one of our
machines and
> want to use Puppet to keep it running. The dropbox service is already
> installed and allows me to successfully execute /etc/init.d/dropbox
> [start/stop/restart/service]. Here''s my code:
>
> class dropbox::service {
>  service { "dropbox":
>    ensure => running,
>  }
> }
>
> I get the following syslog error when this runs:
> (/Stage[main]/Dropbox::Service/Service[dropbox]/ensure) change from
> stopped to running failed: Could not start Service[dropbox]: Execution
> of ''/etc/init.d/dropbox start'' returned 1:  at
/etc/puppet/modules/
> dropbox/manifests/init.pp:14
>
> However, if I run the above command manually, it works fine and
> returns 0:
>
> root@webhost:~# /etc/init.d/dropbox start ; echo $?
> Starting dropbox...
> 0
>
> Any ideas why puppet can''t start the dropbox daemon?

Try this on the command line:
puppet resource service dropbox ensure=running -d

Nan