I’m trying to start tomcat as a service via “notifies” and when the recipe runs I get the below output
==> default: [2015-11-23T18:01:30+05:30] INFO: remote_file[/usr/share/apache-tomcat-8.0.26/webapps/my-app.war] sending start action to service[tomcat] (immediate) ==> default: Recipe: tomcat::install_tomcat ==> default: * service[tomcat] action start ==> default: (up to date)
and tomcat does not start.
This is what I have written in my recipe
notifies :start, 'service[tomcat]', :immediately
I have also tried with
service 'tomcat' do action :start end
and this gives the output as below.
==> default: * service[tomcat] action start ==> default: (up to date)
And does not start tomcat as well
On the other hand,
service 'tomcat' do action :stop end
stops the tomcat instance
Any idea what could be wrong?