4

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.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Neil Sands
  • 173
  • 4
  • 18
  • is it configured on port 8080 or perhaps some other? – JoseK Nov 26 '10 at 06:47
  • Sorry, only just seen this tonight. Yes, it was definitely configured for port 8080. I don't think being configured for another port would give the two status report lines I was seeing in any case. Thanks. – Neil Sands Mar 25 '11 at 22:38

2 Answers2

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  ]
mdahlman
  • 9,204
  • 4
  • 44
  • 72
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

beetstra
  • 7,942
  • 5
  • 40
  • 44
  • Well, I tried that myself at the time, but it didn't cure the problem. Perhaps another lock file went stale. In the end I just left it alone for several weeks, and the next time I came back to it it was fine. Very curious. Lots of banging my head against a brick wall and in the end I learnt nothing from it. Thanks for helping though! – Neil Sands Mar 25 '11 at 22:40