You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Héctor Gómez <pa...@hotmail.com> on 2010/11/18 13:01:43 UTC

Problems with new mod_jk and possible misinformation on the website

Hi, I'm running a CentOs 5 with Apache 2.0.52. I've tried to connect Apache with Tomcat 7.0.4 using mod_jk
First I tried the jk-1.2.31 version. As I have a i586 I choosed the i386 release, and downloaded mod_jk-1.2.31-httpd-2.0.x.so  
Ok, here there might be a mistake. On the description you can read "Apache Tomcat Connectors (mod_jk) 1.2.31 for Linux x86_64". Notice the "x86_64"! (I'm inside the i386 folder!)
That connector is said to be built against version 2.0.52, but it doesn't work. Apache fails on startup and logs no error, and mod_jk log neither. Maybe the i386 version is not suitable for a i586, or maybe this is in fact a x86_64 version (as the description says) even if it's placed into the i386 folder.
Anyway, I downloaded the jk-1.2.30 for i586. That suits my architecture, and Apache starts up the right way. But... no redirection is done! The connector doesn't seem to be working as expected. The problem is that this version may not be suitable for me, as it has been build against version 2.0.61 "and should work with Apache 2.0.55 and later". But mine is 2.0.52 and I can't change it.
Should I downgrade
What can I do? Is there a problem with the jk-1.2.31 for i386? or is it just a misplaced description? Hope anyone can check that because if so, it would be a severe error.
Thanks in advance for your time
PS: I assume that my worker.properties and mod_jk.conf have good configurations, as I've used this connector with previos versions of Apache and Tomcat in other systems.
 		 	   		  

Re: Problems with new mod_jk and possible misinformation on the website

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 11/18/2010 7:01 AM, Héctor Gómez wrote:
> Hi, I'm running a CentOs 5 with Apache 2.0.52. I've tried to connect
>  Apache with Tomcat 7.0.4 using mod_jk. First I tried the jk-1.2.31 
> version. As I have a i586 I choosed the i386 release, and downloaded
>  mod_jk-1.2.31-httpd-2.0.x.so Ok, here there might be a mistake. On 
> the description you can read "Apache Tomcat Connectors (mod_jk) 
> 1.2.31 for Linux x86_64". Notice the "x86_64"! (I'm inside the i386 
> folder!)

That looks like a documentation mistake.

$ wget
'http://www.motorlogy.com/apachemirror//tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/i386/mod_jk-1.2.31-httpd-2.0.x.so'

$ md5sum mod_jk-1.2.31-httpd-2.0.x.so
7ffd2f097a399669e28fb47e5d6c065c  mod_jk-1.2.31-httpd-2.0.x.so

$ file mod_jk-1.2.31-httpd-2.0.x.so
mod_jk-1.2.31-httpd-2.0.x.so: ELF 32-bit LSB shared object, Intel 80386,
version 1 (SYSV), dynamically linked, not stripped

Looks like i386 to me.

> That connector is said to be built against version 2.0.52, but it 
> doesn't work. Apache fails on startup and logs no error, and mod_jk 
> log neither.

If the module won't load, you won't get a mod_jk.log file at all. Try
turning-up the error log level in httpd and trying again.

I've never seen httpd fail to start and /also/ fail to emit an error
message of /some/ kind. If CentOS has the error log going to syslog or
something, you might want to check there, too.

> Maybe the i386 version is not suitable for a i586

Nope, i386 should even work on x86_64 (as long as the process is in x86
mode).

> or maybe this is in fact a x86_64 version (as the description says) 
> even if it's placed into the i386 folder.

Nope, see above.

> Anyway, I downloaded the jk-1.2.30 for i586. That suits my 
> architecture, and Apache starts up the right way. But... no 
> redirection is done!

Configuration please? Jk* directives as well as workers.properties (if
you are using one) and urimap.properties (if you are using one). Also,
tell us what URIs you are trying that aren't being redirected.

Often, users specify their JkMounts at the top-level configuration, and
then use a <VirtualHost> to define all of their services. If you do
that, you'll observe mod_jk doing nothing at all. You should move your
JkMounts to within your <VirtualHost>. If you /must/ define those at the
top-level, then use "JkMountCopy On" in your <VirtualHost> and that
should inherit your mounts from the top-level.

> The connector doesn't seem to be working as expected. The problem is 
> that this version may not be suitable for me, as it has been build 
> against version 2.0.61 "and should work with Apache 2.0.55 and 
> later". But mine is 2.0.52 and I can't change it. Should I 
> downgrade?

I don't think you should downgrade.

> What can I do? Is there a problem with the jk-1.2.31 for i386?

Perhaps.

> or is it just a misplaced description?

That is almost certainly true.

Another option you always have is to compile the module yourself. If you
have gcc and make installed as well as "apxs" (usually installed with an
apache-httpd-dev package or somesuch), then it's trivial to compile
mod_jk against your own httpd that is pretty much guaranteed to work.

I always compile my own mod_jk and I've never had any problems.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlQU0ACgkQ9CaO5/Lv0PBTsACghgiSD5z61g3XXeQrn93iCvlZ
IBAAn2k8k77Y/wPTTpzfnBGCmZK3hpmH
=AcvA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org