You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Filchak <su...@zuka.net> on 2010/05/05 00:42:38 UTC

error with jk_module

Can somebody enlighten me on what this means? I have been struggling 
with this for a while and need to restart my server but keep getting 
this config error.

httpd: Syntax error on line 439 of /usr/local/apache2/conf/httpd.conf: 
API module structure `jk_module' in file 
/usr/local/apache2/modules/mod_jk-1.2.28-httpd-2.0.X.so is garbled - 
perhaps this is not an Apache module DSO?

I have the following compiled in modules in Apache 2.2.3, 64-bit.

Compiled in modules:
   core.c
   mod_authn_file.c
   mod_authn_dbd.c
   mod_authn_default.c
   mod_authz_host.c
   mod_authz_groupfile.c
   mod_authz_user.c
   mod_authz_default.c
   mod_auth_basic.c
   mod_cache.c
   mod_disk_cache.c
   mod_dbd.c
   mod_echo.c
   mod_include.c
   mod_filter.c
   mod_log_config.c
   mod_env.c
   mod_mime_magic.c
   mod_expires.c
   mod_headers.c
   mod_usertrack.c
   mod_setenvif.c
   mod_ssl.c
   worker.c
   http_core.c
   mod_mime.c
   mod_dav.c
   mod_status.c
   mod_autoindex.c
   mod_asis.c
   mod_info.c
   mod_cgid.c
   mod_cgi.c
   mod_dav_fs.c
   mod_negotiation.c
   mod_dir.c
   mod_imagemap.c
   mod_actions.c
   mod_userdir.c
   mod_alias.c
   mod_rewrite.c
   mod_so.c

I am using Tomcat 6.0.18 and am trying to load this module like so:

LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

I really am not sure what is the problem here. Is the module actually 
garbled or is it something else that produces this very misleading error?

Regards,

Dave





Re: Re: error with jk_module

Posted by Dave Filchak <su...@zuka.net>.
I will implement the <IfModule> stuff (thanks also to Andre) but I think 
I finally figured it out. First, it turns out I had another version of 
apache on the server I did not realize. (this server was managed by 
someone else before me and I did not know exactly what was on it). There 
was the 2.0.53 version, which was a yum install. Then there was the 
2.2.3 version, a separate instance of Apache I installed which is 
listening on a different IP. But there was also a third instance of 
2.2.3 installed but was not running. However, the modules in question 
were actually compile for that version, hence the complaining. so I 
stopped the 2.0.53 version and cranked up the 2.2.3 version. Still 
complained a bit so I recompiled a fresh module for that version and 
voila, there she works!

Why don't EVER have to stop learning ;-)

Thanks again to those who took the time to try and answer my questions.

Regards to all.

Dave

On 22/07/64 2:59 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dave,
>
> On 5/5/2010 3:05 PM, Dave Filchak wrote:
>    
>> Actually, the server version for this instance is 2.0.52 and I have the
>> following now in my config:
>>
>> LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
>>
>> and when I test the config I get:
>>
>> API module structure `jk_module' in file
>> /usr/local/apache2/modules/mod_jk.so is garbled - perhaps this is not an
>> Apache module DSO?
>>      
> What happens when you do:
>
> $ file /usr/local/apache2/modules/mod_jk.so
>
> Did you check the md5sum from the mirror you used to download?
>
>    
>> I made sure I downloaded the .so for Apache 2.0.x so I think that is
>> right. I have a tomcat app running so I am wondering, do I have to shut
>> it down before trying to restart the server or testing the config?
>>      
> No, you can (re)start Apache and Tomcat in any order.
>
>    
>> If I comment the LoadModule out, then it starts complaining about the
>> JkWorkersFile and if I comment that, the the JkShmFile ... and on it
>> goes. It is very annoying.
>>      
> Try doing this:
>
> <IfModule mod_jk.c>
>    JkLogFile /var/log/apache2/mod_jk.log
>    JkLogLevel Info
>    JkShmFile /var/log/apache2/jk-runtime-status
>    JkWorkersFile /etc/apache2/jk_workers.properties
> </IfModule>
>
> The "IfModule" will have Apache skip the mod_jk configuration if the
> module isn't loaded.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkvh6nUACgkQ9CaO5/Lv0PDJLwCaAqeaw+0BcvExFTc+LQuetmTf
> qbsAnj/7H3tTjdR4yaynOprElZlxwbdD
> =zVQn
> -----END PGP SIGNATURE-----
>
>    

Re: error with jk_module

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

Dave,

