tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Christopher <dchristop...@pixion.com>
Subject Re: /context not working -- mod_jk error: no match for /server-status
Date Fri, 04 Sep 2009 14:01:14 GMT
Rainer,

Apparently apache is calling /server-status - I see that mod_status is  
enabled in httpd.conf and exercises that context.

One of the frustrations, and I dont know Apache well, is that the  
access log seldom updates.
The error log in the same folder does update, but contains little  
information--apache restarts is about it.

I don't know if this helps, but I just tried to access the sample web  
app from the server machine's own browser

httpd://localhost/sample

and I get "Bad Gateway! The proxy server received an invalid response  
from an upstream server
Error 502
locahost

and this does update the access log.

Dennis Christopher
On Sep 4, 2009, at 12:49 AM, Rainer Jung wrote:

> On 03.09.2009 20:24, Dennis Christopher wrote:
>> Rainer,
>>
>> Trying your /sample/ I get the same result.
>>
>> The log appears to respond to that try but the lines are similar to
>> those I originally posted from mod_jk.log.
>>
>> It's as though every context request is translated into '/server- 
>> status'.
>
> Not very likely. Are those entries also appearing in times you are not
> testing? If so those are someone else, and your own request isn't
> handled by the Apache you are looking at. Can you find your request in
> the access log?
>
> Go through all config files and find out, what is configured about
> /server-status. That URL doesn't have anything to do with mod_jk.
>
> Regards,
>
> Rainer
>
>> the bracketed numbers are:
>>
>> [221:268597152] [debug] attempting to map URI '/server-status' from  
>> 5 maps.
>> .
>> .
>> [221:268597152] [debug] attempting to map context URI
>> '/sample/*.=JBOSS1*' source JKMount
>> .
>> .
>>
>> all the entries are marked [debug].
>>
>> 221 is process httpd with user _www.
>>
>> Dennis
>>
>> On Sep 3, 2009, at 1:26 PM, Rainer Jung wrote:
>>
>>> On 03.09.2009 19:15, Dennis Christopher wrote:
>>>> The problem is that I am trying to support simple references to my
>>>> context without the tomcat port explicitly included.
>>>>
>>>> example: myexample.com/sample should invoke the web-app sample.
>>>
>>> You don't have a JkMount for /sample, only one for /sample/*.
>>> What happens, if you point your browser to
>>>
>>> http://my.apache.name/sample/
>>>
>>> If it doesn't work, extract the lines from your mod_jk log, that  
>>> refer
>>> to this request. Look for something like
>>>
>>> ... [A_NUMBER:ANOTHER_NUMBER] ... Attempting to map URI '/sample/'
>>> from ...
>>>
>>> Then note A_NUMBER:ANOTHER_NUMBER which are the process and thread  
>>> id
>>> used for the request, and get all lines form the log, which have a
>>> timestamp close to your request and use the same IDs.
>>>
>>> Check whether there are any non-debug lines in there. If you can't  
>>> see
>>> what goes wrong, post those lines.
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>>>> what happens instead: the browser tells me: "file not found".
>>>>
>>>> looking at catalina.out it seems the request doesnt reach Tomcat  
>>>> at all.
>>>>
>>>> How I did it: he quick start guide at
>>>>
>>>> http://tomcat.apache.org/connectors-doc/generic_howto/quick.html
>>>>
>>>> gives a simple proof of concept for a context setup (/examples").
>>>>
>>>> which I have followed implicitly. I believe you have already seen  
>>>> what I
>>>> have done with the config files I posted.
>>>>
>>>> Dennis
>>>>
>>>> P.S as it may be important - if I try example.com:8080/sample the  
>>>> main
>>>> page of my web app loads but all of its subreferences, to gif  
>>>> images
>>>> etc, are broken.
>>>>
>>>>
>>>> On Sep 3, 2009, at 12:48 PM, Rainer Jung wrote:
>>>>
>>>>> On 03.09.2009 15:34, Dennis Christopher wrote:
>>>>>> Rainer,
>>>>>>
>>>>>> I am not sending /server-status explicitly.
>>>>>>
>>>>>> The mod_jk log which I excerpted earlier shows the processing of
>>>>>> server-status before any context is asked for, apparently when  
>>>>>> Tomcat
>>>>>> starts up.
>>>>>>
>>>>>> The log continues to repeat these entries - apparently mod_jk is
>>>>>> looping
>>>>>> trying to satisfy this context and never does.
>>>>>
>>>>> No I'm pretty sure this is not the case. I expect someone has a
>>>>> monitoring tool running or a browser windows with auto-refresh for
>>>>> /server-status and that's what produces those debug log lines in
>>>>> mod_jk.
>>>>> No problem per se.
>>>>>
>>>>> So back to the basic question: what is your problem? What are you
>>>>> trying
>>>>> to achieve, what did you do to make it work, how do you test it,  
>>>>> what
>>>>> result do you expect and what happens instead?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Rainer
>>>>>
>>>>>> I added JkMountCopy All but this had no effect.
>>>>>>
>>>>>> Dennis
>>>>>> On Sep 3, 2009, at 4:18 AM, Rainer Jung wrote:
>>>>>>
>>>>>>> On 02.09.2009 21:45, Dennis Christopher wrote:
>>>>>>>> Rainer,
>>>>>>>>
>>>>>>>> Thanks for the reply. I was confused in my orginal post:
I am  
>>>>>>>> not
>>>>>>>> using
>>>>>>>> JBoss at all, only mod_jk.
>>>>>>>>
>>>>>>>> The file contents are as follows below.
>>>>>>>>
>>>>>>>> Apache has a hosts directory, but I'm not sure if the files
 
>>>>>>>> matter.
>>>>>>>> They
>>>>>>>> are either the apache .default files or slight modifications
of
>>>>>>>> them,
>>>>>>>> e.g. virtual_host_global.conf contains just:
>>>>>>>>
>>>>>>>> Listen *:80
>>>>>>>
>>>>>>> I don't understand, why you test this with a request /server-

>>>>>>> status.
>>>>>>> That doesn't make sense, because you don't want /server-status
 
>>>>>>> to be
>>>>>>> forwarded by mod_jk and in fact you didn't configure it.
>>>>>>>
>>>>>>> So choose a better URL to test (one of the URLs you have a  
>>>>>>> JkMount
>>>>>>> for)
>>>>>>> and add "JkMountCopy All".
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Rainer
>>>>>>>
>>>>>>>> 1. uriworkermap.properties -- not used
>>>>>>>>
>>>>>>>> 2. from apache2/httpd.conf:
>>>>>>>>
>>>>>>>> LoadModule jk_module libexec/apache2/mod_jk.so
>>>>>>>> .
>>>>>>>> .
>>>>>>>> <IfModule mod_jk.c>
>>>>>>>>     JKWorkersFile /etc/apache2/workers.properties
>>>>>>>>     JKLogFile /var/log/apache2/mod_jk.log
>>>>>>>>     JKLogLevel debug
>>>>>>>>     JKShmFile /var/log/apache2/mod_jk.shm
>>>>>>>>     JKMount /*.jsp JBoss1
>>>>>>>>     JKMount /servlet/* JBoss1
>>>>>>>>     JKMount /examples/* JBoss1
>>>>>>>>     JKMount /picturetalk/* JBoss1
>>>>>>>>     JKMount /sample/* JBoss1
>>>>>>>> </IfModule>
>>>>>>>> .
>>>>>>>> .
>>>>>>>>
>>>>>>>> 3. from apache2/workers.properties:
>>>>>>>>
>>>>>>>> worker.list=JBoss1, JBoss2, loadbalancer, blojsomworker
>>>>>>>>
>>>>>>>> # ------------------------
>>>>>>>> # First JBoss server
>>>>>>>> # ------------------------
>>>>>>>> worker.JBoss1.port=8009
>>>>>>>> worker.JBoss1.host=127.0.0.1
>>>>>>>> worker.JBoss1.type=ajp13
>>>>>>>>
>>>>>>>> # Specify the size of the open connection cache.
>>>>>>>> #worker.JBoss1.cachesize
>>>>>>>>
>>>>>>>> #
>>>>>>>> # Specifies the load balance factor when used with
>>>>>>>> # a load balancing worker.
>>>>>>>> # Note:
>>>>>>>> #  ----> lbfactor must be > 0
>>>>>>>> #  ----> Low lbfactor means less work done by the worker.
>>>>>>>> worker.JBoss1.lbfactor=100
>>>>>>>>
>>>>>>>>
>>>>>>>> # ------------------------
>>>>>>>> # Second JBoss server
>>>>>>>> # ------------------------
>>>>>>>> #worker.JBoss2.port=9008
>>>>>>>> #worker.JBoss2.host=localhost
>>>>>>>> worker.JBoss2.lbfactor=100
>>>>>>>>
>>>>>>>>
>>>>>>>> # ------------------------
>>>>>>>> # Load Balancer worker
>>>>>>>> # ------------------------
>>>>>>>>
>>>>>>>> #
>>>>>>>> # The loadbalancer (type lb) worker performs weighted round-

>>>>>>>> robin
>>>>>>>> # load balancing with sticky sessions.
>>>>>>>> # Note:
>>>>>>>> #  ----> If a worker dies, the load balancer will check
its  
>>>>>>>> state
>>>>>>>> #        once in a while. Until then all work is redirected
 
>>>>>>>> to peer
>>>>>>>> #        worker.
>>>>>>>> worker.loadbalancer.type=lb
>>>>>>>> worker.loadbalancer.balanced_workers=JBoss1, JBoss2
>>>>>>>>
>>>>>>>> # ------------------------
>>>>>>>> # Blojsom worker
>>>>>>>> # ------------------------
>>>>>>>> #
>>>>>>>> # Worker created specifically for Blojsom.
>>>>>>>> worker.blojsomworker.port=1279
>>>>>>>> worker.blojsomworker.host=127.0.0.1
>>>>>>>> worker.blojsomworker.type=ajp13
>>>>>>>> worker.blojsomworker.lbfactor=100
>>>>>>>>
>>>>>>>>
>>>>>>>> # END workers.properties
>>>>>>>> #
>>>>>>>>
>>>>>>>> On Sep 2, 2009, at 2:05 PM, Rainer Jung wrote:
>>>>>>>>
>>>>>>>>> On 27.08.2009 15:45, Dennis Christopher wrote:
>>>>>>>>>> environment: Tomcat 6.0.18 under apache2 on Mac OS
X Server  
>>>>>>>>>> 10.5
>>>>>>>>>> (Leopard).
>>>>>>>>>>
>>>>>>>>>> I am using a mod_jk connector with JBoss.
>>>>>>>>>>
>>>>>>>>>> I am having trouble getting context urls of the form
>>>>>>>>>> website.my.com/myapplication honoured (or even
>>>>>>>>>> localhost/myapplication).
>>>>>>>>>> (Safari:File not found).I have googled  the error
messages
>>>>>>>>>> below but
>>>>>>>>>> can't find anything applicable to my setup.
>>>>>>>>>>
>>>>>>>>>> The quick start guide at
>>>>>>>>>>
>>>>>>>>>> http://tomcat.apache.org/connectors-doc/generic_howto/quick.html
>>>>>>>>>>
>>>>>>>>>> gives a simple proof of concept for a connector setup
>>>>>>>>>> (/examples").
>>>>>>>>>> However, this does not work,
>>>>>>>>>> though I have followed the editing of the configuration
files
>>>>>>>>>> exactly
>>>>>>>>>> (using JKMount in the httpd.conf etc)
>>>>>>>>>>
>>>>>>>>>> I get an error in mod_jk.log (set to debug level):
>>>>>>>>>>
>>>>>>>>>> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
>>>>>>>>>> map_uri_to_worker_ext::jk_uri_worker_map.c (1036):
(TEST)
>>>>>>>>>> Attempting to
>>>>>>>>>> map URI '/server-status' from 5 maps
>>>>>>>>>> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
>>>>>>>>>> map_uri_to_worker_ext::jk_uri_worker_map.c (1039):
Initial  
>>>>>>>>>> match
>>>>>>>>>> value:for URI '/server-status' is -1.
>>>>>>>>>> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
>>>>>>>>>> find_match::jk_uri_worker_map.c (850): Attempting
to map
>>>>>>>>>> context URI
>>>>>>>>>> '/examples/*=JBoss1' source 'JkMount'
>>>>>>>>>> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
>>>>>>>>>> find_match::jk_uri_worker_map.c (850): Attempting
to map
>>>>>>>>>> context URI
>>>>>>>>>> '/servlet/*=JBoss1' source 'JkMount'
>>>>>>>>>> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
>>>>>>>>>> find_match::jk_uri_worker_map.c (850): Attempting
to map
>>>>>>>>>> context URI
>>>>>>>>>> '/sample/*=JBoss1' source 'JkMount'
>>>>>>>>>> [Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
>>>>>>>>>> find_match::jk_uri_worker_map.c (850): Attempting
to map
>>>>>>>>>> context URI
>>>>>>>>>> '/*.jsp=JBoss1' source 'JkMount'
>>>>>>>>>> [Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
>>>>>>>>>> map_uri_to_worker_ext::jk_uri_worker_map.c (1047):
Match
>>>>>>>>>> value:for URI
>>>>>>>>>> '/server-status' is -1.
>>>>>>>>>> [Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
>>>>>>>>>> jk_translate::mod_jk.c (3536): no match for /server-status
 
>>>>>>>>>> found
>>>>>>>>>>
>>>>>>>>>> Any help on how to diagnose what the seeming error
is  
>>>>>>>>>> pointing to
>>>>>>>>>> would
>>>>>>>>>> be much appreciated.
>>>>>>>>>
>>>>>>>>> This log snippet is not useful, because the request you
used  
>>>>>>>>> was
>>>>>>>>> for
>>>>>>>>> /server-status, which is most likely not a request you
want
>>>>>>>>> mod_jk to
>>>>>>>>> send to JBoss.
>>>>>>>>>
>>>>>>>>> Please post all your JK directives from your httpd.conf
and  
>>>>>>>>> the
>>>>>>>>> files
>>>>>>>>> included in that. Also post your workers.properties,
and if  
>>>>>>>>> you
>>>>>>>>> use it
>>>>>>>>> the uriworkermap.properties file.
>>>>>>>>>
>>>>>>>>> The most common cause why simple setups do not work is
the  
>>>>>>>>> use of
>>>>>>>>> virtual hosts in the Apache configuration. If you have
virtual
>>>>>>>>> hosts,
>>>>>>>>> you have to put JkMount into the virtual hosts, or you
set
>>>>>>>>> "JkMountCopy
>>>>>>>>> All" in the global part of the configuration.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

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


Mime
View raw message