You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sue Evans <se...@blackboard.com> on 2001/04/25 19:56:02 UTC

mod_jk and mod_jserv compiling problems

Hello,
I have spent days trying to get tomcat configured.  I can't seem to
get/create either mod_jk or mod_jserv that will work.  I am on Linux 6.2,
using Apache 1.3 and Tomcat 3.2.1 . I have tried the following with these
results:

1. First tried using the Apache server that installed automatically when I
installed Linux.  Problem is that nowhere on my system could I find apxs -
so I copied it form another Linux installation.  I tried to then compile
mod_jserv.  Keep getting an error when I run the command 
    apxs -c -o mod_jserv.so *.c
to create mod_jserv.  Get the error :No such file or directory.  I don't
know what it is referring to - it is finding apxs okay, what file or
directory is it referring to?

2. Next I tried copying the binary mod_jserv from the tomcat download site
and that didn't work either.  When I went to startup apache, I get the
error:  "Loade DSO libexec/mod_jserv.so uses plain Apache 1.3 API, this
module might crash upon EAPI.  Please recompile it with -DEAPI!"   I have no
idea what this means.

3.  Next I tired compiling my own Apache version 1.3 and got that all
installed with DSO enabled.  Again, tried creating the mod_jserv and mod_jk
files using apxs and again got the error "No such file or directory".  Still
don't know what that is referring to.

4. Next tried using the binary mod_jserv that  I had downloaded from the
tomcat download site.  Didn't work.  Apache won't start.  I get no errors,
nothing in the log files, nothing in configstatus, NOTHING!  (very
frustrating).  Just says "not started".

5. Next I tried using the binary mod_jk that I had downloaded from the
tomcat download site.  Didn't work.  Apache won't start.  This time I at
least get an error message.  It says "API module structure 'jk_module; in
file /usr/local/apache/libexec/mod_jk.so is garbled - perhpas this is not an
Apche module DSO?  Apache could not be started.  (I tried re-downloading it
but to no avail!)

So... any ideas?  To recap:
1. The downloaded binary mod_jk.so and mod_jserv.so don't seem to work. 
2. I can't create new mod_jk.so or mod_jserv.so because apxs reports "No
such file or directory" when I enter the commands as given in the
documentation.

As I said -- I have spent DAYS on this and am completely frustrated.  Any
help is surely appreciated.

- Sue Evans

Re: mod_jk and mod_jserv compiling problems

Posted by Jan Labanowski <jk...@osc.edu>.
Those who compile apache+mod_jk+mod_ssl+tomcat may want to check my
instructions at

  http://www.ccl.net/cca/software/UNIX/apache


Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: jkl@osc.edu 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


Re: mod_jk and mod_jserv compiling problems

Posted by Scott Tatum <sc...@wcom.com>.
I think you were on the best track with #3, compiling and installing Apache
yourself first. When you compile Apache, make sure that your configure line has
at least the --enable-shared=so option so that you can your your mod_jk DSO. I
usually compile with --enable-shared=max option so that I can remove modules if
I don't need them by commenting them out in httpd.conf.

You want to compile mod_jk, not mod_jserv, and you don't want to get a
precompiled version from somewhere.

Your best best is to get both the binary and source versions of Tomcat 3.2.1.
Install the binary version (basically just untar it where you want it and set
the TOMCAT_HOME environment variable). Untar the source version just to compile
mod_jk.so. Change to the src/native/apache1.3 directory under the Tomcat source
directory. Enter this line, replacing JAVA_HOME with the directory of your jsdk
installation (e.g. /usr/java/jdk1.3.0_02):

