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

I have a happy update to this matter... I was running on port 8080 and had
a production copy of apache on port 80.  When I shut down the other
version of apache things work fine.  I believe that only one instance of
apache, regardless of the port, can bind to one IP address.

Everything is working now, but from what I've read in the FAQ-o-matic,
ajp11 connection failures are a symptom of many types of problems.  I am
happy to share my build and installation steps if it helps anyone.  I
built it as a static compilation, not DSO. They
are listed below (pardon the verboseness):

1.  Extracted apache_1.3.9.tar and Apache_JServ_1.0.tar.gz into
/usr/local/src
2.  Downloaded the JSDK 2.0 from http://java.sun.com/products/servlet
3.  Installed JSDK into /usr/JSDK2.0
4.  Run the following command to test a vanilla instance of apache:

      cd /usr/local/src/apache_1.3.9
      configure 
        
5.  The necessary makefiles should now be made.  Now run make:

      make
     
5.  Run make install as apache to put it into /usr/local/apache
 
      make install
       
     This will create some directories under /usr/local/apache and
     put all the binaries in place.
 
     Note: The installer changes the group to staff for all files.
           This has caused no problems with Apache
 
6.  Before we can test Apache, set the following directives in the
     /usr/local/apache/conf/httpd.conf file.  They should already
     exist and need only to be changed.
     
       User nobody
       Group nobody
       ServerName schubert.spinweb.net
       port 8080

7.  Start the server from user apache with this command:

      /usr/local/apache/bin/apachectl start
    
8.  This should respond that httpd started.  To test the server,
    go to:
    
      http://schubert.spinweb.net:8080/
      
    The port is 8080 since non-root users cannot run servers on
    ports under 1023.  The server should be run on port 80 when
    root runs the server later.
       
9.  Build Jserv for static compilation into Apache:

      /usr/local/src/ApacheJServ-1.0/configure \
       --with-apache-src=/usr/local/src/apache_1.3.9
       --prefix=/usr/local/jserv 
       --with-jdk-home=/usr/java1.2
       --with-jsdk=/usr/JSDK2.0/lib/jsdk.jar
   
10. Make the new version:

     cd /usr/local/src/ApacheJServ-1.0/
     make
     make install
     
11. Rebuild Apache:

     /usr/local/src/apache_1.3.9/configure \
      --activate-module=src/modules/jserv/mod_jserv

     cd /usr/local/src/apache_1.3.9
     make
     /usr/local/apache/bin/apachectl stop

12. Add the following to the /usr/local/apache/conf/httpd.conf:

     Include /usr/local/src/ApacheJServ-1.0/example/jserv.conf

13.  make it:

     make install
     /usr/local/apache/bin/apachectl start
     /usr/local/apache/bin/httpd -l
     

14. Restart the Apache server:

      /usr/local/apache/bin/apachectl restart

15. Test the example servlet at:

     http://schubert.spinweb.net:8080/example/Hello

Duane Gran


On Wed, 15 Sep 1999, Thor Heinrichs-Wolpert wrote:

> -----------------------------
> Please read the FAQ!
> <http://java.apache.org/faq/>
> -----------------------------
> 
> Duane:
> 
> I'm running the same configuration as you, and I intermittently get the same
> error messages.
> Can you run at all?
> 
> There was a suggestion from Jon to check that the same class is not
> accessible from the CLASSPATH and the zone path / repository.  I've checked
> mine thoroughly and have not found any permissions, nor access issues.  That
> might help you.
> 
> I didn't see your original message ... but if you are already running, but
> getting intermittent problems, I'd be interested in comparing configs with
> you.
> 
> I'm adding a monitor to the app, and might have to go so far as looking into
> the ajpv11 code so that I can get a bigger message (if possible).  All I get
> in my log is:
> [14/09/1999 14:58:55:389] (EMERGENCY) ajp11: connection fail
> [14/09/1999 14:58:55:389] (ERROR) an error returned handling request via
> protocol "ajpv11"
> which unfortunately doesn't tell me enough.
> 
> Thor HW
> ----- Original Message -----
> From: Duane M. Gran <[EMAIL PROTECTED]>
> To: Java Apache Users <[EMAIL PROTECTED]>
> Sent: Tuesday, September 14, 1999 9:46 PM
> Subject: Re: ajp11: connection fail
> 
> 
> > -----------------------------
> > Please read the FAQ!
> > <http://java.apache.org/faq/>
> > -----------------------------
> >
> > > > #1. What version of Apache JServ you are using
> > > >
> > > > 1.0 final
> > > >
> > > > #2. What version of Apache you are using
> > > >
> > > > 1.3.9, statically linked.  httpd -l confirms that mod_jserv is
> included in
> > > > httpd.
> > > >
> > > > #3. What OS and OS version you are using
> > > >
> > > > Solaris 2.6 on SPARC
> > > >
> > > > #4. An exact description of what is going wrong (pretend that we are
> not
> > > > there and we cannot see what you are doing). Include any useful log
> file
> > > > output as well.
> > > >
> > > > I'm runnin the server on port 8080 and trying to use the example/Hello
> > > > servlet but my error logs show some problems and it returns an
> internal
> > > > server error.  My jserv.log shows:
> > > >
> > > > [14/09/1999 21:31:16:632] (EMERGENCY) ajp11: can not connect to host
> > > > 127.0.0.1:8007
> > > > [14/09/1999 21:31:16:634] (EMERGENCY) ajp11: connection fail
> > > > [14/09/1999 21:31:16:634] (ERROR) an error returned handling request
> via
> > > > protocol "ajpv11"
> > > >
> > > > And my Apache error_log shows:
> > > >
> > > > Exception in thread "main" java.lang.NoClassDefFoundError:
> > > > org/apache/jserv/JServ
> > > >
> > > > This looks like some sort of classpath error, but the default
> statements
> > > > in jserv.properties seems fine:
> > > >
> > > >
> wrapper.classpath=/usr/local/src/ApacheJServ-1.0/src/java/ApacheJServ.jar
> > > > wrapper.classpath=/usr/JSDK2.0/lib/jsdk.jar
> > > >
> > > > Has anyone seen this before, or have any direction they can give me?
> > > > Thank you.
> > > >
> > > > Duane Gran
> > >
> > > By far the most common cause for this problem is Unix permissions,
> assuming
> > > that these path names are correct.
> > >
> > > The Apache JServ JVM runs under the same username as the Apache web
> server,
> > > as set in httpd.conf (normally "nobody" unless you change it).  In order
> for
> > > Apache JServ to start successfully, please make sure that the two JAR
> files
> > > listed above are world-readable, and that all directories above them
> (all the
> > > way to root) have world-read and world-execute permissions.
> > >
> > > Craig McClanahan
> >
> > Thanks for the advice, Craig.  I doublechecked my permissions, but I can't
> > find anything out of the ordinary.  The files and directories are owned by
> > root:other and every file (and directory leading up to the file) is world
> > readable.  Can anyone think of anything else which might cause this error?
> >
> > Duane Gran
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > 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]
> >
> >
> 
> 
> 
> --
> --------------------------------------------------------------
> 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]
> 
> 


---
Senior Webmaster    - Java Programmer
SpinWeb Net Designs - Advanced Web Development & Hosting
(765) 749-1699      - 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