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

> > [02/05/2000 16:11:00:291] (ERROR) ajp12: Servlet Error: 
> > java.lang.ArrayIndexOutOfBoundsException: 4761600: 4761600
> 
> This doesn't look like something JServ would generate. It looks like it is
> coming from a buggy servlet.

You are correct.  Since last writing, I have identified the buggy Servlet, 
however I haven't found the cause.

> > I'm at a loss.  There are something like 30 different users on the system 
with 
> > their own zones, so I don't have full awareness of all the code which 
runs, 
> > but theoretically it shouldn't be possible for one Servlet in a zone to 
take 
> > down the engine, should it?
> 
> Hell ya it is possible!
> 
> Try putting System.exit() in a servlet and see what happens. :-)
> 
> We currently offer ZERO security within JServ for malicious servlets.
> There is a proposal on the java-apache@ list for adding security, but we
> haven't approved it to go into the distribution yet...it is on my TODO
> list...

I see.  Thank you, this helps me to understand how this happens.

> > I have combed the logs, but I can't find a consistent killer.  I'm about 
to 
> > write a Perl program to periodically poll the server and restart Apache to 
fix 
> > this, but that feel kludgy.  Does anyone have any suggestions on this?
> 
> Nope. :-(

I am not sure if I "solved" the problem, but I have managed to avoid it by 
tuning the memory settings for the JVM.  Below is what I set in the 
jserv.properties:

wrapper.bin.parameters=-Xms128m -Xmx256m -Xss500k -Xoss1m

My system has 256mb of RAM, on Solaris 2.7 for SPARC, Java 1.2 and JServ 1.1.

Because I'm paranoid, I went ahead and wrote a script to check for errors and 
to reboot the server.  Here it is if anyone would find it useful or would like 
to offer correction for my quick hack:

#!/bin/ksh

restart_cmd='/usr/local/apache/bin/apachectl restart'
error_msg='java.lang.ArrayIndexOutOfBoundsException'
Date=`date +%D`
Time=`date +%T`

output=`tail -20 /usr/local/jserv/logs/jserv.log | grep $error_msg`
if [[ $output != "" ]]; then
  $restart_cmd                                  # restart web server
  echo "$Date $Time: Restarting server" >> 
/usr/local/jserv/logs/serverCheck.log
else
  echo "$Date $Time: Server check was fine" >> 
/usr/local/jserv/logs/serverCheck
.log
fi

I have this in the root crontab running every 5 minutes.  I realize it has the 
potential of restarting the server, even after things are corrected, but it 
does the trick until I refine it.  Jon... many thanks for the input.

Duane Gran
http://www.spinweb.net


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