I don't understand the results from #service tomcat6 status

Neil Sands picture Neil Sands · Nov 25, 2010 · Viewed 8.1k times · Source

I'm trying to get Tomcat 6 running on Fedora 14. I'm quite new to this sort of thing, though I have managed to get Apache running before.

I suspect I've made mistakes on some quite basic levels, because the test page (http://localhost:8080) can't be found.

If I try to check the service's status, as root or as an ordinary user, this is what I get:

tomcat6 (pid) is running...[OK]  
tomcat6 lockfile exists but process is not running [FAILED]

So I'm confused, because I seem to be being told that Tomcat 6 both is and isn't running. If anyone can tell me what this really is telling me, and where my suspicions should turn next, I'd be very grateful.

There's no mention of any of this sort of thing in the docs.

Answer

mdahlman picture mdahlman · Dec 11, 2012

I had the same problem. I found beetstra's answer to be necessary but insufficient. I also needed to change some permissions. As indicated (mostly) by this bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=708694

# get rid of pid
rm /var/run/tomcat6.pid

# give tomcat sufficient permissions
chown tomcat:tomcat -R /usr/share/tomcat6/conf/
chown tomcat:tomcat -R /usr/share/tomcat6/conf
chown tomcat:tomcat -R /usr/share/tomcat6/logs

After that I could start tomcat successfully:

service tomcat6 start 
Starting tomcat6:              [  OK  ]