Summary: | JkMountFile directive fails to update after the uri mapping file is modified | ||
---|---|---|---|
Product: | Tomcat Connectors | Reporter: | Gilberto <gespinoza75> |
Component: | Common | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
Attachments: |
configuration files and mod_jk log
section of mod_jk.log of the section after loading module built from svn on nov 19 |
Description
Gilberto
2006-11-18 14:43:26 UTC
Created attachment 19140 [details]
configuration files and mod_jk log
A couple of comments: 1) Your shared memory file is /srv/www/logs/jk-runtime-status. It looks like the apache processes don't have write permissions to the file or to the directory. If you don't like the automaticly chosen file, you can choose another one with JkShmFile. This file is necessary. 2) Don't use worker.ajp13.cachesize=1. The directive cachesize is deprecated. It has beend replaced by connection_pool_size. But also connection_pool_size should only be used in very special cases. The default values are usually better. 3) cache_timeout is also deprecated. Use connection_pool_timeout instead. 4) You don't need lbfactor, since you don't use a mod_jk load balancer worker. 5) There's a typo: instead of reclycle_timeout it should by recycle_timeout, but you shouldn't use that. It has the same meaning as connection_pool_timeout. 6) There is a couple of lines in you log: Reloaded urimaps from /etc/geronimo/uriworkermap.properties so actually reloading happens. To understand if there is really a problem, please give the contents of the uriworkermap file before and after change, and the request URL which does not work as expected after the change. Hi Gilberto, inspired by your uriworkermap.properties, which contained "!" rules, I checked the rule and reloading logic. In fact the behaviour when switching between non-"!"-rules and "!"-rules was undefined at best. So adding or removing an exclamation mark did not work. I added a fix to svn, but tests need to wait until tomorrow. Feel free to test, I'm interested in feedback. Please do have a look at my previous comments 1)-6) also. (In reply to comment #3) > Hi Gilberto, > > inspired by your uriworkermap.properties, which contained "!" rules, I checked > the rule and reloading logic. In fact the behaviour when switching between > non-"!"-rules and "!"-rules was undefined at best. So adding or removing an > exclamation mark did not work. > > I added a fix to svn, but tests need to wait until tomorrow. Feel free to test, > I'm interested in feedback. > > Please do have a look at my previous comments 1)-6) also. Hi Rainer- I made the suggested modifications at 1)-6). I also build the new module from the svn and ran my one test. It still does not work. I will attach the md_jk.log for the time period when I made the change of the module. Please let me know if there is more info I can provide to help you out. I will to run more tests to see if there is something goofy in my config. Thanks for your help. Created attachment 19146 [details]
section of mod_jk.log of the section after loading module built from svn on nov 19
Hi Gilberto, you need to give a little info to make your tes understandable for me: - the uriworkermap.properties before the chagne - the same after the change - the URL(s) with which you are testing before and after and the results of the requests (expected/actual) - the timestamp of the change and of the test requests Some of that I can guess from the log, but unfortunately not all :( Hi Rainer- Here is the info you requested. Please let me know if you need more info. I basically just want to be able to use the "not" (!) as quick way to turn on and off a webapp. - the uriworkermap.properties before the chagne: # URI Mappings #this is how I test the auto reload #I have a .jsp served by Geronimo/Tomcat and .html by apache httpd #I remove the ! to serve thru geronimo/tomcat uri map !/bug/=ajp13 !/bug/*=ajp13 !/bug/*.txt=ajp13 !/bug/*.gz=ajp13 /*=ajp13 /*.jsp=ajp13 /servlets-examples/=ajp13 /jsp-examples/=ajp13 /servlets-examples/servlet/*=ajp13 /servlets-examples/*.jsp=ajp13 /jsp-examples/*.jsp=ajp13 /jsp-examples/*.jspx=ajp13 /jsp-examples/servlet/*=ajp13 /jsp-examples/*.html=ajp13 /jsp-examples/*.htm=ajp13 /jsp-examples/*.png=ajp13 /jsp-examples/*.jpg=ajp13 /jsp-examples/*.jpeg=ajp13 /jsp-examples/*.gif=ajp13 !/servlets-examples/*.html=ajp13 !/servlets-examples/*.htm=ajp13 !/servlets-examples/*.png=ajp13 !/servlets-examples/*.jpg=ajp13 !/servlets-examples/*.jpeg=ajp13 !/servlets-examples/*.gif=ajp13 /tomcat-docs/=ajp13 /tomcat-docs/*=ajp13 !/tomcat-docs/*.html=ajp13 !/tomcat-docs/*.htm=ajp13 !/tomcat-docs/*.png=ajp13 !/tomcat-docs/*.jpg=ajp13 !/tomcat-docs/*.jpeg=ajp13 !/tomcat-docs/*.gif=ajp13 /wiki/=ajp13 /wiki/*=ajp13 - the same after the change # URI Mappings #this is how I test the auto reload #I have a .jsp served by Geronimo/Tomcat and .html by apache httpd #I remove the ! to serve thru geronimo/tomcat uri map /bug/=ajp13 /bug/*=ajp13 /bug/*.txt=ajp13 /bug/*.gz=ajp13 /*=ajp13 /*.jsp=ajp13 /servlets-examples/=ajp13 /jsp-examples/=ajp13 /servlets-examples/servlet/*=ajp13 /servlets-examples/*.jsp=ajp13 /jsp-examples/*.jsp=ajp13 /jsp-examples/*.jspx=ajp13 /jsp-examples/servlet/*=ajp13 /jsp-examples/*.html=ajp13 /jsp-examples/*.htm=ajp13 /jsp-examples/*.png=ajp13 /jsp-examples/*.jpg=ajp13 /jsp-examples/*.jpeg=ajp13 /jsp-examples/*.gif=ajp13 !/servlets-examples/*.html=ajp13 !/servlets-examples/*.htm=ajp13 !/servlets-examples/*.png=ajp13 !/servlets-examples/*.jpg=ajp13 !/servlets-examples/*.jpeg=ajp13 !/servlets-examples/*.gif=ajp13 /tomcat-docs/=ajp13 /tomcat-docs/*=ajp13 !/tomcat-docs/*.html=ajp13 !/tomcat-docs/*.htm=ajp13 !/tomcat-docs/*.png=ajp13 !/tomcat-docs/*.jpg=ajp13 !/tomcat-docs/*.jpeg=ajp13 !/tomcat-docs/*.gif=ajp13 /wiki/=ajp13 /wiki/*=ajp13 - the URL(s) with which you are testing before and after and the results of the requests (expected/actual) www.espinozas.org/ with the ! on, I expect to get an index.html page (white bgcolor) with the ! off, i expect to get an index.jsp (gray bgcolor) from the webapp from Geronimo+Tomcat - the timestamp of the change and of the test requests -rw-r--r-- 1 root root 1038 Nov 19 22:12 uriworkermap.properties -rw-r--r-- 1 root root 1034 Nov 20 20:23 uriworkermap.properties ### from access_log (apache) ### 208.178.101.34 - - [20/Nov/2006:08:37:02 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" 212.95.252.16 - - [20/Nov/2006:10:54:37 -0600] "HEAD /icons/apache_pb.gif HTTP/1.0" 404 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" 217.232.116.36 - - [20/Nov/2006:14:21:28 -0600] "GET /bug/JkMountFile.tar.gz HTTP/1.1" 403 - "http://issues.apache.org/bugzilla/show_bug.cgi?id=40997" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0" 217.232.116.36 - - [20/Nov/2006:14:21:39 -0600] "GET /bug/ HTTP/1.1" 403 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0" 217.232.116.36 - - [20/Nov/2006:14:21:42 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.108.223.168 - - [20/Nov/2006:19:27:44 -0600] "GET / HTTP/1.0" 200 357 "-" "-" 66.92.134.85 - - [20/Nov/2006:20:23:29 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:21 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:23 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:25 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:26 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:29 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:30 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:32 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:33 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:35 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:36 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:38 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:39 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:40 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:24:43 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:27:45 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:27:47 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" 66.92.134.85 - - [20/Nov/2006:20:27:49 -0600] "GET / HTTP/1.1" 200 357 "-" "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0" thanks So I assume you are deleting the "!" in freont of the /bug maps to enable or disable access to the /bug context. The correct way is to use a minus sign "-" instead of an exclamation mark "!". -XXX says: define a rule XXX and disable it (don't use it). !XXX says: after you did the matching and you found a worker, go through all the "!" rules, and if one of those matches for the same target worker, don't use the original match, don't forward to tomcat file change semantics without restart are: entries learnt from earlier versions do not get deleted. The only way of manipulating old entries is adding or removing a minus sign. Then they get disabled, or a previous disabled state is turned into enable again. You did: !XXX: never use a mapping XXX. 1 rule loaded. Change to XXX: use a mapping XXX, a second rule loaded. Now you have a rule XXX that might match a request, but the check for exclusions afterwards still finds the !XXX and negated the forward. I suggest: -XXX: Define a map XXX but disable it. Change to XXX: Remove the disabling of XXX, ie. enable it. If you want to be more secure, so that other rules will not be able to accidentily map to /bug, you can also do: !XXX -XXX and enable the context by changing to: -!XXX XXX I'm closing this now. In case you don't understand, please proceed via the users list. In case you are pretty sure, that there is still a bug, reopen with your arguments. |