stop/start services

2006-04-12 Thread eoghan

Hi
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...

Does anyone have any info for me that could help me out with this?
Thank you
Eoghan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread Matthew Seaman
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/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 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.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


RE: stop/start services

2006-04-12 Thread fbsd


/usr/local/share/mysql/mysql.server start
/usr/local/share/mysql/mysql.server stop

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of eoghan
Sent: Wednesday, April 12, 2006 3:02 PM
To: freebsd-questions@freebsd.org
Subject: stop/start services


Hi
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...
Does anyone have any info for me that could help me out with this?
Thank you
Eoghan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread eoghan

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/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 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.

Cheers,

Matthew



Hi Matthew,
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 but 
figured Id have to restart the server in order for it to work, which is 
what Im trying to do now...

Thanks
Eoghan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Re: stop/start services

2006-04-12 Thread [EMAIL PROTECTED]

   Hello,
   Please and what is the diference between directory /usr/local/etc/rc.d
   and etc/rc.d
   Thanks and Regards,
   Julian Bolivar
   --- Mensaje Original --
   De: Matthew Seaman [EMAIL PROTECTED]
   Para: eoghan [EMAIL PROTECTED]
   Cc: freebsd-questions@freebsd.org [EMAIL PROTECTED]
   Asunto: Re: stop/start services
   Fecha: 12/04/2006 15:33:11
   Mensaje:
   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/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 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.
   Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
   Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent,
   CT11 9PW
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Re: stop/start services

2006-04-12 Thread fbsd
 etc/rc.d is for software that is part of the operating system and
 stuff in here gets launched by control statments in rc.conf

 /usr/local/etc/rc.d is where software installed from the ports
normally put their start up scripts.
At boot time the directory is read and all scripts
ending in .sh get executed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, April 12, 2006 3:47 PM
To: freebsd-questions@freebsd.org
Subject: Re: Re: stop/start services



   Hello,
   Please and what is the diference between directory
/usr/local/etc/rc.d
   and etc/rc.d
   Thanks and Regards,
   Julian Bolivar
   --- Mensaje Original --
   De: Matthew Seaman [EMAIL PROTECTED]
   Para: eoghan [EMAIL PROTECTED]
   Cc: freebsd-questions@freebsd.org [EMAIL PROTECTED]
   Asunto: Re: stop/start services
   Fecha: 12/04/2006 15:33:11
   Mensaje:
   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/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 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.
   Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory
Courtyard
   Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent,
   CT11 9PW
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread eoghan

[EMAIL PROTECTED] wrote:

   Hello,
   Please and what is the diference between directory /usr/local/etc/rc.d
   and etc/rc.d
   Thanks and Regards,
   Julian Bolivar


Hi
Im not really sure what you mean? But /etc/rc.d/ doesnt have user 
installed apps? maybe?




   --- Mensaje Original --
   De: Matthew Seaman [EMAIL PROTECTED]
   Para: eoghan [EMAIL PROTECTED]
   Cc: freebsd-questions@freebsd.org [EMAIL PROTECTED]
   Asunto: Re: stop/start services
   Fecha: 12/04/2006 15:33:11
   Mensaje:
   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/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 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.
   Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
   Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent,
   CT11 9PW
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: stop/start services

2006-04-12 Thread Zimmerman, Eric
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:owner-freebsd-
 [EMAIL PROTECTED] On Behalf Of eoghan
 Sent: Wednesday, April 12, 2006 3:14 PM
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Subject: Re: stop/start services
 
 [EMAIL PROTECTED] wrote:
 Hello,
 Please and what is the diference between directory
 /usr/local/etc/rc.d
 and etc/rc.d
 Thanks and Regards,
 Julian Bolivar
 
 Hi
 Im not really sure what you mean? But /etc/rc.d/ doesnt have user
 installed apps? maybe?

It did a few weeks ago for one port. Amavisd used to be installed to
/etc/rc.d but the last time I updated it was moved back to
/usr/local/etc/rc.d (probably because it shouldn't have been in
/etc/rc.d)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread Pete Slagle

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/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 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.


Service instead of daemon?   Our assimilation by the Borg proceeds apace.




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Re: stop/start services

