svn commit: r451742 - in /tomcat/site/trunk: docs/download-connectors.html xdocs/download-connectors.xml
Author: rjung Date: Sun Oct 1 05:19:01 2006 New Revision: 451742 URL: http://svn.apache.org/viewvc?view=revrev=451742 Log: Update download version for mod_jk from 1.2.18 to 1.2.19. I did this already on the web site as part of the release process, but forgot to update the svn sources for the web site :( Modified: tomcat/site/trunk/docs/download-connectors.html tomcat/site/trunk/xdocs/download-connectors.xml Modified: tomcat/site/trunk/docs/download-connectors.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diffrev=451742r1=451741r2=451742 == --- tomcat/site/trunk/docs/download-connectors.html (original) +++ tomcat/site/trunk/docs/download-connectors.html Sun Oct 1 05:19:01 2006 @@ -218,18 +218,18 @@ /div ul li class=download -a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.tar.gzJK 1.2.18 Source Release tar.gz/a +a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gzJK 1.2.19 Source Release tar.gz/a ul class=attributes li -span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.tar.gz.asc;pgp/a]/span +span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gz.asc;pgp/a]/span /li /ul /li li class=download -a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.zipJK 1.2.18 Source Release zip/a +a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zipJK 1.2.19 Source Release zip/a ul class=attributes li -span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.zip.asc;pgp/a]/span +span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zip.asc;pgp/a]/span /li /ul /li Modified: tomcat/site/trunk/xdocs/download-connectors.xml URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-connectors.xml?view=diffrev=451742r1=451741r2=451742 == --- tomcat/site/trunk/xdocs/download-connectors.xml (original) +++ tomcat/site/trunk/xdocs/download-connectors.xml Sun Oct 1 05:19:01 2006 @@ -29,13 +29,13 @@ div class=linksspan class=labelJK 1.2 (bactively maintained/b)/span/div ulli class=group div class=linksspan class=labelSource/span/div -ulli class=downloada href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.tar.gzJK 1.2.18 Source Release tar.gz/a -ul class=attributeslispan class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.tar.gz.asc;pgp/a]/span +ulli class=downloada href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gzJK 1.2.19 Source Release tar.gz/a +ul class=attributeslispan class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gz.asc;pgp/a]/span /li /ul /li -li class=downloada href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.zipJK 1.2.18 Source Release zip/a -ul class=attributeslispan class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.18/tomcat-connectors-1.2.18-src.zip.asc;pgp/a]/span +li class=downloada href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zipJK 1.2.19 Source Release zip/a +ul class=attributeslispan class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zip.asc;pgp/a]/span /li /ul /li - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r462662 - in /tomcat/connectors/trunk/jk/native: iis/jk_isapi_plugin.c netscape/jk_nsapi_plugin.c
Author: rjung Date: Tue Oct 10 19:05:15 2006 New Revision: 462662 URL: http://svn.apache.org/viewvc?view=revrev=462662 Log: Adding reference feature to iis and netscape. I forgot to do that after integrating it in apache. Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diffrev=462662r1=462661r2=462662 == --- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Tue Oct 10 19:05:15 2006 @@ -1242,6 +1242,10 @@ if (jk_map_read_properties(workers_map, worker_file, NULL, logger)) { /* we add the URI-WORKER MAP since workers using AJP14 will feed it */ +if (jk_map_resolve_references(workers_map, worker., 1, 1, logger) == JK_FALSE) { +jk_log(logger, JK_LOG_ERROR, Error in resolving configuration references); +} + worker_env.uri_to_worker = uw_map; worker_env.server_name = serverName; Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?view=diffrev=462662r1=462661r2=462662 == --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Tue Oct 10 19:05:15 2006 @@ -248,6 +248,10 @@ int sleep_cnt; SYS_THREAD s; +if (jk_map_resolve_references(init_map, worker., 1, 1, logger) == JK_FALSE) { +jk_log(logger, JK_LOG_ERROR, Error in resolving configuration references); +} + s = systhread_start(SYSTHREAD_DEFAULT_PRIORITY, 0, init_workers_on_other_threads, init_map); for (sleep_cnt = 0; sleep_cnt 60; sleep_cnt++) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r462665 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml
Author: rjung Date: Tue Oct 10 19:31:43 2006 New Revision: 462665 URL: http://svn.apache.org/viewvc?view=revrev=462665 Log: Adding my changes since 1.2.19. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=462665r1=462664r2=462665 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Tue Oct 10 19:31:43 2006 @@ -26,6 +26,15 @@ br / subsection name=Native changelog + fix + bug40716/bug: Adding reference feature to IIS and Netscape. + /fix + fix + Documentation: Corrected SetEnvIf syntax in JK_WORKER_NAME example. (rjung) + /fix + fix + Documentation: Added forgotten STATE and ACTIVATION notes for load balancer logging in Apache. (rjung) + /fix update Apache: Use instdso.sh instead libtool: libtool does not work on HP-UX for example. (jfclere) /update - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r464922 - in /tomcat/connectors/trunk/jk: native/common/jk_map.c xdocs/changelog.xml
Author: rjung Date: Tue Oct 17 06:23:25 2006 New Revision: 464922 URL: http://svn.apache.org/viewvc?view=revrev=464922 Log: Fixing BZ 40774: Wrong termination detection for feature reference. Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diffrev=464922r1=464921r2=464922 == --- tomcat/connectors/trunk/jk/native/common/jk_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_map.c Tue Oct 17 06:23:25 2006 @@ -661,7 +661,7 @@ *(to+remain) = '.'; *(to+remain+1) = '\0'; -rc = jk_map_resolve_references(m, m-values[i], 0, ++depth, l); +rc = jk_map_resolve_references(m, m-values[i], 0, depth+1, l); if (rc == JK_FALSE) { break; } Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=464922r1=464921r2=464922 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Tue Oct 17 06:23:25 2006 @@ -27,7 +27,11 @@ subsection name=Native changelog fix - bug40716/bug: Adding reference feature to IIS and Netscape. + bug40774/bug: Fixing wrong recursion termination. This one restricted the + reference feature unintentionally to 20 workers. (rjung) + /fix + fix + bug40716/bug: Adding reference feature to IIS and Netscape. (rjung) /fix fix Documentation: Corrected SetEnvIf syntax in JK_WORKER_NAME example. (rjung) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r465304 - /tomcat/connectors/trunk/jk/xdocs/index.xml
Author: rjung Date: Wed Oct 18 10:12:35 2006 New Revision: 465304 URL: http://svn.apache.org/viewvc?view=revrev=465304 Log: Ups: Forgot to delete two memo lines. Modified: tomcat/connectors/trunk/jk/xdocs/index.xml Modified: tomcat/connectors/trunk/jk/xdocs/index.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?view=diffrev=465304r1=465303r2=465304 == --- tomcat/connectors/trunk/jk/xdocs/index.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/index.xml Wed Oct 18 10:12:35 2006 @@ -224,8 +224,6 @@ section name=HowTo and Install br / ul --rw--- 1 jung kippdata 16209 Sep 17 00:26 domino.xml --rw--- 1 jung kippdata 13478 Sep 17 00:26 nes.xml lia href=howto/apache.htmlbApache HowTo and installation documentation/b/a pThis section contains a detailed description of how to build and - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r469198 - /tomcat/container/tc5.5.x/webapps/docs/logging.xml
Author: rjung Date: Mon Oct 30 09:10:40 2006 New Revision: 469198 URL: http://svn.apache.org/viewvc?view=revrev=469198 Log: Correct URL typo for java.util.logging API docs. Modified: tomcat/container/tc5.5.x/webapps/docs/logging.xml Modified: tomcat/container/tc5.5.x/webapps/docs/logging.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/logging.xml?view=diffrev=469198r1=469197r2=469198 == --- tomcat/container/tc5.5.x/webapps/docs/logging.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/logging.xml Mon Oct 30 09:10:40 2006 @@ -320,7 +320,7 @@ attribute name=formatter required=false p The fully-qualified class name of a class that implements the -a href=http://java.suncom/j2se/1.4.2/docs/api/java/util/logging/Formatter.html;java.util.logging.Formatter/a +a href=http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html;java.util.logging.Formatter/a interface. JULI will load this class and associate it with this handler to format its messages. By default, there is no Formatter associated with the handler. /p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r469665 - /tomcat/connectors/trunk/jk/native/common/jk_map.c
Author: rjung Date: Tue Oct 31 13:41:45 2006 New Revision: 469665 URL: http://svn.apache.org/viewvc?view=revrev=469665 Log: Fix for BZ 40856: When mapping URLs we use case sensitive comparisons since version 1.2.19. Unfortunately when adding mappings, we only add an entry, if there is no other entry with the same URL with case insensitive comparison. So whenever multiple URLs are being mapped, which only differ by case, we add onyl one mapping for the first of those URLs, but it's value will be the worker for the last mapping. This was the last remaining place, where we used case insensitive comparisons on the key side of mappings. All other such comparisons are for values. Since al jk_map_get methods were already case sensitive and we never change the case when adding entries, it should be save to drop the case insensitive key match when adding. So now keys are always case sensitive, as a result, we shouldn't apply the case mask when calculating the checksum. Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diffrev=469665r1=469664r2=469665 == --- tomcat/connectors/trunk/jk/native/common/jk_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_map.c Tue Oct 31 13:41:45 2006 @@ -36,17 +36,11 @@ #define JK_MAP_REFERENCE(.reference) #define JK_MAP_REFERENCE_SZ (strlen(JK_MAP_REFERENCE)) -#ifdef AS400 -#define CASE_MASK 0xbfbfbfbf -#else -#define CASE_MASK 0xdfdfdfdf -#endif - /* Compute the checksum for a key, consisting of the first - * 4 bytes, normalized for case-insensitivity and packed into - * an int...this checksum allows us to do a single integer + * 4 bytes, packed into an int. + * This checksum allows us to do a single integer * comparison as a fast check to determine whether we can - * skip a strcasecmp + * skip a strcmp */ #define COMPUTE_KEY_CHECKSUM(key, checksum)\ { \ @@ -68,7 +62,6 @@ c = (unsigned int)*++k;\ checksum |= c; \ } \ -checksum = CASE_MASK; \ } struct jk_map @@ -343,7 +336,7 @@ unsigned int key; COMPUTE_KEY_CHECKSUM(name, key) for (i = 0; i m-size; i++) { -if (m-keys[i] == key strcasecmp(m-names[i], name) == 0) { +if (m-keys[i] == key strcmp(m-names[i], name) == 0) { break; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r469666 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml
Author: rjung Date: Tue Oct 31 13:44:39 2006 New Revision: 469666 URL: http://svn.apache.org/viewvc?view=revrev=469666 Log: Adding fix for 40856 to changelog. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=469666r1=469665r2=469666 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Tue Oct 31 13:44:39 2006 @@ -33,6 +33,9 @@ Added explicit flush when AJP body packet size is zero. (mturk) /update fix + bug40856/bug: Fixing case sensitivity bug in URL mapping. (rjung) + /fix + fix bug40774/bug: Fixing wrong recursion termination. This one restricted the reference feature unintentionally to 20 workers. (rjung) /fix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476528 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_ajp_common.h
Author: rjung Date: Sat Nov 18 06:26:01 2006 New Revision: 476528 URL: http://svn.apache.org/viewvc?view=revrev=476528 Log: Minor cleanups of socket handling - use JK_INVALID_SOCKET instead of -1 in all places - use 0 instead of -1 as default value of socket_timeout - all timeouts now are disabled with the value 0 and negative values should behave the same, so only compare timeouts with - 0 - = 0 - remove redundant check for cache_timeout 0 in ajp_maintain Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=476528r1=476527r2=476528 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Nov 18 06:26:01 2006 @@ -685,7 +685,7 @@ if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, reset socket with sd = %u, ae-sd ); -ae-sd = -1; +ae-sd = JK_INVALID_SOCKET; } jk_reset_pool((ae-pool)); } @@ -1166,7 +1166,7 @@ while (IS_VALID_SOCKET(ae-sd)) { int rc = 0; err = 0; -if (ae-worker-socket_timeout) { +if (ae-worker-socket_timeout 0) { if (!jk_is_socket_connected(ae-sd)) { jk_log(l, JK_LOG_INFO, (%s) socket %d is not connected any more (errno=%d), @@ -1176,7 +1176,7 @@ err++; } } -if (ae-worker-prepost_timeout != 0 !err) { +if (ae-worker-prepost_timeout 0 !err) { /* handle cping/cpong if prepost_timeout is set * If the socket is disconnected no need to handle * the cping/cpong @@ -1233,7 +1233,7 @@ if (ajp_connection_tcp_send_message(ae, op-request, l) != JK_TRUE) { /* Close the socket if unable to send request */ jk_close_socket(ae-sd); -ae-sd = -1; +ae-sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_INFO, (%s) error sending request on a fresh connection (errno=%d), ae-worker-name, ae-last_errno); @@ -1297,7 +1297,7 @@ if (ajp_connection_tcp_send_message(ae, s-reco_buf, l) != JK_TRUE) { /* Close the socket if unable to send request */ jk_close_socket(ae-sd); -ae-sd = -1; +ae-sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_ERROR, (%s) failed resending request body (lb mode) (%d), ae-worker-name, postlen); @@ -1347,7 +1347,7 @@ if (ajp_connection_tcp_send_message(ae, op-post, l) != JK_TRUE) { /* Close the socket if unable to send request */ jk_close_socket(ae-sd); -ae-sd = -1; +ae-sd = JK_INVALID_SOCKET; jk_log(l, JK_LOG_ERROR, (%s) error sending request body, ae-worker-name); JK_TRACE_EXIT(l); @@ -1527,7 +1527,7 @@ int rc = 0; /* If we set a reply timeout, check it something is available */ -if (p-worker-reply_timeout != 0) { +if (p-worker-reply_timeout 0) { if (ajp_is_input_event(p, p-worker-reply_timeout, l) == JK_FALSE) { jk_log(l, JK_LOG_ERROR, @@ -2319,7 +2319,7 @@ ajp_worker_t *aw = pThis-worker_private; int rc; /* Obtain current time only if needed */ -if (aw-cache_timeout 1) { +if (aw-cache_timeout = 0) { /* Nothing to do. */ JK_TRACE_EXIT(l); return JK_TRUE; @@ -2327,7 +2327,7 @@ JK_ENTER_CS(aw-cs, rc); if (rc) { unsigned int i, n = 0, cnt = 0; -/* Count opended slots */ +/* Count open slots */ for (i = 0; i aw-ep_cache_sz; i++) { if (aw-ep_cache[i] IS_VALID_SOCKET(aw-ep_cache[i]-sd)) cnt++; @@ -2337,7 +2337,7 @@ /* Skip the closed sockets */ if (aw-ep_cache[i] IS_VALID_SOCKET(aw-ep_cache[i]-sd)) { int elapsed = (int)difftime(now, aw-ep_cache[i]-last_access); -if ((aw-cache_timeout 0) (elapsed aw-cache_timeout)) { +if (elapsed aw-cache_timeout) { time_t rt = 0; n++; if (JK_IS_DEBUG_LEVEL(l)) Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h?view=diffrev=476528r1=476527r2=476528
svn commit: r476532 - /tomcat/connectors/trunk/jk/native/common/jk_connect.c
Author: rjung Date: Sat Nov 18 06:54:22 2006 New Revision: 476532 URL: http://svn.apache.org/viewvc?view=revrev=476532 Log: Eliminate -1 or INVALID_SOCKET, use the existing defines and macros instead. Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?view=diffrev=476532r1=476531r2=476532 == --- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sat Nov 18 06:54:22 2006 @@ -467,11 +467,10 @@ int jk_close_socket(jk_sock_t s) { +if (IS_VALID_SOCKET(s)) #if defined(WIN32) || (defined(NETWARE) defined(__NOVELL_LIBC__)) -if (s != INVALID_SOCKET) return closesocket(s) ? -1 : 0; #else -if (s != -1) return close(s); #endif @@ -498,11 +497,10 @@ int rc = 0; #if defined(WIN32) || (defined(NETWARE) defined(__NOVELL_LIBC__)) int tmout = SECONDS_TO_LINGER * 1000; -if (s == INVALID_SOCKET) #else struct timeval tv; -if (s 0) #endif +if (!IS_VALID_SOCKET(s)) return -1; /* Shut down the socket for write, which will send a FIN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476673 - in /tomcat/connectors/trunk/jk/native/common: jk_status.c jk_uri_worker_map.c jk_uri_worker_map.h
Author: rjung Date: Sat Nov 18 17:11:04 2006 New Revision: 476673 URL: http://svn.apache.org/viewvc?view=revrev=476673 Log: - Deprecated MATCH_TYPEs not used any longer - JkMountFile reload didn't really work when the original file and the new file contained rules, which only differed by the existence of !. The logic only allowed to change a - prefix between reloads, but not !. Now we also check the MATCH_TYPE_NOMATCH bit when we check for duplicates. (likely fix for BZ 40997) Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=476673r1=476672r2=476673 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Nov 18 17:11:04 2006 @@ -220,14 +220,17 @@ static const char *status_val_match(unsigned int match) { -if (match MATCH_TYPE_STOPPED) -return Stopped; -else if (match MATCH_TYPE_DISABLED) +if (match MATCH_TYPE_DISABLED) return Disabled; else if (match MATCH_TYPE_NO_MATCH) return Unmount; else if (match MATCH_TYPE_EXACT) return Exact; +else if (match MATCH_TYPE_WILDCHAR_PATH) +return Wildchar; +/* deprecated +else if (match MATCH_TYPE_STOPPED) +return Stopped; else if (match MATCH_TYPE_CONTEXT) return Context; else if (match MATCH_TYPE_CONTEXT_PATH) @@ -236,8 +239,7 @@ return Suffix; else if (match MATCH_TYPE_GENERAL_SUFFIX) return General Suffix; -else if (match MATCH_TYPE_WILDCHAR_PATH) -return Wildchar; + */ else return Error; } Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diffrev=476673r1=476672r2=476673 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Sat Nov 18 17:11:04 2006 @@ -245,25 +245,27 @@ for (i = 0; i uw_map-size; i++) { uwr = uw_map-maps[i]; if (strcmp(uwr-uri, puri) == 0) { -/* Update disabled flag */ -if (match_type MATCH_TYPE_DISABLED) -uwr-match_type |= MATCH_TYPE_DISABLED; -else -uwr-match_type = ~MATCH_TYPE_DISABLED; -if (strcmp(uwr-worker_name, worker) == 0) { -jk_log(l, JK_LOG_DEBUG, - map rule %s=%s already exists, - puri, worker); -JK_TRACE_EXIT(l); -return JK_TRUE; -} -else { -jk_log(l, JK_LOG_DEBUG, - changing map rule %s=%s , - puri, worker); -uwr-worker_name = jk_pool_strdup(uw_map-p, worker); -JK_TRACE_EXIT(l); -return JK_TRUE; +if (uwr-match_type MATCH_TYPE_NO_MATCH == match_type MATCH_TYPE_NO_MATCH) { +/* Update disabled flag */ +if (match_type MATCH_TYPE_DISABLED) +uwr-match_type |= MATCH_TYPE_DISABLED; +else +uwr-match_type = ~MATCH_TYPE_DISABLED; +if (strcmp(uwr-worker_name, worker) == 0) { +jk_log(l, JK_LOG_DEBUG, + map rule %s=%s already exists, + puri, worker); +JK_TRACE_EXIT(l); +return JK_TRUE; +} +else { +jk_log(l, JK_LOG_DEBUG, + changing map rule %s=%s , + puri, worker); +uwr-worker_name = jk_pool_strdup(uw_map-p, worker); +JK_TRACE_EXIT(l); +return JK_TRUE; +} } } } @@ -434,7 +436,7 @@ if (!(uwr-match_type MATCH_TYPE_NO_MATCH) || (uwr-match_type MATCH_TYPE_DISABLED)) continue; -/* Check only mathing workers */ +/* Check only matching workers */ if (strcmp(uwr-worker_name, worker)) continue; if (uwr-match_type MATCH_TYPE_WILDCHAR_PATH) { Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h?view=diffrev=476673r1=476672r2=476673
svn commit: r476680 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
Author: rjung Date: Sat Nov 18 17:34:47 2006 New Revision: 476680 URL: http://svn.apache.org/viewvc?view=revrev=476680 Log: Fix operator precedence. Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diffrev=476680r1=476679r2=476680 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Sat Nov 18 17:34:47 2006 @@ -245,7 +245,7 @@ for (i = 0; i uw_map-size; i++) { uwr = uw_map-maps[i]; if (strcmp(uwr-uri, puri) == 0) { -if (uwr-match_type MATCH_TYPE_NO_MATCH == match_type MATCH_TYPE_NO_MATCH) { +if ((uwr-match_type MATCH_TYPE_NO_MATCH) == (match_type MATCH_TYPE_NO_MATCH)) { /* Update disabled flag */ if (match_type MATCH_TYPE_DISABLED) uwr-match_type |= MATCH_TYPE_DISABLED; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476809 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sun Nov 19 04:50:28 2006 New Revision: 476809 URL: http://svn.apache.org/viewvc?view=revrev=476809 Log: Calculate the min connection pool size as ceiling(poolsize/2) instead of floor(poolsize/2). So w don't throw away all connections during maintenance, when the pool has size 1. This will reduce the amount of warnings all endpoints are disconnected or dead. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=476809r1=476808r2=476809 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Nov 19 04:50:28 2006 @@ -2018,7 +2018,7 @@ ajp_worker_t *p = pThis-worker_private; p-ep_cache_sz = jk_get_worker_cache_size(props, p-name, cache); p-ep_mincache_sz = jk_get_worker_cache_size_min(props, p-name, - cache / 2); + (cache+1) / 2); p-socket_timeout = jk_get_worker_socket_timeout(props, p-name, AJP_DEF_SOCKET_TIMEOUT); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476811 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sun Nov 19 04:55:30 2006 New Revision: 476811 URL: http://svn.apache.org/viewvc?view=revrev=476811 Log: We calculated the min connection pool size relativ to the default pool size (1), instead of the real pool size. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=476811r1=476810r2=476811 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Nov 19 04:55:30 2006 @@ -2018,7 +2018,7 @@ ajp_worker_t *p = pThis-worker_private; p-ep_cache_sz = jk_get_worker_cache_size(props, p-name, cache); p-ep_mincache_sz = jk_get_worker_cache_size_min(props, p-name, - (cache+1) / 2); + (p-ep_cache_sz+1) / 2); p-socket_timeout = jk_get_worker_socket_timeout(props, p-name, AJP_DEF_SOCKET_TIMEOUT); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476815 - /tomcat/connectors/trunk/jk/native/common/jk_connect.c
Author: rjung Date: Sun Nov 19 05:14:10 2006 New Revision: 476815 URL: http://svn.apache.org/viewvc?view=revrev=476815 Log: Fix comment typo. Always use 0 and =0 when comparing timeout values. Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?view=diffrev=476815r1=476814r2=476815 == --- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sun Nov 19 05:14:10 2006 @@ -120,7 +120,7 @@ static int nb_connect(jk_sock_t sock, struct sockaddr *addr, int timeout) { int rc; -if (timeout 1) +if (timeout = 0) return connect(sock, addr, sizeof(struct sockaddr_in)); if ((rc = sononblock(sock))) @@ -522,7 +522,7 @@ #endif /* Read all data from the peer until we reach end-of-file (FIN * from peer) or we've exceeded our overall timeout. If the client does - * not send us bytes within 12 second, close the connection. + * not send us bytes within 16 second, close the connection. */ while (rc) { nbytes = jk_tcp_socket_recvfull(s, dummy, sizeof(dummy)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476817 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sun Nov 19 05:26:00 2006 New Revision: 476817 URL: http://svn.apache.org/viewvc?view=revrev=476817 Log: - Check if socket is still connected, even if socket_timeout=0. - Change log message levels according to their real severity. - Add a hint for the all ... dead message. - Adding forgotten socket closes in certain error conditions - Open a new connection when trying to send a new request, even if all preexisting connections are unusable (backend timeout). Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=476817r1=476816r2=476817 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Nov 19 05:26:00 2006 @@ -1166,15 +1166,13 @@ while (IS_VALID_SOCKET(ae-sd)) { int rc = 0; err = 0; -if (ae-worker-socket_timeout 0) { -if (!jk_is_socket_connected(ae-sd)) { -jk_log(l, JK_LOG_INFO, - (%s) socket %d is not connected any more (errno=%d), - ae-worker-name, ae-sd, errno); -jk_close_socket(ae-sd); -ae-sd = JK_INVALID_SOCKET; -err++; -} +if (!jk_is_socket_connected(ae-sd)) { +jk_log(l, JK_LOG_DEBUG, + (%s) socket %d is not connected any more (errno=%d), + ae-worker-name, ae-sd, errno); +jk_close_socket(ae-sd); +ae-sd = JK_INVALID_SOCKET; +err=1; } if (ae-worker-prepost_timeout 0 !err) { /* handle cping/cpong if prepost_timeout is set @@ -1183,7 +1181,7 @@ */ if (ajp_handle_cping_cpong(ae, ae-worker-prepost_timeout, l) == JK_FALSE) -err++; +err=1; } /* If we got an error or can't send data, then try to get a pooled @@ -1192,16 +1190,18 @@ if (err || ((rc = ajp_connection_tcp_send_message(ae, op-request, l)) != JK_TRUE)) { if (rc != JK_FATAL_ERROR) { -jk_log(l, JK_LOG_INFO, +jk_log(l, JK_LOG_DEBUG, (%s) error sending request. Will try another pooled connection, ae-worker-name); ajp_next_connection(ae, l); } else { op-recoverable = JK_FALSE; -jk_log(l, JK_LOG_INFO, +jk_log(l, JK_LOG_ERROR, (%s) error sending request. Unrecoverable operation, ae-worker-name); +jk_close_socket(ae-sd); +ae-sd = JK_INVALID_SOCKET; JK_TRACE_EXIT(l); return JK_FALSE; } @@ -1219,8 +1219,8 @@ jk_log(l, JK_LOG_INFO, (%s) all endpoints are disconnected or dead, ae-worker-name); -JK_TRACE_EXIT(l); -return JK_FALSE; +jk_log(l, JK_LOG_INFO, + Increase the backend idle connection timeout or the connection_pool_minsize); } /* Connect to the backend. * This can be either uninitalized connection or a reconnect. @@ -1632,6 +1632,8 @@ jk_log(l, JK_LOG_ERROR, (%s) Tomcat is down or network problems, p-worker-name); +jk_close_socket(p-sd); +p-sd = JK_INVALID_SOCKET; JK_TRACE_EXIT(l); return JK_FALSE; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476819 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_util.c
Author: rjung Date: Sun Nov 19 05:49:08 2006 New Revision: 476819 URL: http://svn.apache.org/viewvc?view=revrev=476819 Log: Added another lb strategy: session based. Contributed by Takayuki Kaneko. This strategy does only make sense, if the sessions are a much stronger indicator of load than requests. One example is, if sessions are huge in memory and load balancing should care about memory load and not cpu load. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=476819r1=476818r2=476819 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sun Nov 19 05:49:08 2006 @@ -55,6 +55,7 @@ JK_LB_METHOD_TEXT_REQUESTS, JK_LB_METHOD_TEXT_TRAFFIC, JK_LB_METHOD_TEXT_BUSYNESS, +JK_LB_METHOD_TEXT_SESSIONS, NULL }; @@ -798,6 +799,9 @@ p-worker-s-max_busy = p-worker-s-busy; rec-s-busy++; if (p-worker-lbmethod == JK_LB_METHOD_REQUESTS) +rec-s-lb_value += rec-s-lb_mult; +else if (p-worker-lbmethod == JK_LB_METHOD_SESSIONS + !sessionid) rec-s-lb_value += rec-s-lb_mult; else if (p-worker-lbmethod == JK_LB_METHOD_BUSYNESS) rec-s-lb_value += rec-s-lb_mult; Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?view=diffrev=476819r1=476818r2=476819 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sun Nov 19 05:49:08 2006 @@ -42,10 +42,12 @@ #define JK_LB_METHOD_REQUESTS (1) #define JK_LB_METHOD_TRAFFIC (2) #define JK_LB_METHOD_BUSYNESS (3) +#define JK_LB_METHOD_SESSIONS (4) #define JK_LB_METHOD_DEF (JK_LB_METHOD_REQUESTS) #define JK_LB_METHOD_TEXT_REQUESTS (Request) #define JK_LB_METHOD_TEXT_TRAFFIC (Traffic) #define JK_LB_METHOD_TEXT_BUSYNESS (Busyness) +#define JK_LB_METHOD_TEXT_SESSIONS (Sessions) #define JK_LB_METHOD_TEXT_DEF (JK_LB_METHOD_TEXT_REQUESTS) #define JK_LB_LOCK_OPTIMISTIC (1) #define JK_LB_LOCK_PESSIMISTIC (2) Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diffrev=476819r1=476818r2=476819 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Nov 19 05:49:08 2006 @@ -926,12 +926,14 @@ v = jk_map_get_string(m, buf, NULL); if (!v) return JK_LB_METHOD_DEF; -else if (*v == 't' || *v == 'T' || *v == '1') -return JK_LB_METHOD_TRAFFIC; else if (*v == 'r' || *v == 'R' || *v == '0') return JK_LB_METHOD_REQUESTS; +else if (*v == 't' || *v == 'T' || *v == '1') +return JK_LB_METHOD_TRAFFIC; else if (*v == 'b' || *v == 'B' || *v == '2') return JK_LB_METHOD_BUSYNESS; +else if (*v == 's' || *v == 'S' || *v == '3') +return JK_LB_METHOD_SESSIONS; else return JK_LB_METHOD_DEF; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476821 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/workers.xml
Author: rjung Date: Sun Nov 19 06:10:55 2006 New Revision: 476821 URL: http://svn.apache.org/viewvc?view=revrev=476821 Log: Adding docs for the Session load balancing method. Enhancing docs for all other load balancing methods. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=476821r1=476820r2=476821 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 19 06:10:55 2006 @@ -27,6 +27,9 @@ subsection name=Native changelog update + Load Balancer: Added the Sessions strategy. Contributed by Takayuki Kaneko. (rjung) + /update + update Docs: Minor enhancements and syncing with more recent versions. (rjung) /update fix Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diffrev=476821r1=476820r2=476821 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Nov 19 06:10:55 2006 @@ -287,16 +287,53 @@ /directive directive name=method default=Request required=false -Specifies what method load balancer is using for electing best worker. -If method is set to bR[equest]/b balancer will use number of requests -to find the best worker. If set to bT[raffic]/b balancer will use +Specifies what method load balancer is using for electing the best worker. +Please note, that session stickyness and perfect load balancing are +conflicting targets, especially when the number +of sessions is small, or the usage of sessions is extremely varying +For huge numbers of sessions this usually is not a problem. +p +Some methods note, that they aggregate in a sliding time window. They add up +accesses, and on each run of the global maintain method, the load counters +get divided by 2. Usually this happens once a minute, depending on the +setting of worker.maintain. The value of the load counters can be inspected +using the status worker. +/p +p +If method is set to bR[equest]/b the balancer will use number of requests +to find the best worker. Accesses will be distributed according to the +lbfactor in a sliding time window. This is the default value and should be +working well for most applications. +/p +p +If method is set to bS[ession]/b the balancer will use number of sessions +to find the best worker. Accesses will be distributed according to the +lbfactor in a sliding time window. Because the balancer does not keep any state, +it actually does not know the number of sessions. Instead it counts each request +without a session cookie or URL encoding as a new session. This method will neither +know, when a session is being invalidated, nor will it correct its load numbers +according to session timeouts or worker failover. This method should be used, +if sessions are your limiting resource, e.g. when you only have limited memory +and your sessions need a lot of memory. +/p +p +If set to bT[raffic]/b the balancer will use the network traffic between JK and Tomcat to find the best worker. -If set to bB[usyness]/b balancer will +Accesses will be distributed according to the lbfactor in a sliding time window. +This method should be used, if network to and from the backends is your +limiting resource. +/p +p +If set to bB[usyness]/b the balancer will pick the worker with the lowest current load, based on how many requests the worker is currently serving. This number is divided by the workers lbfactor, -and the lowest value (least busy) worker is picked. +and the lowest value (least busy) worker is picked. This method is especially +interesting, if your request take a long time to process, like for a download +application. +/p p This feature has been added in bjk 1.2.9/b. +The Session method has been added in bjk 1.2.20/b. /p /directive - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476849 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_logger.h common/jk_util.c
Author: rjung Date: Sun Nov 19 09:10:43 2006 New Revision: 476849 URL: http://svn.apache.org/viewvc?view=revrev=476849 Log: Part 1 of the vhost merge cleanup - Adding the missing key_size_indicator merge to Apache 2.0 - Adding the basic infra for having a vhost specific timestamp format Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_logger.h tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476849r1=476848r2=476849 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 09:10:43 2006 @@ -131,6 +131,7 @@ * Request Logging */ +char *stamp_format_string; char *format_string; array_header *format; @@ -1017,7 +1018,12 @@ static const char *jk_set_log_fmt(cmd_parms * cmd, void *dummy, char *log_format) { -jk_set_log_format(log_format); +server_rec *s = cmd-server; +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s-module_config, + jk_module); + +conf-stamp_format_string = ap_pstrdup(cmd-pool, log_format); return NULL; } @@ -2028,6 +2034,7 @@ c-log_level = JK_LOG_DEF_LEVEL; c-log = NULL; c-alias_dir = NULL; +c-stamp_format_string = NULL; c-format_string = NULL; c-format = NULL; c-mountcopy = JK_FALSE; @@ -2118,6 +2125,8 @@ } overrides-options = base-options; +overrides-stamp_format_string = base-stamp_format_string; +overrides-format_string = base-format_string; if (overrides-mountcopy) { copy_jk_map(p, overrides-s, base-uri_to_context, @@ -2212,6 +2221,7 @@ if (jkl flp) { jkl-log = jk_log_to_file; jkl-level = conf-log_level; +jkl-log_fmt = conf-stamp_format_string; jkl-logger_private = flp; flp-log_fd = conf-log_fd; conf-log = jkl; Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=476849r1=476848r2=476849 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Nov 19 09:10:43 2006 @@ -165,6 +165,7 @@ * Request Logging */ +char *stamp_format_string; char *format_string; apr_array_header_t *format; @@ -1031,7 +1032,12 @@ static const char *jk_set_log_fmt(cmd_parms * cmd, void *dummy, const char *log_format) { -jk_set_log_format(log_format); +server_rec *s = cmd-server; +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s-module_config, + jk_module); + +conf-stamp_format_string = apr_pstrdup(cmd-pool, log_format); return NULL; } @@ -2138,6 +2144,7 @@ c-log_level = JK_LOG_DEF_LEVEL; c-log = NULL; c-alias_dir = NULL; +c-stamp_format_string = NULL; c-format_string = NULL; c-format = NULL; c-mountcopy = JK_FALSE; @@ -2230,9 +2237,12 @@ overrides-certs_indicator = base-certs_indicator; overrides-cipher_indicator = base-cipher_indicator; overrides-session_indicator = base-session_indicator; +overrides-key_size_indicator = base-key_size_indicator; } overrides-options = base-options; +overrides-stamp_format_string = base-stamp_format_string; +overrides-format_string = base-format_string; if (overrides-mountcopy) { copy_jk_map(p, overrides-s, base-uri_to_context, @@ -2372,6 +2382,7 @@ if (jkl flp) { jkl-log = jk_log_to_file; jkl-level = conf-log_level; +jkl-log_fmt = conf-stamp_format_string; jkl-logger_private = flp; flp-jklogfp = conf-jklogfp; conf-log = jkl; Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_logger.h?view=diffrev=476849r1=476848r2=476849 == --- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Sun Nov 19 09:10:43 2006 @@ -36,6 +36,7 @@ { void *logger_private; int level; +const char *log_fmt; int (JK_METHOD * log) (jk_logger_t *l, int level, const char *what); Modified: tomcat/connectors/trunk/jk/native
svn commit: r476852 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sun Nov 19 09:31:24 2006 New Revision: 476852 URL: http://svn.apache.org/viewvc?view=revrev=476852 Log: Reverting part of r476817. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=476852r1=476851r2=476852 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Nov 19 09:31:24 2006 @@ -1190,7 +1190,7 @@ if (err || ((rc = ajp_connection_tcp_send_message(ae, op-request, l)) != JK_TRUE)) { if (rc != JK_FATAL_ERROR) { -jk_log(l, JK_LOG_DEBUG, +jk_log(l, JK_LOG_INFO, (%s) error sending request. Will try another pooled connection, ae-worker-name); ajp_next_connection(ae, l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476863 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Sun Nov 19 10:06:02 2006 New Revision: 476863 URL: http://svn.apache.org/viewvc?view=revrev=476863 Log: Fix a couple of typos. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476863r1=476862r2=476863 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 10:06:02 2006 @@ -873,7 +873,7 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -/* we need an absolut path */ +/* we need an absolute path */ conf-worker_file = ap_server_root_relative(cmd-pool, worker_file); #ifdef CHROOTED_APACHE @@ -884,7 +884,7 @@ conf-worker_file = ap_pstrdup(cmd-pool, worker_file); if (conf-worker_file == NULL) -return JkWorkersFile file_name invalid; +return JkWorkersFile file name invalid; if (stat(conf-worker_file, statbuf) == -1) return Can't find the workers file specified; @@ -908,7 +908,7 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -/* we need an absolut path (ap_server_root_relative does the ap_pstrdup) */ +/* we need an absolute path (ap_server_root_relative does the ap_pstrdup) */ conf-mount_file = ap_server_root_relative(cmd-pool, mount_file); #ifdef CHROOTED_APACHE @@ -938,7 +938,7 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -/* we need an absolut path */ +/* we need an absolute path */ conf-log_file = log_file; return NULL; @@ -954,7 +954,7 @@ void *dummy, char *shm_file) { -/* we need an absolut path */ +/* we need an absolute path */ jk_shm_file = ap_server_root_relative(cmd-pool, shm_file); #ifdef CHROOTED_APACHE @@ -965,7 +965,7 @@ jk_shm_file = ap_pstrdup(cmd-pool, shm_file); if (jk_shm_file == NULL) -return JkShmFile file_name invalid; +return JkShmFile file name invalid; return NULL; } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=476863r1=476862r2=476863 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Nov 19 10:06:02 2006 @@ -906,11 +906,11 @@ return err_string; } -/* we need an absolut path (ap_server_root_relative does the ap_pstrdup) */ +/* we need an absolute path (ap_server_root_relative does the ap_pstrdup) */ conf-worker_file = ap_server_root_relative(cmd-pool, worker_file); if (conf-worker_file == NULL) -return JkWorkersFile file_name invalid; +return JkWorkersFile file name invalid; if (stat(conf-worker_file, statbuf) == -1) return Can't find the workers file specified; @@ -934,7 +934,7 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -/* we need an absolut path (ap_server_root_relative does the ap_pstrdup) */ +/* we need an absolute path (ap_server_root_relative does the ap_pstrdup) */ conf-mount_file = ap_server_root_relative(cmd-pool, mount_file); if (conf-mount_file == NULL) @@ -967,7 +967,7 @@ conf-log_file = apr_pstrdup(cmd-pool, log_file); if (conf-log_file == NULL) -return JkLogFile file_name invalid; +return JkLogFile file name invalid; return NULL; } @@ -2441,7 +2441,7 @@ jk_cleanup_shmem); } else -jk_log(conf-log, JK_LOG_ERROR, Attachning shm:%s errno=%d, +jk_log(conf-log, JK_LOG_ERROR, Attaching shm:%s errno=%d, jk_shm_name(), rc); if (JK_IS_DEBUG_LEVEL(conf-log)) @@ -2505,7 +2505,7 @@ if (ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads) != APR_SUCCESS) mpm_threads = 1; #endif - jk_set_worker_def_cache_size(mpm_threads); +jk_set_worker_def_cache_size(mpm_threads); if (!uri_worker_map_alloc((conf-uw_map), conf-uri_to_context, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476865 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_global.h
Author: rjung Date: Sun Nov 19 10:17:01 2006 New Revision: 476865 URL: http://svn.apache.org/viewvc?view=revrev=476865 Log: Adding a default location for the log file and a message, if the default gets used. Making a define out of the default JkShmFile location. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_global.h Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476865r1=476864r2=476865 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 10:17:01 2006 @@ -61,6 +61,8 @@ #include jk_ajp13.h #include jk_shm.h +#define JK_LOG_DEF_FILE (logs/mod_jk.log) +#define JK_SHM_DEF_FILE (logs/jk-runtime-status) #define JK_ENV_WORKER_NAME (JK_WORKER_NAME) #define JK_NOTE_WORKER_NAME (JK_WORKER_NAME) #define JK_NOTE_WORKER_TYPE (JK_WORKER_TYPE) @@ -2186,7 +2188,15 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -if (!conf-log_file || conf-log_fd = 0) +if (!s-is_virtual !conf-log_file) { +conf-log_file = ap_server_root_relative(p, JK_LOG_DEF_FILE); +if (conf-log_file) +ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, s, + No JkLogFile defined in httpd.conf. + Using default %s, conf-log_file); +} + +if (s-is_virtual (!conf-log_file || conf-log_fd = 0)) return; /* virtual log shared w/main server */ if (*conf-log_file == '|') { @@ -2248,7 +2258,7 @@ open_jk_log(t, p); #if !defined(WIN32) !defined(NETWARE) if (!jk_shm_file) { -jk_shm_file = ap_server_root_relative(p, logs/jk-runtime-status); +jk_shm_file = ap_server_root_relative(p, JK_SHM_DEF_FILE); if (jk_shm_file) ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, NULL, No JkShmFile defined in httpd.conf. Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=476865r1=476864r2=476865 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Nov 19 10:17:01 2006 @@ -109,6 +109,8 @@ #include jk_worker.h #include jk_shm.h +#define JK_LOG_DEF_FILE (logs/mod_jk.log) +#define JK_SHM_DEF_FILE (logs/jk-runtime-status) #define JK_ENV_WORKER_NAME (JK_WORKER_NAME) #define JK_NOTE_WORKER_NAME (JK_WORKER_NAME) #define JK_NOTE_WORKER_TYPE (JK_WORKER_TYPE) @@ -2365,7 +2367,12 @@ return 0; } if (conf-log_file == NULL) { -return 0; +conf-log_file = ap_server_root_relative(pconf, JK_LOG_DEF_FILE); +if (conf-log_file) +ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, + 0, NULL, + No JkLogFile defined in httpd.conf. + Using default %s, conf-log_file); } if (*(conf-log_file) == '\0') { return 0; @@ -2469,7 +2476,7 @@ #if !defined(WIN32) !defined(NETWARE) if (!jk_shm_file) { -jk_shm_file = ap_server_root_relative(pconf, logs/jk-runtime-status); +jk_shm_file = ap_server_root_relative(pconf, JK_SHM_DEF_FILE); if (jk_shm_file) ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, 0, NULL, Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diffrev=476865r1=476864r2=476865 == --- tomcat/connectors/trunk/jk/native/common/jk_global.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_global.h Sun Nov 19 10:17:01 2006 @@ -171,6 +171,8 @@ #define JK_TRUE (1) #define JK_FALSE (0) +#define JK_UNSET (-1) + #define JK_LF (10) #define JK_CR (13) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476878 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: rjung Date: Sun Nov 19 10:48:05 2006 New Revision: 476878 URL: http://svn.apache.org/viewvc?view=revrev=476878 Log: Adding a couple if JK_IS_DEBUG_LEVEL(). Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476878r1=476877r2=476878 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 10:48:05 2006 @@ -2287,11 +2287,13 @@ /* { int i; -jk_log(conf-log, JK_LOG_DEBUG, default secret key = %s, conf-secret_key); +if (JK_IS_DEBUG_LEVEL(conf-log)) +jk_log(conf-log, JK_LOG_DEBUG, default secret key = %s, conf-secret_key); for (i = 0; i jk_map_size(conf-automount); i++) { char *name = jk_map_name_at(conf-automount, i); -jk_log(conf-log, JK_LOG_DEBUG, worker = %s and virtualhost = %s, name, map_get_string(conf-automount, name, NULL)); +if (JK_IS_DEBUG_LEVEL(conf-log)) +jk_log(conf-log, JK_LOG_DEBUG, worker = %s and virtualhost = %s, name, map_get_string(conf-automount, name, NULL)); } } */ @@ -2383,8 +2385,9 @@ * already tried mapping and it didn't work out */ worker = worker_env.worker_list[0]; -jk_log(l, JK_LOG_DEBUG, Manual configuration for %s %s, - clean_uri, worker_env.worker_list[0]); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, Manual configuration for %s %s, + clean_uri, worker_env.worker_list[0]); } } @@ -2394,9 +2397,10 @@ } else if (conf-alias_dir != NULL) { /* Automatically map uri to a context static file */ -jk_log(l, JK_LOG_DEBUG, - check alias_dir: %s, - conf-alias_dir); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + check alias_dir: %s, + conf-alias_dir); if (strlen(clean_uri) 1) { /* Get the context directory name */ char *context_dir = NULL; @@ -2419,14 +2423,16 @@ } /* Deny access to WEB-INF and META-INF directories */ if (child_dir != NULL) { -jk_log(l, JK_LOG_DEBUG, - AutoAlias child_dir: %s, - child_dir); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + AutoAlias child_dir: %s, + child_dir); if (!strcasecmp(child_dir, WEB-INF) || !strcasecmp(child_dir, META-INF)) { -jk_log(l, JK_LOG_DEBUG, - AutoAlias HTTP_NOT_FOUND for URI: %s, - r-uri); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + AutoAlias HTTP_NOT_FOUND for URI: %s, + r-uri); return HTTP_NOT_FOUND; } } @@ -2450,9 +2456,10 @@ ap_pclosedir(r-pool, dir); /* Add code to verify real path ap_os_canonical_name */ if (ret != NULL) { -jk_log(l, JK_LOG_DEBUG, - AutoAlias OK for file: %s, - ret); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + AutoAlias OK for file: %s, + ret); r-filename = ret; return OK; } @@ -2463,9 +2470,10 @@ if (size 4 !strcasecmp(context_dir + (size - 4), .war)) { -jk_log(l, JK_LOG_DEBUG, - AutoAlias FORBIDDEN for URI: %s, - r-uri); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG
svn commit: r476880 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: rjung Date: Sun Nov 19 10:51:51 2006 New Revision: 476880 URL: http://svn.apache.org/viewvc?view=revrev=476880 Log: Adding the vhost to ap_log_error() where we used NULL, but a server_rec is available. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476880r1=476879r2=476880 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 10:51:51 2006 @@ -2260,7 +2260,7 @@ if (!jk_shm_file) { jk_shm_file = ap_server_root_relative(p, JK_SHM_DEF_FILE); if (jk_shm_file) -ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, NULL, +ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, s, No JkShmFile defined in httpd.conf. Using default %s, jk_shm_file); } @@ -2276,7 +2276,7 @@ jk_shm_name(), rc); #if !defined(WIN32) !defined(NETWARE) if (!jk_shm_file) -ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, NULL, +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, No JkShmFile defined in httpd.conf. LoadBalancer will not function properly!); #endif @@ -2309,7 +2309,7 @@ if (!jk_map_read_properties(init_map, conf-worker_file, NULL, conf-log)) { if (jk_map_size(init_map) == 0) { -ap_log_error(APLOG_MARK, APLOG_EMERG, NULL, +ap_log_error(APLOG_MARK, APLOG_EMERG, s, No worker file and no worker options in httpd.conf use JkWorkerFile to set workers); return; @@ -2338,7 +2338,7 @@ return; } -ap_log_error(APLOG_MARK, APLOG_ERR, NULL, +ap_log_error(APLOG_MARK, APLOG_ERR, s, Error while opening the workers, jk will not work); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476887 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: rjung Date: Sun Nov 19 11:09:58 2006 New Revision: 476887 URL: http://svn.apache.org/viewvc?view=revrev=476887 Log: Some fixes to the Apache httpd 1.3 module: - Change source to destination when copying a table (used for JkMountCopy, taken from Apache 2.x) - Adding CHROOT trick to the log file (we already use it for the shm file and the mount file) Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476887r1=476886r2=476887 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 11:09:58 2006 @@ -941,7 +941,18 @@ jk_module); /* we need an absolute path */ -conf-log_file = log_file; +if (*log_file != '|') { +conf-log_file = ap_server_root_relative(cmd-pool, log_file); + +#ifdef CHROOTED_APACHE +ap_server_strip_chroot(conf-log_file, 0); +#endif + +} +else +conf-log_file = ap_pstrdup(cmd-pool, log_file); +if (conf-log_file == NULL) +return JkLogFile file name invalid; return NULL; } @@ -2100,7 +2111,7 @@ int i; for (i = 0; i sz; i++) { const char *name = jk_map_name_at(src, i); -if (jk_map_get(src, name, NULL) == NULL) { +if (jk_map_get(dst, name, NULL) == NULL) { if (!jk_map_put (dst, name, ap_pstrdup(p, jk_map_get_string(src, name, NULL)), NULL)) { @@ -2259,6 +2270,11 @@ #if !defined(WIN32) !defined(NETWARE) if (!jk_shm_file) { jk_shm_file = ap_server_root_relative(p, JK_SHM_DEF_FILE); + +#ifdef CHROOTED_APACHE +ap_server_strip_chroot(jk_shm_file, 0); +#endif + if (jk_shm_file) ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, s, No JkShmFile defined in httpd.conf. @@ -2630,4 +2646,3 @@ NULL, /* new_connection */ NULL/* close_connection */ #endif /* EAPI */ -}; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476894 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Sun Nov 19 11:31:57 2006 New Revision: 476894 URL: http://svn.apache.org/viewvc?view=revrev=476894 Log: Adding a real config hierarchie for loggers with respect to vhosts. We try to keep track of the pathes and piped we already have opened. As long as they are writte in the same way, the descriptors will be shared. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476894r1=476893r2=476894 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 11:31:57 2006 @@ -198,6 +198,7 @@ } dir_config_rec; static jk_logger_t *main_log = NULL; +static table *jk_log_fds = NULL; static jk_worker_env_t worker_env; static char *jk_shm_file = NULL; static size_t jk_shm_size = JK_SHM_DEF_SIZE; @@ -1037,6 +1038,7 @@ jk_module); conf-stamp_format_string = ap_pstrdup(cmd-pool, log_format); + return NULL; } @@ -2044,7 +2046,6 @@ c-mount_file = NULL; c-log_file = NULL; c-log_fd = -1; -c-log_level = JK_LOG_DEF_LEVEL; c-log = NULL; c-alias_dir = NULL; c-stamp_format_string = NULL; @@ -2052,6 +2053,11 @@ c-format = NULL; c-mountcopy = JK_FALSE; c-options = JK_OPT_FWDURIDEFAULT; +if (s-is_virtual) { +c-log_level = JK_UNSET; +} else { +c-log_level = JK_LOG_DEF_LEVEL; +} c-worker_indicator = JK_ENV_WORKER_NAME; @@ -2126,6 +2132,11 @@ jk_server_conf_t *base = (jk_server_conf_t *) basev; jk_server_conf_t *overrides = (jk_server_conf_t *) overridesv; +if (!overrides-log_file) +overrides-log_file = base-log_file; +if (overrides-log_level == JK_UNSET) +overrides-log_level = base-log_level; + overrides-worker_indicator = base-worker_indicator; if (base-ssl_enable) { @@ -2191,8 +2202,26 @@ return JK_FALSE; } +static int log_fd_get(char *key) +{ +const char *buf=ap_table_get(jk_log_fds, key); +if (buf) +return atoi(buf); +return 0; +} + +static void log_fd_set(pool *p, char *key, int v) +{ +char *buf=(char *)ap_pcalloc(p, 8*sizeof(char)); +ap_snprintf(buf, 8, %d, v); +ap_table_setn(jk_log_fds, key, buf); +} + static void open_jk_log(server_rec *s, pool *p) { +const char *fname; +int jklogfd; +piped_log *pl; jk_logger_t *jkl; file_logger_t *flp; jk_server_conf_t *conf = @@ -2207,36 +2236,56 @@ Using default %s, conf-log_file); } -if (s-is_virtual (!conf-log_file || conf-log_fd = 0)) -return; /* virtual log shared w/main server */ +if (s-is_virtual conf-log_file == NULL) { +ap_log_error(APLOG_MARK, APLOG_ERR, s, + mod_jk: Invalid JkLogFile NULL); +conf-log = main_log; +return; +} +if (s-is_virtual *(conf-log_file) == '\0') { +ap_log_error(APLOG_MARK, APLOG_ERR, s, + mod_jk: Invalid JkLogFile EMPTY); +conf-log = main_log; +return; +} -if (*conf-log_file == '|') { -piped_log *pl; +#ifdef CHROOTED_APACHE +ap_server_strip_chroot(conf-log_file, 0); +#endif -pl = ap_open_piped_log(p, conf-log_file + 1); -if (pl == NULL) { -ap_log_error(APLOG_MARK, APLOG_ERR, s, - mod_jk: could not open reliable pipe - to jk log %s, conf-log_file + 1); -exit(1); +jklogfd = log_fd_get(conf-log_file); +if (!jklogfd) { +if (*conf-log_file == '|') { +if ((pl = ap_open_piped_log(p, conf-log_file + 1)) == NULL) { +ap_log_error(APLOG_MARK, APLOG_ERR, s, + mod_jk: could not open reliable pipe + to jk log %s, conf-log_file + 1); +exit(1); +} +jklogfd = ap_piped_log_write_fd(pl); } -conf-log_fd = ap_piped_log_write_fd(pl); -} -else if (*conf-log_file != '\0') { -char *log_file = ap_server_root_relative(p, conf-log_file); +else { +fname = ap_server_root_relative(p, conf-log_file); +if (!fname) { +ap_log_error(APLOG_MARK, APLOG_ERR, s, + mod_jk: Invalid JkLog path %s, conf-log_file); +exit(1); +} #if AP_MODULE_MAGIC_AT_LEAST(19990320,14) -if ((conf-log_fd = ap_popenf_ex(p, log_file, xfer_flags, xfer_mode, 1)) - 0) { +if ((jklogfd = ap_popenf_ex(p, fname, xfer_flags, xfer_mode, 1)) + 0) { #else
svn commit: r476895 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: rjung Date: Sun Nov 19 11:38:15 2006 New Revision: 476895 URL: http://svn.apache.org/viewvc?view=revrev=476895 Log: Whops: killed a semicolon in r476887. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476895r1=476894r2=476895 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 11:38:15 2006 @@ -2696,3 +2696,4 @@ NULL, /* new_connection */ NULL/* close_connection */ #endif /* EAPI */ +}; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r476898 - /tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
Author: rjung Date: Sun Nov 19 11:51:41 2006 New Revision: 476898 URL: http://svn.apache.org/viewvc?view=revrev=476898 Log: Now, that we have a logger for each vhost, let's use them. No more need to use the main_log. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476898r1=476897r2=476898 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 11:51:41 2006 @@ -952,6 +952,7 @@ } else conf-log_file = ap_pstrdup(cmd-pool, log_file); + if (conf-log_file == NULL) return JkLogFile file name invalid; @@ -1038,7 +1039,7 @@ jk_module); conf-stamp_format_string = ap_pstrdup(cmd-pool, log_format); - + return NULL; } @@ -,7 +1112,7 @@ s += strl[i]; } *s = 0; -jk_log(conf-log ? conf-log : main_log, JK_LOG_REQUEST, %s, str); +jk_log(conf-log, JK_LOG_REQUEST, %s, str); } /* @@ -1671,8 +1672,7 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -jk_logger_t *l = conf-log ? conf-log : main_log; -if (jk_map_read_property(conf-worker_properties, line, l) == JK_FALSE) +if (jk_map_read_property(conf-worker_properties, line, conf-log) == JK_FALSE) return ap_pstrcat(cmd-temp_pool, Invalid JkWorkerProperty , line); return NULL; @@ -1826,34 +1826,33 @@ (jk_server_conf_t *) ap_get_module_config(r-server- module_config, jk_module); -jk_logger_t *l = conf-log ? conf-log : main_log; /* Retrieve the worker name stored by jk_translate() */ const char *worker_name = ap_table_get(r-notes, JK_NOTE_WORKER_NAME); int rc; -JK_TRACE_ENTER(l); +JK_TRACE_ENTER(conf-log); if (ap_table_get(r-subprocess_env, no-jk)) { -if (JK_IS_DEBUG_LEVEL(l)) -jk_log(l, JK_LOG_DEBUG, +if (JK_IS_DEBUG_LEVEL(conf-log)) +jk_log(conf-log, JK_LOG_DEBUG, Into handler no-jk env var detected for uri=%s, declined, r-uri); -JK_TRACE_EXIT(l); +JK_TRACE_EXIT(conf-log); return DECLINED; } if (r-proxyreq) { -jk_log(l, JK_LOG_ERROR, +jk_log(conf-log, JK_LOG_ERROR, Request has proxyreq flag set in mod_jk handler - aborting.); -JK_TRACE_EXIT(l); +JK_TRACE_EXIT(conf-log); return HTTP_INTERNAL_SERVER_ERROR; } /* Set up r-read_chunked flags for chunked encoding, if present */ if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK))) { -jk_log(l, JK_LOG_ERROR, +jk_log(conf-log, JK_LOG_ERROR, Could not setup client_block for chunked encoding - aborting); -JK_TRACE_EXIT(l); +JK_TRACE_EXIT(conf-log); return rc; } @@ -1862,8 +1861,8 @@ * translate and * sets the handler directly ). We still need to know the worker. */ -if (JK_IS_DEBUG_LEVEL(l)) -jk_log(l, JK_LOG_DEBUG, +if (JK_IS_DEBUG_LEVEL(conf-log)) +jk_log(conf-log, JK_LOG_DEBUG, Retrieving environment %s, conf-worker_indicator); worker_name = (char *)ap_table_get(r-subprocess_env, conf-worker_indicator); if (worker_name) { @@ -1871,8 +1870,8 @@ * been used to explicitely set the worker without JkMount. * This is useful in combination with LocationMatch or mod_rewrite. */ -if (JK_IS_DEBUG_LEVEL(l)) -jk_log(l, JK_LOG_DEBUG, +if (JK_IS_DEBUG_LEVEL(conf-log)) +jk_log(conf-log, JK_LOG_DEBUG, Retrieved worker (%s) from env %s for %s, worker_name, conf-worker_indicator, r-uri); } @@ -1883,15 +1882,15 @@ * explicitely give control to us. */ worker_name = worker_env.worker_list[0]; -if (JK_IS_DEBUG_LEVEL(l)) -jk_log(l, JK_LOG_DEBUG, +if (JK_IS_DEBUG_LEVEL(conf-log)) +jk_log(conf-log, JK_LOG_DEBUG, Single worker (%s) configuration for %s, worker_name, r-uri); } else if (worker_env.num_of_workers) { worker_name = worker_env.worker_list[0]; -if (JK_IS_DEBUG_LEVEL(l)) -jk_log(l, JK_LOG_DEBUG
svn commit: r476917 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Sun Nov 19 12:52:04 2006 New Revision: 476917 URL: http://svn.apache.org/viewvc?view=revrev=476917 Log: More vhost config stuff - moving all post config actions to the init or post_config hooks (parsing formats, maps etc.) This makes merging the config easier. - Inherit values from the main server, except they have been set explicitely in the vhost. - And a new feature: JkOptions -JkForwardURI* will throw an error. Caution: value inheritance is broken for configs, which can be enabled and disabled, resp. are of list type. At the moment these are JkOptions and Envvars. To merge these we'll need to handle separate positive and negative lists. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476917r1=476916r2=476917 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 12:52:04 2006 @@ -63,6 +63,11 @@ #define JK_LOG_DEF_FILE (logs/mod_jk.log) #define JK_SHM_DEF_FILE (logs/jk-runtime-status) +#define JK_ENV_HTTPS(HTTPS) +#define JK_ENV_CERTS(SSL_CLIENT_CERT) +#define JK_ENV_CIPHER (SSL_CIPHER) +#define JK_ENV_SESSION (SSL_SESSION_ID) +#define JK_ENV_KEY_SIZE (SSL_CIPHER_USEKEYSIZE) #define JK_ENV_WORKER_NAME (JK_WORKER_NAME) #define JK_NOTE_WORKER_NAME (JK_WORKER_NAME) #define JK_NOTE_WORKER_TYPE (JK_WORKER_TYPE) @@ -1408,21 +1413,14 @@ static const char *jk_set_request_log_format(cmd_parms * cmd, void *dummy, char *format) { -const char *err_string = NULL; server_rec *s = cmd-server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); conf-format_string = ap_pstrdup(cmd-pool, format); -if (format != NULL) { -conf-format = -parse_request_log_string(cmd-pool, format, err_string); -} -if (conf-format == NULL) -return JkRequestLogFormat format array NULL; -return err_string; +return NULL; } /* @@ -1586,6 +1584,10 @@ mask = 0; +if (action == '-' !strncasecmp(w, ForwardURI, strlen(ForwardURI))) +return ap_pstrcat(cmd-pool, JkOptions: Illegal option '-, w, + ': ForwardURI* options can not be disabled, NULL); + if (!strcasecmp(w, ForwardKeySize)) { opt = JK_OPT_FWDKEYSIZE; } @@ -1650,7 +1652,6 @@ (jk_server_conf_t *) ap_get_module_config(s-module_config, jk_module); -conf-envvars_in_use = JK_TRUE; ap_table_add(conf-envvars, env_name, default_value); @@ -2051,45 +2052,37 @@ c-format_string = NULL; c-format = NULL; c-mountcopy = JK_FALSE; -c-options = JK_OPT_FWDURIDEFAULT; + if (s-is_virtual) { c-log_level = JK_UNSET; +c-options = 0; +c-worker_indicator = NULL; +c-ssl_enable = JK_UNSET; +c-https_indicator = NULL; +c-certs_indicator = NULL; +c-cipher_indicator = NULL; +c-session_indicator = NULL; +c-key_size_indicator = NULL; } else { c-log_level = JK_LOG_DEF_LEVEL; +c-options = JK_OPT_FWDURIDEFAULT; +c-worker_indicator = JK_ENV_WORKER_NAME; +/* + * By default we will try to gather SSL info. + * Disable this functionality through JkExtractSSL + */ +c-ssl_enable = JK_TRUE; +/* + * The defaults ssl indicators match those in mod_ssl (seems + * to be in more use). + */ +c-https_indicator = JK_ENV_HTTPS; +c-certs_indicator = JK_ENV_CERTS; +c-cipher_indicator = JK_ENV_CIPHER; +c-session_indicator = JK_ENV_SESSION; +c-key_size_indicator = JK_ENV_KEY_SIZE; } -c-worker_indicator = JK_ENV_WORKER_NAME; - -/* - * By default we will try to gather SSL info. - * Disable this functionality through JkExtractSSL - */ -c-ssl_enable = JK_TRUE; -/* - * The defaults ssl indicators match those in mod_ssl (seems - * to be in more use). - */ -c-https_indicator = HTTPS; -c-certs_indicator = SSL_CLIENT_CERT; - -/* - * The following (comented out) environment variables match apache_ssl! - * If you are using apache_sslapache_ssl uncomment them (or use the - * configuration directives to set them. - * - c-cipher_indicator = HTTPS_CIPHER; - c-session_indicator = NULL; - c
svn commit: r476942 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Sun Nov 19 14:05:01 2006 New Revision: 476942 URL: http://svn.apache.org/viewvc?view=revrev=476942 Log: Fix two compilation errors in the modules. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=476942r1=476941r2=476942 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Nov 19 14:05:01 2006 @@ -2149,7 +2149,6 @@ overrides-session_indicator = base-session_indicator; if (!overrides-key_size_indicator) overrides-key_size_indicator = base-key_size_indicator; -} if (!overrides-secret_key) overrides-secret_key = base-secret_key; Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=476942r1=476941r2=476942 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Nov 19 14:05:01 2006 @@ -2276,7 +2276,6 @@ overrides-session_indicator = base-session_indicator; if (!overrides-key_size_indicator) overrides-key_size_indicator = base-key_size_indicator; -} if (!overrides-secret_key) overrides-secret_key = base-secret_key; @@ -2376,7 +2375,7 @@ conf = ap_get_module_config(s-module_config, jk_module); if (conf-log_file == NULL) { -conf-log_file = ap_server_root_relative(pconf, JK_LOG_DEF_FILE); +conf-log_file = ap_server_root_relative(p, JK_LOG_DEF_FILE); if (conf-log_file) ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, 0, s, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478200 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Wed Nov 22 08:02:50 2006 New Revision: 478200 URL: http://svn.apache.org/viewvc?view=revrev=478200 Log: Display of mapping rules does in status worker does make sense for all workers, ajp13 as well as lb. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=478200r1=478199r2=478200 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Nov 22 08:02:50 2006 @@ -588,6 +588,7 @@ jk_putv(s, td, jk_dump_hinfo(aw-worker_inet_addr, buf), /td\n/tr\n, NULL); jk_puts(s, /table\n); +display_maps(s, sw, s-uw_map, dworker, l); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478208 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Wed Nov 22 08:12:00 2006 New Revision: 478208 URL: http://svn.apache.org/viewvc?view=revrev=478208 Log: Inherit AliasDir and MountFile only if JkMountCopy is set. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=478208r1=478207r2=478208 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Wed Nov 22 08:12:00 2006 @@ -2165,11 +2165,11 @@ copy_jk_map(p, overrides-s, base-uri_to_context, overrides-uri_to_context); copy_jk_map(p, overrides-s, base-automount, overrides-automount); -overrides-mount_file = base-mount_file; +if (!overrides-mount_file) +overrides-mount_file = base-mount_file; +if (!overrides-alias_dir) +overrides-alias_dir = base-alias_dir; } - -if (!overrides-alias_dir) -overrides-alias_dir = base-alias_dir; return overrides; } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=478208r1=478207r2=478208 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Wed Nov 22 08:12:00 2006 @@ -2292,11 +2292,11 @@ copy_jk_map(p, overrides-s, base-uri_to_context, overrides-uri_to_context); copy_jk_map(p, overrides-s, base-automount, overrides-automount); -overrides-mount_file = base-mount_file; +if (!overrides-mount_file) +overrides-mount_file = base-mount_file; +if (!overrides-alias_dir) +overrides-alias_dir = base-alias_dir; } - -if (!overrides-alias_dir) -overrides-alias_dir = base-alias_dir; return overrides; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478210 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp14_worker.c jk_uri_worker_map.c jk_uri_worker_map.h jk_worker.c
Author: rjung Date: Wed Nov 22 08:14:54 2006 New Revision: 478210 URL: http://svn.apache.org/viewvc?view=revrev=478210 Log: Adding a source type to the mapping rules. The different sources (worker.properties, JkMount, uriworkermap and ajp14) might need differences in their life cycle. The first such case is reloading of the uriworkermap file. We want to be able to completely reload the mappings in the file, so we need to know, which of the old mappings have been read from the file. The new implementation now deletes all entries from uriworkermap during reload. The old one continuously added the entries during reload. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h tomcat/connectors/trunk/jk/native/common/jk_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c?view=diffrev=478210r1=478209r2=478210 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp14_worker.c Wed Nov 22 08:14:54 2006 @@ -112,7 +112,7 @@ worker %s will handle uri %s in context %s [%s], ae-worker-name, ci-uris[j], ci-cbase, buf); -uri_worker_map_add(we-uri_to_worker, buf, ae-worker-name, l); +uri_worker_map_add(we-uri_to_worker, buf, ae-worker-name, SOURCE_TYPE_DISCOVER, l); } } @@ -122,11 +122,11 @@ #else uri_worker_map_add(we-uri_to_worker, /examples/servlet/*, - ae-worker-name, l); + ae-worker-name, SOURCE_TYPE_DISCOVER, l); uri_worker_map_add(we-uri_to_worker, /examples/*.jsp, ae-worker-name, - l); + SOURCE_TYPE_DISCOVER, l); uri_worker_map_add(we-uri_to_worker, /examples/*.gif, ae-worker-name, - l); + SOURCE_TYPE_DISCOVER, l); #endif Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diffrev=478210r1=478209r2=478210 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Wed Nov 22 08:14:54 2006 @@ -38,6 +38,22 @@ #endif +static const char *uri_worker_map_source_type[] = { +unknown, +SOURCE_TYPE_TEXT_WORKERDEF, +SOURCE_TYPE_TEXT_JKMOUNT, +SOURCE_TYPE_TEXT_URIMAP, +SOURCE_TYPE_TEXT_DISCOVER, +NULL +}; + + +/* Return the string representation of the balance worker state */ +const char *uri_worker_map_get_source(uri_worker_record_t *uwr, jk_logger_t *l) +{ +return uri_worker_map_source_type[uwr-source_type]; +} + /* * Given context uri, count the number of path tokens. * @@ -79,7 +95,10 @@ /* given the same number of URI tokens, use character * length as a tie breaker */ -return ((int)e2-context_len - (int)e1-context_len); +if(e2-context_len != e1-context_len) +return ((int)e2-context_len - (int)e1-context_len); + +return ((int)e2-source_type - (int)e1-source_type); } static void worker_qsort(jk_uri_worker_map_t *uw_map) @@ -218,8 +237,41 @@ } +/* + * Delete all entries of a given source type + */ + +int uri_worker_map_clear(jk_uri_worker_map_t *uw_map, + unsigned int source_type, jk_logger_t *l) +{ +uri_worker_record_t *uwr = NULL; +unsigned int i; +unsigned int j; + +JK_TRACE_ENTER(l); + +/* Find if duplicate entry */ +for (i = 0; i uw_map-size; i++) { +uwr = uw_map-maps[i]; +if (uwr-source_type == source_type) { +jk_log(l, JK_LOG_DEBUG, + deleting map rule '%s=%s' source '%s', + uwr-context, uwr-worker_name, uri_worker_map_get_source(uwr, l)); +for (j = i; j uw_map-size-1; j++) +uw_map-maps[j] = uw_map-maps[j+1]; +uw_map-size--; +} +} + +JK_TRACE_EXIT(l); +return JK_TRUE; +} + + + int uri_worker_map_add(jk_uri_worker_map_t *uw_map, - const char *puri, const char *worker, jk_logger_t *l) + const char *puri, const char *worker, + unsigned int source_type, jk_logger_t *l) { uri_worker_record_t *uwr = NULL; char *uri; @@ -241,34 +293,6 @@ puri++; } -/* Find if duplicate entry */ -for (i = 0; i uw_map-size; i++) { -uwr = uw_map-maps[i]; -if (strcmp(uwr-uri, puri) == 0) { -if ((uwr-match_type MATCH_TYPE_NO_MATCH
svn commit: r478282 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml
Author: rjung Date: Wed Nov 22 10:51:42 2006 New Revision: 478282 URL: http://svn.apache.org/viewvc?view=revrev=478282 Log: Update changelog with my commits of the last 4 days. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=478282r1=478281r2=478282 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Wed Nov 22 10:51:42 2006 @@ -27,6 +27,50 @@ subsection name=Native changelog update + Status Worker: Add source type to status worker, remove the redundant context + column in the map listing (context=uri). (rjung) + /update + update + uriworkermap: On reload of the file, all old entries from the previous file + version get deleted, before the new ones are being read. (rjung) + /update + fix + Keep normal maps and exclusion maps internally separate. Don't treat them + as the same when adding a rule. (rjung) + version get deleted, before the new ones are being read. (rjung) + /fix + update + Status Worker: Display mappng rules also for non-lb workers and in global view. (rjung) + /update + update + Apache VHosts: Use the vhost log files instead of the main log. (rjung) + /update + update + Apache VHosts: Allow individual timestamp formats by refactoring the formatting + method. (rjung) + /update + update + Apache VHosts: Adding all missing config items to the virtual host level. + Don't overwrite the settings from the global server, but inherit them + in case they are not set in the virtual host. (rjung) + /update + update + Apache: remove unnecessary function names from log messages. (rjung) + /update + update + Apache: add a default log file location and a message, if the default gets used. (rjung) + /update + update + Apache: add missing JK_IS_DEBUG_LEVEL() (rjung) + /update + update + Apache VHosts: Allow JkWorkersFile, JKWorkerProperty, JkShmFile and JkShmFileSize + only in global virtual server. (rjung) + /update + update + Add some more jk_close_socket() and reduce log level for some info messages. (rjung) + /update + update Load Balancer: Added the Sessions strategy. Contributed by Takayuki Kaneko. (rjung) /update update - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478537 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/apache.xml howto/apache.xml style.xsl
Author: rjung Date: Thu Nov 23 03:30:34 2006 New Revision: 478537 URL: http://svn.apache.org/viewvc?view=revrev=478537 Log: Adding more precise info about the apache configuration directives, especially context information, default values and inheritance rules for vhosts. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/howto/apache.xml tomcat/connectors/trunk/jk/xdocs/style.xsl Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=478537r1=478536r2=478537 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Thu Nov 23 03:30:34 2006 @@ -27,6 +27,10 @@ subsection name=Native changelog update + Apache Docs: Adding requirements, context information, default values and + inheritance rules to the Apache config documentation. (rjung) + /update + update Status Worker: Add source type to status worker, remove the redundant context column in the map listing (context=uri). (rjung) /update Modified: tomcat/connectors/trunk/jk/xdocs/config/apache.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/apache.xml?view=diffrev=478537r1=478536r2=478537 == --- tomcat/connectors/trunk/jk/xdocs/config/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/apache.xml Thu Nov 23 03:30:34 2006 @@ -13,83 +13,197 @@ body -section name=Configuration Directives +section name=Configuration Directives p +Most of the directives are allowed once in the global part of the Apache httpd +configuration and once in every lt;VirtualHostgt; elements. Exceptions from this rule are +explicitely listed in the table below. +/p +p +Values are inherited from the main server to the virtual hosts. +Since version 1.2.20 they can be overwritten in the virtual hosts. +Exceptions from this rule are +again explicitely listed in the table below. +/p p Here are the all directives supported by Apache: /p attributes name=Directive attribute name=JkWorkersFile required=falsep -The name of a worker file for the Tomcat servlet containers +The name of a worker file for the Tomcat servlet containers. +br/ +This directive is only allowed once. It must be put into + the global part of the configuration. +br/ +If you don't use the JkWorkerProperty directives, then you must +define your workers with a valid JkWorkersFile. There is no default +value. /p/attribute attribute name=JkWorkerProperty required=falsep -Enables setting workers.properties inside Apache configuration file. +Enables setting worker properties inside Apache configuration file. +The syntax is the same as in the JkWorkersFile (usually workers.properties). +Simply prefix each line with JkWorkerProperty to put it directly into +the Apache httpd config files. +br/ +This directive is allowed multiple times. +It must be put into the global part of the configuration. +br/ +If you don't use the JkWorkerProperty directives, then you must +define your workers with a valid JkWorkersFile. There is no default +value. +br/ This directive is available in jk1.2.7 version and later. /p/attribute -attribute name=JkMount required=falsep -A mount point from a context to a Tomcat worker +attribute name=JkShmFile required=falsep +Shared memory file name. Used only on unix platforms. +br/ +This directive is only allowed once. It must be put into + the global part of the configuration. +br/ +The default value is logs/jk-runtime-status. +/p/attribute +attribute name=JkShmSize required=falsep +Size of the shared memory file name. +br/ +This directive is only allowed once. It must be put into + the global part of the configuration. +br/ +The default value depends on the platform. It is usually less than 64KB. /p/attribute attribute name=JkMountFile required=falsep -File containing multiple mappings from a context to a Tomcat worker +File containing multiple mappings from a context to a Tomcat worker. +It is usually called uriworkermap.properties. +br/ +For inheritance rules, see: JkMountCopy. +br/ +There is no default value. +/p/attribute +attribute name=JkMount required=falsep +A mount point from a context to a Tomcat worker. +br/ +This directive is allowed multiple times. +It is allowed in the global configuration and in VirtualHost. +You can also use it inside Location with a different syntax. +Inside Location, one omits the first argument (path), +which gets inherited from the Location. +For inheritance rules, see: JkMountCopy. /p/attribute attribute name=JkUnMount required=falsep -A no mount point from a context to a Tomcat worker +An exclusion mount point from a context to a Tomcat worker
svn commit: r478544 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/changelog.xml
Author: rjung Date: Thu Nov 23 04:17:22 2006 New Revision: 478544 URL: http://svn.apache.org/viewvc?view=revrev=478544 Log: Apache vhost JkOptions +/- merging: +base - -base + +vhost - -vhost Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=478544r1=478543r2=478544 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Thu Nov 23 04:17:22 2006 @@ -161,6 +161,7 @@ * Jk Options */ int options; +int exclude_options; /* * Environment variables support @@ -1625,7 +1626,7 @@ conf-options = ~mask; if (action == '-') { -conf-options = ~opt; +conf-exclude_options |= opt; } else if (action == '+') { conf-options |= opt; @@ -2052,6 +2053,7 @@ c-format_string = NULL; c-format = NULL; c-mountcopy = JK_FALSE; +c-exclude_options = 0; if (s-is_virtual) { c-log_level = JK_UNSET; @@ -2153,7 +2155,7 @@ if (!overrides-secret_key) overrides-secret_key = base-secret_key; -overrides-options |= base-options; +overrides-options |= (base-options ~base-exclude_options); if (base-envvars_in_use) { overrides-envvars_in_use = JK_TRUE; @@ -2335,6 +2337,7 @@ ap_log_error(APLOG_MARK, APLOG_ERR, srv, JkRequestLogFormat format array NULL); } +sconf-options = ~sconf-exclude_options; } } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=478544r1=478543r2=478544 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Thu Nov 23 04:17:22 2006 @@ -195,6 +195,7 @@ * Jk Options */ int options; +int exclude_options; /* * Environment variables support @@ -1653,7 +1654,7 @@ conf-options = ~mask; if (action == '-') { -conf-options = ~opt; +conf-exclude_options |= opt; } else if (action == '+') { conf-options |= opt; @@ -2172,6 +2173,7 @@ c-format_string = NULL; c-format = NULL; c-mountcopy = JK_FALSE; +c-exclude_options = 0; c-was_initialized = JK_FALSE; if (s-is_virtual) { @@ -2280,7 +2282,7 @@ if (!overrides-secret_key) overrides-secret_key = base-secret_key; -overrides-options |= base-options; +overrides-options |= (base-options ~base-exclude_options); if (base-envvars_in_use) { overrides-envvars_in_use = JK_TRUE; @@ -2614,6 +2616,7 @@ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, JkRequestLogFormat format array NULL); } +sconf-options = ~sconf-exclude_options; } } init_jk(pconf, conf, s); Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=478544r1=478543r2=478544 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Thu Nov 23 04:17:22 2006 @@ -27,6 +27,9 @@ subsection name=Native changelog update + Apache VHosts: Merge JkOptions +base - -base + +vhost - -vhost. (rjung) + /update + update Apache Docs: Adding requirements, context information, default values and inheritance rules to the Apache config documentation. (rjung) /update - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478710 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Author: rjung Date: Thu Nov 23 15:24:16 2006 New Revision: 478710 URL: http://svn.apache.org/viewvc?view=revrev=478710 Log: Initialize new log_fmt to NULL for non-Apache. If it is NULL, the old default format will be used. Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diffrev=478710r1=478709r2=478710 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Thu Nov 23 15:24:16 2006 @@ -322,6 +322,7 @@ if (rc p) { rc-log = log_to_file; rc-level = level; +rc-log_fmt = NULL; rc-logger_private = p; #ifdef AS400 p-logfile = fopen(file, a+, o_ccsid=0); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478736 - /tomcat/connectors/trunk/jk/native/common/jk_worker.c
Author: rjung Date: Thu Nov 23 17:10:18 2006 New Revision: 478736 URL: http://svn.apache.org/viewvc?view=revrev=478736 Log: Adding a little validation for maintain_time, like we use it for all other timing configurations. Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_worker.c?view=diffrev=478736r1=478735r2=478736 == --- tomcat/connectors/trunk/jk/native/common/jk_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_worker.c Thu Nov 23 17:10:18 2006 @@ -71,6 +71,8 @@ } worker_maintain_time = jk_get_worker_maintain_time(init_data); +if(worker_maintain_time 0) +worker_maintain_time = 0; if (!build_worker_map(init_data, we-worker_list, we-num_of_workers, we, l)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478739 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Thu Nov 23 17:31:42 2006 New Revision: 478739 URL: http://svn.apache.org/viewvc?view=revrev=478739 Log: Part 1 of the big jk_status overhaul: Minor and local changes. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=478739r1=478738r2=478739 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Thu Nov 23 17:31:42 2006 @@ -50,7 +50,7 @@ #define JK_STATUS_XMLE /jk:status\n -#define JK_STATUS_TEXTUPDATE_RESPONCE OK - jk status worker updated\n +#define JK_STATUS_TEXTUPDATE_RESPONSE OK - jk status worker updated\n typedef struct status_worker status_worker_t; @@ -292,33 +292,38 @@ return rv; } -static int status_bool(const char *param, const char *req) +static int status_bool(const char *param, const char *req, int def) { const char *v; char buf[32]; -int rv = 0; +int rv = def; if ((v = status_cmd(param, req, buf, sizeof(buf { if (strcasecmp(v, on) == 0 || -strcasecmp(v, true) == 0) +strcasecmp(v, true) == 0 || +strcasecmp(v, 1) == 0) rv = 1; +else if (strcasecmp(v, off) == 0 || +strcasecmp(v, false) == 0 || +strcasecmp(v, 0) == 0) +rv = 0; } return rv; } -static void display_maps(jk_ws_service_t *s, status_worker_t *sw, +static void display_maps(jk_ws_service_t *s, jk_uri_worker_map_t *uwmap, const char *worker, jk_logger_t *l) { char buf[64]; unsigned int i; -jk_puts(s, br/Uri Mappings:\n); +jk_putv(s, hr/h3URI Mappings for , worker, /h3\n, NULL); jk_puts(s, table\ntrthMatch Type/ththUri/th thSource/th/tr\n); for (i = 0; i uwmap-size; i++) { uri_worker_record_t *uwr = uwmap-maps[i]; -if (worker strcmp(uwr-worker_name, worker)) { +if (!worker || strcmp(uwr-worker_name, worker)) { continue; } jk_putv(s, trtd, @@ -332,7 +337,7 @@ jk_puts(s, /table\n); } -static void dump_maps(jk_ws_service_t *s, status_worker_t *sw, +static void dump_maps(jk_ws_service_t *s, jk_uri_worker_map_t *uwmap, const char *worker, jk_logger_t *l) { @@ -341,7 +346,7 @@ for (i = 0; i uwmap-size; i++) { uri_worker_record_t *uwr = uwmap-maps[i]; -if (worker strcmp(uwr-worker_name, worker)) { +if (!worker || strcmp(uwr-worker_name, worker)) { continue; } jk_printf(s, jk:map type=\%s\ uri=\%s\ source=\%s\ /\n, @@ -551,7 +556,7 @@ jk_puts(s, //td/tr\n); jk_puts(s, /table\n); -display_maps(s, sw, s-uw_map, dworker, l); +display_maps(s, s-uw_map, dworker, l); jk_puts(s, br/input type=\submit\ value=\Update Balancer\//form\n); } } @@ -564,7 +569,7 @@ jk_putv(s, td, jk_dump_hinfo(aw-worker_inet_addr, buf), /td\n/tr\n, NULL); jk_puts(s, /table\n); -display_maps(s, sw, s-uw_map, dworker, l); +display_maps(s, s-uw_map, dworker, l); } } /* Display legend */ @@ -672,7 +677,7 @@ jk_printf(s, domain=\%s\, wr-s-domain); jk_puts(s, /\n); } -dump_maps(s, sw, s-uw_map, lb-s-name, l); +dump_maps(s, s-uw_map, lb-s-name, l); jk_puts(s, /jk:balancer\n); } @@ -699,8 +704,8 @@ if (i 1) i = 1; lb-s-recover_wait_time = i; -lb-s-sticky_session = status_bool(ls, s-query_string); -lb-s-sticky_session_force = status_bool(lf, s-query_string); +lb-s-sticky_session = status_bool(ls, s-query_string, lb-s-sticky_session); +lb-s-sticky_session_force = status_bool(lf, s-query_string, lb-s-sticky_session_force); } else { int n = status_int(lb, s-query_string, -1); @@ -778,11 +783,15 @@ for (i = 0; i lb-num_of_workers; i++) { worker_record_t *wr = (lb-lb_workers[i]); wr-s-busy = 0; +wr-s-client_errors= 0; wr-s-elected = 0; +wr-s-elected_snapshot = 0; wr-s-error_time = 0; wr-s-errors = 0; wr-s-lb_value = 0; wr-s-max_busy = 0; +wr-s-recoveries = 0; +wr-s-recovery_errors = 0; wr-s-readed = 0; wr-s-transferred = 0; wr-s-state= JK_LB_STATE_NA; @@ -792,18 +801,20
svn commit: r478746 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_shm.h jk_status.c
Author: rjung Date: Thu Nov 23 18:13:59 2006 New Revision: 478746 URL: http://svn.apache.org/viewvc?view=revrev=478746 Log: Adding locking strategy and balancing method as manageable to the status worker. Since the shm worker gets longer and longer, and since it contains quite a few members, which are read mostly, I started to keep copies of the read mostly members which belong to the lb in the lb worker. A sequence number indicated, if the local copies have to be updated from shm. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h tomcat/connectors/trunk/jk/native/common/jk_shm.h tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=478746r1=478745r2=478746 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Thu Nov 23 18:13:59 2006 @@ -166,6 +166,33 @@ p-lb_workers[i].s-lb_value = 0; } } +JK_TRACE_EXIT(l); +} + +/* Syncing config values from shm */ +void jk_lb_pull(lb_worker_t * p, jk_logger_t *l) { +JK_TRACE_ENTER(l); +p-sticky_session = p-s-sticky_session; +p-sticky_session_force = p-s-sticky_session_force; +p-recover_wait_time = p-s-recover_wait_time; +p-retries = p-s-retries; +p-lbmethod = p-s-lbmethod; +p-lblock = p-s-lblock; +p-sequence = p-s-sequence; +JK_TRACE_EXIT(l); +} + +/* Syncing config values from shm */ +void jk_lb_push(lb_worker_t * p, jk_logger_t *l) { +JK_TRACE_ENTER(l); +p-s-sticky_session = p-sticky_session; +p-s-sticky_session_force = p-sticky_session_force; +p-s-recover_wait_time = p-recover_wait_time; +p-s-retries = p-retries; +p-s-lbmethod = p-lbmethod; +p-s-lblock = p-lblock; +p-s-sequence = p-sequence; +JK_TRACE_EXIT(l); } /* Retrieve the parameter with the given name*/ @@ -541,7 +568,7 @@ * balancer. Of course you will need a some kind of * session replication between those two remote. */ -if (p-s-sticky_session_force) +if (p-sticky_session_force) candidate = NULL; else if (*candidate-s-redirect) candidate = find_by_session(p, candidate-s-redirect, l); @@ -665,7 +692,7 @@ sessionid = next; rc = NULL; } -if (!rc p-s-sticky_session_force) { +if (!rc p-sticky_session_force) { if (p-lblock == JK_LB_LOCK_PESSIMISTIC) jk_shm_unlock(); else { @@ -727,7 +754,13 @@ jk_b_set_buffer_size(s-reco_buf, p-worker-max_packet_size); jk_b_reset(s-reco_buf); s-reco_status = RECO_INITED; -if (p-worker-s-sticky_session) { + +jk_shm_lock(); +if (p-worker-sequence != p-worker-s-sequence) +jk_lb_pull(p-worker, l); +jk_shm_unlock(); + +if (p-worker-sticky_session) { /* Use sessionid only if sticky_session is * defined for this load balancer */ @@ -736,7 +769,7 @@ if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, service sticky_session=%d id='%s', - p-worker-s-sticky_session, sessionid ? sessionid : empty); + p-worker-sticky_session, sessionid ? sessionid : empty); while (attempt = num_of_workers rc == -1) { worker_record_t *rec = @@ -798,6 +831,8 @@ if (p-worker-s-busy p-worker-s-max_busy) p-worker-s-max_busy = p-worker-s-busy; rec-s-busy++; +if (rec-s-busy rec-s-max_busy) +rec-s-max_busy = rec-s-busy; if (p-worker-lbmethod == JK_LB_METHOD_REQUESTS) rec-s-lb_value += rec-s-lb_mult; else if (p-worker-lbmethod == JK_LB_METHOD_SESSIONS @@ -805,8 +840,6 @@ rec-s-lb_value += rec-s-lb_mult; else if (p-worker-lbmethod == JK_LB_METHOD_BUSYNESS) rec-s-lb_value += rec-s-lb_mult; -if (rec-s-busy rec-s-max_busy) -rec-s-max_busy = rec-s-busy; if (p-worker-lblock == JK_LB_LOCK_PESSIMISTIC) jk_shm_unlock(); @@ -1084,8 +1117,8 @@ unsigned int num_of_workers; const char *secret; -p-s-sticky_session = jk_get_is_sticky_session(props, p-s-name); -p-s-sticky_session_force = jk_get_is_sticky_session_force(props, p-s-name); +p-sticky_session = jk_get_is_sticky_session(props, p-s-name); +p-sticky_session_force = jk_get_is_sticky_session_force(props, p-s-name); secret
svn commit: r478749 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Thu Nov 23 18:26:05 2006 New Revision: 478749 URL: http://svn.apache.org/viewvc?view=revrev=478749 Log: Major jk status additions for the html mime type: - two views for showing things: list=full list like we already had, show=only one worker - edit for the configuration form - update and reset like we already had, but reset optionally also only for a single lb member - edit/update/reset remember, if you came from list or from show and return there after commit - edit/update/reset remember refresh rate and activate it again after commit - more argument validations - a few error messages Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=478749r1=478748r2=478749 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Thu Nov 23 18:26:05 2006 @@ -357,263 +357,303 @@ } -/** - * Command line reference: - * cmd=list (default) display configuration - * cmd=show display detailed configuration - * cmd=update update configuration - * cmd=add add new uri map. - * w=worker display detailed configuration for worker - * - * Worker parameters: - * r=string redirect route name - * - */ - - -static void display_workers(jk_ws_service_t *s, status_worker_t *sw, -const char *dworker, jk_logger_t *l) +static int display_worker(jk_ws_service_t *s, jk_worker_t *w, + int refresh, int single, + jk_logger_t *l) { -unsigned int i; char buf[32]; -time_t now = time(NULL); +const char *name = NULL; +const char *from = NULL; +ajp_worker_t *aw = NULL; +lb_worker_t *lb = NULL; -for (i = 0; i sw-we-num_of_workers; i++) { -jk_worker_t *w = wc_get_worker_for_name(sw-we-worker_list[i], l); -ajp_worker_t *aw = NULL; -lb_worker_t *lb = NULL; -if (w == NULL) -continue; -if (w-type == JK_LB_WORKER_TYPE) { -lb = (lb_worker_t *)w-worker_private; -} -else if (w-type == JK_AJP13_WORKER_TYPE || - w-type == JK_AJP14_WORKER_TYPE) { -aw = (ajp_worker_t *)w-worker_private; -} -else { -/* Skip status, jni and ajp12 worker */ -continue; -} -jk_puts(s, hr/\nh3Worker Status for ); -if (dworker strcmp(dworker, sw-we-worker_list[i]) == 0) { -/* Next click will colapse the editor */ -jk_putv(s, a href=\, s-req_uri, ?cmd=show\, NULL); -} -else -jk_putv(s, a href=\, s-req_uri, ?cmd=showw=, -sw-we-worker_list[i], \, NULL); -jk_putv(s, sw-we-worker_list[i], /a/h3\n, NULL); -if (lb != NULL) { -unsigned int j; -int selected = -1; - -jk_shm_lock(); -if (lb-sequence != lb-s-sequence) -jk_lb_pull(lb, l); -jk_shm_unlock(); - -jk_puts(s, tabletr -thType/ththSticky session/th -thForce Sticky session/th -thRetries/th -thMethod/th -thLock/th -thRecovery timeout/th -/tr\ntr); -jk_putv(s, td, status_worker_type(w-type), /td, NULL); -jk_putv(s, td, status_val_bool(lb-sticky_session), +if (w-type == JK_LB_WORKER_TYPE) { +lb = (lb_worker_t *)w-worker_private; +} +else if (w-type == JK_AJP13_WORKER_TYPE || + w-type == JK_AJP14_WORKER_TYPE) { +aw = (ajp_worker_t *)w-worker_private; +} +if (single) { +from = show; +jk_putv(s, hr/\na href=\, s-req_uri, ?cmd=list\Back to full worker list/abr/\n, NULL); +} +else{ +from = list; +} + +if (lb != NULL) { +time_t now = time(NULL); +unsigned int j; + +jk_shm_lock(); +if (lb-sequence != lb-s-sequence) +jk_lb_pull(lb, l); +jk_shm_unlock(); + +name = lb-s-name; +jk_puts(s, hr/h3[); +if (single) { +jk_puts(s, S); +} +else{ +jk_printf(s, a href=\%s?cmd=showw=%srefresh=%d\S/a, + s-req_uri, name, refresh); +} +jk_puts(s, |); +jk_printf(s, a href=\%s?cmd=editw=%sfrom=%srefresh=%d\E/a, + s-req_uri, name, from, refresh); +jk_puts(s, |); +jk_printf(s, a href=\%s?cmd=resetw=%sfrom=%srefresh=%d\R/a, + s-req_uri, name, from, refresh); +jk_puts(s, ]nbsp;nbsp;); +jk_putv(s, Worker Status for , name, h3/\n, NULL); +jk_puts(s, tabletr +thType
svn commit: r478750 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
Author: rjung Date: Thu Nov 23 18:36:15 2006 New Revision: 478750 URL: http://svn.apache.org/viewvc?view=revrev=478750 Log: Remove unused variable. Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diffrev=478750r1=478749r2=478750 == --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Thu Nov 23 18:36:15 2006 @@ -311,7 +311,6 @@ uri_worker_record_t *uwr = NULL; char *uri; unsigned int match_type = 0; -unsigned int i; JK_TRACE_ENTER(l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r478751 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Thu Nov 23 18:39:09 2006 New Revision: 478751 URL: http://svn.apache.org/viewvc?view=revrev=478751 Log: Fix two compiler warnings. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=478751r1=478750r2=478751 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Thu Nov 23 18:39:09 2006 @@ -357,7 +357,7 @@ } -static int display_worker(jk_ws_service_t *s, jk_worker_t *w, +static void display_worker(jk_ws_service_t *s, jk_worker_t *w, int refresh, int single, jk_logger_t *l) { @@ -1088,7 +1088,7 @@ char *err = NULL; int cmd; int mime; -int refresh; +int refresh = -1; status_endpoint_t *p; JK_TRACE_ENTER(l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479235 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sat Nov 25 15:44:40 2006 New Revision: 479235 URL: http://svn.apache.org/viewvc?view=revrev=479235 Log: - partially undo r476817: if there exist connections, but all of them are broken, reconnect only during the next retry. If retries=1 in configuration, this allows immediate failover in the lb. - remove a tab Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=479235r1=479234r2=479235 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Nov 25 15:44:40 2006 @@ -1230,11 +1230,13 @@ jk_log(l, JK_LOG_INFO, (%s) increase the backend idle connection timeout or the connection_pool_minsize, ae-worker-name); +JK_TRACE_EXIT(l); +return JK_FALSE; } /* Connect to the backend. * This can be either uninitalized connection or a reconnect. */ -if (ajp_connect_to_endpoint(ae, l) == JK_TRUE) { +if (ajp_connect_to_endpoint(ae, l) == JK_TRUE) { /* * After we are connected, each error that we are going to * have is probably unrecoverable - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479311 - /tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c
Author: rjung Date: Sun Nov 26 00:52:44 2006 New Revision: 479311 URL: http://svn.apache.org/viewvc?view=revrev=479311 Log: Untabify. Modified: tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c Modified: tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c?view=diffrev=479311r1=479310r2=479311 == --- tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c (original) +++ tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c Sun Nov 26 00:52:44 2006 @@ -1001,8 +1001,8 @@ memset(processInformation, 0, sizeof(processInformation)); - if( cmdLine==NULL ) - cmdLine=data.cmd_line; +if( cmdLine==NULL ) +cmdLine=data.cmd_line; printf(cmdLine); if(CreateProcess(data.java_bin, @@ -1024,7 +1024,7 @@ shutdown_port = data.shutdown_port; shutdown_secret = data.shutdown_secret; shutdown_protocol = strdup(data.shutdown_protocol); - shutdown_cmd = strdup(data.stop_cmd); +shutdown_cmd = strdup(data.stop_cmd); return JK_TRUE; } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479312 - /tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c
Author: rjung Date: Sun Nov 26 00:54:36 2006 New Revision: 479312 URL: http://svn.apache.org/viewvc?view=revrev=479312 Log: Untabify Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?view=diffrev=479312r1=479311r2=479312 == --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Sun Nov 26 00:54:36 2006 @@ -300,8 +300,8 @@ jk_close_file_logger(logger); } - if (init_map) { -jk_map_free(init_map); +if (init_map) { +jk_map_free(init_map); } } @@ -413,7 +413,7 @@ s-headers_names = NULL; s-headers_values = NULL; s-num_headers = 0; - s-uw_map = uw_map; +s-uw_map = uw_map; #ifdef NETWARE /* on NetWare, we can have virtual servers that are secure. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479314 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h
Author: rjung Date: Sun Nov 26 01:04:47 2006 New Revision: 479314 URL: http://svn.apache.org/viewvc?view=revrev=479314 Log: - Adding a new constant, used later in the status worker. - Adding two new useful debug messages. - removed trailing white space. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=479314r1=479313r2=479314 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sun Nov 26 01:04:47 2006 @@ -172,6 +172,10 @@ /* Syncing config values from shm */ void jk_lb_pull(lb_worker_t * p, jk_logger_t *l) { JK_TRACE_ENTER(l); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + syncing mem for lb '%s' from shm, + p-s-name); p-sticky_session = p-s-sticky_session; p-sticky_session_force = p-s-sticky_session_force; p-recover_wait_time = p-s-recover_wait_time; @@ -185,6 +189,10 @@ /* Syncing config values from shm */ void jk_lb_push(lb_worker_t * p, jk_logger_t *l) { JK_TRACE_ENTER(l); +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + syncing shm for lb '%s' from mem, + p-s-name); p-s-sticky_session = p-sticky_session; p-s-sticky_session_force = p-sticky_session_force; p-s-recover_wait_time = p-recover_wait_time; @@ -441,7 +449,7 @@ JK_LB_DECAY_MULT * delta / lb-maintain_time); curmax = decay_load(lb, JK_LB_DECAY_MULT * delta / lb-maintain_time, l); if (!recover_workers(lb, curmax, now, l)) { -force_recovery(lb, l); +force_recovery(lb, l); } } @@ -1018,7 +1026,7 @@ else { /* No workers in error state. * Somebody set them all to disabled? - */ + */ jk_log(l, JK_LOG_ERROR, All tomcat instances failed, no more workers left for recovery); *is_error = JK_HTTP_SERVER_BUSY; @@ -1176,7 +1184,7 @@ p-lb_workers[i].s-lb_value = 0; p-lb_workers[i].s-state = JK_LB_STATE_NA; p-lb_workers[i].s-error_time = 0; -p-lb_workers[i].s-activation = +p-lb_workers[i].s-activation = jk_get_worker_activation(props, worker_names[i]); if (!wc_create_worker(p-lb_workers[i].s-name, 0, props, @@ -1206,7 +1214,7 @@ if (id_domain) { *id_domain = '\0'; strcpy(p-lb_workers[i].s-domain, p-lb_workers[i].s-jvm_route); -*id_domain = '.'; +*id_domain = '.'; } } if (JK_IS_DEBUG_LEVEL(l)) { Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?view=diffrev=479314r1=479313r2=479314 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sun Nov 26 01:04:47 2006 @@ -70,6 +70,7 @@ #define JK_LB_ACTIVATION_ACTIVE(1) #define JK_LB_ACTIVATION_DISABLED (2) #define JK_LB_ACTIVATION_STOPPED (3) +#define JK_LB_ACTIVATION_MAX (JK_LB_ACTIVATION_STOPPED) #define JK_LB_ACTIVATION_TEXT_ACTIVE (ACT) #define JK_LB_ACTIVATION_TEXT_DISABLED (DIS) #define JK_LB_ACTIVATION_TEXT_STOPPED (STP) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479316 [1/2] - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Nov 26 01:17:17 2006 New Revision: 479316 URL: http://svn.apache.org/viewvc?view=revrev=479316 Log: The big status worker update: 1) Added our standard TRACE messages 2) Added a couple of debug, info and warn log messages 3) Added constants for attribute names and values 4) Added Some constants for attribute clear text names 5) Make xml and txt mime type functional for list, show, update and reset. 6) Implement the new read_only feature, that disabled edit/update/reset. You can have e.g. two status worker mapped to different URLs, one of them read/write (default) and the other read only. 7) Implement the new user attribute. It is a list of users the Status worker checks against the remote_user field. The authentication process itself has do be done by the web server. Empty list = access to unauthenticated users. 8) Additional lb overview fields: good/degraded/bad - bad = in error or in recovering or stopped - degraded = not bad but disabled or busy - good = neither bad nor degraded (active and OK or N/A) 9) global lb edit per attribute: additional edit view for lb, where one can add one attribute for all members on a common page, e.g. the activation or the lb factor etc. 10) Some new utility functions (e.g. to write a self referring uri) 11) Quite some refactoring. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479318 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/workers.xml
Author: rjung Date: Sun Nov 26 01:40:50 2006 New Revision: 479318 URL: http://svn.apache.org/viewvc?view=revrev=479318 Log: Adding read_only and user as status worker attributes to the docs. Update for the changelog, all items concerning the status worker. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=479318r1=479317r2=479318 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 26 01:40:50 2006 @@ -26,6 +26,34 @@ br / subsection name=Native changelog + update + Status Worker: All functions accessible also for xml and txt + mime types (list, show, update, reset). (rjung) + /update + update + Status Worker: New global health indicators for load balancers + named bad (error, recovering or stopped), degraded (busy or disabled) + and good (the rest, active and OK or N/A). (rjung) + /update + update + Status Worker: New edit page, to change one attribute for all + members of a load balancer. (rjung) + /update + update + Status Worker: Standard logging for status worker. (rjung) + /update + update + Status Worker: code refactoring. (rjung) + /update + update + Status Worker: New attribute user (list) denies access, if + the request user in the sense of remote_user is not in this list. + Empty list = no deny (rjung) + /update + update + Status Worker: New attribute read_only disables the parts + of the status worker, that change states and configurations. (rjung) + /update fix bug36121/bug: Don't change main uri when mod_jk serves included uri. (markt) Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diffrev=479318r1=479317r2=479318 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Nov 26 01:40:50 2006 @@ -372,6 +372,17 @@ directive name=css default= required=false Specifies the url for cascading stylesheet to use. /directive +directive name=read_only default=False required=false +A status worker with read_only=True will not allow any operations, +that change the runtime state or configuration of the other workers. +These are edit/update/reset. +/directive +directive name=user default= required=false +This directive can be used mutltiple times. It is a list of users +which gets compared to the user name authenticated by the web server. +If the name is not contained in this list, access is denied. Per +default the list is empty and then access is allowed to anybody. +/directive /directives /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479327 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Nov 26 02:05:38 2006 New Revision: 479327 URL: http://svn.apache.org/viewvc?view=revrev=479327 Log: Fix a couple of compile time warnings (unused vars and int/unsigned int conversion) Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=479327r1=479326r2=479327 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Nov 26 02:05:38 2006 @@ -1911,7 +1911,6 @@ const char *worker, const char *sub_worker, int refresh, jk_logger_t *l) { -unsigned int i; jk_worker_t *w = NULL; JK_TRACE_ENTER(l); @@ -1944,7 +1943,6 @@ const char *worker, const char *sub_worker, jk_logger_t *l) { -unsigned int i; jk_worker_t *w = NULL; JK_TRACE_ENTER(l); @@ -1975,7 +1973,6 @@ const char *worker, const char *sub_worker, jk_logger_t *l) { -unsigned int i; jk_worker_t *w = NULL; JK_TRACE_ENTER(l); @@ -2270,7 +2267,7 @@ if (w-num_of_users) { if (s-remote_user) { -unsigned int i; +int i; denied = 1; for (i = 0; i w-num_of_users; i++) { if (!strcmp(s-remote_user, w-user_names[i])) { @@ -2602,7 +2599,7 @@ JK_TRACE_ENTER(log); if (pThis pThis-worker_private) { status_worker_t *p = pThis-worker_private; -unsigned int i; +int i; p-we = we; p-css = jk_get_worker_style_sheet(props, p-name, NULL); p-read_only = jk_get_is_read_only(props, p-name); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479328 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Nov 26 02:15:13 2006 New Revision: 479328 URL: http://svn.apache.org/viewvc?view=revrev=479328 Log: Another compiler, another warning. Fixed it. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=479328r1=479327r2=479328 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Nov 26 02:15:13 2006 @@ -379,7 +379,7 @@ { if (status_get_arg_raw(param, req, buf, len)) { char *off = buf; -while (off=strpbrk(off, JK_STATUS_ESC_CHARS)) +while ((off = strpbrk(off, JK_STATUS_ESC_CHARS))) off[0] = '@'; return buf; } @@ -1373,7 +1373,6 @@ for (i = 0; i lb-num_of_workers; i++) { worker_record_t *wr = (lb-lb_workers[i]); -ajp_worker_t *a = (ajp_worker_t *)wr-w-worker_private; jk_putv(s, trtd, wr-s-name, /tdtd\n, NULL); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479376 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/workers.xml
Author: rjung Date: Sun Nov 26 08:34:38 2006 New Revision: 479376 URL: http://svn.apache.org/viewvc?view=revrev=479376 Log: Adding max_packet_size to docs. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=479376r1=479375r2=479376 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 26 08:34:38 2006 @@ -27,6 +27,10 @@ subsection name=Native changelog update + Docs: Added short description of max_packet_size to worker + reference. (rjung) + /update + update Status Worker: All functions accessible also for xml and txt mime types (list, show, update, reset). (rjung) /update Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diffrev=479376r1=479375r2=479376 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Nov 26 08:34:38 2006 @@ -376,12 +376,18 @@ A status worker with read_only=True will not allow any operations, that change the runtime state or configuration of the other workers. These are edit/update/reset. +p +This feature has been added in bjk 1.2.20/b. +/p /directive directive name=user default= required=false This directive can be used mutltiple times. It is a list of users which gets compared to the user name authenticated by the web server. If the name is not contained in this list, access is denied. Per default the list is empty and then access is allowed to anybody. +p +This feature has been added in bjk 1.2.20/b. +/p /directive /directives /subsection @@ -443,6 +449,22 @@ /p /directive +directive name=max_packet_size default=8192 required=false +This attribute sets the maximal AJP packet size in Bytes. +The maximum value is 65536. If you change it from the default, +you bmust/b also change the packetSize attribute of your AJP +connector on the tomcat side! The attribute packetSize is only available +in Tomcat 5.5.20+ and 6.0.2+. +p +Normally it is not necessary to change the maximum packet size. Problems +with the default value have been reported when sending certificates or +certificate chains. +/p +p +This feature has been added in bjk 1.2.19/b. +/p +/directive + directive name=recovery_options default=0 required=false Only used for a member worker of a load balancer. p @@ -556,6 +578,7 @@ /p p This feature has been added in bjk 1.2.16/b. +The automatic domain rule has been added in bjk 1.2.20/b. /p /directive - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479378 - in /tomcat/connectors/trunk/jk/xdocs: changelog.xml config/project.xml config/uriworkermap.xml project.xml
Author: rjung Date: Sun Nov 26 08:36:47 2006 New Revision: 479378 URL: http://svn.apache.org/viewvc?view=revrev=479378 Log: New doc page for uriworkermap. Added: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml (with props) Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diffrev=479378r1=479377r2=479378 == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Nov 26 08:36:47 2006 @@ -27,6 +27,9 @@ subsection name=Native changelog update + Docs: New page with description of uriworkermap. (rjung) + /update + update Docs: Added short description of max_packet_size to worker reference. (rjung) /update Modified: tomcat/connectors/trunk/jk/xdocs/config/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/project.xml?view=diffrev=479378r1=479377r2=479378 == --- tomcat/connectors/trunk/jk/xdocs/config/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/project.xml Sun Nov 26 08:36:47 2006 @@ -14,6 +14,7 @@ /menu menu name=Configuration item name=Workers.propertieshref=workers.html/ +item name=Uriworkermap.properties href=uriworkermap.html/ item name=Apachehref=apache.html/ item name=IIS href=iis.html/ /menu Added: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml?view=autorev=479378 == --- tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml (added) +++ tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Sun Nov 26 08:36:47 2006 @@ -0,0 +1,247 @@ +?xml version=1.0? +!DOCTYPE document [ + !ENTITY project SYSTEM project.xml +] +document url=uriworkermap.html + +project; + +properties +author email=[EMAIL PROTECTED]Rainer Jung/author +titleuriworkermap.properties configuration/title +/properties + +body + +section name=Introduction +br/ +p +The forwarding of requests from the web server to tomcat gets configured by defining mapping rules. +Such a rule maps requests to workers. The request part of the map is described by a URI pattern, +the worker by it's worker name. +/p +p +The so-called buriworkermap/b file is a mechanism of defining rules, +which works for all web servers. There exist also other web server specific configuration +options for defining rules, which will be mostly discussed on the reference pages for +configuring tomcat connectors for the individual web servers. +/p +p +The name of the file is usually uriworkermap.properties, +although this is configurable in the web server. +Please consult the web server specific documentation pages on +how to enable the uriworkermap file. +/p +p +The main features supported by the uriworkermap file are +ul +li +Exact and wildchar matches, shortcuts to map a directory and all including content. +/li +li +Exclusion rules, disabling of rules an defined preferences behaviour. +/li +li +Virtual host integration: uri mapping rules can be expressed per virtual host. +The details are web server specific though. +/li +li +Dynamic reloading: The file gets checked every 60 seconds for changes. +New versions are automatically reloaded without web server restarts. +/li +li +Integration with the status worker. +/li +li +Support for comments in the rule file. +/li +/ul +The following sections describe these aspects in more detail. +/p +/section + +section name=Syntax +br/ +subsection name=Line format +br/ +p +The file has a line based format. There are no continuation characters, +so each rule needs to be defined on a single line. Each rule is a pair consisting +of a URI pattern and a worker name, combined by an equals sign '=': +source + /myapp=myworker +/source +The URI pattern is case sensitive. +/p +/subsection +subsection name=Comments, white space +br/ +p +All text after and including the character '#' gets ignored and can be used for comments. +Leading and trailing white space gets trimmed around the URI pattern and also around the worker name. +The following definitions are all equivalent: +source + # This is a white space example + /myapp=myworker + /myapp=myworker + /myapp = myworker +/source +/p +/subsection + +subsection name=URI patterns +br/ +p +Inside the URI pattern three special characters can be used, '*', '?' and '|'. +The character '*' is a wildchar
svn commit: r479601 - in /tomcat/connectors/trunk/jk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ native/netscape/ xdocs/ xdocs/config/
Author: rjung Date: Mon Nov 27 04:22:29 2006 New Revision: 479601 URL: http://svn.apache.org/viewvc?view=revrev=479601 Log: Making uriworkermap reload time configurable, at the moment only for Apache. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_global.h tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.h tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/xdocs/changelog.xml tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=479601r1=479600r2=479601 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon Nov 27 04:22:29 2006 @@ -121,6 +121,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; +char *mount_file_reload; jk_map_t *uri_to_context; int mountcopy; @@ -934,6 +935,32 @@ } /* + * JkMountFileReload Directive Handling + * + * JkMountFileReload seconds + */ + +static const char *jk_set_mount_file_reload(cmd_parms * cmd, +void *dummy, char *mount_file_reload) +{ +server_rec *s = cmd-server; +int interval; + +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s-module_config, + jk_module); + +interval = atoi(mount_file_reload); +if (interval 0) { +interval = 0; +} + +conf-mount_file_reload = interval; + +return NULL; +} + +/* * JkLogFile Directive Handling * * JkLogFile file @@ -1702,6 +1729,16 @@ the name of a mount file for the Tomcat servlet uri mappings}, /* + * JkMountFileReload specifies the reload check interval for the + * uriworker properties file. + * + * Default value is: JK_URIMAP_DEF_RELOAD + */ +{JkMountFileReload, jk_set_mount_file_reload, NULL, RSRC_CONF, TAKE1, + the reload check interval of the mount file}, + +/* + * JkAutoMount specifies that the list of handled URLs must be * JkAutoMount specifies that the list of handled URLs must be * asked to the servlet engine (autoconf feature) */ @@ -2056,6 +2093,7 @@ c-exclude_options = 0; if (s-is_virtual) { +c-mount_file_reload = JK_UNSET; c-log_level = JK_UNSET; c-options = 0; c-worker_indicator = NULL; @@ -2066,6 +2104,7 @@ c-session_indicator = NULL; c-key_size_indicator = NULL; } else { +c-mount_file_reload = JK_URIMAP_DEF_RELOAD; c-log_level = JK_LOG_DEF_LEVEL; c-options = JK_OPT_FWDURIDEFAULT; c-worker_indicator = JK_ENV_WORKER_NAME; @@ -2163,6 +2202,8 @@ base-envvars); } +if (overrides-mount_file_reload == JK_UNSET) +overrides-mount_file_reload = base-mount_file_reload; if (overrides-mountcopy) { copy_jk_map(p, overrides-s, base-uri_to_context, overrides-uri_to_context); @@ -2328,6 +2369,7 @@ p, Memory error); if (sconf-mount_file) { sconf-uw_map-fname = sconf-mount_file; +sconf-uw_map-reload = sconf-mount_file_reload; uri_worker_map_load(sconf-uw_map, sconf-log); } if (sconf-format_string) { Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=479601r1=479600r2=479601 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 27 04:22:29 2006 @@ -153,6 +153,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; +char *mount_file_reload; jk_map_t *uri_to_context; int mountcopy; @@ -956,6 +957,32 @@ } /* + * JkMountFileReload Directive Handling + * + * JkMountFileReload seconds + */ + +static const char *jk_set_mount_file_reload(cmd_parms * cmd, +void *dummy, const char *mount_file_reload) +{ +server_rec *s = cmd-server; +int interval; + +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s-module_config
svn commit: r479606 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Mon Nov 27 04:36:49 2006 New Revision: 479606 URL: http://svn.apache.org/viewvc?view=revrev=479606 Log: Fix wrong struct member type for new attribute. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=479606r1=479605r2=479606 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon Nov 27 04:36:49 2006 @@ -121,7 +121,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; -char *mount_file_reload; +int mount_file_reload; jk_map_t *uri_to_context; int mountcopy; Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=479606r1=479605r2=479606 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 27 04:36:49 2006 @@ -153,7 +153,7 @@ jk_map_t *worker_properties; char *worker_file; char *mount_file; -char *mount_file_reload; +int mount_file_reload; jk_map_t *uri_to_context; int mountcopy; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479630 - /tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml
Author: rjung Date: Mon Nov 27 06:20:21 2006 New Revision: 479630 URL: http://svn.apache.org/viewvc?view=revrev=479630 Log: Correkt IIS info on uriworkermap reload interval. Modified: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Modified: tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml?view=diffrev=479630r1=479629r2=479630 == --- tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml Mon Nov 27 06:20:21 2006 @@ -224,9 +224,9 @@ if the last check happened at least 60 seconds ago. /p p -IIS does the check every 60 seconds. For Apache you can configure the -interval using the directive JkMountFile. The default value is also 60 seconds. -A value of 0 turns off the reloading. +For Apache you can configure the interval using the directive JkMountFile, +for IIS you would use the attribute worker_mount_reload. +The default value is 60 seconds. A value of 0 turns off the reloading. /p p If the file changed, it gets reloaded completely. If there exist rules coming - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479835 - in /tomcat/connectors/trunk/jk/xdocs: miscellaneous/ webserver_howto/
Author: rjung Date: Mon Nov 27 17:14:10 2006 New Revision: 479835 URL: http://svn.apache.org/viewvc?view=revrev=479835 Log: Adding new dirs to start docs reorg. Added: tomcat/connectors/trunk/jk/xdocs/miscellaneous/ tomcat/connectors/trunk/jk/xdocs/webserver_howto/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479837 - in /tomcat/connectors/trunk/jk/xdocs: ajp/ generic_howto/
Author: rjung Date: Mon Nov 27 17:22:34 2006 New Revision: 479837 URL: http://svn.apache.org/viewvc?view=revrev=479837 Log: Another two dirs for doc reorg. Added: tomcat/connectors/trunk/jk/xdocs/ajp/ tomcat/connectors/trunk/jk/xdocs/generic_howto/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479842 [2/2] - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ common/ config/ generic_howto/ howto/ miscellaneous/ news/ tools/ webserver_howto/
Copied: tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml (from r479836, tomcat/connectors/trunk/jk/xdocs/howto/apache.xml) URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml?view=diffrev=479842p1=tomcat/connectors/trunk/jk/xdocs/howto/apache.xmlr1=479836p2=tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xmlr2=479842 == --- tomcat/connectors/trunk/jk/xdocs/howto/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Mon Nov 27 17:55:39 2006 @@ -36,8 +36,12 @@ /p p -It is recommanded that you also read the a href=workers.htmlWorkers HowTo/a document -to learn how to setup the working entities between your WebServer and Tomcat Engines. +It is recommended that you also read the a href=workers.htmlWorkers HowTo/a document +to learn how to setup the working entities between your web server and Tomcat Engines. +For more detailed configuration information consult the reference documentation for +a href=../config/worker.htmlworkers.properties/a, +a href=../config/uriworkermap.htmluriworkermap/a +and a href=../config/apache.htmlApache/a. /p p @@ -64,7 +68,7 @@ /p p In all the examples in this document ${tomcat_home} will be b/var/tomcat3/b. -A a href=workers.htmlworker/a is defined to be a tomcat process that accepts work from the Apache server. +A a href=../generic_howto/workers.htmlworker/a is defined to be a tomcat process that accepts work from the Apache server. /p /subsection @@ -89,7 +93,7 @@ iSeries V5R1 and V5R2 with Apache 2.0.39. Be sure to have the latest Apache PTF installed. /li li -Tomcat 3.2.x, Tomcat 3.3.x, Tomcat 4.0.x, Tomcat 4.1.x and Tomcat 5 +Tomcat 3.2.x, Tomcat 3.3.x, Tomcat 4.0.x, Tomcat 4.1.x, Tomcat 5.0.x, Tomcat 5.5.x and Tomcat 6. /li /ul /p @@ -106,8 +110,8 @@ /p p -The bajp12/b has been bdeprecated/b with Tomcat 3.3.x and you should use instead -bajp13/b which is the only ajp protocol known by Tomcat 4.0.x, 4.1.x and 5. +The bajp12/b has been bdeprecated/b with Tomcat 3.3.x and you should use instead +bajp13/b which is the only ajp protocol known by Tomcat 4.x, 5 and 5.5 and Tomcat 6. /p p @@ -187,7 +191,7 @@ /p p -For example JK 1.2.5 can be downloaded from a mirror +For example JK 1.2.x can be downloaded from a mirror a href=http://tomcat.apache.org/download-connectors.cgi; here/a (look for JK 1.2 Binary Releases). The JK 1.2 Binary Releases link contains binary version for a variety of operating systems for both Apache 1.3 and Apache 2. @@ -281,7 +285,7 @@ /p ul li -You couldn't use bmod_jk.conf-auto/b since Tomcat engine isn't on the same machine that your Apache WebServer, +You couldn't use bmod_jk.conf-auto/b since Tomcat engine isn't on the same machine that your Apache web server, ie when you have an Apache in front of a Tomcat Farm. /li li Copied: tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml (from r479836, tomcat/connectors/trunk/jk/xdocs/howto/iis.xml) URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml?view=diffrev=479842p1=tomcat/connectors/trunk/jk/xdocs/howto/iis.xmlr1=479836p2=tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xmlr2=479842 == --- tomcat/connectors/trunk/jk/xdocs/howto/iis.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml Mon Nov 27 17:55:39 2006 @@ -41,8 +41,12 @@ /p p -It is recommanded that you also read the a href=workers.htmlWorkers HowTo/a document -to learn how to setup the working entities between your WebServer and Tomcat Engines. +It is recommended that you also read the a href=workers.htmlWorkers HowTo/a document +to learn how to setup the working entities between your web server and Tomcat Engines. +For more detailed configuration information consult the reference documentation for +a href=../config/worker.htmlworkers.properties/a, +a href=../config/uriworkermap.htmluriworkermap/a +and a href=../config/iis.htmlIIS/a. /p @@ -81,7 +85,7 @@ IIS4.0 and PWS4.0 (numerous people have working IIS 5 and IIS 6 configurations) /li li -Tomcat 3.2 and later, Tomcat 4.x and Tomcat 5 +Tomcat 3.2 and later, Tomcat 4.x, Tomcat 5 and 5.5 and Tomcat 6 /li /ul /p @@ -106,7 +110,7 @@ p The bajp12/b has been bdeprecated/b with Tomcat 3.3.x and you should use instead -bajp13/b which is the only ajp protocol known by Tomcat 4.x and 5. +bajp13/b which is the only ajp protocol known by Tomcat 4.x, 5 and 5.5 and Tomcat 6. /p p @@ -160,11 +164,11 @@ bisapi_redirect.dll/b - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section). /li li -bworkers.properties/b - A file that describes the host(s) and port(s) used by the workers (Tomcat processes). +ba href=../config/workers.htmlworkers.properties/a/b - A file
svn commit: r479961 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Nov 28 01:33:48 2006 New Revision: 479961 URL: http://svn.apache.org/viewvc?view=revrev=479961 Log: Fix compiler warnings. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=479961r1=479960r2=479961 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Nov 28 01:33:48 2006 @@ -151,7 +151,7 @@ const char*doctype; int read_only; char **user_names; -int num_of_users; +unsigned int num_of_users; jk_worker_t worker; status_endpoint_t ep; jk_worker_env_t *we; @@ -2316,7 +2316,7 @@ if (w-num_of_users) { if (s-remote_user) { -int i; +unsigned int i; denied = 1; for (i = 0; i w-num_of_users; i++) { if (!strcmp(s-remote_user, w-user_names[i])) { @@ -2654,7 +2654,7 @@ JK_TRACE_ENTER(log); if (pThis pThis-worker_private) { status_worker_t *p = pThis-worker_private; -int i; +unsigned int i; p-we = we; p-css = jk_get_worker_style_sheet(props, p-name, NULL); p-ns = jk_get_worker_name_space(props, p-name, JK_NSDEF); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479963 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Nov 28 01:44:04 2006 New Revision: 479963 URL: http://svn.apache.org/viewvc?view=revrev=479963 Log: Adding back links to the form views (edit) of the status worker. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=479963r1=479962r2=479963 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Nov 28 01:44:04 2006 @@ -678,6 +678,13 @@ lb_worker_t *lb = NULL; JK_TRACE_ENTER(l); +if (single) { +jk_puts(s, hr/\n); +status_write_uri(s, Back to full worker list, JK_STATUS_CMD_LIST, + 0, 0, refresh, NULL, NULL); +jk_puts(s, br/\n); +from = JK_STATUS_CMD_SHOW; +} if (w-type == JK_LB_WORKER_TYPE) { lb = (lb_worker_t *)w-worker_private; name = lb-s-name; @@ -702,13 +709,6 @@ JK_TRACE_EXIT(l); return; } -if (single) { -jk_puts(s, hr/\n); -status_write_uri(s, Back to full worker list, JK_STATUS_CMD_LIST, - 0, 0, refresh, NULL, NULL); -jk_puts(s, br/\n); -from = JK_STATUS_CMD_SHOW; -} if (lb) { time_t now = time(NULL); @@ -1128,6 +1128,10 @@ lb_worker_t *lb = NULL; JK_TRACE_ENTER(l); +jk_puts(s, hr/\n); +status_write_uri(s, Back to worker view, from, + 0, 0, refresh, NULL, NULL); +jk_puts(s, br/\n); if (w-type == JK_LB_WORKER_TYPE) { lb = (lb_worker_t *)w-worker_private; name = lb-s-name; @@ -1272,6 +1276,11 @@ jk_log(l, JK_LOG_DEBUG, producing edit form for sub worker '%s' of lb worker '%s', wr-s-name, worker); + +jk_puts(s, hr/\n); +status_write_uri(s, Back to worker view, from, + 0, 0, refresh, NULL, NULL); +jk_puts(s, br/\n); jk_putv(s, hr/h3Edit worker settings for , wr-s-name, /h3\n, NULL); status_start_form(s, GET, JK_STATUS_CMD_UPDATE, @@ -1336,6 +1345,10 @@ unsigned int i; JK_TRACE_ENTER(l); +jk_puts(s, hr/\n); +status_write_uri(s, Back to worker view, from, + 0, 0, refresh, NULL, NULL); +jk_puts(s, br/\n); if (!attribute) { jk_log(l, JK_LOG_WARNING, missing request parameter '%s', - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r479969 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Tue Nov 28 01:56:10 2006 New Revision: 479969 URL: http://svn.apache.org/viewvc?view=revrev=479969 Log: Add easier to detect result message to the end of status worker output. Should help with automation. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=479969r1=479968r2=479969 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Tue Nov 28 01:56:10 2006 @@ -2609,14 +2609,30 @@ } if (err) { if (mime == JK_STATUS_MIME_HTML) { -jk_putv(s, pb, err, /b/p, NULL); +jk_putv(s, pbResult: ERROR - , err, /b/p, NULL); jk_putv(s, a href=\, s-req_uri, \JK Status Manager/a, NULL); } else if (mime == JK_STATUS_MIME_XML) { -jk_putv(s, Error, err, /Error, NULL); +jk_putv(s, , w-ns, result\n, NULL); +jk_puts(s,type=\ERROR\\n); +jk_putv(s,msg=\, err, \/\n, NULL); } else { -jk_puts(s, err); +jk_putv(s, ERROR - , err, NULL); +} +} +else { +if (mime == JK_STATUS_MIME_HTML) { +jk_puts(s, pbResult: OK - Action finished/b/p); +jk_putv(s, a href=\, s-req_uri, \JK Status Manager/a, NULL); +} +else if (mime == JK_STATUS_MIME_XML) { +jk_putv(s, , w-ns, result\n, NULL); +jk_puts(s,type=\OK\\n); +jk_puts(s,msg=\Action finished\/\n); +} +else { +jk_puts(s, OK - Action finished); } } if (mime == JK_STATUS_MIME_HTML) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481553 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 2 04:31:10 2006 New Revision: 481553 URL: http://svn.apache.org/viewvc?view=revrev=481553 Log: Replace - by _ in attribute name time-to-recover to make naming compliant with ant nameing restrictions (this helps for the jkstatus ant tasks). Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=481553r1=481552r2=481553 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 2 04:31:10 2006 @@ -972,7 +972,7 @@ if (rs lb-recover_wait_time - (int)difftime(now, wr-s-error_time)) rs += lb-maintain_time; } -jk_printf(s, time-to-recover=\%u\, rs 0 ? 0 : rs); +jk_printf(s, time_to_recover=\%u\, rs 0 ? 0 : rs); /* Terminate the tag */ jk_puts(s, /\n); } @@ -1104,7 +1104,7 @@ if (rs lb-recover_wait_time - (int)difftime(now, wr-s-error_time)) rs += lb-maintain_time; } -jk_printf(s, time-to-recover=%u\n, rs 0 ? 0 : rs); +jk_printf(s, time_to_recover=%u\n, rs 0 ? 0 : rs); } } else if (aw) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481556 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 2 05:14:02 2006 New Revision: 481556 URL: http://svn.apache.org/viewvc?view=revrev=481556 Log: Changing return type of argument passing in status worker to a three value type (JK_TRUE, JK_FALSE and JK_UNSET). JK_UNSET is used to distinguish an empty parameter from a missing one. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=481556r1=481555r2=481556 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 2 05:14:02 2006 @@ -342,7 +342,7 @@ return True; } -static char *status_get_arg_raw(const char *param, const char *req, char *buf, size_t len) +static int status_get_arg_raw(const char *param, const char *req, char *buf, size_t len) { char ps[32]; char *p; @@ -350,9 +350,9 @@ *buf = '\0'; if (!req) -return NULL; +return JK_FALSE; if (!param) -return NULL; +return JK_FALSE; sprintf(ps, %s=, param); p = strstr(req, ps); if (!p) { @@ -373,23 +373,25 @@ } buf[l] = '\0'; if (l) -return buf; +return JK_TRUE; else -return NULL; +return JK_UNSET; } else -return NULL; +return JK_FALSE; } -static const char *status_get_arg(const char *param, const char *req, char *buf, size_t len) +static int status_get_arg(const char *param, const char *req, char *buf, size_t len) { -if (status_get_arg_raw(param, req, buf, len)) { +int rv; + +rv = status_get_arg_raw(param, req, buf, len); +if (rv == JK_TRUE) { char *off = buf; while ((off = strpbrk(off, JK_STATUS_ESC_CHARS))) off[0] = '@'; -return buf; } -return NULL; +return rv; } static int status_get_int(const char *param, const char *req, int def) @@ -397,7 +399,7 @@ char buf[32]; int rv = def; -if (status_get_arg_raw(param, req, buf, sizeof(buf) -1)) { +if (status_get_arg_raw(param, req, buf, sizeof(buf)) == JK_TRUE) { rv = atoi(buf); } return rv; @@ -408,7 +410,7 @@ char buf[32]; int rv = def; -if (status_get_arg_raw(param, req, buf, sizeof(buf))) { +if (status_get_arg_raw(param, req, buf, sizeof(buf)) == JK_TRUE) { if (strcasecmp(buf, on) == 0 || strcasecmp(buf, true) == 0 || strcasecmp(buf, 1) == 0) @@ -549,16 +551,16 @@ *refresh = 0; if (!s-query_string) return; -if (status_get_arg_raw(JK_STATUS_ARG_CMD, s-query_string, buf, sizeof(buf))) +if (status_get_arg_raw(JK_STATUS_ARG_CMD, s-query_string, buf, sizeof(buf)) == JK_TRUE) *cmd = status_cmd_int(buf); -if (status_get_arg_raw(JK_STATUS_ARG_MIME, s-query_string, buf, sizeof(buf))) +if (status_get_arg_raw(JK_STATUS_ARG_MIME, s-query_string, buf, sizeof(buf)) == JK_TRUE) *mime = status_mime_int(buf); -if (status_get_arg_raw(JK_STATUS_ARG_FROM, s-query_string, buf, sizeof(buf))) +if (status_get_arg_raw(JK_STATUS_ARG_FROM, s-query_string, buf, sizeof(buf)) == JK_TRUE) *from = status_cmd_int(buf); *refresh = status_get_int(JK_STATUS_ARG_REFRESH, s-query_string, 0); -if (status_get_arg(JK_STATUS_ARG_WORKER, s-query_string, buf, sizeof(buf))) +if (status_get_arg(JK_STATUS_ARG_WORKER, s-query_string, buf, sizeof(buf)) == JK_TRUE) strncpy(worker, buf, JK_SHM_STR_SIZ); -if (status_get_arg(JK_STATUS_ARG_WORKER_MEMBER, s-query_string, buf, sizeof(buf))) +if (status_get_arg(JK_STATUS_ARG_WORKER_MEMBER, s-query_string, buf, sizeof(buf)) == JK_TRUE) strncpy(sub_worker, buf, JK_SHM_STR_SIZ); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, @@ -1553,6 +1555,7 @@ { char buf[128]; int rc = 0; +int rv; int i; JK_TRACE_ENTER(l); @@ -1580,8 +1583,8 @@ /* Recalculate the load multiplicators wrt. lb_factor */ rc |= 2; } -if (status_get_arg(JK_STATUS_ARG_LBM_ROUTE, - s-query_string, buf, sizeof(buf))) { +if ((rv = status_get_arg(JK_STATUS_ARG_LBM_ROUTE, + s-query_string, buf, sizeof(buf))) == JK_TRUE) { if (strncmp(wr-s-jvm_route, buf, JK_SHM_STR_SIZ)) { jk_log(l, JK_LOG_INFO, setting 'jvm_route' for sub worker '%s' of lb worker '%s' to '%s', @@ -1597,14 +1600,14 @@ } } } -else { +else if (rv == JK_UNSET) { jk_log(l, JK_LOG_INFO, resetting 'jvm_route' for sub worker '%s' of lb worker '%s', wr-s-name, worker); memset(wr-s-jvm_route, 0, JK_SHM_STR_SIZ
svn commit: r481759 - /tomcat/connectors/trunk/jk/tools/jkrelease.sh
Author: rjung Date: Sun Dec 3 03:59:36 2006 New Revision: 481759 URL: http://svn.apache.org/viewvc?view=revrev=481759 Log: Update JK release skript according to new documentation structure. Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh Modified: tomcat/connectors/trunk/jk/tools/jkrelease.sh URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/jkrelease.sh?view=diffrev=481759r1=481758r2=481759 == --- tomcat/connectors/trunk/jk/tools/jkrelease.sh (original) +++ tomcat/connectors/trunk/jk/tools/jkrelease.sh Sun Dec 3 03:59:36 2006 @@ -160,7 +160,7 @@ ;; esac rm -f CHANGES -${TOOL} ../docs/printer/changelog.html CHANGES 2/dev/null +${TOOL} ../docs/miscellaneous/printer/changelog.html CHANGES 2/dev/null if [ -f CHANGES -a -s CHANGES ] then failed=false @@ -175,7 +175,6 @@ fi # Export text docs -${TOOL} ../docs/printer/changelog.html CHANGES ${TOOL} ../docs/news/printer/20060101.html NEWS ${TOOL} ../docs/news/printer/20050101.html NEWS ${TOOL} ../docs/news/printer/20041100.html NEWS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481770 - in /tomcat/connectors/trunk/jk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ native/netscape/ xdocs/ajp/ xdocs/config/ xdocs/miscellaneous/
Author: rjung Date: Sun Dec 3 04:55:56 2006 New Revision: 481770 URL: http://svn.apache.org/viewvc?view=revrev=481770 Log: Rename jvm_route to route: - You can still use the old name in the worker configuration. In case of conflicts, the new name will win. - Added jvm_route to the deprecated list in the code and in the docs. - All log messages and the status worker will now only refer to route. - All internal implementation names have been changed as well. Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h tomcat/connectors/trunk/jk/native/common/jk_service.h tomcat/connectors/trunk/jk/native/common/jk_shm.h tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/native/common/jk_util.c tomcat/connectors/trunk/jk/native/common/jk_util.h tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/xdocs/ajp/ajpv13a.xml tomcat/connectors/trunk/jk/xdocs/ajp/ajpv13ext.xml tomcat/connectors/trunk/jk/xdocs/config/workers.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=481770r1=481769r2=481770 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Dec 3 04:55:56 2006 @@ -496,7 +496,7 @@ { request_rec *r = private_data-r; char *ssl_temp = NULL; -s-jvm_route = NULL;/* Used for sticky session routing */ +s-route = NULL;/* Used for sticky session routing */ /* Copy in function pointers (which are really methods) */ s-start_response = ws_start_response; @@ -2008,8 +2008,8 @@ ap_psprintf(r-pool, %.1ld.%.6ld, seconds, micro); ap_table_setn(r-notes, JK_NOTE_REQUEST_DURATION, duration); #endif -if (s.jvm_route *s.jvm_route) -ap_table_setn(r-notes, JK_NOTE_WORKER_ROUTE, s.jvm_route); +if (s.route *s.route) +ap_table_setn(r-notes, JK_NOTE_WORKER_ROUTE, s.route); request_log_transaction(r, conf); } } Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=481770r1=481769r2=481770 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Dec 3 04:55:56 2006 @@ -516,7 +516,7 @@ request_rec *r = private_data-r; char *ssl_temp = NULL; -s-jvm_route = NULL;/* Used for sticky session routing */ +s-route = NULL;/* Used for sticky session routing */ /* Copy in function pointers (which are really methods) */ s-start_response = ws_start_response; @@ -2101,8 +2101,8 @@ duration = apr_psprintf(r-pool, %.1ld.%.6ld, seconds, micro); apr_table_setn(r-notes, JK_NOTE_REQUEST_DURATION, duration); -if (s.jvm_route *s.jvm_route) -apr_table_setn(r-notes, JK_NOTE_WORKER_ROUTE, s.jvm_route); +if (s.route *s.route) +apr_table_setn(r-notes, JK_NOTE_WORKER_ROUTE, s.route); request_log_transaction(r, xconf); } Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?view=diffrev=481770r1=481769r2=481770 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Sun Dec 3 04:55:56 2006 @@ -400,7 +400,7 @@ ajpv12_sendstring(p, s-server_name) #endif ajpv12_sendint(p, s-server_port) ajpv12_sendstring(p, s-protocol) ajpv12_sendstring(p, 0) /* SERVER_SIGNATURE */ - ajpv12_sendstring(p, s-server_software) ajpv12_sendstring(p, s-jvm_route) /* JSERV_ROUTE */ + ajpv12_sendstring(p, s-server_software) ajpv12_sendstring(p, s-route) /* JSERV_ROUTE */ ajpv12_sendstring(p, ) /* JSERV
svn commit: r481775 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c xdocs/config/apache.xml xdocs/miscellaneous/changelog.xml xdocs/webserver_howto/apache.xml
Author: rjung Date: Sun Dec 3 05:57:46 2006 New Revision: 481775 URL: http://svn.apache.org/viewvc?view=revrev=481775 Log: Apache: Fix incorrect handling of JkEnvVar when Vars are set multiple times. Allow omitting of default value (which means default is empty string). Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diffrev=481775r1=481774r2=481775 == --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Dec 3 05:57:46 2006 @@ -1681,7 +1681,10 @@ jk_module); -ap_table_add(conf-envvars, env_name, default_value); +/* env_name is mandatory, default_value is optional. + * No value means set the variable to an empty string. + */ +ap_table_setn(conf-envvars, env_name, default_value ? default_value : ); return NULL; } @@ -1843,8 +1846,9 @@ * JkEnvVar let user defines envs var passed from WebServer to * Servlet Engine */ -{JkEnvVar, jk_add_env_var, NULL, RSRC_CONF, TAKE2, - Adds a name of environment variable that should be sent to servlet-engine}, +{JkEnvVar, jk_add_env_var, NULL, RSRC_CONF, TAKE12, + Adds a name of environment variable and an optional value + that should be sent to servlet-engine}, {JkWorkerProperty, jk_set_worker_property, NULL, RSRC_CONF, RAW_ARGS, Set workers.properties formated directive}, @@ -2197,9 +2201,20 @@ overrides-options |= (base-options ~base-exclude_options); if (base-envvars_in_use) { -overrides-envvars_in_use = JK_TRUE; -overrides-envvars = ap_overlay_tables(p, overrides-envvars, - base-envvars); +int i; +const array_header *arr; +const table_entry *elts; + +arr = ap_table_elts(base-envvars); +if (arr) { +overrides-envvars_in_use = JK_TRUE; +elts = (const table_entry *)arr-elts; +for (i = 0; i arr-nelts; ++i) { +if (!ap_table_get(overrides-envvars, elts[i].key)) { +ap_table_setn(overrides-envvars, elts[i].key, elts[i].val); +} +} +} } if (overrides-mount_file_reload == JK_UNSET) Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diffrev=481775r1=481774r2=481775 == --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Dec 3 05:57:46 2006 @@ -1711,7 +1711,10 @@ conf-envvars_in_use = JK_TRUE; -apr_table_add(conf-envvars, env_name, default_value); +/* env_name is mandatory, default_value is optional. + * No value means set the variable to an empty string. + */ +apr_table_setn(conf-envvars, env_name, default_value ? default_value : ); return NULL; } @@ -1885,9 +1888,9 @@ * JkEnvVar let user defines envs var passed from WebServer to * Servlet Engine */ -AP_INIT_TAKE2(JkEnvVar, jk_add_env_var, NULL, RSRC_CONF, - Adds a name of environment variable that should be sent - to servlet-engine), +AP_INIT_TAKE12(JkEnvVar, jk_add_env_var, NULL, RSRC_CONF, + Adds a name of environment variable and an optional value + that should be sent to servlet-engine), AP_INIT_RAW_ARGS(JkWorkerProperty, jk_set_worker_property, NULL, RSRC_CONF, @@ -2323,9 +2326,20 @@ overrides-options |= (base-options ~base-exclude_options); if (base-envvars_in_use) { -overrides-envvars_in_use = JK_TRUE; -overrides-envvars = apr_table_overlay(p, overrides-envvars, - base-envvars); +int i; +const apr_array_header_t *arr; +const apr_table_entry_t *elts; + +arr = apr_table_elts(base-envvars); +if (arr) { +overrides-envvars_in_use = JK_TRUE; +elts = (const apr_table_entry_t *)arr-elts; +for (i = 0; i arr-nelts; ++i) { +if (!apr_table_get(overrides-envvars, elts[i].key)) { +apr_table_setn(overrides-envvars, elts[i].key, elts[i].val
svn commit: r482060 - in /tomcat/connectors/trunk/jk/native/common: jk_util.c jk_util.h
Author: rjung Date: Sun Dec 3 20:28:07 2006 New Revision: 482060 URL: http://svn.apache.org/viewvc?view=revrev=482060 Log: Cleanup jk_util.c a little: - num_of_wokers - num_of_workers - use num instead of num_* mostly Add three more properties for use in status worker: - prefix to define a prefix for the property output type - good and bad rating to make the good and bad summary for lb in status worker configurable Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c tomcat/connectors/trunk/jk/native/common/jk_util.h Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diffrev=482060r1=482059r2=482060 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Dec 3 20:28:07 2006 @@ -81,9 +81,12 @@ #define NAMESPACE_OF_WORKER (ns) #define XML_NAMESPACE_OF_WORKER (xmlns) #define XML_DOCTYPE_OF_WORKER (doctype) +#define PROP_PREFIX_OF_WORKER (prefix) #define READ_ONLY_OF_WORKER (read_only) #define USER_OF_WORKER (user) +#define GOOD_RATING_OF_WORKER (good) +#define BAD_RATING_OF_WORKER(bad) #define DEFAULT_WORKER_TYPE JK_AJP13_WORKER_NAME #define SECRET_KEY_OF_WORKER(secretkey) @@ -131,6 +134,8 @@ BALANCE_WORKERS, MOUNT_OF_WORKER, USER_OF_WORKER, +GOOD_RATING_OF_WORKER, +BAD_RATING_OF_WORKER, list, NULL }; @@ -174,6 +179,7 @@ NAMESPACE_OF_WORKER, XML_NAMESPACE_OF_WORKER, XML_DOCTYPE_OF_WORKER, +PROP_PREFIX_OF_WORKER, NULL }; @@ -804,19 +810,19 @@ return jk_map_get_string(m, buf, NULL); } -int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_wokers) +int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_workers) { -if (m list num_of_wokers) { +if (m list num_of_workers) { char **ar = jk_map_get_string_list(m, WORKER_LIST_PROPERTY_NAME, -num_of_wokers, +num_of_workers, DEFAULT_WORKER); if (ar) { *list = ar; return JK_TRUE; } *list = NULL; -*num_of_wokers = 0; +*num_of_workers = 0; } return JK_FALSE; @@ -1049,6 +1055,16 @@ return jk_map_get_string(m, buf, def); } +const char *jk_get_worker_prop_prefix(jk_map_t *m, const char *wname, const char *def) +{ +char buf[1024]; +if (!m || !wname) { +return NULL; +} +MAKE_WORKER_PARAM(PROP_PREFIX_OF_WORKER); +return jk_map_get_string(m, buf, def); +} + int jk_get_is_read_only(jk_map_t *m, const char *wname) { int rc = JK_FALSE; @@ -1065,21 +1081,65 @@ int jk_get_worker_user_list(jk_map_t *m, const char *wname, -char ***list, unsigned int *num_of_users) +char ***list, unsigned int *num) { char buf[1024]; -if (m list num_of_users wname) { +if (m list num wname) { char **ar = NULL; MAKE_WORKER_PARAM(USER_OF_WORKER); -ar = jk_map_get_string_list(m, buf, num_of_users, NULL); +ar = jk_map_get_string_list(m, buf, num, NULL); +if (ar) { +*list = ar; +return JK_TRUE; +} +*list = NULL; +*num = 0; +} + +return JK_FALSE; +} + +int jk_get_worker_good_rating(jk_map_t *m, + const char *wname, + char ***list, unsigned int *num) +{ +char buf[1024]; + +if (m list num wname) { +char **ar = NULL; + +MAKE_WORKER_PARAM(GOOD_RATING_OF_WORKER); +ar = jk_map_get_string_list(m, buf, num, NULL); +if (ar) { +*list = ar; +return JK_TRUE; +} +*list = NULL; +*num = 0; +} + +return JK_FALSE; +} + +int jk_get_worker_bad_rating(jk_map_t *m, + const char *wname, + char ***list, unsigned int *num) +{ +char buf[1024]; + +if (m list num wname) { +char **ar = NULL; + +MAKE_WORKER_PARAM(BAD_RATING_OF_WORKER); +ar = jk_map_get_string_list(m, buf, num, NULL); if (ar) { *list = ar; return JK_TRUE; } *list = NULL; -*num_of_users = 0; +*num = 0; } return JK_FALSE; @@ -1087,28 +1147,28 @@ int jk_get_lb_worker_list(jk_map_t *m, const char *wname, - char ***list, unsigned int *num_of_wokers) + char ***list, unsigned int *num_of_workers) { char buf[1024
svn commit: r482072 [1/2] - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Dec 3 20:57:49 2006 New Revision: 482072 URL: http://svn.apache.org/viewvc?view=revrev=482072 Log: Further improvements for the status worker: - New output style mime=prop for property type output. Format includes lines for attributes mount, balance_workers, list - New cmd=version (only shows version numbers, no worker data) - New lb view without sub workers (add opt=nosw) - good/bad/degraded: the mapping of (activation,state) to good/bad is now configurable - Renamed request param att - opt - Renamed some DEF constants - Added Headings (Legend, LB list, AJP list) - Fixed copyright placement as page footer - consistent grouping of lb and non-lb workers for cmd=list for all mime types - Added id to map display, because we have no other primary key for maps - Changed description of N/A in legend to Unknown, because Not Available was misleading. - Some more Logging - Automatic handling of the opt request attribute - More and consistent navigation - Use more string constants instead of jk_p(uts|utv|rintf) - Utility functions for xml and property output - Better parameter validation - Killed a bit of redundant code across mime types (still much left) - renamed logger log to l Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r482084 - in /tomcat/connectors/trunk/jk/xdocs: config/workers.xml miscellaneous/changelog.xml
Author: rjung Date: Sun Dec 3 21:26:26 2006 New Revision: 482084 URL: http://svn.apache.org/viewvc?view=revrev=482084 Log: Update docs and changelog with last status worker extensions. Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?view=diffrev=482084r1=482083r2=482084 == --- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Sun Dec 3 21:26:26 2006 @@ -381,10 +381,69 @@ /p /directive directive name=user default= required=false -This directive can be used mutltiple times. It is a list of users +It is a list of users which gets compared to the user name authenticated by the web server. If the name is not contained in this list, access is denied. Per default the list is empty and then access is allowed to anybody. +p +This directive can be used multiple times. +/p +p +This feature has been added in bjk 1.2.20/b. +/p +/directive +directive name=good default=a.o,a.n,a.b,a.r required=false +For every load balancer worker, the status worker shows a summary +of the state of its members. There are three such states, +good, bad and degraded. +p +These states are determined depending on the activation of the members +(active, disabled, stopped) and their runtime state +(ok, n/a, busy, recovering, error). +By default, members are assumed to be good, if their activation +is active and their runtime state is not error. +/p +p +You can change this mapping, by assigning a list of values to the +attribute good. Each value gives a possible match for the members, +and one match suffices. Each value is either a single character, or two +characters combined with a dot .. The single characters are the +first characters in the words active, disabled, stopped, +ok, na, busy, recovering, error. If a value consists only +of a single character, then all members with this activation or runtime +state will be assumed good. A combination of an activation and a runtime +state concatenated with a dot . does only apply to a member, that has +exactly this activation and state. +/p +p +Members of a load balancer will first be matched against the state bad, +if they don't match, the state good will be tried, and if they +still don't match, their state will be degraded. +/p +p +This directive can be used multiple times. +/p +p +This feature has been added in bjk 1.2.20/b. +/p +/directive +directive name=bad default=s,e required=false +See: good. +p +By default, members are assumed to be bad, if their activation +is stopped or their runtime state is error. +/p +p +This directive can be used multiple times. +/p +p +This feature has been added in bjk 1.2.20/b. +/p +/directive +directive name=prefix default=worker required=false +The prefix, which will be used by the status worker +when producing properties output (mime=prop). +Each property keyy will be prefixed by this value. p This feature has been added in bjk 1.2.20/b. /p Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diffrev=482084r1=482083r2=482084 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Dec 3 21:26:26 2006 @@ -26,6 +26,19 @@ br / subsection name=Native changelog + update + Status Worker: Add directive to make property prefix + and good/bad rule configurable. (rjung) + /update + update + Status Worker: Omit lb members when att=nosw. (rjung) + /update + update + Status Worker: New command cmd=version for a short version output. (rjung) + /update + update + Status Worker: New output stype mime=prop produces property lists. (rjung) + /update fix Apache: Fix incorrect handling of JkEnvVar when Vars are set multiple times. (rjung) /fix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r482086 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sun Dec 3 21:32:36 2006 New Revision: 482086 URL: http://svn.apache.org/viewvc?view=revrev=482086 Log: Fix a couple of compiler warnings. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=482086r1=482085r2=482086 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sun Dec 3 21:32:36 2006 @@ -388,9 +388,9 @@ return rc; } -static int jk_print_xml_start_elt(jk_ws_service_t *s, status_worker_t *sw, - int indentation, int close_tag, - const char *name) +static void jk_print_xml_start_elt(jk_ws_service_t *s, status_worker_t *sw, + int indentation, int close_tag, + const char *name) { if (close_tag) { jk_printf(s, %*s%s%s\n, indentation, , sw-ns, name); @@ -400,15 +400,15 @@ } } -static int jk_print_xml_close_elt(jk_ws_service_t *s, status_worker_t *sw, - int indentation, - const char *name) +static void jk_print_xml_close_elt(jk_ws_service_t *s, status_worker_t *sw, + int indentation, + const char *name) { jk_printf(s, %*s/%s%s\n, indentation, , sw-ns, name); } -static int jk_print_xml_stop_elt(jk_ws_service_t *s, - int indentation, int close_tag) +static void jk_print_xml_stop_elt(jk_ws_service_t *s, + int indentation, int close_tag) { if (close_tag) { jk_printf(s, %*s/\n, indentation, ); @@ -418,44 +418,44 @@ } } -static int jk_print_xml_att_string(jk_ws_service_t *s, - int indentation, - const char *key, const char *value) +static void jk_print_xml_att_string(jk_ws_service_t *s, +int indentation, +const char *key, const char *value) { jk_printf(s, %*s%s=\%s\\n, indentation, , key, value ? value : ); } -static int jk_print_xml_att_int(jk_ws_service_t *s, -int indentation, -const char *key, int value) +static void jk_print_xml_att_int(jk_ws_service_t *s, + int indentation, + const char *key, int value) { jk_printf(s, %*s%s=\%d\\n, indentation, , key, value); } -static int jk_print_xml_att_uint(jk_ws_service_t *s, - int indentation, - const char *key, unsigned value) +static void jk_print_xml_att_uint(jk_ws_service_t *s, + int indentation, + const char *key, unsigned value) { jk_printf(s, %*s%s=\%u\\n, indentation, , key, value); } -static int jk_print_xml_att_uint32(jk_ws_service_t *s, - int indentation, - const char *key, jk_uint32_t value) +static void jk_print_xml_att_uint32(jk_ws_service_t *s, +int indentation, +const char *key, jk_uint32_t value) { jk_printf(s, %*s%s=\% JK_UINT32_T_FMT \\n, indentation, , key, value); } -static int jk_print_xml_att_uint64(jk_ws_service_t *s, - int indentation, - const char *key, jk_uint64_t value) +static void jk_print_xml_att_uint64(jk_ws_service_t *s, +int indentation, +const char *key, jk_uint64_t value) { jk_printf(s, %*s%s=\% JK_UINT64_T_FMT \\n, indentation, , key, value); } -static int jk_print_prop_att_string(jk_ws_service_t *s, status_worker_t *sw, -const char *name, -const char *key, const char *value) +static void jk_print_prop_att_string(jk_ws_service_t *s, status_worker_t *sw, + const char *name, + const char *key, const char *value) { if (name) { jk_printf(s, %s.%s.%s=%s\n, sw-prefix, name, key, value ? value : ); @@ -465,9 +465,9 @@ } } -static int jk_print_prop_att_int(jk_ws_service_t *s, status_worker_t *sw, - const char *name, - const char *key, int value) +static void jk_print_prop_att_int(jk_ws_service_t *s, status_worker_t *sw, + const char
svn commit: r482756 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
Author: rjung Date: Tue Dec 5 12:13:48 2006 New Revision: 482756 URL: http://svn.apache.org/viewvc?view=revrev=482756 Log: Dropping one of the two jk_endpoint members of the lb_endpoint. I could find not s single line apart from the deleted, where the jk_endpoint named e was used. Also tests showed, it was always NULL. Maybe e was supposed to be the endpoint of an lb member that actually services the request, but this endpoint is called end and onl lived in the lb service method locally. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=482756r1=482755r2=482756 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Tue Dec 5 12:13:48 2006 @@ -79,7 +79,6 @@ struct lb_endpoint { -jk_endpoint_t *e; lb_worker_t *worker; jk_endpoint_t endpoint; @@ -1098,10 +1097,6 @@ if (e *e (*e)-endpoint_private) { lb_endpoint_t *p = (*e)-endpoint_private; -if (p-e) { -p-e-done(p-e, l); -} - free(p); *e = NULL; JK_TRACE_EXIT(l); @@ -1303,7 +1298,6 @@ if (pThis pThis-worker_private pend) { lb_endpoint_t *p = (lb_endpoint_t *) malloc(sizeof(lb_endpoint_t)); -p-e = NULL; p-worker = pThis-worker_private; p-endpoint.endpoint_private = p; p-endpoint.service = service; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483087 - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ config/ generic_howto/ miscellaneous/ news/ reference/ webserver_howto/
Author: rjung Date: Wed Dec 6 06:20:35 2006 New Revision: 483087 URL: http://svn.apache.org/viewvc?view=revrev=483087 Log: Renaming the config dir of the docs to reference and using the title Reference Guide in the docs. Added: tomcat/connectors/trunk/jk/xdocs/reference/ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml - copied unchanged from r483077, tomcat/connectors/trunk/jk/xdocs/config/apache.xml tomcat/connectors/trunk/jk/xdocs/reference/iis.xml - copied unchanged from r483077, tomcat/connectors/trunk/jk/xdocs/config/iis.xml tomcat/connectors/trunk/jk/xdocs/reference/project.xml - copied, changed from r483077, tomcat/connectors/trunk/jk/xdocs/config/project.xml tomcat/connectors/trunk/jk/xdocs/reference/uriworkermap.xml - copied unchanged from r483077, tomcat/connectors/trunk/jk/xdocs/config/uriworkermap.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml - copied, changed from r483077, tomcat/connectors/trunk/jk/xdocs/config/workers.xml Removed: tomcat/connectors/trunk/jk/xdocs/config/ Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml tomcat/connectors/trunk/jk/xdocs/build.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml tomcat/connectors/trunk/jk/xdocs/index.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/faq.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml tomcat/connectors/trunk/jk/xdocs/news/20060101.xml tomcat/connectors/trunk/jk/xdocs/news/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/iis.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/nes.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?view=diffrev=483087r1=483086r2=483087 == --- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Wed Dec 6 06:20:35 2006 @@ -13,11 +13,11 @@ item name=Docs Home href=../index.html/ /menu -menu name=Configuration Reference -item name=Workers.properties href=../config/workers.html/ -item name=Uriworkermap.properties href=../config/uriworkermap.html/ -item name=Apache href=../config/apache.html/ -item name=IIShref=../config/iis.html/ +menu name=Reference Guide +item name=Workers.properties href=../reference/workers.html/ +item name=Uriworkermap.properties href=../reference/uriworkermap.html/ +item name=Apache href=../reference/apache.html/ +item name=IIShref=../reference/iis.html/ /menu menu name=Generic HowTo @@ -53,4 +53,4 @@ /menu /body -/project \ No newline at end of file +/project Modified: tomcat/connectors/trunk/jk/xdocs/build.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/build.xml?view=diffrev=483087r1=483086r2=483087 == --- tomcat/connectors/trunk/jk/xdocs/build.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/build.xml Wed Dec 6 06:20:35 2006 @@ -64,18 +64,18 @@ param name=project-menu expression=nomenu/ /style -!-- Configuration Reference -- -style basedir=config - destdir=${build.dir}/${dist.name}/config +!-- Reference Guide -- +style basedir=reference + destdir=${build.dir}/${dist.name}/reference extension=.html style=style.xsl excludes=project.xml includes=*.xml param name=relative-path expression=../ /style -mkdir dir=${build.dir}/${dist.name}/config/printer/ -style basedir=config - destdir=${build.dir}/${dist.name}/config/printer +mkdir dir=${build.dir}/${dist.name}/reference/printer/ +style basedir=reference + destdir=${build.dir}/${dist.name}/reference/printer extension=.html style=style.xsl excludes=project.xml Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml?view=diffrev=483087r1=483086r2=483087 == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/loadbalancers.xml Wed Dec
svn commit: r483115 [1/2] - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Wed Dec 6 07:36:46 2006 New Revision: 483115 URL: http://svn.apache.org/viewvc?view=revrev=483115 Log: Last huge status worker renovation for 1.2.20: Adding a jk_map which holds all the request properties to the status_endpoint_t. As a consequence, the endpoint is no longer static. Added also hide features to all sections of the display, so one can easily shrink the view to the information one wants to follow. And now on to documenting this beast. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483244 - in /tomcat/connectors/trunk/jk/xdocs: ./ ajp/ generic_howto/ miscellaneous/ news/ reference/ webserver_howto/
Author: rjung Date: Wed Dec 6 13:37:59 2006 New Revision: 483244 URL: http://svn.apache.org/viewvc?view=revrev=483244 Log: Added status worker reference page. Added: tomcat/connectors/trunk/jk/xdocs/reference/status.xml (with props) Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml tomcat/connectors/trunk/jk/xdocs/index.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml tomcat/connectors/trunk/jk/xdocs/news/20060101.xml tomcat/connectors/trunk/jk/xdocs/news/project.xml tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/reference/project.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml tomcat/connectors/trunk/jk/xdocs/webserver_howto/project.xml Modified: tomcat/connectors/trunk/jk/xdocs/ajp/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/ajp/project.xml?view=diffrev=483244r1=483243r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/ajp/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/ajp/project.xml Wed Dec 6 13:37:59 2006 @@ -14,8 +14,9 @@ /menu menu name=Reference Guide -item name=Workers.properties href=../reference/workers.html/ -item name=Uriworkermap.properties href=../reference/uriworkermap.html/ +item name=workers.properties href=../reference/workers.html/ +item name=uriworkermap.properties href=../reference/uriworkermap.html/ +item name=Status Worker href=../reference/status.html/ item name=Apache href=../reference/apache.html/ item name=IIShref=../reference/iis.html/ /menu Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml?view=diffrev=483244r1=483243r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/generic_howto/project.xml Wed Dec 6 13:37:59 2006 @@ -14,8 +14,9 @@ /menu menu name=Reference Guide -item name=Workers.properties href=../reference/workers.html/ -item name=Uriworkermap.properties href=../reference/uriworkermap.html/ +item name=workers.properties href=../reference/workers.html/ +item name=uriworkermap.properties href=../reference/uriworkermap.html/ +item name=Status Worker href=../reference/status.html/ item name=Apache href=../reference/apache.html/ item name=IIShref=../reference/iis.html/ /menu Modified: tomcat/connectors/trunk/jk/xdocs/index.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?view=diffrev=483244r1=483243r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/index.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/index.xml Wed Dec 6 13:37:59 2006 @@ -29,7 +29,7 @@ section name=Headlines br / ul -lia href=news/20060101.html#20060928.128 November 2006 - bJK-1.2.20 released/b/a +lia href=news/20060101.html#20061210.110 December 2006 - bJK-1.2.20 released/b/a pThe Apache Tomcat team is proud to announce the immediate availability of Tomcat Connectors 1.2.20 Stable. /p Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diffrev=483244r1=483243r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Wed Dec 6 13:37:59 2006 @@ -27,6 +27,9 @@ subsection name=Native changelog update + Docs: New reference guide page for status worker. (rjung) + /update + update Docs: Renaming the config dir to reference and using the title Reference Guide in the docs. (rjung) /update Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml?view=diffrev=483244r1=483243r2=483244 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/project.xml Wed Dec 6 13:37:59 2006 @@ -14,8 +14,9 @@ /menu menu name=Reference Guide -item name=Workers.properties
svn commit: r485049 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml
Author: rjung Date: Sat Dec 9 11:30:54 2006 New Revision: 485049 URL: http://svn.apache.org/viewvc?view=revrev=485049 Log: Adding version information and compatibility disclaimers to the new status worker documentation page. Modified: tomcat/connectors/trunk/jk/xdocs/reference/status.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/status.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/status.xml?view=diffrev=485049r1=485048r2=485049 == --- tomcat/connectors/trunk/jk/xdocs/reference/status.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/status.xml Sat Dec 9 11:30:54 2006 @@ -35,6 +35,9 @@ complete coverage of the various request parameters and their meaning, so that you can include the status worker in your automation scripts. /p +p +The documentation of the status worker starts with bjk 1.2.20/b +/p /section section name=Usage Patterns @@ -299,6 +302,13 @@ section name=Request Parameters br/ +p +This section should help you building automation scripts based on the jk status +management interface. This interface is still not stable, we expect further +improvements in the next releases. It is well possible, that the request parameters +might change in an incompatible way. So be prepared to change you scripts when +updating to future versions. +/p subsection name=Actions br/ p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r485059 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 9 12:49:27 2006 New Revision: 485059 URL: http://svn.apache.org/viewvc?view=revrev=485059 Log: Don't use abbreviations in the output of the status worker. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=485059r1=485058r2=485059 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 9 12:49:27 2006 @@ -2433,7 +2433,7 @@ jk_printf(s, Balancer Workers: count=%d\n, count); } else if (mime == JK_STATUS_MIME_PROP) { -jk_print_prop_att_int(s, w, NULL, lb_cnt, count); +jk_print_prop_att_int(s, w, NULL, lb_count, count); } else { jk_printf(s, hr/h2Listing Load Balancing Worker%s (%d Worker%s) [, @@ -2465,7 +2465,7 @@ jk_printf(s, AJP Workers: count=%d\n, count); } else if (mime == JK_STATUS_MIME_PROP) { -jk_print_prop_att_int(s, w, NULL, ajp_cnt, count); +jk_print_prop_att_int(s, w, NULL, ajp_count, count); } else { jk_printf(s, hr/h2Listing AJP Worker%s (%d Worker%s) [, @@ -3228,18 +3228,18 @@ else if (mime == JK_STATUS_MIME_XML) { jk_print_xml_start_elt(s, w, 2, 0, result); jk_print_xml_att_string(s, 4, type, ERROR); -jk_print_xml_att_string(s, 4, msg, err); +jk_print_xml_att_string(s, 4, message, err); jk_print_xml_stop_elt(s, 2, 1); } else if (mime == JK_STATUS_MIME_TXT) { jk_puts(s, Result:); jk_printf(s, type=%s, ERROR); -jk_printf(s, msg=\%s\, err); +jk_printf(s, message=\%s\, err); jk_puts(s, \n); } else { jk_print_prop_att_string(s, w, result, type, ERROR); -jk_print_prop_att_string(s, w, result, msg, err); +jk_print_prop_att_string(s, w, result, message, err); } } else { @@ -3249,18 +3249,18 @@ else if (mime == JK_STATUS_MIME_XML) { jk_print_xml_start_elt(s, w, 2, 0, result); jk_print_xml_att_string(s, 4, type, OK); -jk_print_xml_att_string(s, 4, msg, Action finished); +jk_print_xml_att_string(s, 4, message, Action finished); jk_print_xml_stop_elt(s, 2, 1); } else if (mime == JK_STATUS_MIME_TXT) { jk_puts(s, Result:); jk_printf(s, type=%s, OK); -jk_printf(s, msg=\%s\, Action finished); +jk_printf(s, message=\%s\, Action finished); jk_puts(s, \n); } else { jk_print_prop_att_string(s, w, result, type, OK); -jk_print_prop_att_string(s, w, result, msg, Action finished); +jk_print_prop_att_string(s, w, result, message, Action finished); } } if (mime == JK_STATUS_MIME_HTML) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r485089 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 9 15:32:04 2006 New Revision: 485089 URL: http://svn.apache.org/viewvc?view=revrev=485089 Log: status worker fixes: - use int format instead of unsigned int. - update vars before logging them Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=485089r1=485088r2=485089 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 9 15:32:04 2006 @@ -1,4 +1,3 @@ -// amp; encoding+// versions with show (hide?), hr /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -222,12 +221,12 @@ td% JK_UINT32_T_FMT /td \ td%s/td \ td%s/td \ - td%u/td \ - td%u/td \ + td%d/td \ + td%d/td \ td%s/td \ td%s/td \ td%s/td \ - td%u/td \ + td%d/td \ /tr\n typedef struct status_worker status_worker_t; @@ -444,13 +443,6 @@ jk_printf(s, %*s%s=\%d\\n, indentation, , key, value); } -static void jk_print_xml_att_uint(jk_ws_service_t *s, - int indentation, - const char *key, unsigned value) -{ -jk_printf(s, %*s%s=\%u\\n, indentation, , key, value); -} - static void jk_print_xml_att_uint32(jk_ws_service_t *s, int indentation, const char *key, jk_uint32_t value) @@ -489,18 +481,6 @@ } } -static void jk_print_prop_att_uint(jk_ws_service_t *s, status_worker_t *w, - const char *name, - const char *key, unsigned value) -{ -if (name) { -jk_printf(s, %s.%s.%s=%u\n, w-prefix, name, key, value); -} -else { -jk_printf(s, %s.%s=%u\n, w-prefix, key, value); -} -} - static void jk_print_prop_att_uint32(jk_ws_service_t *s, status_worker_t *w, const char *name, const char *key, jk_uint32_t value) @@ -1394,9 +1374,9 @@ jk_print_xml_att_uint32(s, 8, client_errors, wr-s-client_errors); jk_print_xml_att_uint64(s, 8, transferred, wr-s-transferred); jk_print_xml_att_uint64(s, 8, read, wr-s-readed); -jk_print_xml_att_uint(s, 8, busy, wr-s-busy); -jk_print_xml_att_uint(s, 8, max_busy, wr-s-max_busy); -jk_print_xml_att_uint(s, 8, time_to_recover, rs 0 ? 0 : rs); +jk_print_xml_att_int(s, 8, busy, wr-s-busy); +jk_print_xml_att_int(s, 8, max_busy, wr-s-max_busy); +jk_print_xml_att_int(s, 8, time_to_recover, rs 0 ? 0 : rs); /* Terminate the tag */ jk_print_xml_stop_elt(s, 6, 1); @@ -1423,9 +1403,9 @@ jk_printf(s, client_errors=% JK_UINT32_T_FMT, wr-s-client_errors); jk_printf(s, transferred=% JK_UINT64_T_FMT, wr-s-transferred); jk_printf(s, read=% JK_UINT64_T_FMT, wr-s-readed); -jk_printf(s, busy=%u, wr-s-busy); -jk_printf(s, max_busy=%u, wr-s-max_busy); -jk_printf(s, time_to_recover=%u, rs 0 ? 0 : rs); +jk_printf(s, busy=%d, wr-s-busy); +jk_printf(s, max_busy=%d, wr-s-max_busy); +jk_printf(s, time_to_recover=%d, rs 0 ? 0 : rs); jk_puts(s, \n); } @@ -1450,9 +1430,9 @@ jk_print_prop_att_uint32(s, w, wr-s-name, client_errors, wr-s-client_errors); jk_print_prop_att_uint64(s, w, wr-s-name, transferred, wr-s-transferred); jk_print_prop_att_uint64(s, w, wr-s-name, read, wr-s-readed); -jk_print_prop_att_uint(s, w, wr-s-name, busy, wr-s-busy); -jk_print_prop_att_uint(s, w, wr-s-name, max_busy, wr-s-max_busy); -jk_print_prop_att_uint(s, w, wr-s-name, time_to_recover, rs 0 ? 0 : rs); +jk_print_prop_att_int(s, w, wr-s-name, busy, wr-s-busy); +jk_print_prop_att_int(s, w, wr-s-name, max_busy, wr-s-max_busy
svn commit: r485091 - in /tomcat/connectors/trunk/jk/native/common: jk_map.c jk_status.c jk_util.c jk_util.h
Author: rjung Date: Sat Dec 9 15:41:01 2006 New Revision: 485091 URL: http://svn.apache.org/viewvc?view=revrev=485091 Log: Introduce general pupose conversion function int - string and string - int. Use it in map and in status worker. Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/native/common/jk_util.c tomcat/connectors/trunk/jk/native/common/jk_util.h Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diffrev=485091r1=485090r2=485091 == --- tomcat/connectors/trunk/jk/native/common/jk_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_map.c Sat Dec 9 15:41:01 2006 @@ -234,21 +234,12 @@ int jk_map_get_bool(jk_map_t *m, const char *name, int def) { char buf[100]; -size_t len; const char *rc; -int rv = 0; sprintf(buf, %d, def); rc = jk_map_get_string(m, name, buf); -len = strlen(rc); -if (len) { -if (strcasecmp(rc, true) == 0 || -*rc == 'Y' || *rc == 'y' || *rc == '1') { -rv = 1; -} -} -return rv; +return jk_get_bool_code(rc, def); } char **jk_map_get_string_list(jk_map_t *m, Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=485091r1=485090r2=485091 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 9 15:41:01 2006 @@ -689,14 +689,6 @@ } -static const char *status_val_bool(int v) -{ -if (v == 0) -return False; -else -return True; -} - static int status_get_string(status_endpoint_t *p, const char *param, const char *def, @@ -742,19 +734,11 @@ jk_logger_t *l) { const char *arg; -int rv = def; if (status_get_string(p, param, NULL, arg, l) == JK_TRUE) { -if (strcasecmp(arg, on) == 0 || -strcasecmp(arg, true) == 0 || -strcasecmp(arg, 1) == 0) -rv = 1; -else if (strcasecmp(arg, off) == 0 || -strcasecmp(arg, false) == 0 || -strcasecmp(arg, 0) == 0) -rv = 0; +return jk_get_bool_code(arg, def); } -return rv; +return def; } const char *status_cmd_text(int cmd) @@ -1213,8 +1197,8 @@ jk_puts(s, table JK_STATUS_SHOW_LB_HEAD); jk_printf(s, JK_STATUS_SHOW_LB_ROW, status_worker_type(JK_LB_WORKER_TYPE), - status_val_bool(lb-sticky_session), - status_val_bool(lb-sticky_session_force), + jk_get_bool(lb-sticky_session), + jk_get_bool(lb-sticky_session_force), lb-retries, jk_lb_get_method(lb, l), jk_lb_get_lock(lb, l), @@ -1237,8 +1221,8 @@ jk_print_xml_start_elt(s, w, 2, 0, balancer); jk_print_xml_att_string(s, 4, name, name); jk_print_xml_att_string(s, 4, type, status_worker_type(JK_LB_WORKER_TYPE)); -jk_print_xml_att_string(s, 4, sticky_session, status_val_bool(lb-sticky_session)); -jk_print_xml_att_string(s, 4, sticky_session_force, status_val_bool(lb-sticky_session_force)); +jk_print_xml_att_string(s, 4, sticky_session, jk_get_bool(lb-sticky_session)); +jk_print_xml_att_string(s, 4, sticky_session_force, jk_get_bool(lb-sticky_session_force)); jk_print_xml_att_int(s, 4, retries, lb-retries); jk_print_xml_att_int(s, 4, recover_time, lb-recover_wait_time); jk_print_xml_att_string(s, 4, method, jk_lb_get_method(lb, l)); @@ -1257,8 +1241,8 @@ jk_puts(s, Balancer Worker:); jk_printf(s, name=%s, name); jk_printf(s, type=%s, status_worker_type(JK_LB_WORKER_TYPE)); -jk_printf(s, sticky_session=%s, status_val_bool(lb-sticky_session)); -jk_printf(s, sticky_session_force=%s, status_val_bool(lb-sticky_session_force)); +jk_printf(s, sticky_session=%s, jk_get_bool(lb-sticky_session)); +jk_printf(s, sticky_session_force=%s, jk_get_bool(lb-sticky_session_force)); jk_printf(s, retries=%d, lb-retries); jk_printf(s, recover_time=%d, lb-recover_wait_time); jk_printf(s, method=%s, jk_lb_get_method(lb, l)); @@ -1276,8 +1260,8 @@ jk_print_prop_att_string(s, w, NULL, list, name); jk_print_prop_att_string(s, w, name, type, status_worker_type(JK_LB_WORKER_TYPE)); -jk_print_prop_att_string(s, w, name, sticky_session, status_val_bool(lb-sticky_session
svn commit: r485092 - in /tomcat/connectors/trunk/jk/native/common: jk_lb_worker.c jk_lb_worker.h jk_status.c jk_util.c
Author: rjung Date: Sat Dec 9 15:50:44 2006 New Revision: 485092 URL: http://svn.apache.org/viewvc?view=revrev=485092 Log: Introduce general purpose functions for parsing activation, state, method and lock strings. Use them in jk_util and in status worker. This enables to update via status worker additionally with the string values, that it shows when listing workers. Reorder constant arrays for these attributes to put the order in sync with the integers one can use when configuring. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=485092r1=485091r2=485092 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Dec 9 15:50:44 2006 @@ -44,36 +44,36 @@ #define JK_WORKER_USABLE_STICKY(w) ((w)-state != JK_LB_STATE_ERROR (w)-activation != JK_LB_ACTIVATION_STOPPED) static const char *lb_locking_type[] = { -unknown, JK_LB_LOCK_TEXT_OPTIMISTIC, JK_LB_LOCK_TEXT_PESSIMISTIC, +unknown, NULL }; static const char *lb_method_type[] = { -unknown, JK_LB_METHOD_TEXT_REQUESTS, JK_LB_METHOD_TEXT_TRAFFIC, JK_LB_METHOD_TEXT_BUSYNESS, JK_LB_METHOD_TEXT_SESSIONS, +unknown, NULL }; static const char *lb_state_type[] = { -unknown, JK_LB_STATE_TEXT_NA, JK_LB_STATE_TEXT_OK, JK_LB_STATE_TEXT_RECOVER, JK_LB_STATE_TEXT_BUSY, JK_LB_STATE_TEXT_ERROR, +unknown, NULL }; static const char *lb_activation_type[] = { -unknown, JK_LB_ACTIVATION_TEXT_ACTIVE, JK_LB_ACTIVATION_TEXT_DISABLED, JK_LB_ACTIVATION_TEXT_STOPPED, +unknown, NULL }; @@ -115,22 +115,85 @@ return lb_locking_type[p-lblock]; } +/* Return the int representation of the lb lock type */ +int jk_lb_get_lock_code(const char *v) +{ +if (!v) +return JK_LB_LOCK_DEF; +else if (*v == 'o' || *v == 'O' || *v == '0') +return JK_LB_LOCK_OPTIMISTIC; +else if (*v == 'p' || *v == 'P' || *v == '1') +return JK_LB_LOCK_PESSIMISTIC; +else +return JK_LB_LOCK_DEF; +} + /* Return the string representation of the lb method type */ const char *jk_lb_get_method(lb_worker_t *p, jk_logger_t *l) { return lb_method_type[p-lbmethod]; } +/* Return the int representation of the lb lock type */ +int jk_lb_get_method_code(const char *v) +{ +if (!v) +return JK_LB_METHOD_DEF; +else if (*v == 'r' || *v == 'R' || *v == '0') +return JK_LB_METHOD_REQUESTS; +else if (*v == 't' || *v == 'T' || *v == '1') +return JK_LB_METHOD_TRAFFIC; +else if (*v == 'b' || *v == 'B' || *v == '2') +return JK_LB_METHOD_BUSYNESS; +else if (*v == 's' || *v == 'S' || *v == '3') +return JK_LB_METHOD_SESSIONS; +else +return JK_LB_METHOD_DEF; +} + /* Return the string representation of the balance worker state */ const char *jk_lb_get_state(worker_record_t *p, jk_logger_t *l) { return lb_state_type[p-s-state]; } +/* Return the int representation of the lb lock type */ +int jk_lb_get_state_code(const char *v) +{ +if (!v) +return JK_LB_STATE_DEF; +else if (*v == 'n' || *v == 'N' || *v == '0') +return JK_LB_STATE_NA; +else if (*v == 'o' || *v == 'O' || *v == '1') +return JK_LB_STATE_OK; +else if (*v == 'r' || *v == 'R' || *v == '2') +return JK_LB_STATE_RECOVER; +else if (*v == 'b' || *v == 'B' || *v == '3') +return JK_LB_STATE_BUSY; +else if (*v == 'e' || *v == 'E' || *v == '4') +return JK_LB_STATE_ERROR; +else +return JK_LB_STATE_DEF; +} + /* Return the string representation of the balance worker activation */ const char *jk_lb_get_activation(worker_record_t *p, jk_logger_t *l) { return lb_activation_type[p-s-activation]; +} + +int jk_lb_get_activation_code(const char *v) +{ +if (!v) +return JK_LB_ACTIVATION_DEF; +else if (*v == 'a' || *v == 'A' || *v == '0') +return JK_LB_ACTIVATION_ACTIVE; +else if (*v == 'd' || *v == 'D' || *v == '1') +return JK_LB_ACTIVATION_DISABLED; +else if (*v == 's' || *v == 'S' || *v == '2') +return JK_LB_ACTIVATION_STOPPED; +else +return JK_LB_ACTIVATION_DEF; } /* Update the load multipliers wrt. lb_factor */ Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?view=diffrev=485092r1=485091r2=485092
svn commit: r485093 - /tomcat/connectors/trunk/jk/native/common/jk_status.c
Author: rjung Date: Sat Dec 9 15:54:54 2006 New Revision: 485093 URL: http://svn.apache.org/viewvc?view=revrev=485093 Log: Replace Maps container in status worker by an additional attribute map_count. This way maps and members are handled similarly. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=485093r1=485092r2=485093 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec 9 15:54:54 2006 @@ -994,6 +994,26 @@ return JK_TRUE; } +static int count_maps(jk_ws_service_t *s, + const char *worker, + jk_logger_t *l) +{ +unsigned int i; +int count=0; +jk_uri_worker_map_t *uw_map = s-uw_map; + +JK_TRACE_ENTER(l); +for (i = 0; i uw_map-size; i++) { +uri_worker_record_t *uwr = uw_map-maps[i]; +if (strcmp(uwr-worker_name, worker)) { +continue; +} +count++; +} +JK_TRACE_EXIT(l); +return count; +} + static void display_maps(jk_ws_service_t *s, status_endpoint_t *p, const char *worker, @@ -1013,13 +1033,7 @@ mime = status_mime_int(arg); hide = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) JK_STATUS_ARG_OPTION_NO_MAPS; -for (i = 0; i uw_map-size; i++) { -uri_worker_record_t *uwr = uw_map-maps[i]; -if (strcmp(uwr-worker_name, worker)) { -continue; -} -count++; -} +count = count_maps(s, worker, l); if (count) { @@ -1040,17 +1054,6 @@ jk_printf(s, JK_STATUS_TABLE_HEAD_3_STRING, Match Type, Uri, Source); } -else if (mime == JK_STATUS_MIME_XML) { -jk_print_xml_start_elt(s, w, 6, 0, maps); -jk_print_xml_att_int(s, 8, size, count); -jk_print_xml_stop_elt(s, 6, 0); -} -else if (mime == JK_STATUS_MIME_TXT) { -jk_printf(s, Maps: size=%d\n, count); -} -else if (mime == JK_STATUS_MIME_PROP) { -jk_print_prop_att_int(s, w, worker, maps.size, count); -} } } @@ -1073,12 +1076,12 @@ uri_worker_map_get_source(uwr, l)); } else if (mime == JK_STATUS_MIME_XML) { -jk_print_xml_start_elt(s, w, 8, 0, map); -jk_print_xml_att_int(s, 10, id, count); -jk_print_xml_att_string(s, 10, type, uri_worker_map_get_match(uwr, buf, l)); -jk_print_xml_att_string(s, 10, uri, uwr-uri); -jk_print_xml_att_string(s, 10, source, uri_worker_map_get_source(uwr, l)); -jk_print_xml_stop_elt(s, 8, 1); +jk_print_xml_start_elt(s, w, 6, 0, map); +jk_print_xml_att_int(s, 8, id, count); +jk_print_xml_att_string(s, 8, type, uri_worker_map_get_match(uwr, buf, l)); +jk_print_xml_att_string(s, 8, uri, uwr-uri); +jk_print_xml_att_string(s, 8, source, uri_worker_map_get_source(uwr, l)); +jk_print_xml_stop_elt(s, 6, 1); } else if (mime == JK_STATUS_MIME_TXT) { jk_puts(s, Map:); @@ -1110,9 +1113,6 @@ if (mime == JK_STATUS_MIME_HTML) { jk_puts(s, /table\n); } -else if (mime == JK_STATUS_MIME_XML) { -jk_print_xml_close_elt(s, w, 6, maps); -} } else { if (mime == JK_STATUS_MIME_HTML) { @@ -1144,6 +1144,7 @@ unsigned int good = 0; unsigned int degraded = 0; unsigned int bad = 0; +int map_count; unsigned int j; const char *name = lb-s-name; status_worker_t *w = p-worker; @@ -1176,6 +1177,8 @@ degraded++; } +map_count = count_maps(s, name, l); + if (mime == JK_STATUS_MIME_HTML) { jk_puts(s, hr/h3[); @@ -1233,6 +1236,7 @@ jk_print_xml_att_int(s, 4, bad, bad); jk_print_xml_att_int(s, 4, busy, lb-s-busy); jk_print_xml_att_int(s, 4, max_busy, lb-s-max_busy); +jk_print_xml_att_int(s, 4, map_count, map_count); jk_print_xml_stop_elt(s, 2, 0); } @@ -1253,6 +1257,7 @@ jk_printf(s, bad=%d, bad); jk_printf(s, busy=%d, lb-s-busy); jk_printf(s, max_busy=%d, lb-s-max_busy); +jk_printf(s, map_count=%d, map_count); jk_puts(s, \n); } @@ -1272,6 +1277,7 @@ jk_print_prop_att_int(s, w, name, bad, bad); jk_print_prop_att_int(s, w, name, busy, lb-s-busy); jk_print_prop_att_int(s, w, name, max_busy, lb-s-max_busy); +jk_print_prop_att_int(s, w, name, map_count
svn commit: r485095 - /tomcat/connectors/trunk/jk/xdocs/reference/status.xml
Author: rjung Date: Sat Dec 9 16:16:01 2006 New Revision: 485095 URL: http://svn.apache.org/viewvc?view=revrev=485095 Log: Update attribute usage in status worker docs page. Modified: tomcat/connectors/trunk/jk/xdocs/reference/status.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/status.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/status.xml?view=diffrev=485095r1=485094r2=485095 == --- tomcat/connectors/trunk/jk/xdocs/reference/status.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/status.xml Sat Dec 9 16:16:01 2006 @@ -380,22 +380,22 @@ blt/b: recover_time (seconds) /li li -bls/b: sticky_session (checkbox) +bls/b: sticky_session (0/f/n/off=off, 1/t/y/on=on; case insensitive) /li li -blf/b: sticky_session_force (checkbox) +blf/b: sticky_session_force (0/f/n/off=off, 1/t/y/on=on; case insensitive) /li li -blm/b: method (1=Requests, 2=Traffic, 3=Busyness, 4=Sessions) +blm/b: method (0/r=Requests, 1/t=Traffic, 2/b=Busyness, 3/s=Sessions; case insensitive, only first character is used) /li li -bll/b: lock (1=Optimistic, 2=Pessimistic) +bll/b: lock (0/o=Optimistic, 1/p=Pessimistic; case insensitive, only first character is used) /li /ul And now the list of parameters you can use to change settings for load balancer members: ul li -bwa/b: activation flag (1=active, 2=disabled, 3=stopped) +bwa/b: activation flag (0/a=active, 1/d=disabled, 2/s=stopped; case insensitive, only first character is used) /li li bwf/b: load balancing factor (integer weight) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r485097 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Sat Dec 9 16:17:40 2006 New Revision: 485097 URL: http://svn.apache.org/viewvc?view=revrev=485097 Log: Update changelog. Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diffrev=485097r1=485096r2=485097 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Dec 9 16:17:40 2006 @@ -27,6 +27,10 @@ subsection name=Native changelog update + Allow integer and string values when setting enumeration/boolean + attributes via status worker update action. (rjung) + /update + update Docs: New reference guide page for status worker. (rjung) /update update - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r487981 - in /tomcat/connectors/trunk/jk: native/ native/common/ native/iis/ native/iis/installer/ xdocs/miscellaneous/
Author: rjung Date: Sun Dec 17 05:53:14 2006 New Revision: 487981 URL: http://svn.apache.org/viewvc?view=revrev=487981 Log: Start dev cycle for version 1.2.21: increase version number etc. Modified: tomcat/connectors/trunk/jk/native/STATUS.txt tomcat/connectors/trunk/jk/native/common/jk_version.h tomcat/connectors/trunk/jk/native/common/portable.h.sample tomcat/connectors/trunk/jk/native/configure.in tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/STATUS.txt?view=diffrev=487981r1=487980r2=487981 == --- tomcat/connectors/trunk/jk/native/STATUS.txt (original) +++ tomcat/connectors/trunk/jk/native/STATUS.txt Sun Dec 17 05:53:14 2006 @@ -3,6 +3,7 @@ Release: +1.2.21 : in development 1.2.20 : released December 10, 2006 1.2.19 : released September 17, 2006 1.2.18 : released July, 2006 Modified: tomcat/connectors/trunk/jk/native/common/jk_version.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_version.h?view=diffrev=487981r1=487980r2=487981 == --- tomcat/connectors/trunk/jk/native/common/jk_version.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_version.h Sun Dec 17 05:53:14 2006 @@ -26,14 +26,14 @@ /** START OF AREA TO MODIFY BEFORE RELEASING */ #define JK_VERMAJOR 1 #define JK_VERMINOR 2 -#define JK_VERFIX 20 -#define JK_VERSTRING1.2.20 +#define JK_VERFIX 21 +#define JK_VERSTRING1.2.21 /* Beta number */ #define JK_VERBETA 0 #define JK_BETASTRING 0 /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */ -#define JK_VERISRELEASE 1 +#define JK_VERISRELEASE 0 #define JK_VERRC0 #define JK_RCSTRING 0 Modified: tomcat/connectors/trunk/jk/native/common/portable.h.sample URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/portable.h.sample?view=diffrev=487981r1=487980r2=487981 == --- tomcat/connectors/trunk/jk/native/common/portable.h.sample (original) +++ tomcat/connectors/trunk/jk/native/common/portable.h.sample Sun Dec 17 05:53:14 2006 @@ -93,4 +93,4 @@ #define USE_SO_SNDTIMEO 1 /* Version number of package */ -#define VERSION 1.2.20 +#define VERSION 1.2.21 Modified: tomcat/connectors/trunk/jk/native/configure.in URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?view=diffrev=487981r1=487980r2=487981 == --- tomcat/connectors/trunk/jk/native/configure.in (original) +++ tomcat/connectors/trunk/jk/native/configure.in Sun Dec 17 05:53:14 2006 @@ -11,7 +11,7 @@ dnl package and version. (synchronization with common/jk_version.h ?) PACKAGE=mod_jk -VERSION=1.2.20 +VERSION=1.2.21 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION}) Modified: tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism?view=diffrev=487981r1=487980r2=487981 == --- tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism (original) +++ tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism Sun Dec 17 05:53:14 2006 @@ -3288,7 +3288,7 @@ rowtdProductID/tdtdnone/tdtd//row rowtdProductLanguage/tdtd1033/tdtd//row rowtdProductName/tdtdJakarta Isapi Redirector/tdtd//row - rowtdProductVersion/tdtd1.2.20/tdtd//row + rowtdProductVersion/tdtd1.2.21/tdtd//row rowtdProgressType0/tdtdinstall/tdtd//row rowtdProgressType1/tdtdInstalling/tdtd//row rowtdProgressType2/tdtdinstalled/tdtd//row Modified: tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc?view=diffrev=487981r1=487980r2=487981 == --- tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc (original) +++ tomcat/connectors/trunk/jk/native/iis/isapi_redirect.rc Sun Dec 17 05:53:14 2006 @@ -14,13 +14,13 @@ specific language governing permissions and \ limitations under the License. -#define JK_VERSION_STR 1.2.20 +#define JK_VERSION_STR 1.2.21 #define JK_DLL_BASENAME isapi_redirect
svn commit: r487982 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Author: rjung Date: Sun Dec 17 05:54:10 2006 New Revision: 487982 URL: http://svn.apache.org/viewvc?view=revrev=487982 Log: Fix missing format char for worker name in log message. This one was missing since we introduced that message. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=487982r1=487981r2=487982 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Dec 17 05:54:10 2006 @@ -1108,7 +1108,7 @@ if ((len = ajp_read_fully_from_server(r, l, read_buf, len)) 0) { jk_log(l, JK_LOG_INFO, - (%) receiving data from client failed. + (%s) receiving data from client failed. Connection aborted or network problems, ae-worker-name); JK_TRACE_EXIT(l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r487990 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Author: rjung Date: Sun Dec 17 06:52:54 2006 New Revision: 487990 URL: http://svn.apache.org/viewvc?view=revrev=487990 Log: Use correct windows line endings for log file on WIN32 platform. Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diffrev=487990r1=487989r2=487990 == --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Dec 17 06:52:54 2006 @@ -420,7 +420,11 @@ { int rc = 0; /* Need to reserve space for newline and terminating zero byte. */ +#ifdef WIN32 +static int usable_size = HUGE_BUFFER_SIZE-3; +#else static int usable_size = HUGE_BUFFER_SIZE-2; +#endif if (!l || !file || !fmt) { return -1; } @@ -502,6 +506,9 @@ } else { used = usable_size; } +#ifdef WIN32 +buf[used++] = '\r'; +#endif buf[used] = '\n'; buf[used+1] = 0; va_end(args); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r488992 - /tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
Author: rjung Date: Wed Dec 20 01:21:23 2006 New Revision: 488992 URL: http://svn.apache.org/viewvc?view=revrev=488992 Log: Fix default values of retries in doc. Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diffrev=488992r1=488991r2=488992 == --- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Wed Dec 20 01:21:23 2006 @@ -148,7 +148,7 @@ /p /directive -directive name=retries default=3 required=false +directive name=retries default=2 required=false The number of retries that the worker will try in case of error returned from remote Tomcat. If the number of retries set is greater then three (the default value), on each retry after default an extra wait of 100ms will be inserted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r489233 - in /tomcat/site/trunk: docs/download-connectors.html docs/faq/misc.html docs/faq/printer/misc.html xdocs/download-connectors.xml
Author: rjung Date: Wed Dec 20 16:27:48 2006 New Revision: 489233 URL: http://svn.apache.org/viewvc?view=revrev=489233 Log: Update tomcat site for JK download 1.2.19 - 1.2.20. Modified: tomcat/site/trunk/docs/download-connectors.html tomcat/site/trunk/docs/faq/misc.html tomcat/site/trunk/docs/faq/printer/misc.html tomcat/site/trunk/xdocs/download-connectors.xml Modified: tomcat/site/trunk/docs/download-connectors.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diffrev=489233r1=489232r2=489233 == --- tomcat/site/trunk/docs/download-connectors.html (original) +++ tomcat/site/trunk/docs/download-connectors.html Wed Dec 20 16:27:48 2006 @@ -3,16 +3,16 @@ html head titleApache Tomcat - Tomcat Connectors (mod_jk, mod_jk2) Downloads/title -link type=text/css href=stylesheets/tomcat.css rel=stylesheet/ +link rel=stylesheet href=stylesheets/tomcat.css type=text/css / /head -body bgcolor=#ff text=#00 link=#525D76 alink=#525D76 vlink=#525D76 -table border=0 width=100% cellspacing=0 +body vlink=#525D76 alink=#525D76 link=#525D76 text=#00 bgcolor=#ff +table cellspacing=0 width=100% border=0 !--PAGE HEADER-- tr td !--PROJECT LOGO-- a href=http://tomcat.apache.org/; -img src=./images/tomcat.gif align=left alt=Tomcat Logo border=0/ +img border=0 alt=Tomcat Logo align=left src=./images/tomcat.gif / /a /td td @@ -23,28 +23,28 @@ td !--APACHE LOGO-- a href=http://www.apache.org/; -img src=http://www.apache.org/images/asf-logo.gif; align=right alt=Apache Logo border=0/ +img border=0 alt=Apache Logo align=right src=http://www.apache.org/images/asf-logo.gif; / /a /td /tr /table div class=searchbox -form action=http://www.google.com/search; method=get -input value=tomcat.apache.org name=sitesearch type=hidden/ -input value=Search the Site size=25 name=q id=query type=text/ -input name=Search value=Search Site type=submit/ +form method=get action=http://www.google.com/search; +input type=hidden name=sitesearch value=tomcat.apache.org / +input type=text id=query name=q size=25 value=Search the Site / +input type=submit value=Search Site name=Search / /form /div -table border=0 width=100% cellspacing=4 +table cellspacing=4 width=100% border=0 !--HEADER SEPARATOR-- tr td colspan=2 -hr noshade= size=1/ +hr size=1 noshade= / /td /tr tr !--LEFT SIDE NAVIGATION-- -td width=20% valign=top nowrap=true +td nowrap=true valign=top width=20% p strongApache Tomcat/strong /p @@ -161,11 +161,11 @@ /ul /td !--RIGHT SIDE MAIN BODY-- -td width=80% valign=top align=left -table border=0 cellspacing=0 cellpadding=2 width=100% +td align=left valign=top width=80% +table width=100% cellpadding=2 cellspacing=0 border=0 tr td bgcolor=#525D76 -font color=#ff face=arial,helvetica,sanserif +font face=arial,helvetica,sanserif color=#ff a name=Tomcat Connectors (mod_jk, mod_jk2) Downloads strongTomcat Connectors (mod_jk, mod_jk2) Downloads/strong /a @@ -184,8 +184,8 @@ encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are ibackup/i mirrors (at the end of the mirrors list) that should be -available.br/[if-any logo]a href=[link] -img align=right src=[logo] border=0/ +available.br /[if-any logo]a href=[link] +img align=right src=[logo] border=0 / /a[end]/p p form action=[location] method=get id=SelectMirror @@ -200,7 +200,7 @@ [for backup]option value=[backup][backup] (backup)/option[end] [end] /select -input type=submit value=Change/ +input type=submit value=Change / /form /p p @@ -224,18 +224,18 @@ /div ul li class=download -a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gzJK 1.2.19 Source Release tar.gz/a +a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.20/tomcat-connectors-1.2.20-src.tar.gzJK 1.2.20 Source Release tar.gz/a ul class=attributes li -span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.tar.gz.asc;pgp/a]/span +span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.20/tomcat-connectors-1.2.20-src.tar.gz.asc;pgp/a]/span /li /ul /li li class=download -a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zipJK 1.2.19 Source Release zip/a +a href=[preferred]/tomcat/tomcat-connectors/jk/source/jk-1.2.20/tomcat-connectors-1.2.20-src.zipJK 1.2.20 Source Release zip/a ul class=attributes li -span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.19/tomcat-connectors-1.2.19-src.zip.asc;pgp/a]/span +span class=pgp[a href=http://www.apache.org/dist/tomcat/tomcat
svn commit: r489581 - /tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
Author: rjung Date: Fri Dec 22 00:43:15 2006 New Revision: 489581 URL: http://svn.apache.org/viewvc?view=revrev=489581 Log: Another fix for the changed retries default value (docs). Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diffrev=489581r1=489580r2=489581 == --- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Fri Dec 22 00:43:15 2006 @@ -150,7 +150,7 @@ directive name=retries default=2 required=false The number of retries that the worker will try in case of error returned from remote -Tomcat. If the number of retries set is greater then three (the default value), on +Tomcat. If the number of retries set is greater than two (the default value), on each retry after default an extra wait of 100ms will be inserted. /directive - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r490578 - /tomcat/connectors/trunk/jk/native/common/jk_global.h
Author: rjung Date: Wed Dec 27 14:25:28 2006 New Revision: 490578 URL: http://svn.apache.org/viewvc?view=revrev=490578 Log: Fix global defines for Netware. Thanks to Guenther. Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diffrev=490578r1=490577r2=490578 == --- tomcat/connectors/trunk/jk/native/common/jk_global.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_global.h Wed Dec 27 14:25:28 2006 @@ -290,7 +290,7 @@ typedef unsigned __int64 jk_uint64_t; #define JK_UINT64_T_FMT I64u #define JK_UINT64_T_HEX_FMT I64x -#elif defined(AS400) +#elif defined(AS400) || defined(NETWARE) typedef unsigned int jk_uint32_t; #define JK_UINT32_T_FMT u #define JK_UINT32_T_HEX_FMT x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r493203 - in /tomcat/connectors/trunk: jk/tools/lineends.pl jni/native/build/lineends.pl
Author: rjung Date: Fri Jan 5 13:57:03 2007 New Revision: 493203 URL: http://svn.apache.org/viewvc?view=revrev=493203 Log: Carry over Mladen's lineends.pl improvements from jni to jk (and kill one trailing space). Modified: tomcat/connectors/trunk/jk/tools/lineends.pl tomcat/connectors/trunk/jni/native/build/lineends.pl Modified: tomcat/connectors/trunk/jk/tools/lineends.pl URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/tools/lineends.pl?view=diffrev=493203r1=493202r2=493203 == --- tomcat/connectors/trunk/jk/tools/lineends.pl (original) +++ tomcat/connectors/trunk/jk/tools/lineends.pl Fri Jan 5 13:57:03 2007 @@ -23,7 +23,7 @@ $ignore .= gif-jpg-jpeg-png-ico-bmp-; # Archive formats -$ignore .= tar-gz-z-zip-jar-war-; +$ignore .= tar-gz-z-zip-jar-war-bz2-tgz-; # Many document formats $ignore .= eps-psd-pdf-ai-; @@ -32,9 +32,9 @@ $ignore .= ucs2-ucs4-; # Some binary objects -$ignore .= class-so-dll-exe-obj-; +$ignore .= class-so-dll-exe-obj-a-o-lo-slo-sl-dylib-; -# Some build env files in NW/Win32 +# Some build env files $ignore .= mcp-xdc-ncb-opt-pdb-ilk-sbr-; $preservedate = 1; Modified: tomcat/connectors/trunk/jni/native/build/lineends.pl URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/build/lineends.pl?view=diffrev=493203r1=493202r2=493203 == --- tomcat/connectors/trunk/jni/native/build/lineends.pl (original) +++ tomcat/connectors/trunk/jni/native/build/lineends.pl Fri Jan 5 13:57:03 2007 @@ -34,7 +34,7 @@ # Some binary objects $ignore .= class-so-dll-exe-obj-a-o-lo-slo-sl-dylib-; -# Some build env files +# Some build env files $ignore .= mcp-xdc-ncb-opt-pdb-ilk-sbr-; $preservedate = 1; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r493861 - /tomcat/connectors/trunk/KEYS
Author: rjung Date: Sun Jan 7 14:06:06 2007 New Revision: 493861 URL: http://svn.apache.org/viewvc?view=revrev=493861 Log: Adding signing key of guenter knauf. He provides signed Netware binaries for mod_jk. Modified: tomcat/connectors/trunk/KEYS Modified: tomcat/connectors/trunk/KEYS URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/KEYS?view=diffrev=493861r1=493860r2=493861 == --- tomcat/connectors/trunk/KEYS (original) +++ tomcat/connectors/trunk/KEYS Sun Jan 7 14:06:06 2007 @@ -460,3 +460,48 @@ POKL9N3T3MkdexuGv1Fc41aWQRcAn3GUI1TJ4wJDGCPAJMb16IrnxUdt =C30m -END PGP PUBLIC KEY BLOCK- + +Type Bits/KeyIDDate User ID +pub 1024D/E55B0D0E 2007-01-01 Guenter Knauf (CODE SIGNING KEY) [EMAIL PROTECTED] + +-BEGIN PGP PUBLIC KEY BLOCK- +Version: GnuPG v1.4.6 (MingW32) + +mQGiBEWZmwYRBAD0q6ODLHHR2D/8L7yANKOviQZwhRDOxfxIL3PoZ/xN/bMPeo8t +wcv6Wh/VnIdz153kl2EkdYhCNbc+d0g/WMfFNe7ch8hqeYJKKQBj2fViS30ZLfju +EwVesWzr7kUah2ETHC2Lo+vd0+x2yLsTriWUhK/ZU+85MTZRs5HX4e03NwCg5SpM +iJp1pLwJGEt1zsAfIqUVfXcD/3uOlJamsYXmNGtEsndP3V67gsQxrleWWrLQzkt5 +WP/Myq5uY3XtIa0j6NE9TZtXwFQzVoeLQhpUg8bMuPRg3VzB5oq3ClkS09w38xyF +eEZlNjeJg9TfvDk4bYpLKHtJeFn3pFR13Ojz+r7AHo/wbcO/Jho6XXLJPCjeMBFg +MVagA/oDalIMI9cUVmM5In2WexaGuYqOaLD/2CEpNpL2zppv/5ES75oU1I6bNVw8 +jVI5pHIVn7wTH4ja3GfK238uncqot4SM6DxdW1F4Gj4cKG1YXyPbD+kqqX4IrzFW +VL92VtA7LJdt2t/z+OFg2StDKiKtpGdSGcWEimDu7RapK251d7Q4Ikd1ZW50ZXIg +S25hdWYiICgiQ09ERSBTSUdOSU5HIEtFWSIpIDxmdWFua2dAYXBhY2hlLm9yZz6I +ZgQTEQIAJgUCRZmbBgIbAwUJCWYBgAYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ +EC/waJTlWw0OzdYAnR7vfP8ygtxJ0d7zMxM+LphquxSJAKCCcOTJ4VO0NnidBb/n +FHN99o9pdbkEDQRFmZtOEBAAwlQPuku80T82g6aS1HpnsXyzxG+k1k0Nj66ZvRM0 +f8gQKmGanVTsbmjXRD1Q0N/WR3F5ynrk+dvgdN0/IqBxR+Ek6L0hYFqa0Mp8Rqw7 +0M7oUI5iwMa/873koCnBhFet6Eu91mVPOSE9mdVIw/vlq8KT8VuxcqpvUKYgjC9h +HK3GQniaR4JKkCQjk4ZynQiDckKcfaR765GYvw3Fq+v92Ebrdu5qYh4Tq2ncEY6q +fCcxTu6THXNPVgX+A+5ASlcLAxMAD1W25//abwPdvBIZ/76nXXGnZI4NQDQQf1W3 +btrcHxQUXrvHM1DTV70wlifIA3xjuWTIRr31gXv5QVrVQdn58AhWoHB2eSGX/jhH +zQfghS/FkBIt//THDNDYhNtqHLz6SihMHNDIUcBNNZDF1tO2slsrAtKkooX1J91l +BtWRWwkU3VK1HttMhAB5xUswbn3XExKK/J7IiI2M+Qz/QIKVIWcPyYmPBUkwtNtV +RiGPcq2OMF2BEKRVyCZa1rQuPNRLv2iuFD7iaRfMMakWGIY2uIeLAy3KNS6VbH0q +a7LUfeUv0Be2yyEAr5luMwomWzAHpW4xhCLG0kjMiNCceTJwASG6eTg/JpWxcXca +8M0ZvcbVBZ7nzvwDRBCtH0W+9w+gNwgtToE4UnglrO4TsXtWwOyLfv+GaVQIngqH +4lsAAwUQAL/VaXfDuLOe1j3jn1sKjDIfIHzTS0THdxpP3B0WahZ7xHAtuFdd8jXi +CmIGi9hKO99Mn5xsW3/cEPVfTjkXbfsgUc5xHsC8zJ9BCHctkgPvaHUJ7lAyZbW+ +y+CrW+dpCN49Y8H50NhwjiHiwT7GynNKnOxMFg/aZKLBVFFOzjqtDQ8qjiPdgAld +O/tV7/WV4HTZvGUqQloEqqMjWTJO+fw9Mau/ejvBBuz/P78XkCku8cST6hjg89FX +gyB0J7TL3ykvJltIS1gBNK6BF3N2es4qIaT/MUUbB5wdpltYt1HZHBUtvF8ywySu +Tu3ymyYfLQdRt+e32tMWgbWL00d2YJDeEOFeylBbOErzHI+tqxAQlwigKzHyUQkN +Kel2MRmdsaiHMlc8Btj6YsFTf+sXnLo/zkq3BLVJd9qRS+udbbT02TIVhKybbJbx +tgg5ajhDzOuRHb+RhpqjAaM6HGM2Vv1y3OLSzAN981LyEKgqIG2cwmNmubQLgwi1 +UDhcrTLlaXpFB+SHpvZPsnBQ329YKurlIV/rL38ZajIIMYPmk6bZIqTW0cwy7aHL +XgBEgIpUjHDBOnq80rcyc4dauctgU1muYFh6y47yqtxmTkHu5nwTbZEn6/l1/Ffo +GCRMkLtwRdDm/4BfuuPExBNkplzglJ/cMAvvr0/mwv+tqvQTT0CMiE8EGBECAA8F +AkWZm04CGwwFCQlmAYAACgkQL/BolOVbDQ4R3ACdHuJ0qhGNF2HmkKxkEvyQ8XYB +KGYAoI/VBpQ3XajbV/CPs3YP4qBMddA/ +=LiRc +-END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r493978 - /tomcat/connectors/trunk/KEYS
Author: rjung Date: Mon Jan 8 00:11:18 2007 New Revision: 493978 URL: http://svn.apache.org/viewvc?view=revrev=493978 Log: Fix key fingerprint of Guenter Knauf. Modified: tomcat/connectors/trunk/KEYS Modified: tomcat/connectors/trunk/KEYS URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/KEYS?view=diffrev=493978r1=493977r2=493978 == --- tomcat/connectors/trunk/KEYS (original) +++ tomcat/connectors/trunk/KEYS Mon Jan 8 00:11:18 2007 @@ -461,8 +461,9 @@ =C30m -END PGP PUBLIC KEY BLOCK- -Type Bits/KeyIDDate User ID -pub 1024D/E55B0D0E 2007-01-01 Guenter Knauf (CODE SIGNING KEY) [EMAIL PROTECTED] +Type bits /keyIDDate User ID +pub 1024D/E55B0D0E 2007/01/01 Guenter Knauf (CODE SIGNING KEY) [EMAIL PROTECTED] + Key fingerprint = 3E6A C004 854F 3A7F 0356 6B59 2FF0 6894 E55B 0D0E -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.4.6 (MingW32) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r494538 - in /tomcat/connectors/trunk/jk/xdocs/reference: apache.xml workers.xml
Author: rjung Date: Tue Jan 9 11:39:16 2007 New Revision: 494538 URL: http://svn.apache.org/viewvc?view=revrev=494538 Log: Add two small enhancements to the reference guide: - unit of connection_pool_timeout is seconds (most other timeouts are ms) - JkLogFile in apache only has a default value since 1.2.20 Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?view=diffrev=494538r1=494537r2=494538 == --- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Tue Jan 9 11:39:16 2007 @@ -148,6 +148,7 @@ The default value is logs/mod_jk.log. br/ Pipes are supported for Apache 1.3 only since version 1.2.16. +The default value exists only since version 1.2.20. /p/attribute attribute name=JkLogLevel required=falsep The Tomcat Connector module log level, can be debug, info, warn Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diffrev=494538r1=494537r2=494538 == --- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Tue Jan 9 11:39:16 2007 @@ -183,7 +183,7 @@ /directive directive name=connection_pool_timeout default=0 required=false -Cache timeout property should be used with bconnection_pool_size/b to specify how long JK should keep +Cache timeout property should be used with bconnection_pool_size/b to specify how many seconds JK should keep an inactive socket in cache before closing it. This property should be used to reduce the number of threads on the Tomcat web server. The default value zero disables the closing (infinite timeout). p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r496807 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Tue Jan 16 10:14:24 2007 New Revision: 496807 URL: http://svn.apache.org/viewvc?view=revrev=496807 Log: Fix segfault in feature fail_on_status (wrong order of log arguments). Patch by Juri Haberland. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diffrev=496807r1=496806r2=496807 == --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Tue Jan 16 10:14:24 2007 @@ -1852,8 +1852,8 @@ (%s) request failed, because of response status %d, recoverable operation attempt=%d, - p-worker-http_status_fail, - p-worker-name, i); + p-worker-name, + p-worker-http_status_fail, i); JK_TRACE_EXIT(l); if (i = JK_RETRIES) { jk_sleep(JK_SLEEP_DEF); Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diffrev=496807r1=496806r2=496807 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jan 16 10:14:24 2007 @@ -26,6 +26,10 @@ br / subsection name=Native changelog + fix +bug41381/bug: Fix segfault in feature fail_on_status +(wrong order of log arguments). Patch by Juri Haberland. (rjung) + /fix /changelog /subsection /section - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r500534 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c native/common/jk_shm.h native/common/jk_status.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Sat Jan 27 06:14:00 2007 New Revision: 500534 URL: http://svn.apache.org/viewvc?view=revrev=500534 Log: Improve data synchronization between different processes (use sequence number more carefully). Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_shm.h tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=500534r1=500533r2=500534 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Jan 27 06:14:00 2007 @@ -395,6 +395,8 @@ worker_record_t *w = NULL; JK_TRACE_ENTER(l); +if (p-sequence != p-s-sequence) +jk_lb_pull(p, l); for (i = 0; i p-num_of_workers; i++) { w = p-lb_workers[i]; if (w-s-state == JK_LB_STATE_ERROR) { Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_shm.h?view=diffrev=500534r1=500533r2=500534 == --- tomcat/connectors/trunk/jk/native/common/jk_shm.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_shm.h Sat Jan 27 06:14:00 2007 @@ -62,7 +62,7 @@ /* Sequence counter starting at 0 and increasing * every time we change the config */ -unsigned int sequence; +volatile unsigned int sequence; /* Number of currently busy channels */ volatile int busy; /* Maximum number of busy channels */ Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500534r1=500533r2=500534 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Jan 27 06:14:00 2007 @@ -1644,6 +1644,11 @@ return; } +jk_shm_lock(); +if (lb-sequence != lb-s-sequence) +jk_lb_pull(lb, l); +jk_shm_unlock(); + jk_putv(s, hr/h3Edit load balancer settings for , name, /h3\n, NULL); Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diffrev=500534r1=500533r2=500534 == --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Jan 27 06:14:00 2007 @@ -27,6 +27,9 @@ subsection name=Native changelog fix + JkStatus: Improve data synchronization between different processes. (rjung) + /fix + fix bug41381/bug: Fix segfault in feature fail_on_status (wrong order of log arguments). Patch by Juri Haberland. (rjung) /fix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r500537 - in /tomcat/connectors/trunk/jk: native/common/jk_lb_worker.c native/common/jk_lb_worker.h native/common/jk_status.c xdocs/miscellaneous/changelog.xml xdocs/reference/status.xml x
Author: rjung Date: Sat Jan 27 06:41:05 2007 New Revision: 500537 URL: http://svn.apache.org/viewvc?view=revrev=500537 Log: Do not try to recover load balancer sub workers multiple times in parallel (except when doing forced recovery). Use additional runtime states PROBE and FORCED. Typical state cycles are: OK-ERROR-RECOVER-PROBE-OK/ERROR. and OK-ERROR-FORCED-OK/ERROR. Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/reference/status.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diffrev=500537r1=500536r2=500537 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Jan 27 06:41:05 2007 @@ -40,8 +40,8 @@ * The load balancing code in this */ -#define JK_WORKER_USABLE(w) ((w)-state != JK_LB_STATE_ERROR (w)-state != JK_LB_STATE_BUSY (w)-activation != JK_LB_ACTIVATION_STOPPED (w)-activation != JK_LB_ACTIVATION_DISABLED) -#define JK_WORKER_USABLE_STICKY(w) ((w)-state != JK_LB_STATE_ERROR (w)-activation != JK_LB_ACTIVATION_STOPPED) +#define JK_WORKER_USABLE(w) ((w)-state != JK_LB_STATE_ERROR (w)-state != JK_LB_STATE_PROBE (w)-state != JK_LB_STATE_BUSY (w)-activation != JK_LB_ACTIVATION_STOPPED (w)-activation != JK_LB_ACTIVATION_DISABLED) +#define JK_WORKER_USABLE_STICKY(w) ((w)-state != JK_LB_STATE_ERROR (w)-state != JK_LB_STATE_PROBE (w)-activation != JK_LB_ACTIVATION_STOPPED) static const char *lb_locking_type[] = { JK_LB_LOCK_TEXT_OPTIMISTIC, @@ -65,6 +65,8 @@ JK_LB_STATE_TEXT_RECOVER, JK_LB_STATE_TEXT_BUSY, JK_LB_STATE_TEXT_ERROR, +JK_LB_STATE_TEXT_FORCE, +JK_LB_STATE_TEXT_PROBE, unknown, NULL }; @@ -172,6 +174,10 @@ return JK_LB_STATE_BUSY; else if (*v == 'e' || *v == 'E' || *v == '4') return JK_LB_STATE_ERROR; +else if (*v == 'f' || *v == 'F' || *v == '5') +return JK_LB_STATE_FORCE; +else if (*v == 'p' || *v == 'P' || *v == '6') +return JK_LB_STATE_PROBE; else return JK_LB_STATE_DEF; } @@ -446,7 +452,7 @@ jk_log(l, JK_LOG_INFO, worker %s is marked for recovery, w-s-name); -w-s-state = JK_LB_STATE_RECOVER; +w-s-state = JK_LB_STATE_FORCE; forced++; } } @@ -857,6 +863,9 @@ int retry_wait = JK_LB_MIN_RETRY_WAIT; s-route = rec-r; prec = rec; + +if (rec-s-state == JK_LB_STATE_RECOVER) +rec-s-state = JK_LB_STATE_PROBE; if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h?view=diffrev=500537r1=500536r2=500537 == --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.h Sat Jan 27 06:41:05 2007 @@ -62,13 +62,17 @@ #define JK_LB_STATE_RECOVER(2) #define JK_LB_STATE_BUSY (3) #define JK_LB_STATE_ERROR (4) +#define JK_LB_STATE_FORCE (5) +#define JK_LB_STATE_PROBE (6) #define JK_LB_STATE_DEF(JK_LB_STATE_NA) #define JK_LB_STATE_TEXT_NA(N/A) #define JK_LB_STATE_TEXT_OK(OK) #define JK_LB_STATE_TEXT_RECOVER (REC) #define JK_LB_STATE_TEXT_BUSY (BSY) #define JK_LB_STATE_TEXT_ERROR (ERR) -#define JK_LB_STATE_TEXT_MAX (JK_LB_STATE_ERROR) +#define JK_LB_STATE_TEXT_FORCE (FRC) +#define JK_LB_STATE_TEXT_PROBE (PRB) +#define JK_LB_STATE_TEXT_MAX (JK_LB_STATE_PROBE) #define JK_LB_STATE_TEXT_DEF (JK_LB_STATE_TEXT_NA) #define JK_LB_ACTIVATION_ACTIVE(0) #define JK_LB_ACTIVATION_DISABLED (1) Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500537r1=500536r2=500537 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Jan 27 06:41:05 2007 @@ -595,6 +595,12 @@ case JK_LB_STATE_RECOVER: mask = JK_STATUS_MASK_RECOVER; break; +case
svn commit: r500540 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml xdocs/reference/status.xml
Author: rjung Date: Sat Jan 27 06:58:59 2007 New Revision: 500540 URL: http://svn.apache.org/viewvc?view=revrev=500540 Log: Add status worker feature, that allows to mark an errored lb sub worker administratively for recovery. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/reference/status.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500540r1=500539r2=500540 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Jan 27 06:58:59 2007 @@ -105,8 +105,9 @@ #define JK_STATUS_CMD_UPDATE (4) #define JK_STATUS_CMD_RESET(5) #define JK_STATUS_CMD_VERSION (6) +#define JK_STATUS_CMD_RECOVER (7) #define JK_STATUS_CMD_DEF (JK_STATUS_CMD_LIST) -#define JK_STATUS_CMD_MAX (JK_STATUS_CMD_VERSION) +#define JK_STATUS_CMD_MAX (JK_STATUS_CMD_RECOVER) #define JK_STATUS_CMD_TEXT_UNKNOWN (unknown) #define JK_STATUS_CMD_TEXT_LIST(list) #define JK_STATUS_CMD_TEXT_SHOW(show) @@ -114,6 +115,7 @@ #define JK_STATUS_CMD_TEXT_UPDATE (update) #define JK_STATUS_CMD_TEXT_RESET (reset) #define JK_STATUS_CMD_TEXT_VERSION (version) +#define JK_STATUS_CMD_TEXT_RECOVER (recover) #define JK_STATUS_CMD_TEXT_DEF (JK_STATUS_CMD_TEXT_LIST) #define JK_STATUS_MIME_UNKNOWN (0) @@ -289,6 +291,7 @@ JK_STATUS_CMD_TEXT_UPDATE, JK_STATUS_CMD_TEXT_RESET, JK_STATUS_CMD_TEXT_VERSION, +JK_STATUS_CMD_TEXT_RECOVER, NULL }; @@ -768,6 +771,8 @@ return JK_STATUS_CMD_RESET; else if (!strcmp(cmd, JK_STATUS_CMD_TEXT_VERSION)) return JK_STATUS_CMD_VERSION; +else if (!strcmp(cmd, JK_STATUS_CMD_TEXT_RECOVER)) +return JK_STATUS_CMD_RECOVER; return JK_STATUS_CMD_UNKNOWN; } @@ -848,7 +853,8 @@ prev = status_cmd_int(arg); if (cmd == JK_STATUS_CMD_UNKNOWN) { if (prev == JK_STATUS_CMD_UPDATE || -prev == JK_STATUS_CMD_RESET) { +prev == JK_STATUS_CMD_RESET || +prev == JK_STATUS_CMD_RECOVER) { cmd = from; } } @@ -856,7 +862,8 @@ jk_printf(s, %s%s=%s, started ? amp; : ?, JK_STATUS_ARG_CMD, status_cmd_text(cmd)); if (cmd == JK_STATUS_CMD_EDIT || -cmd == JK_STATUS_CMD_RESET) { +cmd == JK_STATUS_CMD_RESET || +cmd == JK_STATUS_CMD_RECOVER) { jk_printf(s, %s%s=%s, amp;, JK_STATUS_ARG_FROM, status_cmd_text(prev)); } @@ -1323,6 +1330,11 @@ jk_puts(s, |); status_write_uri(s, p, R, JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN, name, wr-s-name, 0, 0, , l); +if (wr-s-state == JK_LB_STATE_ERROR) { +jk_puts(s, |); +status_write_uri(s, p, T, JK_STATUS_CMD_RECOVER, JK_STATUS_MIME_UNKNOWN, + name, wr-s-name, 0, 0, , l); +} jk_puts(s, ]nbsp;/td); jk_printf(s, JK_STATUS_SHOW_MEMBER_ROW, wr-s-name, @@ -2827,6 +2839,79 @@ return JK_FALSE; } +static int recover_worker(jk_ws_service_t *s, + status_endpoint_t *p, + jk_logger_t *l) +{ +unsigned int i; +const char *worker; +const char *sub_worker; +lb_worker_t *lb; +jk_worker_t *jw = NULL; +worker_record_t *wr = NULL; + +JK_TRACE_ENTER(l); +status_get_string(p, JK_STATUS_ARG_WORKER, , worker, l); +status_get_string(p, JK_STATUS_ARG_SUB_WORKER, , sub_worker, l); +jk_log(l, JK_LOG_INFO, + recovering worker '%s' sub worker '%s', + worker ? worker : (null), sub_worker ? sub_worker : (null)); +if (!worker || !worker[0]) { +jk_log(l, JK_LOG_WARNING, + NULL or EMPTY worker param); +JK_TRACE_EXIT(l); +return JK_FALSE; +} +jw = wc_get_worker_for_name(worker, l); +if (!jw) { +jk_log(l, JK_LOG_WARNING, + could not find worker '%s', + worker); +JK_TRACE_EXIT(l); +return JK_FALSE; +} +if (jw-type != JK_LB_WORKER_TYPE) { +jk_log(l, JK_LOG_WARNING, + worker type not implemented); +JK_TRACE_EXIT(l); +return JK_FALSE; +} +lb = (lb_worker_t *)jw-worker_private; +if (!lb) { +jk_log(l, JK_LOG_WARNING, + lb structure is (null)); +JK_TRACE_EXIT(l); +return JK_FALSE
svn commit: r500543 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml xdocs/reference/status.xml xdocs/reference/workers.xml
Author: rjung Date: Sat Jan 27 07:15:48 2007 New Revision: 500543 URL: http://svn.apache.org/viewvc?view=revrev=500543 Log: - Allow a user of a read/write status worker to switch it to and from read_only mode temporarily. - Do not show read/write commands in a read_only status worker. Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/reference/status.xml tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=500543r1=500542r2=500543 == --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Jan 27 07:15:48 2007 @@ -69,6 +69,7 @@ #define JK_STATUS_ARG_OPTION_NO_LEGEND 0x0004 #define JK_STATUS_ARG_OPTION_NO_LB 0x0008 #define JK_STATUS_ARG_OPTION_NO_AJP0x0010 +#define JK_STATUS_ARG_OPTION_READ_ONLY 0x0020 #define JK_STATUS_ARG_LB_RETRIES (lr) #define JK_STATUS_ARG_LB_RECOVER_TIME (lt) @@ -1150,6 +1151,7 @@ char buf_wr[32]; int cmd; int mime; +int read_only = 0; int single = 0; unsigned int hide_members; const char *arg; @@ -1169,6 +1171,13 @@ mime = status_mime_int(arg); hide_members = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) JK_STATUS_ARG_OPTION_NO_MEMBERS; +if (w-read_only) { +read_only = 1; +} +else { +read_only = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) +JK_STATUS_ARG_OPTION_READ_ONLY; +} if (cmd == JK_STATUS_CMD_SHOW) { single = 1; } @@ -1202,12 +1211,14 @@ status_write_uri(s, p, S, JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN, name, , 0, 0, , l); } -jk_puts(s, |); -status_write_uri(s, p, E, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN, - name, , 0, 0, , l); -jk_puts(s, |); -status_write_uri(s, p, R, JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN, - name, , 0, 0, , l); +if (!read_only) { +jk_puts(s, |); +status_write_uri(s, p, E, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN, + name, , 0, 0, , l); +jk_puts(s, |); +status_write_uri(s, p, R, JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN, + name, , 0, 0, , l); +} jk_puts(s, ]nbsp;nbsp;); jk_putv(s, Worker Status for , name, /h3\n, NULL); jk_puts(s, table JK_STATUS_SHOW_LB_HEAD); @@ -1324,18 +1335,22 @@ if (mime == JK_STATUS_MIME_HTML) { -jk_puts(s, tr\ntd[); -status_write_uri(s, p, E, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN, - name, wr-s-name, 0, 0, , l); -jk_puts(s, |); -status_write_uri(s, p, R, JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN, - name, wr-s-name, 0, 0, , l); -if (wr-s-state == JK_LB_STATE_ERROR) { +jk_puts(s, tr\ntd); +if (!read_only) { +jk_puts(s, [); +status_write_uri(s, p, E, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN, + name, wr-s-name, 0, 0, , l); jk_puts(s, |); -status_write_uri(s, p, T, JK_STATUS_CMD_RECOVER, JK_STATUS_MIME_UNKNOWN, +status_write_uri(s, p, R, JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN, name, wr-s-name, 0, 0, , l); +if (wr-s-state == JK_LB_STATE_ERROR) { +jk_puts(s, |); +status_write_uri(s, p, T, JK_STATUS_CMD_RECOVER, JK_STATUS_MIME_UNKNOWN, + name, wr-s-name, 0, 0, , l); +} +jk_puts(s, ]); } -jk_puts(s, ]nbsp;/td); +jk_puts(s, nbsp;/td); jk_printf(s, JK_STATUS_SHOW_MEMBER_ROW, wr-s-name, status_worker_type(wr-w-type), @@ -1448,25 +1463,27 @@ if (mime == JK_STATUS_MIME_HTML) { jk_puts(s, /tablebr/\n); -jk_puts(s, bE/bdit one attribute for all members: [); -status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_ACTIVATION, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN, - name, , 0, 0, JK_STATUS_ARG_LBM_ACTIVATION, l); -jk_puts(s, \n|); -status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_FACTOR
svn commit: r500550 - in /tomcat/connectors/trunk/jk: jkstatus/src/share/org/apache/jk/status/ native/common/ xdocs/miscellaneous/ xdocs/reference/
Author: rjung Date: Sat Jan 27 07:41:36 2007 New Revision: 500550 URL: http://svn.apache.org/viewvc?view=revrev=500550 Log: Show estimated time until next global maintenance in status worker. Change displayed time until next recovery to a min/max pair. Modified: tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancerMember.java tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml tomcat/connectors/trunk/jk/xdocs/reference/status.xml Modified: tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancerMember.java URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancerMember.java?view=diffrev=500550r1=500549r2=500550 == --- tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancerMember.java (original) +++ tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancerMember.java Sat Jan 27 07:41:36 2007 @@ -88,6 +88,12 @@ /* possible with 1.2.20 */ int time_to_recover = -1 ; +/* possible with 1.2.21 */ +int time_to_recover_max = -1 ; + +/* possible with 1.2.21 */ +int time_to_recover_min = -1 ; + /** * @return Returns the jvm_route. * @since mod_jk 1.2.16 @@ -107,22 +113,22 @@ } /** -* @return the route + * @return the route * @since mod_jk 1.2.20 -*/ - public String getRoute() { - return route; - } + */ +public String getRoute() { +return route; +} - /** -* @param route the route to set +/** + * @param route the route to set * @since mod_jk 1.2.20 -*/ - public void setRoute(String route) { - this.route = route; - } + */ +public void setRoute(String route) { +this.route = route; +} - /** +/** * @return Returns the address. */ public String getAddress() { @@ -459,21 +465,52 @@ this.distance = distance; } - /** -* @return the time_to_recover +/** + * @return the time_to_recover * @since mod_jk 1.2.20 -*/ - public int getTime_to_recover() { - return time_to_recover; - } + */ +public int getTime_to_recover() { +return time_to_recover; +} - /** -* @param time_to_recover the time_to_recover to set +/** + * @param time_to_recover the time_to_recover to set * @since mod_jk 1.2.20 -*/ - public void setTime_to_recover(int time_to_recover) { - this.time_to_recover = time_to_recover; - } + */ +public void setTime_to_recover(int time_to_recover) { +this.time_to_recover = time_to_recover; +} +/** + * @return the time_to_recover_min + * @since mod_jk 1.2.21 + */ +public int getTime_to_recover_min() { +return time_to_recover_min; +} + +/** + * @param time_to_recover_min the time_to_recover_min to set + * @since mod_jk 1.2.21 + */ +public void setTime_to_recover_min(int time_to_recover_min) { +this.time_to_recover_min = time_to_recover_min; +} + +/** + * @return the time_to_recover_max + * @since mod_jk 1.2.21 + */ +public int getTime_to_recover_max() { +return time_to_recover_max; +} + +/** + * @param time_to_recover_max the time_to_recover_max to set + * @since mod_jk 1.2.21 + */ +public void setTime_to_recover_max(int time_to_recover_max) { +this.time_to_recover_max = time_to_recover_max; +} } Modified: tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java?view=diffrev=500550r1=500549r2=500550 == --- tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java (original) +++ tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java Sat Jan 27 07:41:36 2007 @@ -622,6 +622,17 @@ currentProject.setNewProperty(prefix + .time_to_recover, Integer.toString(member.getTime_to_recover())); } +if(member.getTime_to_recover_min() = 0) { +currentProject.setNewProperty(prefix + .time_to_recover_min, +Integer.toString(member.getTime_to_recover_min())); +} +if(member.getTime_to_recover_max() = 0) { +currentProject.setNewProperty(prefix + .time_to_recover_max, +Integer.toString