Hash: SHA256


On 11/26/19 09:58, Roberto Bottoni wrote:
> I have a Debian 10 server with Apache 2 + Tomcat 9. I can't run
> JSF pages due to an internal server error. I use OpenJDK v. 11,
> also use the Apache Tomcat Native library [1.2.23]
> (tomcat-native-1.2.23-src.tar.gz) using the APR version [1.7.0]
> (apr-1.7.0.tar.gz). Tomcat starts regularly and also Apache.
> If I open : http://www.mydomain.com
> i get Internal Server Error The server encountered an internal
> error or misconfiguration and was unable to complete your
> request.... etc.. etc..
> the site should be display the current date and time, but if I do
> :
> http://www.mydomain.com:8080 i see the page correctly!
> I think the error is in the Apache Tomcat connector
> (libapache2-mod-jk installed with "aptitude" command) ..
> This is my workers.properties file :

Next time, please remove all the comments when posting configuration,
unless they are particularly relevant.
> workers.tomcat_home=/usr/share/tomcat9

This directive does nothing.

> workers.java_home=/usr/lib/jvm/java-11-openjdk-amd64

This directive does nothing.

> ps=/

This directive does nothing.

How old is this configuration?

> worker.list=ajp13_worker worker.ajp13_worker.port=8009 
> worker.ajp13_worker.host=localhost worker.ajp13_worker.type=ajp13 
> worker.ajp13_worker.lbfactor=1 worker.loadbalancer.type=lb 
> worker.loadbalancer.balance_workers=ajp13_worker

Okay, so you have a worker called ajp13_worker and another one called
loadbalancer which (a) balances to ajp13_worker but (b) isn't
registered as a worker, so you can't JkMount to it. Keep that in mind.

> and this is my httpd-jk.conf (loaded by Apache) file :
> <IfModule jk_module>
> JkWorkersFile /etc/libapache2-mod-jk/workers.properties

This is the file above, right? Double-check.

> JkWatchdogInterval 60 <Location /jk-status> # Inside Location we
> can omit the URL in JkMount JkMount jk-status Require ip 
> </Location>

You haven't defined a jk-status worker. This won't work.

> <Location /jk-manager> # Inside Location we can omit the URL in
> JkMount JkMount jk-manager Require ip </Location>

Nor will this.

> </IfModule>

Your configuration is incomplete: you have no JkMounts defined, other
than the invalid ones. So something is missing, because your
configuration clearly shows that JkMounts are in effect:

> This is my mod_jk.log log file (I replaced my real domain with 
> www.mydomain.com)
> [Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] 
> uri_worker_map_add::jk_uri_worker_map.c (848): wildchar rule 
> '/*=ajp13_worker' source 'JkMount' was added

So somewhere in your configuration, this line must be present:

    JkMount /* ajp13_worker

> [Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] 
> wc_get_worker_for_name::jk_worker.c (120): did not find a worker 
> ajp13_worker

That's not good. It appears to be in your configuration. My initial
conclusion is that the file where you have defined ajp13_worker is not
the file actually being used by mod_jk.

> the VirtualHost in Apache is :
> <VirtualHost *:80> DocumentRoot
> "/var/www/vhosts/www.mydomain.com/ROOT" ServerName
> www.mydomain.com ServerAdmin i...@mydomain.com
> JkMount /* ajp13_worker

Yup there it is.

> JkLogLevel debug


> I have a new Debian 10 server with Apache 2 + Tomcat 9. I can't run
> the JSF page due to an internal server error. I think the error is
> in the Apache Tomcat connector (libapache2-mod-jk) ..
> [snip: repeated configuration files]
> So, it seems that Apache cannot find "ajp13_worker" worker..
> Why?

Can you confirm that this file contains your configuration:

- -chris
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/


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

Reply via email to