You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Hochreiter <li...@wavenet.at> on 2006/11/14 17:54:37 UTC

jk connector problems

Hi!

I have some problems with Tomcat & JK Connector and Apache Virtual hosts.

Apache should only give requests of one virtual host to the jk 
connector, but
it handles all requests over to the jk connector, no matter what host.
Actually the log files of jkerror.log are very big - and getting bigger.

As jk could not map the uri of other virtual hosts, it gives the request
back to apache (or something) and the right page opens, but I don't
want apache to handle all requests of all virtual hosts to the connector.

Can somebody please give me  hint?


I have configured apache like that:

------------------------ http443.conf ----------------
NameVirtualHost 10.0.0.6:443
<VirtualHost 10.0.0.6:443>
                ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
                Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
                Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
                PerlModule Apache2::Reload
                PerlInitHandler Apache2::Reload
                PerlModule Apache2::RequestRec
        ErrorLog /var/log/apache2/httpserror_log
        TransferLog /var/log/apache2/httpsaccess_log
        SSLEngine on
        SSLCipherSuite 
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCertificateFile /etc/apache2/ssl.crt/otrs.crt
        SSLCertificateKeyFile /etc/apache2/ssl.key/otrs.key
        <Files ~ "\.(cgi|shtml|phtml|php3?)$">
            SSLOptions +StdEnvVars
        </Files>
        <Directory "/srv/www/cgi-bin">
            SSLOptions +StdEnvVars
        </Directory>
        SetEnvIf User-Agent ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
        CustomLog /var/log/apache2/ssl_request_log   ssl_combined
        ServerName XXX1.xx
        DocumentRoot /opt/otrs/var/httpd/htdocs/
        <Location /otrs>
                ErrorDocument 403 /otrs/index.pl
                SetHandler  perl-script
                PerlResponseHandler ModPerl::Registry
                Options +ExecCGI
                PerlOptions +ParseHeaders
                PerlOptions +SetupEnv
                Order allow,deny
                Allow from all
        </Location>

        # directory settings
        <Directory "/opt/otrs/bin/cgi-bin/">
                AllowOverride None
                Options +ExecCGI -Includes
                Order allow,deny
                Allow from all
        </Directory>
        <Directory "/opt/otrs/var/httpd/htdocs/">
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>
        SetEnvIf Request_URI "/*" no-jk
</VirtualHost>

