----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Jean-Luc Rochat wrote:
> 
> > I have my bindaddress set to my ip address (not 127.0.0.1) and
> > when I try to send it a stop signal, it takes a NullPointerException.
> > This works fine if I use 127.0.0.1 as the bindaddress (which means
> > I can only connect from an Apache instance on the same box).
> >
> > It looks like the signal method in JServ is always connecting to
> > 127.0.0.1 to send signals.  I changed it to open the socket to
> > the bindaddress value from the properties file and it appears to
> > fix the problem.  Is this a valid fix?
> >
> No. (in my opinion).
> There is another thread on this list : "How to startup Apache JServ"
> where I explain why : mainly because it sucks in a distributed
> environment : Apache on one host and 2 JServs on another one. (with or
> without load-balancing).
> Which properties file are you going to share ?
> Bernie did propose another approach. I didn't read it totally yet, but
> he usually has good ideas.

It sucks even more only being able to send a signal to a JServ that is
bound to 127.0.0.1 (since this appears to break the ability to have
Apache on one host and JServ on another).  This means the only way to
stop it is kill -9.  Our machines are all Solaris 2.6 with JDK 1.1.8. 
Even on the same machine, if the JServ is bound to localhost and the
ApJServMount is to the machine name (not localhost), the JServ will
reject the connection.  So being forced to use localhost if we want to
shutdown gracefully sucks.

The properties file is whatever properties file was passed in for
startup (required by org.apache.jserv.JServ.main so there must be one).

The patch defaults it to the current default value (localhost) so there
is no behavioral change to any current config.

As a side note, we use a control script here (semi-modeled after
apachectl) to start/stop/restart multiple JServ instances (all manual
mode).  The scheme we use is to have a properties file for each
host:port combination (where the zone configs may be identical for load
balancing) named something like "jserv.properties.`uname -n`:port".  The
control script requires a port number as an option which it uses to
determine which properties file to use (and hence which VM to talk to). 
We could easily add a host option and could stop/restart remote JServs.


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to