2006-04-12 Thread Odhiambo Washington
* On 12/04/06 16:13 -0400, fbsd wrote:
|  etc/rc.d is for software that is part of the operating system and
|  stuff in here gets launched by control statments in rc.conf
| 
|  /usr/local/etc/rc.d is where software installed from the ports
| normally put their start up scripts.
| At boot time the directory is read and all scripts
| ending in .sh get executed.

With rcNG, it seems that any script with the executable mode set and
with a matching control statement in /etc/rc.conf will get started
regardless of whether it ends in .sh or not.


-Wash

http://www.netmeister.org/news/learn2quote.html

DISCLAIMER: See http://www.wananchi.com/bms/terms.php

--
+==+
|\  _,,,---,,_ | Odhiambo Washington[EMAIL PROTECTED]
Zzz /,`.-'`'-.  ;-;;,_ | Wananchi Online Ltd.   www.wananchi.com
   |,4-  ) )-,_. ,\ (  `'-'| Tel: +254 20 313985-9  +254 20 313922
  '---''(_/--'  `-'\_) | GSM: +254 722 743223   +254 733 744121
+==+

Gee, Toto, I don't think we are in Kansas anymore.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread Odhiambo Washington
* On 12/04/06 20:46 +0100, 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/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 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.
| 
|  Cheers,
| 
|  Matthew
| 
| 
| Hi Matthew,
| 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 but 
| figured Id have to restart the server in order for it to work, which is 
| what Im trying to do now...

Have you checked that the script refers to the correct pid file?



-Wash

http://www.netmeister.org/news/learn2quote.html

DISCLAIMER: See http://www.wananchi.com/bms/terms.php

--
+==+
|\  _,,,---,,_ | Odhiambo Washington[EMAIL PROTECTED]
Zzz /,`.-'`'-.  ;-;;,_ | Wananchi Online Ltd.   www.wananchi.com
   |,4-  ) )-,_. ,\ (  `'-'| Tel: +254 20 313985-9  +254 20 313922
  '---''(_/--'  `-'\_) | GSM: +254 722 743223   +254 733 744121
+==+

It is against the law for a monster to enter the corporate limits of
Urbana, Illinois.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread Lowell Gilbert
Odhiambo Washington [EMAIL PROTECTED] writes:

 With rcNG, it seems that any script with the executable mode set and
 with a matching control statement in /etc/rc.conf will get started
 regardless of whether it ends in .sh or not.

But with slightly different semantics.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread Matthew Seaman
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/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 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/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 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
server.xml

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: stop/start services

2006-04-12 Thread Matthew Seaman
Pete Slagle 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/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 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.
 
 Service instead of daemon?   Our assimilation by the Borg proceeds apace.

Tomcat isn't strictly a daemon -- it runs in a JavaVM that (IIRC) doesn't
divorce itself from any controlling terminal or close down its stdin,
stdout or stderr descriptors in the way that daemon processes should.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: stop/start services

2006-04-12 Thread eoghan

Matthew Seaman wrote:

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/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 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/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 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
server.xml

Cheers,

Matthew



Ah ok, I will cvsup and reinstall it. Then will try it again...
Thanks for the info.
Eoghan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stop/start services

2006-04-12 Thread Paul Schmehl
--On April 12, 2006 10:30:48 PM +0100 Matthew Seaman 
[EMAIL PROTECTED] wrote:


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.

I'm not familiar with Tomcat, but rcNG has the capability of solving these 
types of problems.  The author of the script can use check_process(${name} 
command_interpreter) instead, so that the scripts will check the running 
processes rather than the pidfile.


I'm working on a set of ports that require that because they are tcl 
scripts, so the ${name} of the process is squild, but ps returns tclsh8.4 
instead.


*If* that's the problem with Tomcat, it's fairly easily fixed.

Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/

Re: stop/start services

2006-04-12 Thread wc_fbsd

At 04:36 PM 4/12/2006, Pete Slagle wrote:

Service instead of daemon?   Our assimilation by the Borg proceeds apace.


C'mon don't be so paranoid.  There's been an etc/services since, 
well, probably since Billy Boy was living check to check  ;)


   -Wayne

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]