Tomcat, Apache and mod_jk.so problems.


Results 1 to 6 of 6

Thread: Tomcat, Apache and mod_jk.so problems.

  1. #1
    Join Date
    Aug 2002
    Location
    Norway
    Posts
    40

    Tomcat, Apache and mod_jk.so problems.

    I just can't seem to get the mod_jk module to work with Apache.
    The first problem is that I'm not able to create the mod_jk module the normal way. After I configure the tomcat-connectors source with apxs and do a make (both go trough without errors), there still isn't any mod_jk module under the apache-2.0 directory. These are the only files that are there:
    Code:
    Makefile
    Makefile.apxs.in
    Makefile.vc
    Makefile.apxs
    Makefile.in
    NWGNUmakefile
    bldjk.qclsrc
    config.m4
    mod_jk.a
    mod_jk.dsp
    mod_jk.lo
    mod_jk.c
    mod_jk.la
    mod_jk.o
    But after a lot of google searching, I found a site that used the following command after make:
    Code:
    gcc -shared -o apache-2.0/mod_jk.so apache-2.0/*.o
    This actually created a mod_jk.so file, which I copied to my apache/modules/ directory, and then added the following to httpd.conf:
    Code:
    LoadModule jk_module          modules/mod_jk.so
    JkWorkersFile /usr/local/apache/workers.properties
    JkLogFile     /usr/lib/apache-tomcat/logs/mod_jk.log
    JkLogLevel    info
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
    JkRequestLogFormat     "%w %V %T"
    But when I start apache I get this error (line 54 is the LoadModule line):
    Code:
    httpd: Syntax error on line 54 of /etc/httpd/httpd.conf: Cannot load /usr/local/apache/modules/mod_jk.so into server: /usr/local/apache/modules/mod_jk.so: undefined symbol: jk_log
    I hope someone here can help me with this, because it's driving me nuts.

  2. #2
    Join Date
    Aug 2002
    Location
    Norway
    Posts
    40
    Tried switching to Ubunto, but it still isn't working. Isn't there anyone who can help?

  3. #3
    Join Date
    Nov 2000
    Location
    Kongsberg, Norway
    Posts
    3,572
    Hei Espen,

    Looks like your mod_jk.so file are missing 'jk_log' (which you probably already know). I've never compiled this module myself, but there may be other options you need to pass to the compiler/linker in order to include 'jk_log'.

    I'd look into makefiles, README, etc. in the source directory first.

    Cheers
    Linux User #181509

    * It can hardly be a coincidence that no language on this planet
    has ever come up with the phrase "as pretty as an airport" *
    -- Douglas Adams --

  4. #4
    Join Date
    Aug 2002
    Location
    Norway
    Posts
    40
    I apologize, there is actually a difference with ubuntu (including that I have to add CFLAGS=-fPIC to the configure command). The problem is no longer jk_log, but jk_set_log_format. I have searched all the makefile's and documents, but I cannot seem to find any reference to it.
    So the error I get now is:
    Code:
    httpd: Syntax error on line 54 of /etc/httpd/httpd.conf: Cannot load /usr/local/apache/modules/mod_jk.so into server: /usr/local/apache/modules/mod_jk.so: undefined symbol: jk_set_log_format
    Since it still gave an undefined symbol error, I was stupid and assumed that it was the same symbol.

  5. #5
    Join Date
    Nov 2000
    Location
    Kongsberg, Norway
    Posts
    3,572
    Found this after a quick Google search, and there seems to be a problem in a particular version of the mod_jk sources. Not sure which version you are trying, as you didn't bother to mention that, but here's the link: http://servlets.com/archive/servlet/...me=tomcat-user
    Linux User #181509

    * It can hardly be a coincidence that no language on this planet
    has ever come up with the phrase "as pretty as an airport" *
    -- Douglas Adams --

  6. #6
    Join Date
    Aug 2002
    Location
    Norway
    Posts
    40
    I've also found that site, but I couldn't see if there was any solution.
    I'm sorry for leaving out version info, but here it comes (better late than never):

    Ubuntu 5.10 64bit
    Apache 2.2.0
    Tomcat 5.5.16
    Jakarta-tomcat-connector 1.2.15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •