You're assuming that tomcat is daemonizing but it seems the task is running with some option that prevents it from forking and leaving the current shell (so it's parent ID process is init)
> On Oct 24, 2013, at 18:00, Manoj Thakkar < "> > wrote:
>
> Hi All,
>
> I have a chef recipe which does something like this
>
> cd tomcat/bin
> ./shutdown.sh
> sleep 10
> ./startup.sh
>
> when i run it on the node chef-client -o "recipe[tomcat]"it works fine ,
>
> but when i call knife ssh "role[tomcat]" "chef-client -o "recipe[tomcat]" the tomcat come up and then shutdown itself,
>
> i thought its something to do with ssh and starting a new shell so i tried ./startup.sh & in the recipe
>
> but that also did not help, pls help i think i understand the issue being a new shell spawned and killed, but i dont understand why even if i put the process in background also what's the workaround for it.
>
Check startup.sh and make sure the command is run without debug or "no fork" or whatever equivalent option tomcat uses. It might be as simple as "write output to stdout" and when your shell exits the task dies. (broken pipe)
Hope that helps
Regards,
--
A bug magnet
Archive powered by MHonArc 2.6.16.