apxs -o mod_jk.so -I../jk -IJAVA_HOME/include -I/JAVA_HOME/include/linux -c *.c
../jk/*.c

If apxs is not in your path, then you will have to put the absolute path for
apxs in order for it to see it. For example if your apache bin directory is
/home/httpd/bin, then you replace apxs with /home/httpd/bin/apxs.

Once you run this, you'll have a mod_jk.so in that directory. Move that file to
the libexec directory under the Apache directory. Then edit httpd.conf and put
in LoadModule and AddModule directives in order with the other directives:

LoadModule jk_module          libexec/mod_jk.so
AddModule mod_jk.c

I think the mod_jk.conf-auto adds its own LoadModule line. You will want to copy
mod_jk.conf-auto to mod_jk.conf, remove the LoadModule entry from that file, and
include that file in httpd.conf. Any more questions, just ask.

-Scott

Sue Evans wrote:

> Hello,
> I have spent days trying to get tomcat configured.  I can't seem to
> get/create either mod_jk or mod_jserv that will work.  I am on Linux 6.2,
> using Apache 1.3 and Tomcat 3.2.1 . I have tried the following with these
> results:
>
> 1. First tried using the Apache server that installed automatically when I
> installed Linux.  Problem is that nowhere on my system could I find apxs -
> so I copied it form another Linux installation.  I tried to then compile
> mod_jserv.  Keep getting an error when I run the command
>     apxs -c -o mod_jserv.so *.c
> to create mod_jserv.  Get the error :No such file or directory.  I don't
> know what it is referring to - it is finding apxs okay, what file or
> directory is it referring to?
>
> 2. Next I tried copying the binary mod_jserv from the tomcat download site
> and that didn't work either.  When I went to startup apache, I get the
> error:  "Loade DSO libexec/mod_jserv.so uses plain Apache 1.3 API, this
> module might crash upon EAPI.  Please recompile it with -DEAPI!"   I have no
> idea what this means.
>
> 3.  Next I tired compiling my own Apache version 1.3 and got that all
> installed with DSO enabled.  Again, tried creating the mod_jserv and mod_jk
> files using apxs and again got the error "No such file or directory".  Still
> don't know what that is referring to.
>
> 4. Next tried using the binary mod_jserv that  I had downloaded from the
> tomcat download site.  Didn't work.  Apache won't start.  I get no errors,
> nothing in the log files, nothing in configstatus, NOTHING!  (very
> frustrating).  Just says "not started".
>
> 5. Next I tried using the binary mod_jk that I had downloaded from the
> tomcat download site.  Didn't work.  Apache won't start.  This time I at
> least get an error message.  It says "API module structure 'jk_module; in
> file /usr/local/apache/libexec/mod_jk.so is garbled - perhpas this is not an
> Apche module DSO?  Apache could not be started.  (I tried re-downloading it
> but to no avail!)
>
> So... any ideas?  To recap:
> 1. The downloaded binary mod_jk.so and mod_jserv.so don't seem to work.
> 2. I can't create new mod_jk.so or mod_jserv.so because apxs reports "No
> such file or directory" when I enter the commands as given in the
> documentation.
>
> As I said -- I have spent DAYS on this and am completely frustrated.  Any
> help is surely appreciated.
>
> - Sue Evans

--
Scott Tatum | scott.tatum@wcom.com
Senior Applications Developer, Special Projects
WorldCom | http://www.wcom.com/



Re: mod_jk and mod_jserv compiling problems

Posted by Sendai <On...@linkline.com>.
The first thing I would do is remove apache entirely and remove any remnants
of mod_jk and mod_jserv from your system. Especially the binaries.

Best to start with a fresh installation environment than anything else.

Then download and build a new apache installation, making sure to enable DSO
support when you run the configure command, i.e.:

./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE --enable-mo
dule=so

from the apache build directory. After that just "make" and "make install"
as you would a normal Apache installation. In my experience I never use
pre-installed binary versions of 3rd-party applications as they usual
default some things I don't want, i.e. not having DSO support enabled and
such.

Next download the source distro of mod_jserv and do the configuration as per
the instructions
(http://java.apache.org/jserv/install/howto.unix_install.html):

./configure --prefix=/usr/local/jserv --with-apxs=/usr/local/apache/bin/apxs
 --with-jdk-home=/path/to/jdk --with-JSDK=/path/to/jsdk.jar --disable-debugg
ing


That line will enable the execution of apache's apxs, assuming you installed
apache in /usr/local/apache. If not then substitute the full path name to
apxs. After that you should be able to run "make" and "make install" and you
should have mod_jserv.so created. If not done by default, make sure the file
"mod_jserv.so" is copied into apache's libexec directory.

One of the other pitfalls I ran into when first working with tomcat was
havng problems with my jdk installation, if you're unsure of it then just
make sure

java -version

works without error and that "jsdk.jar" exists on your system. Other than
that it should work fine with default behavior.

-Karl

"The very powerful and the very stupid have one thing in common: they don't
alter their views to fit the facts, they alter the facts to fit their views,
which can be uncomfortable, if you happen to be one of the facts that needs
altering.
-The Doctor


----- Original Message -----
From: "Sue Evans" <se...@blackboard.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, April 25, 2001 10:56 AM
Subject: mod_jk and mod_jserv compiling problems


> Hello,
> I have spent days trying to get tomcat configured.  I can't seem to
> get/create either mod_jk or mod_jserv that will work.  I am on Linux 6.2,
> using Apache 1.3 and Tomcat 3.2.1 . I have tried the following with these
> results:
>
> 1. First tried using the Apache server that installed automatically when I
> installed Linux.  Problem is that nowhere on my system could I find apxs -
> so I copied it form another Linux installation.  I tried to then compile
> mod_jserv.  Keep getting an error when I run the command
>     apxs -c -o mod_jserv.so *.c
> to create mod_jserv.  Get the error :No such file or directory.  I don't
> know what it is referring to - it is finding apxs okay, what file or
> directory is it referring to?
>
> 2. Next I tried copying the binary mod_jserv from the tomcat download site
> and that didn't work either.  When I went to startup apache, I get the
> error:  "Loade DSO libexec/mod_jserv.so uses plain Apache 1.3 API, this
> module might crash upon EAPI.  Please recompile it with -DEAPI!"   I have
no
> idea what this means.
>
> 3.  Next I tired compiling my own Apache version 1.3 and got that all
> installed with DSO enabled.  Again, tried creating the mod_jserv and
mod_jk
> files using apxs and again got the error "No such file or directory".
Still
> don't know what that is referring to.
>
> 4. Next tried using the binary mod_jserv that  I had downloaded from the
> tomcat download site.  Didn't work.  Apache won't start.  I get no errors,
> nothing in the log files, nothing in configstatus, NOTHING!  (very
> frustrating).  Just says "not started".
>
> 5. Next I tried using the binary mod_jk that I had downloaded from the
> tomcat download site.  Didn't work.  Apache won't start.  This time I at
> least get an error message.  It says "API module structure 'jk_module; in
> file /usr/local/apache/libexec/mod_jk.so is garbled - perhpas this is not
an
> Apche module DSO?  Apache could not be started.  (I tried re-downloading
it
> but to no avail!)
>
> So... any ideas?  To recap:
> 1. The downloaded binary mod_jk.so and mod_jserv.so don't seem to work.
> 2. I can't create new mod_jk.so or mod_jserv.so because apxs reports "No
> such file or directory" when I enter the commands as given in the
> documentation.
>
> As I said -- I have spent DAYS on this and am completely frustrated.  Any
> help is surely appreciated.
>
> - Sue Evans
>