-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Last week I sent an e-mail about being unable to restart or stop JServ in manual mode 
on a Solaris system. I think the catch there is it is unable to close the socket for 
some reason, and is just hanging. In an effort to track down what's going wrong I 
started messing around with it on my NT setup (which is working in automatic mode). My 
system is NT 4.0 SP 3, Apache 1.3.6, JServ 1.0, jdk 1.2.2. I have Jserv configured for 
1 servlet zone, 1 repository directory, and the only servlets in the repository are 
SnoopServlet, SessionServlet, and SimpleServlet (so it can't be my programming...). My 
classpath has only ApacheJServ.jar and jsdk.jar.

OK, so I start Jserv and then I run SnoopServlet. I get this log:

[13/09/1999 15:31:15:599 PDT] ApacheJServ/1.0 is starting...
[13/09/1999 15:31:15:599 PDT] WARNING: connection authentication is disabled
[13/09/1999 15:31:15:619 PDT] Connection allowed from localhost/127.0.0.1
[13/09/1999 15:31:15:619 PDT] Listening on port 8007 accepting 50 maximum connections
[13/09/1999 15:31:15:629 PDT] Creating Servlet Zones
[13/09/1999 15:32:07:213 PDT] SnoopServlet: init

Looks OK to me.

Then I send a shutdown with the -s parameter and the same jserv.properties file I used 
to start it with. JServ terminates, but the log is the same. After looking through the 
source code, it looks like it should definitely be outputting some information. Like 
"Closing the server socket" and which servlets are terminating.

Now I delete the log and restart JServ. I get SnoopServlet's reponse, no problem. Then 
I try to do a restart with the -r argument. I get the "Signal Sent" message. Check the 
log:

[13/09/1999 15:37:49:535 PDT] ApacheJServ/1.0 is starting...
[13/09/1999 15:37:49:535 PDT] WARNING: connection authentication is disabled
[13/09/1999 15:37:49:675 PDT] Connection allowed from localhost/127.0.0.1
[13/09/1999 15:37:49:675 PDT] Listening on port 8007 accepting 50 maximum connections
[13/09/1999 15:37:49:705 PDT] Creating Servlet Zones
[13/09/1999 15:38:01:052 PDT] SnoopServlet: init
[13/09/1999 15:38:59:405 PDT] Received signal 01
[13/09/1999 15:38:59:405 PDT] Restarting ApacheJServ/1.0...
[13/09/1999 15:38:59:415 PDT] Terminating root
[13/09/1999 15:38:59:746 PDT] ApacheJServ/1.0 is starting...
[13/09/1999 15:38:59:746 PDT] WARNING: connection authentication is disabled
[13/09/1999 15:38:59:756 PDT] Connection allowed from localhost/127.0.0.1
[13/09/1999 15:38:59:756 PDT] Listening on port 8007 accepting 50 maximum connections
[13/09/1999 15:38:59:756 PDT] Creating Servlet Zones
[13/09/1999 15:38:59:445 PDT] SnoopServlet: destroy
[13/09/1999 15:38:59:405 PDT] Closing the server socket

Something looks suspicious to me here. The time stamps of the last 2 entries are 
before the previous 5 or so. But never mind that, I didn't feel like looking through 
the whole LogWriter code to see what it was doing. If you follow the times of the 
events it looks OK. Problem is when I go to run the SnoopServlet again, it doesn't 
respond. I get "document contained no data" from my browser, and there are no 
additional entries in the log. JServ or mod_jserv's log. If I subsequently try to do a 
shutdown with -s, nothing happens either, but I do get a "Signal sent" confirmation. 
But nothing in the logs, and Jserv doesn't exit.

So I see two problems: 1) When I shutdown, it doesn't look like the Servlet's destroy 
methods are being called (although maybe some log buffering is causing the entries to 
not be saved before system.exit() is called), 2) Restart doesn't seem to leave JServ 
in a responsive state.

Can anyone confirm or deny this behavior? I'm going to try it on my Red Hat 6 system 
later and see what happens. Does anyone know if the module uses the -r (restart) 
command or does it do a complete stop and then start if you restart apache? Under NT I 
don't think there is a way to restart apache, because from the services dialog there 
are only stop and start buttons.

Thanks for reading all of this,

-Greg



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