stop/start services

Matthew Seaman m.seaman at
Wed Apr 12 21:31:08 UTC 2006

eoghan wrote:
> Matthew Seaman wrote:
>> eoghan wrote:
>>> I asked a question about stopping/starting tomcat, but I suppose I didnt
>>> ask it right.
>>> What I should have asked is:
>>> How do I stop/start services that I have enabled in my rc.conf, such as
>>> mysql, tomcat etc. I have tried from my rc.d/ with tomcat but it will
>>> not work for me...
>> Like this:
>>     /usr/local/etc/rc.d/ start
>> If that doesn't print out anything then double check what's in
>> /etc/rc.conf
>> If the service apparently starts up, but then you find it's not running
>> a few seconds later, then check any log files that application uses --
>> it's
>> quite often the case that there's a configuration fubar somewhere that is
>> causing the service to give up.

> Well I have the service enabled in my rc.conf... so going to
> localhost:8180 shows me the default tomcat page saying its working
> etc... the jsp examples work fine.
> When i try /usr/local/etc/rc.d/ stop
> i get:
> tomcat55 not running? (check /var/run/
> Thats it. contains 2039.
> I created a jsp file with just plain html in it... but when i browse to
> it I get a HTTP 500 error (exception report).
> I have the file in the correct place according to the docs so Im not
> sure why is not working... I have originally some small piece of jsp but
> figured Id have to restart the server in order for it to work, which is
> what Im trying to do now...

That's not quite the same thing.  Tomcat is clearly starting up and
running perfectly well, as you show by viewing the default web page.  

The problem seems to be the file that should contain the tomcat pid,
and which doesn't.  As that pid file is what the RC scripts refer to
in order to find the process to shut down, not having the right pid
in there will cause the effects you've been seeing. There have been
a number of posts about this issue several months back on the
freebsd-java@ mailing list. I believe it was a bug in the port due
to quite a radical rethink of the way tomcat should be started up.
According to CVS that problem was fixed in the last but one update
to the www/tomcat55 port.  cvsup your ports and try again.

Oh -- in general you don't need to bounce tomcat if you modify one
of the .jsp pages it serves out.  Tomcat usually notices that the
.jsp is newer than the compiled Java bytecode it creates from it,
and will recompile the page for you automatically.  That, at least,
is the default behaviour although you can change it by modifying



Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP:         Ramsgate
                                                      Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list