tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Re: mod_jk2 doesn't create jk2.socket
Date Fri, 09 Jan 2004 20:12:01 GMT
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

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

2.Configured Apache with:

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

3.Built and installed Apache

4.Went to

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

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

JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 -lpcre


JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 -lpcre
-lpcreposix -laprutil-0

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 ( and to

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

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

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.

just my two cents . . . .

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message