On 5/5/2010 3:05 PM, Dave Filchak wrote:
> Actually, the server version for this instance is 2.0.52 and I have the
> following now in my config:
> 
> LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
> 
> and when I test the config I get:
> 
> API module structure `jk_module' in file
> /usr/local/apache2/modules/mod_jk.so is garbled - perhaps this is not an
> Apache module DSO?

What happens when you do:

$ file /usr/local/apache2/modules/mod_jk.so

Did you check the md5sum from the mirror you used to download?

> I made sure I downloaded the .so for Apache 2.0.x so I think that is
> right. I have a tomcat app running so I am wondering, do I have to shut
> it down before trying to restart the server or testing the config?

No, you can (re)start Apache and Tomcat in any order.

> If I comment the LoadModule out, then it starts complaining about the
> JkWorkersFile and if I comment that, the the JkShmFile ... and on it
> goes. It is very annoying.

Try doing this:

<IfModule mod_jk.c>
  JkLogFile /var/log/apache2/mod_jk.log
  JkLogLevel Info
  JkShmFile /var/log/apache2/jk-runtime-status
  JkWorkersFile /etc/apache2/jk_workers.properties
</IfModule>

The "IfModule" will have Apache skip the mod_jk configuration if the
module isn't loaded.

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

iEYEARECAAYFAkvh6nUACgkQ9CaO5/Lv0PDJLwCaAqeaw+0BcvExFTc+LQuetmTf
qbsAnj/7H3tTjdR4yaynOprElZlxwbdD
=zVQn
-----END PGP SIGNATURE-----

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


Re: Re: error with jk_module

Posted by Dave Filchak <su...@zuka.net>.
Actually, the server version for this instance is 2.0.52 and I have the
following now in my config:

LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

and when I test the config I get:

API module structure `jk_module' in file
/usr/local/apache2/modules/mod_jk.so is garbled - perhaps this is not an
Apache module DSO?

I made sure I downloaded the .so for Apache 2.0.x so I think that is
right. I have a tomcat app running so I am wondering, do I have to shut
it down before trying to restart the server or testing the config? I
really need to restart the server because it was listening on all
interfaces to port 443 and I needed to stop that happening. But I do not
want to restart until I figure out why the hell I am getting this error.
If I comment the LoadModule out, then it starts complaining about the
JkWorkersFile and if I comment that, the the JkShmFile ... and on it
goes. It is very annoying.

Dave



On 22/07/64 2:59 PM, André Warnier wrote:
> Dave Filchak wrote:
> ...
> this :
>>
>> httpd: Syntax error on line 439 of 
>> /usr/local/apache2/conf/httpd.conf: API module structure `jk_module' 
>> in file /usr/local/apache2/modules/mod_jk-1.2.28-httpd-2.0.X.so is 
>> garbled - perhaps this is not an Apache module DSO?
>>
> ...
> and this :
>>
>> LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
>>
> do not seem to match (the filename), unless mod_jk.so is a link to the 
> other one. Are you sure it is ?
>
> Also, if it is a link, and if your Apache is a 2.2 version, then it 
> would appear that you may have downloaded a wrong version of the 
> mod_jk.so.  The end of the version says "httpd-2.0.X.so", which would 
> appear to make it a version for Apache 2.0.x, not 2.2.x.
>
>
>

Re: error with jk_module

Posted by André Warnier <aw...@ice-sa.com>.
Dave,

I got your message 3 times, so I guess you sent it to the list and to me 
as a copy and...
The list is enough, I get all of those.

Dave Filchak wrote:
> Actually, the server version for this instance is 2.0.52 and I have the 
> following now in my config:
> 
> LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
> 
> and when I test the config I get:
> 
> API module structure `jk_module' in file 
> /usr/local/apache2/modules/mod_jk.so is garbled - perhaps this is not an 
> Apache module DSO?

I have never seen that message before, so I'm guessing.

> 
> I made sure I downloaded the .so for Apache 2.0.x so I think that is 
> right.

It also has to be for the correct platform.  Did you say which one you 
are using ? and did you check that the binary .so you downloaded matches 
it ?

Actually, I would have expected Apache to crash nastily with a 
segmentation fault if the module was for another platform. The message 
above is nice and gentle.
But again, I'm guessing.

  I have a tomcat app running so I am wondering, do I have to shut
> it down before trying to restart the server or testing the config? 
No. mod_jk is only at the Apache level, and the problem you are seeing 
is at the Apache level.  It is not loading mod_jk, so it cannot be 
talking to Tomcat yet.

I
> really need to restart the server because it was listening on all 
> interfaces to port 443 and I needed to stop that happening. But I do not 
> want to restart until I figure out why the hell I am getting this error. 
> If I comment the LoadModule out, then it starts complaining about the 
> JkWorkersFile and if I comment that, the the JkShmFile ... and on it 
> goes. It is very annoying.
> 
That's easy fix. Put all these Jk directives inside an <IfModule ..> 
section. If you do not load the module (aka comment out the LoadModule 
line), the rest will be ignored.
There are examples in the standard httpd.conf.



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


Re: error with jk_module

Posted by André Warnier <aw...@ice-sa.com>.
Dave Filchak wrote:
...
this :
> 
> httpd: Syntax error on line 439 of /usr/local/apache2/conf/httpd.conf: 
> API module structure `jk_module' in file 
> /usr/local/apache2/modules/mod_jk-1.2.28-httpd-2.0.X.so is garbled - 
> perhaps this is not an Apache module DSO?
> 
...
and this :
> 
> LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
> 
do not seem to match (the filename), unless mod_jk.so is a link to the 
other one. Are you sure it is ?

Also, if it is a link, and if your Apache is a 2.2 version, then it 
would appear that you may have downloaded a wrong version of the 
mod_jk.so.  The end of the version says "httpd-2.0.X.so", which would 
appear to make it a version for Apache 2.0.x, not 2.2.x.



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