tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikola Milutinovic <>
Subject Question on mod_jk2 (working)
Date Thu, 27 Nov 2003 10:44:05 GMT
Hi all.

I tried and managed to setup mod_jk2 with UNIX socket channel and I have some 

First I tried to do it without "apr" handler. It would open a socket, but would 
refuse connection from Apache. Then I tried with "apr", reasoning that AF_UNIX 
socket is not native to JVM and JNI should be used. Why it opened a socket is 
beyond me.

That threw errors, complaining on being unable to find 
"${serverConf}/conf/". Whatever I did in "jk2.conf" gave no 
result. I recalled from my previous attempt that *that* variable was to be set 
via environment, so I addedd to "tomcat4.conf" (this is a 4.1.24 RPM) statement:

export serverConf

After restarting Tomcat, everything worked (except for Tomcat not being able to 
read SHM file, but I'll comment it out, anyway).


1. Is this the right way?

Is this the way it was meant to be used? I do realize that AF_UNIX would require 
JNI and I have noticed that wants to parse I'm not 
sure that it should and in my case it is just a burdon, unless I'm missing 

2. Is there a more elegant way of setting "serverConf" property?

It did occur to me that JK-JNI was meant for something else, namely running 
Tomcat within Apache process group, among other things. So, it is not 
unthinkable that in such a scenario Apache would set that environment variable. 
Consequently, UNIX socket would be a sort of a patch/workaround for us who want 
to keep things under wraps.

Honestly, being a UNIX/Linux/PosgreSQL/Tomcat/Apache admin at the same time can 
be tiresome. Since I've locked down Mandrake to "Paranoid Security", it's 
firewall is denying many things, like "ping localhost". Having to poke and open 
ports for JK seamed like more work and besides, UNIX socket is supposed to be 


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

View raw message