Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
mod_jk2 doesn 't create jk2.socket

mod_jk2 doesn 't create jk2.socket

2004-01-09       - By Faine, Mark

 Back
Reply:     1     2     3     4     5     6     7  

This looks like you are running on Linux . . . Or at
least I've seen the same behavior on Linux as you're
seeing here.

It also looks like you're trying UNIX sockets as
opposed to IP sockets.

I've had some success doing this on the following
environment.

Fedora Core 1 2.4.22-1.2138.nptl
Java 1.4.2_02-b03

Apache 2.0.48 from source
Tomcat 5.0.16 binaries
mod_jk2.so    from 2.0.2 source

To accomplish this, I did the following:

1.Set my environment variables as follows:

a) export JAVA_HOME=/usr/java
b) export LDFLAGS="-lgdbm -lldap -lexpat -ldb"
c) export CPPFLAGS="-I/usr/kerberos/include   \
                   -I/usr/openssl/include"

2.Configured Apache with:

./configure --enable-ssl=shared \
           --enable-modules=all \
           --enable-mods-shared=most

3.Built and installed Apache

4.Went to
 jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2

5. Configured with:
./configure --with-apxs2=/home/apache/bin/apxs \
           --with-tomcat41=/home/tomcat \
           --with-os-type=include/linux \
           --with-jni \
           --with-pcre

6. Went to server/apache2 and changed the following
line in the Makefile from:

JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 (See http://apr-0.ora-code.com) -lpcre
-lpcreposix

to:

JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 (See http://apr-0.ora-code.com) -lpcre
-lpcreposix -laprutil-0 (See http://til-0.ora-code.com)

7. Went back up to the directory in step 5, and
performed a make.

8. Changed to cd ../build/jk2/apache2

9. Copied the .so files (mod_jk2.so and jkjni.so) to
/home/apache/modues.

10. Made the appropriate Tomcat and Apache
configuration changes.

Started Tomcat, and then Apache.  UNIX Sockets works
on Linux.

The reason for CPPFLAGS and LDFLAGS is that Redhat
puts libraries and include files in places not
expected by the configure scripts.  The configure
scripts should probably be patched to reflect this.

There are some extra include files in the linux
subdirectory of the Java SDK, which is the reason for
the --with-os-type=include/linux.  The configure
script tacks on $JAVA_HOME, so the entire path CANNOT
be given.

Finally, it appears that many of the references have
been moved out of libapr (as of 0.93?) and into
libaprutil.  This should probably be reflected in the
configure script by running apu-config as well as
apr-config.

There has also been some discussion concerning running
Tomcat in-process with Apache on Linux.  This is going
to be difficult, since the multi-processor modules
(MPM) for Apache on UNIX don't support a single
process multi-threaded worker.  There is an
experimental MPM, but according to the documentation
it's unstable and slower than the worker MPM
environment.

Since Redhat 2.4.2x, Fedora Core 1, and the base Linux
kernel (2.6.0, 2.6.1) now have the new NPTL threads,
it might be possible to write a linux-specific MPM
that keeps all the threads in a single process (like
the win_mpm module).

Hmmm . . . . another project.

I realize that this is probably much longer than you
expected, but I hope it helps.

/mde/
just my two cents . . . .


__ ____ ____ ____ ____ ____ ______
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
<http://hotjobs.sweepstakes.yahoo> http://hotjobs.sweepstakes.yahoo



I appreciate your two cents.  Actually I'm on Solaris 8 but it mostly all
still applies...   Woudn't happen to know any inside secrets to making it
work on Solaris would you?  I should have included that I was on Solaris in
my original post.

One thing, I noticed you didn't compile with --with-apr.  I have to or else
I get an error message about jni needing apr during the configure?

Thanks,
-Mark


©2008 junlu.com - Jax Systems, LLC, U.S.A.