Apache2 tomcat7 with mod_jk not working after system reboot

I have configured tomcat to run on port 80 with apache2 and mod_jk and it works well. If I restart the system, the site will be the default site from apache2. If I restart apache2 (restart / etc / init.d / apache2) the site is sent from tomcat. But why first after restarting apache2?

Any idea?

Log after system reboot (in / var / log / apache2 /):

> mod_jk.log <
[Mon Sep 22 16:24:40.296 2014] [2256:3075069696] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Mon Sep 22 16:24:40.296 2014] [2256:3075069696] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-manager' in uri map post processing.
[Mon Sep 22 16:24:40.296 2014] [2256:3075069696] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-status' in uri map post processing.
[Mon Sep 22 16:24:40.298 2014] [2257:3075069696] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Mon Sep 22 16:24:40.298 2014] [2257:3075069696] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-manager' in uri map post processing.
[Mon Sep 22 16:24:40.298 2014] [2257:3075069696] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-status' in uri map post processing.

> error.log <
[Mon Sep 22 16:24:40 2014] [notice] Apache/2.2.22 (Debian) mod_jk/1.2.37 configured -- resuming normal operations
[Mon Sep 22 16:26:50 2014] [notice] caught SIGTERM, shutting down

      

Log after restarting apache (in / var / log / apache2 /):

> mod_jk.log <
[Mon Sep 22 16:29:10.042 2014] [3599:3074443008] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Mon Sep 22 16:29:10.042 2014] [3599:3074443008] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-manager' in uri map post processing.
[Mon Sep 22 16:29:10.042 2014] [3599:3074443008] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-status' in uri map post processing.
[Mon Sep 22 16:29:10.052 2014] [3600:3074443008] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Mon Sep 22 16:29:10.052 2014] [3600:3074443008] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-manager' in uri map post processing.
[Mon Sep 22 16:29:10.052 2014] [3600:3074443008] [error] extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 'jk-status' in uri map post processing.

> error.log <
[Mon Sep 22 16:29:10 2014] [notice] Apache/2.2.22 (Debian) mod_jk/1.2.37 configured -- resuming normal operations

      

EDIT 1: Ok, I tested this several times and found out that apache2 / tomcat7 / mod_jk behavior is crazier xD I'll show you my settings:

> local: hosts <
192.168.84.129 migor
192.168.84.129 test.migor

> in tomcat server.xml <
<Host name="test.migor" appBase="myapps/test" unpackWARs="true" autoDeploy="true" />

> worker.properties <
workers.tomcat_home=/var/lib/tomcat7
workers.java_home=/usr/lib/jvm/java-7
ps=/
worker.list=ajp13_worker
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
worker.ajp13_worker.lbfactor=1

> sitea-available/test.migor <
<Virtualhost test.migor>
    JkMount /* ajp13_worker
    ServerName test.migor
    DocumentRoot /var/lib/tomcat7/myapps/test
    ErrorLog /var/lib/tomcat7/logs/error.log
    CustomLog /var/lib/tomcat7/logs/access.log common
    <Directory /var/lib/tomcat7/myapps/test>
        Options -Indexes
    </Directory>
</Virtualhost>

      

Now the behavior:

  • After rebooting under the URL: "test.migor /", "migor /" and my server ip 192.168.84.129 I will get the site from apache2
  • After restarting apache2, I get on the migor / page and 192.168.84.129 the tomcat page from webapps and on test.migor / the page from myapps / test. Here's the problem, I was expecting on page 192.168.84.129 of the page with apache2.

Any idea?

EDIT 2:

Ok, I forgot to add "NameVirtualHost test.migor" to "sitea-available / test.migor" and my configuration completely overwrites the default apache setting. It's okay for me now. With url "migor /" I can call the default apache site and with url "test.migor /" I can call the tomcat home page which is at tomcat7 / myapps / test.

But this behavior will only be activated after restarting apache2 (if I rebooted my system before). I'll show for the solution and post it here. Perhaps in "EDIT 3" xD

+3


source to share


1 answer


This error explicitly states that jk-manager

and is jk-status

not well defined in the works.property file.

Please check the employees.properties file and make the following changes:



worker.list=jk-manager
worker.jk-manager.type=status

worker.list=jk-status
worker.jk-status.type=status
worker.jk-status.read_only=true

      

Hooray!!

0


source







All Articles