Felix & Ryan: Good thought to try a clean environment. I tried "bash --
no-profile" and then ran the CLI command again, but it still worked.
My perusal of the script itself didn't seem to show any environment
variable dependencies. Felix, yes, puppet is correctly deducing that
the service is stopped, and it is indeed not running after puppet
runs.
Aaron: This is running on Ubuntu 11.04, so no SELinux, but AppArmor is
on. Could that be a factor?
Nan, here is the output from "puppet resource service dropbox
ensure=running -d":
debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update
does not exist
debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/
svstat does not exist
debug: Puppet::Type::Service::ProviderRedhat: file /sbin/service does
not exist
debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not
exist
debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl
does not exist
debug: Loaded state in 0.00 seconds
debug: Service[dropbox](provider=debian): Executing 'ps -ef'
debug: Service[dropbox](provider=debian): PID is 28233
debug: Finishing transaction 70128500285900
debug: Storing state
debug: Stored state in 0.02 seconds
debug: Service[dropbox](provider=debian): Executing 'ps -ef'
debug: Service[dropbox](provider=debian): PID is 28233
service { 'dropbox':
ensure => 'running'
}
Thanks, everyone, for your responses.
Richard
On Jan 31, 3:25 pm, Ryan Bowlby <[email protected]> wrote:
> I second checking for required environment variables. Attempt to run
> in a shell that hasn't sourced your .bash_profile and related login-
> time config files. Also, try it with an exec with "/bin/bash -x /etc/
> init.d/dropbox start" to further troubleshoot.
>
> On Jan 30, 3:05 pm, "Richard K. Miller" <[email protected]>
> 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?
>
> > Richard
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.