# Tomcat service start not working

**URL:** <https://discourse.chef.io/t/tomcat-service-start-not-working/7359>\
**Category:** Chef Infra (archive)\
**Created:** [November 23, 2015, 1:22pm UTC](https://discourse.chef.io/t/tomcat-service-start-not-working/7359 "2015-11-23T13:22:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gibu\_George](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@Gibu\_George](https://discourse.chef.io/u/Gibu_George)\
**Post date:** [November 23, 2015, 1:22pm UTC](https://discourse.chef.io/t/tomcat-service-start-not-working/7359/1 "2015-11-23T13:22:09Z")

</div>

Hi All,

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?

–gibu

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [November 23, 2015, 1:33pm UTC](https://discourse.chef.io/t/tomcat-service-start-not-working/7359/2 "2015-11-23T13:33:17Z")

</div>

Are you not looking at `action :restart` ?

The idempotent behavior is: if you notify something to start and it’s already started, do nothing, hence the ‘up to date’ log you get, tomcat is already started, so don’t try to start it again.

---

<div class="post-metadata">

**Author:** ![Gibu\_George](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@Gibu\_George](https://discourse.chef.io/u/Gibu_George)\
**Post date:** [November 23, 2015, 2:30pm UTC](https://discourse.chef.io/t/tomcat-service-start-not-working/7359/3 "2015-11-23T14:30:50Z")

</div>

Well, I have a stop just before that and to test, I had the tomcat service stopped manually as well. Still the start would not work.

I tried with restart and that works, I was also able to start the tomcat service manually.

–gibu

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [November 23, 2015, 4:45pm UTC](https://discourse.chef.io/t/tomcat-service-start-not-working/7359/4 "2015-11-23T16:45:35Z")

</div>

Maybe you have another resource earlier in the run starting tomcat ?

Maybe you can make a gist of a run log ?
