From owner-freebsd-questions@FreeBSD.ORG Wed Apr 12 21:31:07 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4FCA16A404 for ; Wed, 12 Apr 2006 21:31:07 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.187.76.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F68143D45 for ; Wed, 12 Apr 2006 21:31:06 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from [IPv6:::1] (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.13.6/8.13.6) with ESMTP id k3CLUrDC075172; Wed, 12 Apr 2006 22:30:53 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <443D7188.3000706@infracaninophile.co.uk> Date: Wed, 12 Apr 2006 22:30:48 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 1.5 (X11/20060401) MIME-Version: 1.0 To: eoghan References: <443D4EA9.9090209@redry.net> <443D55C6.4010801@infracaninophile.co.uk> <443D5915.5090204@redry.net> In-Reply-To: <443D5915.5090204@redry.net> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig9ACBA8C166A754FDF243C0F9" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (smtp.infracaninophile.co.uk [IPv6:::1]); Wed, 12 Apr 2006 22:30:54 +0100 (BST) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: stop/start services X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2006 21:31:08 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9ACBA8C166A754FDF243C0F9 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable eoghan wrote: > Matthew Seaman wrote: >> eoghan wrote: >> >>> I asked a question about stopping/starting tomcat, but I suppose I di= dnt >>> 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/tomcat.sh 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 runnin= g >> 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/tomcat55.sh stop > i get: > tomcat55 not running? (check /var/run/tomcat55.pid) > Thats it. tomcat55.pid 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 bu= t > 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. =20 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 =2Ejsp 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 server.xml Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig9ACBA8C166A754FDF243C0F9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEPXGN8Mjk52CukIwRA1QhAJ9ov39W5OJ23e8peEIB+IT6bdvyrwCfVjLJ oQ+Oo3IMjnWs39QB0Zg5ct4= =HZ+j -----END PGP SIGNATURE----- --------------enig9ACBA8C166A754FDF243C0F9--