This is a discussion on mod_jk causes Apache httpd to fail on startup within the Apache Web Server forums, part of the Web Server and Related Forums category; OS: Fedora Core 3 Apache: 2.0.52 Tomcat: 5.5.16 I am using the Apache install from the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
OS: Fedora Core 3
Apache: 2.0.52 Tomcat: 5.5.16 I am using the Apache install from the linux dist rpm, tomcat downloaded from Apache website. Apache worked as configured when installed, I built a small test site and could access it. Tomcat installed, default install and I could access the example pages via port 8080. The next step was to install the mod_jk connector module. I downloaded jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so from the tomcat site and renamed this binary file to mod_jk.so and placed it in the Apache modules directory (/usr/lib/httpd/modules). I did a chmod 775 mod_jk.so to set it's x flags. At the end of /etc/httpd/httpd.conf I added: # # Mod_jk settings # JkWorkersFile "/etc/httpd/conf/workers.properties" JkLogLevel error # myNewApp is optional, in cse you want to place a new app of your own in here #JkMount /myNewWebApp default #JkMount /myNewWebApp/* default JkMount /jsp-examples default JkMount /jsp-examples/* default LoadModule jk_module modules/mod_jk.so # End of mod_jk settings My limited understanding of this is that I should at least be able to access the example JPS files through Apache with http://localhost/jsp-examples/ however, I can no longer start Apache. When I attempt to start Apache, I get this error: # /etc/rc.d/init.d/httpd start Starting httpd: Syntax error on line 1039 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk.so into server: /etc/httpd/modules/mod_jk.so: cannot open shared object file: No such file or directory [FAILED] Since /etc/httpd/modules/ is linked to /usr/lib/httpd/modules, I do see mod_jk.so when I do an ls of /etc/httpd/modules. If I comment out these added lines, httpd starts just fine, but without the connector. Since I can see the file in the proper directory with ls, I just don't understand this error message. Can someone please help me - point me to good documentation? Thanks so much in advance - -- ScottG |
|
|||
|
On Thu, 23 Mar 2006 16:06:59 +0100, Davide Bianchi
<davideyeahsure@onlyforfun.net> wrote: >On 2006-03-23, Scott Gravenhorst <no.spam@gte.net> wrote: >> Cannot load /etc/httpd/modules/mod_jk.so into server: >> /etc/httpd/modules/mod_jk.so: cannot open shared object file: No such >> file or directory > >Check the permission on the file and your selinux configuation. # ls -l mod_jk.so -rwxr-xr-x 1 root root 551410 Mar 22 12:09 mod_jk.so I erred when I said chmod 775, it is 755. Contents of /etc/sysconfig/selinux: # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. Sorry to be ignorant, I have no idea what this does, but it looks to be disabled. >This could also meant that mod_jk.so is linked against a library >that is missing in your system. Try ldd /where/is/mod_jk.so and see >which libraries it wants. Check if you have all of them Hmm. Here could be a problem: # ldd /usr/lib/httpd/modules/mod_jk.so not a dynamic executable >Have you considered to compile mod_jk on your own? I can try that, the reason I did not is that in the Apache Tomcat documentation it said that it is recommended that the precompiled binaries be used, so that's what I've been trying to work with. Many thanks Davide, I'll give compiling the source a shot. -- ScottG |
|
|||
|
On Thu, 23 Mar 2006 16:48:31 +0100, Davide Bianchi
<davideyeahsure@onlyforfun.net> wrote: >On 2006-03-23, Scott Gravenhorst <no.spam@gte.net> wrote: >> SELINUX=disabled >> >> Sorry to be ignorant, I have no idea what this does, but it looks to >> be disabled. > >It allow you to add 'hooks' in the kernel to have a better control of >what processes can do or cannot do on files, beyond the permissions. > >> # ldd /usr/lib/httpd/modules/mod_jk.so >> not a dynamic executable > >Well... > >> I can try that, the reason I did not is that in the Apache Tomcat >> documentation it said that it is recommended that the precompiled >> binaries be used, so that's what I've been trying to work with. > >It never worked for me. > >> Many thanks Davide, I'll give compiling the source a shot. > >Quick way: get the source codes, cd in /where/you/unpacked/them/native >./configure ; make >Then in apache-<version> you should find the mod_jk.so. Ok, this is almost working, but ./configure says it can't find Apache... Is there some configuration I need to do? (environment variable? config file change?) There _is_ an Apache webserver install in there, very much default. |
|
|||
|
On Thu, 23 Mar 2006 20:13:33 +0100, Davide Bianchi
<davideyeahsure@onlyforfun.net> wrote: >On 2006-03-23, Scott Gravenhorst <no.spam@gte.net> wrote: >> Ok, this is almost working, but ./configure says it can't find >> Apache... Is there some configuration I need to do? (environment >> variable? config file change?) > >See the README and INSTALL files in there, ./configure --help will give >you a lot more info. > Thank you so much for your help, the BUILDING file had what I needed, except that I knew nothing about the apxs requirement and had to suffer through installing the httpd devel packages. But in the end, I now have an Apache - Tomcat pair, connector installed, that works as advertised. I can see the jsp-examples files via the Apache Webserver. You da man, Davide, thanks! |