NameVirtualHost 10.0.0.3:443
<VirtualHost 10.0.0.3:443>
        ErrorLog /var/log/apache2/httpserror_log
        TransferLog /var/log/apache2/httpsaccess_log
        ServerName XXX.xx
        SSLEngine on
        SSLCipherSuite 
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCertificateFile /etc/apache2/ssl.crt/intranet.crt
        SSLCertificateKeyFile /etc/apache2/ssl.key/intranet.key
        SetEnvIf User-Agent ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
        CustomLog /var/log/apache2/ssl_request_log   ssl_combined
        JkMount /* default
</VirtualHost>
-------------------------------------------------------------

in http.conf you read:


--------------------------------------------------------

JkWorkersFile "/etc/apache2/workers.properties"
JkLogFile "/opt/xtreme/tomcat/logs/mod_jk.log"
JkLogFile /var/log/apache2/jkerror.log
--------------------------------------------------------

and at least the workers.properies

------------------------------------------------------
        workers.tomcat_home=/opt/xtreme/tomcat
       ps=/
       worker.list=default
       worker.default.port=8009
       worker.default.host=127.0.0.1
       worker.default.type=ajp13
       worker.default.lbfactor=1
------------------------------------------------------









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


Re: jk connector problems

Posted by brian bay <br...@gmail.com>.
did you try setting the default host in the workers.properties file to the
actual host you want apache to forward to tomcat?

worker.default.host = 10.x.x.x
instead of
worker.default.host=127.0.0.1




Brian


On 11/15/06, Martin Gainty <mg...@hotmail.com> wrote:
>
> The connectors tutorial is located at
> http://tomcat.apache.org/connectors-doc/howto/apache.html
>
> be sure to Read the howto at
> http://tomcat.apache.org/connectors-doc/howto/workers.html
>
> Assuming you are not using auto-conf I would use the supplied
> workers.properties from the supplied connectors tutorial
> If you follow instructions previously mentioned to setup JkMount in your
> workers.properties you should only forward those requests identified in
> JkMount
>
> be aware that when you configure in multiple workers through loadbalance
> the higher lbfactor is favored over lower
> worker.worker2.lbfactor=3
> worker.worker1.lbfactor=2
> (worker2 is favored to handle incoming request over worker1)
>
> Viel Gluck,
> Martin
> This e-mail communication and any attachments may contain confidential and
> privileged information for the use of the
> designated recipients named above. If you are not the intended recipient,
> you are hereby notified that you have received
> this communication in error and that any review, disclosure,
> dissemination, distribution or copying of it or its
> contents
> ----- Original Message -----
> From: "Rainer Jung" <ra...@kippdata.de>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Wednesday, November 15, 2006 2:44 AM
> Subject: Re: jk connector problems
>
>
> > Hi Martin,
> >
> > these lines only mean, that mod_jk is checking whether it should forward
> > the request or not, but it doesn't find a match (=JkMount), so it
> > decides to let other apache modules handle the request. This part of
> > request processing is normal, even if there is no JkMount.
> >
> > Regards,
> >
> > Rainer
> >
> >
> > Martin Hochreiter schrieb:
> >> Rainer Jung schrieb:
> >>> Hi,
> >>>
> >>> Martin Hochreiter schrieb:
> >>>
> >>>> Hi!
> >>>>
> >>>> I have some problems with Tomcat & JK Connector and Apache Virtual
> >>>> hosts.
> >>>>
> >>>> Apache should only give requests of one virtual host to the jk
> >>>> connector, but
> >>>> it handles all requests over to the jk connector, no matter what
> host.
> >>>>
> >>>
> >>> I didn't try your config, but it looks like the config is OK. The
> first
> >>> virtual server should not forward any requests, the second one should
> >>> forward all requests.
> >>>
> >>>
> >>>> Actually the log files of jkerror.log are very big - and getting
> bigger.
> >>>>
> >>>
> >>> You've not JkLogLevel statement. The docs say it's default is INFO,
> but
> >>> some versions of mod_jk are broken with respect to the default log
> level
> >>> and take debug or trace instead. Please add an explicit "JkLogLevel
> >>> info" to the config.
> >>>
> >>>
> >>>> As jk could not map the uri of other virtual hosts, it gives the
> request
> >>>> back to apache (or something) and the right page opens, but I don't
> >>>> want apache to handle all requests of all virtual hosts to the
> >>>> connector.
> >>>>
> >>>
> >>> Are you sure that mod_jk actually tries to forward the requests for
> the
> >>> first virtual host? Maybe you are only mislead by the debug logging
> int
> >>> the log file. Of course mod_jk will look at the requests (and log some
> >>> debug lines) even, if it later decides not to forward a request via a
> >>> worker.
> >>>
> >>>
> >>>> Can somebody please give me  hint?
> >>>>
> >>>
> >>> Lower your log level and try to make more explicit, why you think,
> that
> >>> mod_jk forwards all requests for both virtual servers.
> >>>
> >>> Regards,
> >>>
> >>> Rainer
> >>>
> >> Hello Rainer!
> >>
> >> I will lower the log level and monitor the issue -
> >> I think that the connector gets every request because of
> >> these lines in jkerror.log:
> >>
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> >> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
> >> jk_uri_worker_map_t::map_uri_to_worker
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
> >> map URI '/error/include/top.html'
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> >> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
> >> jk_uri_worker_map_t::map_uri_to_worker
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
> >> map URI '/error/include/bottom.html'
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> >> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
> >> jk_uri_worker_map_t::map_uri_to_worker
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
> >> map URI '/error/contact.html.var'
> >> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> >> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> >>
> >> This are requests to the first virtual host and I don't understand why
> >> apache handles
> >> that requests over to the connector.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

Re: jk connector problems

Posted by Martin Gainty <mg...@hotmail.com>.
The connectors tutorial is located at
http://tomcat.apache.org/connectors-doc/howto/apache.html

be sure to Read the howto at
http://tomcat.apache.org/connectors-doc/howto/workers.html

Assuming you are not using auto-conf I would use the supplied workers.properties from the supplied connectors tutorial
If you follow instructions previously mentioned to setup JkMount in your workers.properties you should only forward those requests identified in JkMount

be aware that when you configure in multiple workers through loadbalance the higher lbfactor is favored over lower 
worker.worker2.lbfactor=3
worker.worker1.lbfactor=2
(worker2 is favored to handle incoming request over worker1)

Viel Gluck,
Martin
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Rainer Jung" <ra...@kippdata.de>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Wednesday, November 15, 2006 2:44 AM
Subject: Re: jk connector problems


> Hi Martin,
> 
> these lines only mean, that mod_jk is checking whether it should forward
> the request or not, but it doesn't find a match (=JkMount), so it
> decides to let other apache modules handle the request. This part of
> request processing is normal, even if there is no JkMount.
> 
> Regards,
> 
> Rainer
> 
> 
> Martin Hochreiter schrieb:
>> Rainer Jung schrieb:
>>> Hi,
>>>
>>> Martin Hochreiter schrieb:
>>>  
>>>> Hi!
>>>>
>>>> I have some problems with Tomcat & JK Connector and Apache Virtual
>>>> hosts.
>>>>
>>>> Apache should only give requests of one virtual host to the jk
>>>> connector, but
>>>> it handles all requests over to the jk connector, no matter what host.
>>>>     
>>>
>>> I didn't try your config, but it looks like the config is OK. The first
>>> virtual server should not forward any requests, the second one should
>>> forward all requests.
>>>
>>>  
>>>> Actually the log files of jkerror.log are very big - and getting bigger.
>>>>     
>>>
>>> You've not JkLogLevel statement. The docs say it's default is INFO, but
>>> some versions of mod_jk are broken with respect to the default log level
>>> and take debug or trace instead. Please add an explicit "JkLogLevel
>>> info" to the config.
>>>
>>>  
>>>> As jk could not map the uri of other virtual hosts, it gives the request
>>>> back to apache (or something) and the right page opens, but I don't
>>>> want apache to handle all requests of all virtual hosts to the
>>>> connector.
>>>>     
>>>
>>> Are you sure that mod_jk actually tries to forward the requests for the
>>> first virtual host? Maybe you are only mislead by the debug logging int
>>> the log file. Of course mod_jk will look at the requests (and log some
>>> debug lines) even, if it later decides not to forward a request via a
>>> worker.
>>>
>>>  
>>>> Can somebody please give me  hint?
>>>>     
>>>
>>> Lower your log level and try to make more explicit, why you think, that
>>> mod_jk forwards all requests for both virtual servers.
>>>
>>> Regards,
>>>
>>> Rainer
>>>     
>> Hello Rainer!
>> 
>> I will lower the log level and monitor the issue -
>> I think that the connector gets every request because of
>> these lines in jkerror.log:
>> 
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
>> jk_uri_worker_map_t::map_uri_to_worker, done without a match
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
>> jk_uri_worker_map_t::map_uri_to_worker
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
>> map URI '/error/include/top.html'
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
>> jk_uri_worker_map_t::map_uri_to_worker, done without a match
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
>> jk_uri_worker_map_t::map_uri_to_worker
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
>> map URI '/error/include/bottom.html'
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
>> jk_uri_worker_map_t::map_uri_to_worker, done without a match
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
>> jk_uri_worker_map_t::map_uri_to_worker
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
>> map URI '/error/contact.html.var'
>> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
>> jk_uri_worker_map_t::map_uri_to_worker, done without a match
>> 
>> This are requests to the first virtual host and I don't understand why
>> apache handles
>> that requests over to the connector.
>> 
>> 
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>

Re: jk connector problems

Posted by Mladen Turk <ml...@jboss.com>.
Martin Hochreiter wrote:
> 
> I'll see, I "solved" it with another way:
> 
> I simply kicked out mod_jk and use mod_proxy.
> The performance is a significant better.
>

Great. You can at least say that you are
the first one!
Please give us some benchmark results.

Cheers,
Mladen.

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


Re: jk connector problems

Posted by Martin Hochreiter <li...@wavenet.at>.
Rainer Jung schrieb:
> Hi Martin,
>
> these lines only mean, that mod_jk is checking whether it should forward
> the request or not, but it doesn't find a match (=JkMount), so it
> decides to let other apache modules handle the request. This part of
> request processing is normal, even if there is no JkMount.
>
> Regards,
>
> Rainer
>   

I'll see, I "solved" it with another way:

I simply kicked out mod_jk and use mod_proxy.
The performance is a significant better.

lg

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


Re: jk connector problems

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Martin,

these lines only mean, that mod_jk is checking whether it should forward
the request or not, but it doesn't find a match (=JkMount), so it
decides to let other apache modules handle the request. This part of
request processing is normal, even if there is no JkMount.

Regards,

Rainer


Martin Hochreiter schrieb:
> Rainer Jung schrieb:
>> Hi,
>>
>> Martin Hochreiter schrieb:
>>  
>>> Hi!
>>>
>>> I have some problems with Tomcat & JK Connector and Apache Virtual
>>> hosts.
>>>
>>> Apache should only give requests of one virtual host to the jk
>>> connector, but
>>> it handles all requests over to the jk connector, no matter what host.
>>>     
>>
>> I didn't try your config, but it looks like the config is OK. The first
>> virtual server should not forward any requests, the second one should
>> forward all requests.
>>
>>  
>>> Actually the log files of jkerror.log are very big - and getting bigger.
>>>     
>>
>> You've not JkLogLevel statement. The docs say it's default is INFO, but
>> some versions of mod_jk are broken with respect to the default log level
>> and take debug or trace instead. Please add an explicit "JkLogLevel
>> info" to the config.
>>
>>  
>>> As jk could not map the uri of other virtual hosts, it gives the request
>>> back to apache (or something) and the right page opens, but I don't
>>> want apache to handle all requests of all virtual hosts to the
>>> connector.
>>>     
>>
>> Are you sure that mod_jk actually tries to forward the requests for the
>> first virtual host? Maybe you are only mislead by the debug logging int
>> the log file. Of course mod_jk will look at the requests (and log some
>> debug lines) even, if it later decides not to forward a request via a
>> worker.
>>
>>  
>>> Can somebody please give me  hint?
>>>     
>>
>> Lower your log level and try to make more explicit, why you think, that
>> mod_jk forwards all requests for both virtual servers.
>>
>> Regards,
>>
>> Rainer
>>     
> Hello Rainer!
> 
> I will lower the log level and monitor the issue -
> I think that the connector gets every request because of
> these lines in jkerror.log:
> 
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
> map URI '/error/include/top.html'
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
> map URI '/error/include/bottom.html'
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to
> map URI '/error/contact.html.var'
> [Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]:
> jk_uri_worker_map_t::map_uri_to_worker, done without a match
> 
> This are requests to the first virtual host and I don't understand why
> apache handles
> that requests over to the connector.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

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


Re: jk connector problems

Posted by Martin Hochreiter <li...@wavenet.at>.
Rainer Jung schrieb:
> Hi,
>
> Martin Hochreiter schrieb:
>   
>> Hi!
>>
>> I have some problems with Tomcat & JK Connector and Apache Virtual hosts.
>>
>> Apache should only give requests of one virtual host to the jk
>> connector, but
>> it handles all requests over to the jk connector, no matter what host.
>>     
>
> I didn't try your config, but it looks like the config is OK. The first
> virtual server should not forward any requests, the second one should
> forward all requests.
>
>   
>> Actually the log files of jkerror.log are very big - and getting bigger.
>>     
>
> You've not JkLogLevel statement. The docs say it's default is INFO, but
> some versions of mod_jk are broken with respect to the default log level
> and take debug or trace instead. Please add an explicit "JkLogLevel
> info" to the config.
>
>   
>> As jk could not map the uri of other virtual hosts, it gives the request
>> back to apache (or something) and the right page opens, but I don't
>> want apache to handle all requests of all virtual hosts to the connector.
>>     
>
> Are you sure that mod_jk actually tries to forward the requests for the
> first virtual host? Maybe you are only mislead by the debug logging int
> the log file. Of course mod_jk will look at the requests (and log some
> debug lines) even, if it later decides not to forward a request via a
> worker.
>
>   
>> Can somebody please give me  hint?
>>     
>
> Lower your log level and try to make more explicit, why you think, that
> mod_jk forwards all requests for both virtual servers.
>
> Regards,
>
> Rainer
>   
>   
Hello Rainer!

I will lower the log level and monitor the issue -
I think that the connector gets every request because of
these lines in jkerror.log:

[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to 
map URI '/error/include/top.html'
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to 
map URI '/error/include/bottom.html'
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (486)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (500)]: Attempting to 
map URI '/error/contact.html.var'
[Wed Nov 15 07:15:09 2006]  [jk_uri_worker_map.c (618)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match

This are requests to the first virtual host and I don't understand why 
apache handles
that requests over to the connector.


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


Re: jk connector problems

Posted by Rainer Jung <ra...@kippdata.de>.
Hi,

Martin Hochreiter schrieb:
> Hi!
> 
> I have some problems with Tomcat & JK Connector and Apache Virtual hosts.
> 
> Apache should only give requests of one virtual host to the jk
> connector, but
> it handles all requests over to the jk connector, no matter what host.

I didn't try your config, but it looks like the config is OK. The first
virtual server should not forward any requests, the second one should
forward all requests.

> Actually the log files of jkerror.log are very big - and getting bigger.

You've not JkLogLevel statement. The docs say it's default is INFO, but
some versions of mod_jk are broken with respect to the default log level
and take debug or trace instead. Please add an explicit "JkLogLevel
info" to the config.

> 
> As jk could not map the uri of other virtual hosts, it gives the request
> back to apache (or something) and the right page opens, but I don't
> want apache to handle all requests of all virtual hosts to the connector.

Are you sure that mod_jk actually tries to forward the requests for the
first virtual host? Maybe you are only mislead by the debug logging int
the log file. Of course mod_jk will look at the requests (and log some
debug lines) even, if it later decides not to forward a request via a
worker.

> 
> Can somebody please give me  hint?

Lower your log level and try to make more explicit, why you think, that
mod_jk forwards all requests for both virtual servers.

Regards,

Rainer

> 
> 
> I have configured apache like that:
> 
> ------------------------ http443.conf ----------------
> NameVirtualHost 10.0.0.6:443
> <VirtualHost 10.0.0.6:443>
>                ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
>                Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
>                Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
>                PerlModule Apache2::Reload
>                PerlInitHandler Apache2::Reload
>                PerlModule Apache2::RequestRec
>        ErrorLog /var/log/apache2/httpserror_log
>        TransferLog /var/log/apache2/httpsaccess_log
>        SSLEngine on
>        SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
>        SSLCertificateFile /etc/apache2/ssl.crt/otrs.crt
>        SSLCertificateKeyFile /etc/apache2/ssl.key/otrs.key
>        <Files ~ "\.(cgi|shtml|phtml|php3?)$">
>            SSLOptions +StdEnvVars
>        </Files>
>        <Directory "/srv/www/cgi-bin">
>            SSLOptions +StdEnvVars
>        </Directory>
>        SetEnvIf User-Agent ".*MSIE.*" \
>                 nokeepalive ssl-unclean-shutdown \
>                 downgrade-1.0 force-response-1.0
>        CustomLog /var/log/apache2/ssl_request_log   ssl_combined
>        ServerName XXX1.xx
>        DocumentRoot /opt/otrs/var/httpd/htdocs/
>        <Location /otrs>
>                ErrorDocument 403 /otrs/index.pl
>                SetHandler  perl-script
>                PerlResponseHandler ModPerl::Registry
>                Options +ExecCGI
>                PerlOptions +ParseHeaders
>                PerlOptions +SetupEnv
>                Order allow,deny
>                Allow from all
>        </Location>
> 
>        # directory settings
>        <Directory "/opt/otrs/bin/cgi-bin/">
>                AllowOverride None
>                Options +ExecCGI -Includes
>                Order allow,deny
>                Allow from all
>        </Directory>
>        <Directory "/opt/otrs/var/httpd/htdocs/">
>                AllowOverride None
>                Order allow,deny
>                Allow from all
>        </Directory>
>        SetEnvIf Request_URI "/*" no-jk
> </VirtualHost>
> 
> NameVirtualHost 10.0.0.3:443
> <VirtualHost 10.0.0.3:443>
>        ErrorLog /var/log/apache2/httpserror_log
>        TransferLog /var/log/apache2/httpsaccess_log
>        ServerName XXX.xx
>        SSLEngine on
>        SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
>        SSLCertificateFile /etc/apache2/ssl.crt/intranet.crt
>        SSLCertificateKeyFile /etc/apache2/ssl.key/intranet.key
>        SetEnvIf User-Agent ".*MSIE.*" \
>                 nokeepalive ssl-unclean-shutdown \
>                 downgrade-1.0 force-response-1.0
>        CustomLog /var/log/apache2/ssl_request_log   ssl_combined
>        JkMount /* default
> </VirtualHost>
> -------------------------------------------------------------
> 
> in http.conf you read:
> 
> 
> --------------------------------------------------------
> 
> JkWorkersFile "/etc/apache2/workers.properties"
> JkLogFile "/opt/xtreme/tomcat/logs/mod_jk.log"
> JkLogFile /var/log/apache2/jkerror.log
> --------------------------------------------------------
> 
> and at least the workers.properies
> 
> ------------------------------------------------------
>        workers.tomcat_home=/opt/xtreme/tomcat
>       ps=/
>       worker.list=default
>       worker.default.port=8009
>       worker.default.host=127.0.0.1
>       worker.default.type=ajp13
>       worker.default.lbfactor=1
> ------------------------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

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