Hi all.

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

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/workers2.properties". 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:

serverConf="/etc/httpd/2.0"
export serverConf

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

QUESTIONS
---------

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 jkjni.so wants to parse workers2.properties. I'm not sure that it should and in my case it is just a burdon, unless I'm missing something.

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 faster.

Nix.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to