On Thursday, February 7, 2013 4:49:18 AM UTC-6, bernard...@morpho.com wrote: > > Error: /Stage[main]/Jbossuninstall/Service[jboss]/ensure: change from > running to stopped failed: Could not stop Service[jboss]: Execution of > '/sbin/service jboss stop' returned : > > > > In fact command /sbin/service jboss stop returns 143, is it the error > reason ? > > Yes. Linux Standards Base specifications call for initscript actions other than 'status' to return 0 on success, and Puppet relies on your services to comply. Supposing that Jboss is in fact stopped successfully in your scenario, the initscript is defective on account of returning the wrong code. This is not a CentOS problem, because CentOS did not provide whatever Jboss package you are using.
Supposing that you don't want to fix the Jboss init script, you can work around its buggy behavior by declaring a custom 'stop' command for the Service resource. You'll have to determine the details to match your requirements and the behavior of the initscript. If you don't care whether jboss really does stop then it might be '/bin/bash -c "/sbin/service jboss stop || /bin/true"'. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.