问题
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.
回答1:
I had the same problem, and it was caused by a stale lock file. The process was not really running, there was just a file that said it might be running. The solution was to remove that file:
rm /var/run/tomcat6.pid
回答2:
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 ]
来源:https://stackoverflow.com/questions/4281166/i-dont-understand-the-results-from-service-tomcat6-status