Ask Your Question

service command not able to start init script

asked 2014-02-27 13:46:55 -0600

msachikanta gravatar image

updated 2014-02-27 14:15:47 -0600

Stefan gravatar image


I have writen a code to create the init script under /etc/init.d directory and to start the service by Puppet RAL method, below is my code,

class rserve::service inherits rserve
  file {
    ensure => present,
    owner  => root,
    group  => root,
    mode   => 0755,
    notify => Service['Rserve'],
    source => 'puppet:///modules/rserve/Rserve',

 service { "Rserve":
    ensure => running,
    enable => true,
    require => File["$unix_service_dir/Rserve"],

But when i am running puppet agent -t command in agent machines i am getting the below error for service start command.

[root@server04 ~]# puppet agent -t
info: Retrieving plugin
info: Loading facts in /var/opt/lib ...
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-02-27 14:24:17 -0600

Stefan gravatar image

You have set up the file resource to notify your service resource on changes, so when the init script is initially deployed...

notice: /Stage[main]/Rserve::Service/File[/etc/init.d/Rserve]/ensure: defined content as '{md5}b1be3238cbf3575552533c1eaef5859a'

puppet will schedule a restart of the service (the service is not necessarily restarted right away in case multiple resources can notify your init script or you have other dependent resources for your notified resource)

info: /Stage[main]/Rserve::Service/File[/etc/init.d/Rserve]: Scheduling refresh of Service[Rserve]

when puppet finally restarts the service it seems to does it by ... (more)

edit flag offensive delete link more

answered 2014-02-27 23:46:39 -0600

msachikanta gravatar image

updated 2014-02-28 14:55:21 -0600

Stefan gravatar image

Thanks a Lot,

No i have modified the init script, when I executed puppet agent -t command again it got successfully executed. but I found service has not started by RAL method.

Below are the extract of puppet agent -t command.

[root@server04 ~]# puppet agent -t
info: Retrieving plugin
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
info: Loading facts ...
edit flag offensive delete link more


I don't know what you mean by "service has not started by RAL method". It looks like puppet stopped the service but the initscript returned with an exit code ...(more)

Stefan gravatar imageStefan ( 2014-02-28 17:00:19 -0600 )edit

Thanks... we have resolve the issue by modifying init script. now its working as expected. Regards, Sachikanta

msachikanta gravatar imagemsachikanta ( 2014-03-03 00:33:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-02-27 13:46:55 -0600

Seen: 1,477 times

Last updated: Feb 28 '14