My apologies, I thought you were saying it starts but were unaware of
the exit code.

I'm now unsure... You could try run this:

puppet apply --verbose --debug --trace --summarize test.pp

where test.pp is the simplest form of your service as possible, and
see if you get anything useful, although I've just done that on a
CentOS system and it wasn't as helpful as I imagined (didn't blatantly
tell me the exit code as I hoped).

On Sep 30, 3:33 pm, "D.N. van der Meijden" <cybernijn...@gmail.com>
wrote:
> Hi Luke,
>
> As mentioned it works manually:
>
> 'client:~# /etc/init.d/zabbix_agent start ; echo $?
> Starting Zabbix agent: zabbix_agentd
> 0
>
> By the way, this specific client is a lenny 5.05
>
> On 30 sep, 16:28, "luke.bigum" <luke.bi...@fasthosts.co.uk> wrote:
>
> > As Nigel indicated, the exit code for your init script is not what
> > puppet expects, it is not a file permission problem.
>
> > As Nigel suggested, shut down your service then run this:
>
> > /etc/init.d/zabbix_agent start ; echo $?
>
> > And tell us what number is printed on the screen. If it prints 1, that
> > would explain your Puppet error message. Not sure what operating
> > system you use, but init scripts SHOULD return 0 when they run
> > successfully. If your init script is returning 1 on success, it's
> > broken.
>
> > -Luke
>
> > On Sep 30, 3:04 pm, "D.N. van der Meijden" <cybernijn...@gmail.com>
> > wrote:
>
> > > Thanks for the quick reply Nigel.
> > > I understand that the puppet is reporting back the exit status, but
> > > what I don't understand is why it keeps failing when trying to start
> > > via puppet.
> > > All files are available on the client, permissions are ok and starting
> > > the daemon manually works without problems.
>
> > > On 30 sep, 15:57, Nigel Kersten <nig...@google.com> wrote:
>
> > > > On Thu, Sep 30, 2010 at 6:42 AM, D.N. van der Meijden
>
> > > > <cybernijn...@gmail.com> wrote:
> > > > > I'm trying to get a service running, but I keep getting the following
> > > > > error message:
> > > > > "err: //Node[debiannode]/zabbix/Service[zabbix_agent]/ensure: change
> > > > > from stopped to running failed: Could not start Service[zabbix_agent]:
> > > > > Execution of '/etc/init.d/zabbix_agent start' returned 1:  at /etc/
> > > > > puppet/modules/zabbix/manifests/init.pp:62"
>
> > > > > The part of the init.pp script:
> > > > >   service { "zabbix_agent":
> > > > >      name      => "zabbix_agent",
> > > > >      enable    => true,
> > > > >      ensure    => running,
> > > > >      hasstatus => true,
> > > > >      subscribe => File["zabbix_agentd.conf"],
> > > > >      require   => [ File["/etc/zabbix"],
> > > > > File["zabbix_agentd.conf"] ],
> > > > >   }     # <-- line 62
>
> > > > > If I start the daemon manually [as root or normal user zabbix] (i.e. /
> > > > > etc/init.d/zabbix_agent start), it works.
> > > > > I checked the permissions, but these are set at 755 so that shouldn't
> > > > > be a problem.
>
> > > > > client:~# /etc/init.d/zabbix_agent start
> > > > > Starting Zabbix agent: zabbix_agentd
> > > > > client:~# ps -ef | grep zabbix
> > > > > zabbix    2116     1  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > zabbix    2117  2116  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > zabbix    2118  2116  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > zabbix    2119  2116  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > zabbix    2120  2116  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > zabbix    2121  2116  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > zabbix    2122  2116  0 15:37 ?        00:00:00 /etc/zabbix/sbin/
> > > > > zabbix_agentd
> > > > > root      2124  1890  0 15:37 pts/2    00:00:00 grep zabbix
>
> > > > > What am I missing here?
>
> > > > The exit status of starting the daemon, which is what Puppet is
> > > > reporting back to you.
>
> > > > /etc/init.d/zabbix_agent start ; echo $?
>
> > > > It sounds like puppet is actually starting it but thinking the
> > > > operation failed because the init script exits non-zero.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups "Puppet Users" group.
> > > > > To post to this group, send email to puppet-us...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to 
> > > > > puppet-users+unsubscr...@googlegroups.com.
> > > > > For more options, visit this group 
> > > > > athttp://groups.google.com/group/puppet-users?hl=en.
>
> > > > --
> > > > nigel- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit 
> > > > oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to