I'd like to use BRL (requires Kawa and a servlet engine), but am
frustratingly
stuck trying to coerce Apache+mod_jserv into working. I know this might
be a
bit off topic for the group, but I'm trying to reach people who might be
using
BRL.
I can access http://localhost/jserv/status, and click the "localhost"
(http://localhost/jserv/status?module=localhost) entry in the
"Configured Hosts"
sections. I can change the config and this page properly reflects the
changes
(i.e. a test by changing the port number); the "localhost" page also
indicates
the .brl handler is setup.
However,
I cannot load the "ajpv12://localhost:8007"
(http://localhost/jserv/engine/0/)
page. Mozilla will contact localhost, but loads indefinitely, never
displaying content. Similarily, I cannot load
"http://localhost/servelts/IsItWorking". This leads me to believe it's
not
working.
httpd's error_log:
[Tue Jan 8 21:20:08 2002] [info] [client 127.0.0.1] ajpv12-open timed
out
mod_jserv's jserv.log (from jserv.properties)
[08/01/2002 21:20:08:054 EST] <jservException> AJP Protocol Error:
java.io.IOException: Stream closed prematurely
I read one usenet explanation that the "Stream closed .. " error is
indicative
of a problem when using a JDK with java threads implemented as native
threads.
I can't find anything on the "timed out" error from the httpd log.
I've tried many different JDKs.
It's been a long process understanding jserv and it's configuration (I
started
all this with Tomcat, but saw examples using mod_jserv and thought this
would
be easier!), but now I'm stumped.
Can someone please help?
Thanks, config below.
Richard
--------------------
Currently, my set up is:
Mandrake 8.1 with 2.4.17ac3+preempt (ok, I should try a simpler
kernel...)
Glibc 2.2.4 (libc-2.2.4.so)
Blackdown JDK installed in:
/usr/java/jdk1.2.2/ (symlinked as /usr/java/jdk; jserv.conf points
through the symlink - see below)
also tried these JDK releases; the Blackdown ones are from FCS tarballs:
Blackdown j2sdk1.3.1
Blackdown jdk118_v3
Sun jdk1.3.1_01
apache-1.3.22-1.1mdk (Mandrake)
httpd.conf:
DocumentRoot /var/www/html
Servername localhost
User apache
Include conf/commonhttpd.conf (Mandrake splits the conf files)
UseCanonicalName off
Include /etc/httpd/conf/jserv/jserv.conf
LoadModule jserv_module modules/mod_jserv.so
AddModule mod_jserv.c
ApacheJServ-1.1.2-1
jserv.conf:
ApJServManual off
ApJServProperties /etc/httpd/conf/jserv/jserv.properties
ApJServMount /servlets /root
ApJServMount /servlet /root
ApJServAction .brl /servlets/gnu.brl.brlsv
jserv.properties
wrapper.bin=/usr/java/jdk/bin/java
wrapper.bin.parameters="-verbose"
wrapper.path="/bin:/usr/bin:/usr/local/bin:/usr/java/jdk/bin:/usr/sbin:/sbin"
wrapper.classpath=/usr/lib/apache/ApacheJServ.jar
wrapper.classpath=/home/httpd/classes/servlet-2.0.jar
wrapper.classpath=/home/httpd/classes/brl-2.1.28.jar
wrapper.classpath=/home/httpd/classes/kawa-1.6.96.jar
bindaddress=localhost
zones=root
root.properties=/etc/httpd/conf/jserv/zone.properties
pool=false
security.selfservlet=true
security.allowedAddresses=DISABLED
security.authentication=false
-rwxr-xr-x 1 root root 240895 Jun 19 2000
/usr/lib/apache/mod_jserv.so
drwxr-xr-x 2 root nobody 4096 Dec 23 19:53
/home/httpd/servlets/
-rwxr-xr-x 1 root nobody 2041 Jun 19 2000
/home/httpd/servlets/IsItWorking.class
-rwxr-xr-x 1 root nobody 4542 Jun 19 2000
/home/httpd/servlets/IsItWorking.java
> It's been a long process understanding jserv and it's configuration (I
> started all this with Tomcat, but saw examples using mod_jserv and
> thought this would be easier!), but now I'm stumped.
The jserv examples in the manual are now somewhat dated. However,
tomcat doesn't require any special configuration. Just get learnbrl.war
from sourceforge. Ostensibly it's a tool to teach newbies how to use
BRL, but it also serves as an example of how to configure a web
application to use BRL.
Thanks for your help. If you could elaborate on the installation procedure, I'd
be appreciative.
On your advice, I revisited tomcat4. It was much simpler than mod_jserv, good
call.
I downloaded the learnbrl.war file (incidently, the 2.1.29 sourceforge .war file
seems to be the same one as 2.1.28, are the download links correct?). Since I
don't know the guts of a tomcat server.xml file, I read the jakarta docs on the
manager app and used it to install the brl app (from a .war).
I copied learningbrl.war into /var/tomcat4/webapps/ and then:
http://localhost:8180/manager/install?path=/learnbrl&war=jar:file:/learnbrl.war!/
results in:
FAIL - Encountered exception java.util.zip.ZipException: No such file or
directory
If I create the /learnbrl dir myself and the perform the manager install, it
completes and tells me so.
But the .war doesn't extract, so when I visit http://localhost:8180/learnbrl/
there isn't any content. (I'm assuming that's how I access the lessons.) I get
an empty directory listing (which is different than the 404 I get if the
application isn't installed and running.. so I'm getting _somewhere_).
This doesn't seem like the proper way to install a webapp. However, the tomcat
docs don't seem to contain enough simple steps or explanation to get me
rolling. Unfortunately, I have zero experience with tomcat.
In fact, when the manager docs refer to the argument for "war=" as an "absolute
path to a .war file", I would interpret that to mean a fully qualified system
path! I don't think that's what they mean; when I tried the manager install
with "war=/var/tomcat4/webapp/learnbrl.war" (as the second argument to the
manager cgi) I received a totally different error. I just can't find the
documentation to bootstrap myself.
BTW, if I install the app via manager, shouldn't there be configuration changes
written (to declare the brl app context at /learnbrl) in the server.xml file?
None of the tomcat conf files have been written to after the installation.
I've asked a few questions here, but I understand that you're not tomcat
support; if you happen have a reference to more thorough tomcat instructions, I
would be grateful.
I feel that I'm probably missing one or two very simple steps.
Many thanks for any help,
Richard
> On your advice, I revisited tomcat4. It was much simpler than
> mod_jserv, good call. I downloaded the learnbrl.war file (incidently,
> the 2.1.29 sourceforge .war file seems to be the same one as 2.1.28,
> are the download links correct?).
You have to scroll down to the bottom of the download page to get the
latest learnbrl.war. It's 1207281 bytes, as opposed to the 2.1.28 size
of 1075744.
Sourceforge should really learn how to use HTML anchors. Clicking on
"download" next to a package within a project should take you to the
part of the download page that has that package, rather than put you at
the top and make you scroll as happens now.
I'm using tomcat in a BRL workshop for MIT's Independent Activities
Period, and my working setup happens to be on the web. You can poke
around in here and see what I did:
http://web.mit.edu/brlewis/tomcat/
I unpacked the war file using
jar xvf learnbrl.war
This is a good way to do it as you'll be modifying tutorial files as you
go along. Tomcat will unpack the .war file for you if configured to use
the .war, but it deletes the files when it decides it's done.
I don't know how to install via the manager. I just copied the part of
server.xml for the examples webapp and changed "examples" to "learnbrl"
everywhere. (I might also have deleted some directive that were
obviously unnecessary.)
"<jservException> AJP Protocol Error: java.io.IOException: Stream
closed prematurely".
Would you tell me how to fix it?
AJP protocol errors would only result from Apache and JServ having
difficulty talking to each other.
Why are you using JServ in this day and age? Either Jetty or Tomcat can
integrate with Apache or act as standalone web servers. JServ predates
Java web application archives, so you'll need Jetty or Tomcat (or
Websphere or resin or Paperclips or JRun, etc.) if you want to use
learnbrl.war as per the BRL manual.
I am using Apache 1.3.33 + mod_perl/1.28 + mod_ssl2.8 OpenSSL0.9.7d.
Thanks,