Bug#581790: libapache2-mod-jk: tomcat auto-configure could be easier

Diederik de Haas didi.debian at cknow.org
Sat May 15 23:38:05 UTC 2010


Package: libapache2-mod-jk
Version: 1:1.2.28-2
Severity: wishlist

webserver_howto/apache.html of libapache-mod-jk-doc describes how to connect
apache2 and tomcat. According to that page in the "Using Tomcat auto-configure"
 section it should be as simple as adding the following line to the Engine tag 
of the /etc/tomcat6/server.xml :
  <Listener className="org.apache.jk.config.ApacheConfig" 
     modJk="/usr/lib/apache2/modules/mod_jk.so" />

Doing that and restarting tomcat6 results in a failure, since it tries to write 
files to locations in which it can't write since they don't exist.

I got it working file the following Listener tag:
  <Listener className="org.apache.jk.config.ApacheConfig" 
     modJk="/usr/lib/apache2/modules/mod_jk.so" 
     jkConfig="/etc/libapache2-mod-jk/mod_jk-auto.conf" 
     workersConfig="/etc/libapache2-mod-jk/workers.properties"
     jkWorker="ajp13_worker" jkLog="/var/log/tomcat6/" />

The link to the "Tomcat docs website" in that section was quite helpful though.

After I'd figured it out, I read the README.Debian which pointed to the 
httpd_example_apache2.conf, but that explains the/a debian way to use 
"Custom mod_jk configuration". But in my situation I have both apache2 and
tomcat on the same machine, so I went for the auto-configure variant.

There are a couple of ways to fix this and I'll leave it up to the maintainers 
to choose which one(s).
1. Update libapache-mod-jk-doc to mention that auto-configure doesn't work as 
   described there and the user should use the custom configuration option. 
   Optionally mention the README.Debian there, since I/most people(?) expect
   to find all info in a -doc package. 
   Note 1: If it applies to tomcat6 as well, please mention that. If not please
   specify what to do when using tomcat6.
   Note 2: libapache2-mod-jk-doc would make for a more logical package name IMO.
2. Use debconf or sth like that to set the package up (including 
   workers.properties, see below for my workers.java_home value).
3. Extend the README.Debian, so it includes the configuration for auto-configure.
4. Provide a manpage for this package which explains how to set it up. For help 
   that's the first place to check I thought. It wasn't until later that I found 
   the README.Debian.

If you have question or need more info, don't hesitate to ask.

Regards,
  Diederik

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libapache2-mod-jk depends on:
ii  apache2-mpm-prefork [apache2] 2.2.15-5   Apache HTTP Server - traditional n
ii  apache2.2-common              2.2.15-5   Apache HTTP Server common files
ii  libc6                         2.10.2-8   Embedded GNU C Library: Shared lib

libapache2-mod-jk recommends no packages.

Versions of packages libapache2-mod-jk suggests:
ii  libapache-mod-jk-doc          1:1.2.28-2 Documentation of libapache2-mod-jk
ii  tomcat6                       6.0.26-1   Servlet and JSP engine

-- Configuration Files:
/etc/libapache2-mod-jk/workers.properties changed:
workers.tomcat_home=/usr/share/tomcat6
workers.java_home=/usr/lib/jvm/java-6-sun
ps=/
worker.list=ajp13_worker
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
worker.ajp13_worker.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker


-- no debconf information





More information about the pkg-java-maintainers mailing list