Ask Your Question
0

service command not able to start init script

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

msachikanta gravatar image

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

Stefan gravatar image

Hello,

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 {
    "$unix_service_dir/Rserve":
    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 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

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

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
0

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

msachikanta gravatar image

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

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 ...
(more)
edit flag offensive delete link more

Comments

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 -0500 )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 -0500 )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

Stats

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

Seen: 1,136 times

Last updated: Feb 28 '14