svn commit: r1649490 - in /tomcat/tc8.0.x/tags/TOMCAT_8_0_16: ./ build.properties.default
Author: markt Date: Mon Jan 5 10:01:39 2015 New Revision: 1649490 URL: http://svn.apache.org/r1649490 Log: tag 8.0.16 Added: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ - copied from r1649489, tomcat/trunk/ Modified: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default Modified: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default?rev=1649490&r1=1649489&r2=1649490&view=diff == --- tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default (original) +++ tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default Mon Jan 5 10:01:39 2015 @@ -27,7 +27,7 @@ version.major=9 version.minor=0 version.build=0 version.patch=0 -version.suffix=-dev +version.suffix= # - Build control flags - # Note enabling validation uses Checkstyle which is LGPL licensed - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649492 - /tomcat/tc8.0.x/tags/TOMCAT_8_0_16/
Author: markt Date: Mon Jan 5 10:10:52 2015 New Revision: 1649492 URL: http://svn.apache.org/r1649492 Log: Tagged wrong branch Removed: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649495 - in /tomcat/tc8.0.x/tags/TOMCAT_8_0_16: ./ build.properties.default
Author: markt Date: Mon Jan 5 10:22:27 2015 New Revision: 1649495 URL: http://svn.apache.org/r1649495 Log: Tag 8.0.16 Added: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ (props changed) - copied from r1649494, tomcat/tc8.0.x/trunk/ Modified: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- bugtraq:append = false Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- --- bugtraq:logregex (added) +++ bugtraq:logregex Mon Jan 5 10:22:27 2015 @@ -0,0 +1,2 @@ +(https?\://issues.apache.org/bugzilla/show_bug.cgi\?id=\d+|BZ\s?\d+) +(\d+) Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- --- bugtraq:message (added) +++ bugtraq:message Mon Jan 5 10:22:27 2015 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- bugtraq:number = true Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- bugtraq:warnifnoissue = false Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- --- svn:ignore (added) +++ svn:ignore Mon Jan 5 10:22:27 2015 @@ -0,0 +1,7 @@ +.* +build.properties +logs +nbproject +output +work +*.iml Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Mon Jan 5 10:22:27 2015 @@ -0,0 +1 @@ +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892 ,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907 Propchange: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ -- svnmailer:content-charset = utf-8 Modified: tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default?rev=1649495&r1=1649494&r2=1649495&view=diff == --- tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default (original) +++ tomcat/tc8.0.x/tags/TOMCAT_8_0_16/build.properties.default Mon Jan 5 10:22:27 2015 @@ -27,7 +27,7 @@ version.major=8 version.minor=0 version.build=16 version.patch=0 -version.suffix=-dev +version.suffix= # - Build control flags - # Note enabling validation uses Checkstyle which is LGPL licensed - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649496 - in /tomcat/jk/trunk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Mon Jan 5 10:31:17 2015 New Revision: 1649496 URL: http://svn.apache.org/r1649496 Log: Don't log trailing garbage from log buffer if mod_jk log fails and we log instead to the Apache error log. Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c tomcat/jk/trunk/native/apache-2.0/mod_jk.c Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1649496&r1=1649495&r2=1649496&view=diff == --- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Mon Jan 5 10:31:17 2015 @@ -2964,8 +2964,8 @@ static int JK_METHOD jk_log_to_file(jk_l what[used++] = '\n'; if (write(log_fd, what, used) < 0 ) { ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, NULL, - "mod_jk: jk_log_to_file %s failed", - what); + "mod_jk: jk_log_to_file %.*s failed", + used, what); } } Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1649496&r1=1649495&r2=1649496&view=diff == --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Jan 5 10:31:17 2015 @@ -3200,8 +3200,8 @@ static int JK_METHOD jk_log_to_file(jk_l char error[256]; apr_strerror(rv, error, 254); ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, - "mod_jk: jk_log_to_file %s failed: %s", - what, error); + "mod_jk: jk_log_to_file %.*s failed: %s", + used, what, error); } rv = apr_global_mutex_unlock(jk_log_lock); if (rv != APR_SUCCESS) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649498 - /tomcat/jk/trunk/native/apache-2.0/mod_jk.c
Author: rjung Date: Mon Jan 5 10:39:50 2015 New Revision: 1649498 URL: http://svn.apache.org/r1649498 Log: Use separate cleanups for child and main process. Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1649498&r1=1649497&r2=1649498&view=diff == --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Jan 5 10:39:50 2015 @@ -2638,9 +2638,17 @@ static const command_rec jk_cmds[] = { /* The JK module handlers*/ /* = */ -/** Util - cleanup shmem. +/** Util - cleanup for all processes. */ -static apr_status_t jk_cleanup_shmem(void *data) +static apr_status_t jk_cleanup_proc(void *data) +{ +jk_shm_close(main_log); +return APR_SUCCESS; +} + +/** Util - cleanup for child processes. + */ +static apr_status_t jk_cleanup_child(void *data) { /* Force the watchdog thread exit */ if (jk_watchdog_interval > 0) { @@ -2648,8 +2656,7 @@ static apr_status_t jk_cleanup_shmem(voi while (jk_watchdog_running) apr_sleep(apr_time_from_sec(1)); } -jk_shm_close(main_log); -return APR_SUCCESS; +return jk_cleanup_proc(data); } /** Main service method, called to forward a request to tomcat @@ -3386,7 +3393,7 @@ static void jk_child_init(apr_pool_t * p } if ((rc = jk_shm_attach(jk_shm_file, jk_shm_size, conf->log)) == 0) { -apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_shmem, +apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_child, apr_pool_cleanup_null); } else { @@ -3490,7 +3497,7 @@ static int init_jk(apr_pool_t * pconf, j } if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf->log)) == 0) { apr_pool_cleanup_register(pconf, conf->log, - jk_cleanup_shmem, + jk_cleanup_proc, apr_pool_cleanup_null); } else { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649501 - in /tomcat/jk/trunk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Author: rjung Date: Mon Jan 5 11:07:35 2015 New Revision: 1649501 URL: http://svn.apache.org/r1649501 Log: Make sure we don't use the main mod_jk log during process shutdown in case it is piped. Write to the error log instead. During shutdown the piped logger could already be gone and the pipe would block once the buffer gets full. Typically this does not happen, since we don't log much during shutdown. Observed in the main process during "apachectl restart" under load with logging added to process cleanup. Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c tomcat/jk/trunk/native/apache-2.0/mod_jk.c Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1649501&r1=1649500&r2=1649501&view=diff == --- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Mon Jan 5 11:07:35 2015 @@ -265,6 +265,7 @@ typedef struct dir_config_struct static server_rec *main_server = NULL; static jk_logger_t *main_log = NULL; +static int main_log_is_piped = JK_FALSE; static table *jk_log_fds = NULL; static jk_worker_env_t worker_env; static char *jk_shm_file = NULL; @@ -2968,6 +2969,15 @@ static int JK_METHOD jk_log_to_file(jk_l used, what); } } +else { +/* Can't use mod_jk log any more, log to error log instead. + * Choose APLOG_ERR, since we already checked above, that if + * the mod_jk log file would still be open, we would have + * actually logged the message there + */ +ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, NULL, + "%.*s", used, what); +} return JK_TRUE; } @@ -2995,6 +3005,7 @@ static void open_jk_log(server_rec *s, p const char *fname; int jklogfd; piped_log *pl; +int is_piped = JK_FALSE; jk_logger_t *jkl; jk_file_logger_t *flp; jk_server_conf_t *conf = @@ -3036,6 +3047,7 @@ static void open_jk_log(server_rec *s, p exit(1); } jklogfd = ap_piped_log_write_fd(pl); +is_piped = JK_TRUE; } else { fname = ap_server_root_relative(p, conf->log_file); @@ -3070,6 +3082,7 @@ static void open_jk_log(server_rec *s, p jk_set_time_fmt(conf->log, conf->stamp_format_string); if (main_log == NULL) main_log = conf->log; +main_log_is_piped = is_piped; return; } @@ -3568,6 +3581,17 @@ static void jk_server_cleanup(void *data static void jk_generic_cleanup(server_rec *s) { +/* If the main log is piped, we need to make sure + * it is no longer used. The external log process + * (e.g. rotatelogs) will be gone now and the pipe will + * block, once the buffer gets full + */ +if (main_log && main_log_is_piped && main_log->logger_private) { +jk_file_logger_t *p = main_log->logger_private; +if (p) { +p->log_fd = -1; +} +} if (jk_worker_properties) { jk_map_free(&jk_worker_properties); jk_worker_properties = NULL; Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1649501&r1=1649500&r2=1649501&view=diff == --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Jan 5 11:07:35 2015 @@ -276,6 +276,7 @@ typedef struct apache_private_data apach static server_rec *main_server = NULL; static jk_logger_t *main_log = NULL; +static int main_log_is_piped = JK_FALSE; static apr_hash_t *jk_log_fps = NULL; static jk_worker_env_t worker_env; static apr_global_mutex_t *jk_log_lock = NULL; @@ -2642,6 +2643,17 @@ static const command_rec jk_cmds[] = { */ static apr_status_t jk_cleanup_proc(void *data) { +/* If the main log is piped, we need to make sure + * it is no longer used. The external log process + * (e.g. rotatelogs) will be gone now and the pipe will + * block, once the buffer gets full + */ +if (main_log && main_log_is_piped && main_log->logger_private) { +jk_file_logger_t *p = main_log->logger_private; +if (p) { +p->jklogfp = NULL; +} +} jk_shm_close(main_log); return APR_SUCCESS; } @@ -3217,6 +3229,15 @@ static int JK_METHOD jk_log_to_file(jk_l /* XXX: Maybe this should be fatal? */ } } +else { +/* Can't use mod_jk log any more, log to error log instead. + * Choose APLOG_ERR, since we already checked above, that if + * the mod_jk log file would still be open, we would have + * actually logg
[jira] [Commented] (MTOMCAT-280) Allow running deploy-only and redeploy-only goals without pom file
[ https://issues.apache.org/jira/browse/MTOMCAT-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264490#comment-14264490 ] Matteo TURRA commented on MTOMCAT-280: -- I tried this version https://repository.apache.org/content/groups/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.3-SNAPSHOT/tomcat7-maven-plugin-2.3-20141117.031147-18.jar and I got the " Goal requires a project to execute but there is no POM in this directory" error message. > Allow running deploy-only and redeploy-only goals without pom file > -- > > Key: MTOMCAT-280 > URL: https://issues.apache.org/jira/browse/MTOMCAT-280 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement > Components: tomcat7 >Reporter: Lauri Lehtinen >Assignee: Olivier Lamy (*$^¨%`£) > Labels: patch > Fix For: 2.3 > > Attachments: MTOMCAT-280.patch > > > Use case is as follows: > 0. A 2-step CI build exists for the sole purpose of deploying any artifact to > a remote tomcat server > 1. Run mvn dependency:get -D... -D... to download a war file from Nexus. > 2. Run mvn tomcat7:deploy -D... -D... to deploy the war file. > I would prefer to not involve a pom file in this. However, if the plugin > doesn't find one, it fail.s > Also, it appears that all the properties I need, except warFile, can be > overriden with -D's. The only way I'm able to make this work is create a > dummy pom file with tomcat7 plugin defined in the build section, and a > ${warFile} in its configuration section. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56489] Include a directory for configuration files
https://issues.apache.org/bugzilla/show_bug.cgi?id=56489 Rainer Jung changed: What|Removed |Added Hardware|PC |All OS|Linux |All --- Comment #1 from Rainer Jung --- Note that you can work around this issue by using the JkWorkerProperty syntax inside httpd.conf instead of using workers.properties. See for JkWorkerProperty in http://tomcat.apache.org/connectors-doc/reference/apache.html. Example: JkWorkerProperty worker.list=myworker JkWorkerProperty worker.myworker.type=ajp13 JkWorkerProperty worker.myworker.host=localhost JkWorkerProperty worker.myworker.port=8009 ... Apache allows to split up config files into modular pieces and paste them together using the "Include" directive with various wildcard possibilities. With that approach you can also mix the "reference" feature of the mod_jk properties and e.g. mod_macro to simplify config files. It could make sense to support your original enhancement request, but currently I don't plan to work on it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649503 - in /tomcat/jk/trunk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_ajp_common.c common/jk_ajp_common.h common/jk_lb_worker.c common/jk_service.h common/jk_worker.c co
Author: rjung Date: Mon Jan 5 11:22:37 2015 New Revision: 1649503 URL: http://svn.apache.org/r1649503 Log: BZ 56703: Improve connection counting used in status worker for monitoring purposes. Use a shutdown cleanup handler in mod_jk (Apache) to correctly count down connections closed by terminating child processes. Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c tomcat/jk/trunk/native/apache-2.0/mod_jk.c tomcat/jk/trunk/native/common/jk_ajp_common.c tomcat/jk/trunk/native/common/jk_ajp_common.h tomcat/jk/trunk/native/common/jk_lb_worker.c tomcat/jk/trunk/native/common/jk_service.h tomcat/jk/trunk/native/common/jk_worker.c tomcat/jk/trunk/native/common/jk_worker.h Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1649503&r1=1649502&r2=1649503&view=diff == --- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Mon Jan 5 11:22:37 2015 @@ -3543,6 +3543,7 @@ static int jk_fixups(request_rec * r) static void child_exit_handler(server_rec * s, ap_pool * p) { +wc_shutdown(main_log); /* srevilak - refactor cleanup body to jk_generic_cleanup() */ jk_generic_cleanup(s); jk_shm_close(main_log); Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1649503&r1=1649502&r2=1649503&view=diff == --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Jan 5 11:22:37 2015 @@ -2668,6 +2668,7 @@ static apr_status_t jk_cleanup_child(voi while (jk_watchdog_running) apr_sleep(apr_time_from_sec(1)); } +wc_shutdown(main_log); return jk_cleanup_proc(data); } Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1649503&r1=1649502&r2=1649503&view=diff == --- tomcat/jk/trunk/native/common/jk_ajp_common.c (original) +++ tomcat/jk/trunk/native/common/jk_ajp_common.c Mon Jan 5 11:22:37 2015 @@ -3124,6 +3124,7 @@ int JK_METHOD ajp_worker_factory(jk_work aw->worker.worker_private = aw; aw->worker.maintain = ajp_maintain; +aw->worker.shutdown = ajp_shutdown; aw->logon = NULL; @@ -3461,6 +3462,49 @@ int JK_METHOD ajp_maintain(jk_worker_t * JK_TRACE_EXIT(l); return JK_TRUE; } +else { +JK_LOG_NULL_PARAMS(l); +} + +JK_TRACE_EXIT(l); +return JK_FALSE; +} + +int JK_METHOD ajp_shutdown(jk_worker_t *pThis, jk_logger_t *l) +{ +JK_TRACE_ENTER(l); + +if (pThis && pThis->worker_private) { +ajp_worker_t *aw = pThis->worker_private; +int i; +unsigned int n = 0; + +JK_ENTER_CS(&aw->cs); +for (i = (int)aw->ep_cache_sz - 1; +i >= 0; i--) { +/* Skip the closed sockets + */ +if (IS_SLOT_AVAIL(aw->ep_cache[i]) && +IS_VALID_SOCKET(aw->ep_cache[i]->sd)) { +n++; +aw->ep_cache[i]->reuse = JK_FALSE; +aw->ep_cache[i]->hard_close = JK_TRUE; +ajp_reset_endpoint(aw->ep_cache[i], l); +aw->ep_cache[i]->sd = JK_INVALID_SOCKET; +if (JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + "(%s) shut down pool slot=%d", + aw->name, i); +} +} +JK_LEAVE_CS(&aw->cs); +if (n && JK_IS_DEBUG_LEVEL(l)) +jk_log(l, JK_LOG_DEBUG, + "(%s) shut down %u sockets from %u pool slots", + aw->name, n, aw->ep_cache_sz); +JK_TRACE_EXIT(l); +return JK_TRUE; +} else { JK_LOG_NULL_PARAMS(l); } Modified: tomcat/jk/trunk/native/common/jk_ajp_common.h URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.h?rev=1649503&r1=1649502&r2=1649503&view=diff == --- tomcat/jk/trunk/native/common/jk_ajp_common.h (original) +++ tomcat/jk/trunk/native/common/jk_ajp_common.h Mon Jan 5 11:22:37 2015 @@ -468,6 +468,8 @@ int ajp_connection_tcp_get_message(ajp_e int JK_METHOD ajp_maintain(jk_worker_t *pThis, time_t now, jk_logger_t *l); +int JK_METHOD ajp_shutdown(jk_worker_t *pThis, jk_logger_t *l); + void jk_ajp_get_cping_text(int mode, char *buf); int jk_ajp_get_cping_mode(const char *m, int def); Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_lb_worker.c?rev=1649503&r1=1649502&r2=1649503
svn commit: r1649506 - in /tomcat/jk/trunk: native/common/jk_ajp_common.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Mon Jan 5 11:45:31 2015 New Revision: 1649506 URL: http://svn.apache.org/r1649506 Log: BZ 56703: Status: Improve connected counter by using atomics. Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1649506&r1=1649505&r2=1649506&view=diff == --- tomcat/jk/trunk/native/common/jk_ajp_common.c (original) +++ tomcat/jk/trunk/native/common/jk_ajp_common.c Mon Jan 5 11:45:31 2015 @@ -818,7 +818,7 @@ static void ajp_abort_endpoint(ajp_endpo jk_shutdown_socket(ae->sd, l); } } -ae->worker->s->connected--; +JK_ATOMIC_DECREMENT(&(ae->worker->s->connected)); ae->sd = JK_INVALID_SOCKET; } ae->last_op = JK_AJP13_END_RESPONSE; @@ -856,9 +856,9 @@ void ajp_close_endpoint(ajp_endpoint_t * ae->worker->name, ae->sd, ae->reuse ? "" : " (socket shutdown)"); if (IS_VALID_SOCKET(ae->sd)) { jk_shutdown_socket(ae->sd, l); -ae->worker->s->connected--; +JK_ATOMIC_DECREMENT(&(ae->worker->s->connected)); +ae->sd = JK_INVALID_SOCKET; } -ae->sd = JK_INVALID_SOCKET; jk_close_pool(&(ae->pool)); free(ae); JK_TRACE_EXIT(l); @@ -884,11 +884,9 @@ static int ajp_next_connection(ajp_endpo */ if (IS_VALID_SOCKET(ae->sd)) { jk_shutdown_socket(ae->sd, l); -ae->worker->s->connected--; +JK_ATOMIC_DECREMENT(&(ae->worker->s->connected)); +ae->sd = JK_INVALID_SOCKET; } -/* Mark existing endpoint socket as closed - */ -ae->sd = JK_INVALID_SOCKET; JK_ENTER_CS(&aw->cs); for (i = 0; i < aw->ep_cache_sz; i++) { /* Find cache slot with usable socket @@ -1036,6 +1034,7 @@ int ajp_connect_to_endpoint(ajp_endpoint { char buf[64]; int rc = JK_TRUE; +int connected; JK_TRACE_ENTER(l); @@ -1055,11 +1054,11 @@ int ajp_connect_to_endpoint(ajp_endpoint JK_TRACE_EXIT(l); return JK_FALSE; } -ae->worker->s->connected++; +connected = JK_ATOMIC_INCREMENT(&(ae->worker->s->connected)); /* Update maximum number of connections */ -if (ae->worker->s->connected > ae->worker->s->max_connected) -ae->worker->s->max_connected = ae->worker->s->connected; +if (connected > ae->worker->s->max_connected) +ae->worker->s->max_connected = connected; /* set last_access only if needed */ if (ae->worker->cache_timeout > 0) @@ -1153,7 +1152,7 @@ void jk_ajp_pull(ajp_worker_t * aw, int aw->ep_cache[i]->sd = JK_INVALID_SOCKET; aw->ep_cache[i]->addr_sequence = aw->addr_sequence; jk_shutdown_socket(sd, l); -aw->s->connected--; +JK_ATOMIC_DECREMENT(&(aw->s->connected)); } } jk_clone_sockaddr(&(aw->worker_inet_addr), &inet_addr); @@ -1215,7 +1214,7 @@ void jk_ajp_push(ajp_worker_t * aw, int aw->ep_cache[i]->sd = JK_INVALID_SOCKET; aw->ep_cache[i]->addr_sequence = aw->addr_sequence; jk_shutdown_socket(sd, l); -aw->s->connected--; +JK_ATOMIC_DECREMENT(&(aw->s->connected)); } } JK_LEAVE_CS(&aw->cs); @@ -3443,9 +3442,9 @@ int JK_METHOD ajp_maintain(jk_worker_t * * called from the watchdog thread. */ for (m = 0; m < m_count; m++) { -if (m_sock[m] != JK_INVALID_SOCKET) { +if (IS_VALID_SOCKET(m_sock[m])) { jk_shutdown_socket(m_sock[m], l); -aw->s->connected--; +JK_ATOMIC_DECREMENT(&(aw->s->connected)); } } free(m_sock); Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1649506&r1=1649505&r2=1649506&view=diff == --- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Mon Jan 5 11:45:31 2015 @@ -171,6 +171,11 @@ 44454: Improve busy counter by using atomics. (rjung) + +56703: Status: Improve connected counter. Use atomics +and for mod_jk (Apache) currectly count down connections closed +by child processes that are stopped. (rjung) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56703] "Current number of backend connections" counter ever increasing when timeouts are defined
https://issues.apache.org/bugzilla/show_bug.cgi?id=56703 Rainer Jung changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Rainer Jung --- I have improved the implementation of the connected counter in two ways now: - using atomics so that we don't miss any increments or decrements under high load (r1649506) - adding a shutdown handler for Apache child processes, that closes and decrements any connection held by a child process (r1649503). Such process shut downs can happen e.g. by a normal process termination because of e.g. MaxSpareThreads or MaxConnectionsPerChild in the Apache config. Closing this now, can be reopened it the next release proves to still not count correctly. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 49469] Workers status page has negative number of connections
https://issues.apache.org/bugzilla/show_bug.cgi?id=49469 Rainer Jung changed: What|Removed |Added Status|NEW |RESOLVED Hardware|PC |All Resolution|--- |FIXED OS|Linux |All Severity|enhancement |normal --- Comment #1 from Rainer Jung --- See BZ 56703: the implementation of the "connected" counter has been improved a lot for version 1.2.41. Closing this now, can be reopened it the next release proves to still not count correctly. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649513 - /tomcat/tc8.0.x/trunk/java/org/apache/catalina/AccessLog.java
Author: markt Date: Mon Jan 5 12:22:19 2015 New Revision: 1649513 URL: http://svn.apache.org/r1649513 Log: Trivial whitespace change to try and trigger a CI build Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/AccessLog.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/AccessLog.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/AccessLog.java?rev=1649513&r1=1649512&r2=1649513&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/AccessLog.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/AccessLog.java Mon Jan 5 12:22:19 2015 @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.catalina; import org.apache.catalina.connector.Request; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649515 - in /tomcat/jk/trunk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml
Author: rjung Date: Mon Jan 5 12:30:12 2015 New Revision: 1649515 URL: http://svn.apache.org/r1649515 Log: BZ 44571: Ensure that we return with status 503 if we can not get and endpoint for a worker. Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c tomcat/jk/trunk/native/apache-2.0/mod_jk.c tomcat/jk/trunk/native/iis/jk_isapi_plugin.c tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1649515&r1=1649514&r2=1649515&view=diff == --- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Mon Jan 5 12:30:12 2015 @@ -2682,6 +2682,13 @@ static int jk_handler(request_rec * r) } } } +else { +jk_log(conf->log, JK_LOG_ERROR, "Could not get endpoint" + " for worker=%s", + STRNULL_FOR_NULL(worker_name)); +rc = 0; /* just to make sure that we know we've failed */ +is_error = HTTP_SERVICE_UNAVAILABLE; +} #ifndef NO_GETTIMEOFDAY gettimeofday(&tv_end, NULL); if (tv_end.tv_usec < tv_begin.tv_usec) { Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1649515&r1=1649514&r2=1649515&view=diff == --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Jan 5 12:30:12 2015 @@ -2888,6 +2888,7 @@ static int jk_handler(request_rec * r) " for worker=%s", worker_name); rc = 0; /* just to make sure that we know we've failed */ +is_error = HTTP_SERVICE_UNAVAILABLE; } } else { Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1649515&r1=1649514&r2=1649515&view=diff == --- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Jan 5 12:30:12 2015 @@ -2337,9 +2337,12 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSI e->done(&e, logger); } else { +int is_error = JK_HTTP_SERVER_BUSY; jk_log(logger, JK_LOG_ERROR, "Failed to obtain an endpoint to service request - " "your connection_pool_size is probably less than the threads in your web server!"); +lpEcb->dwHttpStatusCode = is_error; +write_error_message(lpEcb, is_error, private_data.err_hdrs); } } else { Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1649515&r1=1649514&r2=1649515&view=diff == --- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Mon Jan 5 12:30:12 2015 @@ -176,6 +176,10 @@ and for mod_jk (Apache) currectly count down connections closed by child processes that are stopped. (rjung) + +44571: Ensure that we return with status 503 if we +can not get and endpoint for a worker. (rjung) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 44571] Limits busy per worker to a threshold
https://issues.apache.org/bugzilla/show_bug.cgi?id=44571 Rainer Jung changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Rainer Jung --- I agree with the comments form Tim. The "busy" limit can and should be done with the existing feature of restricting the connection_pool_size in combination with a (short) connection_acquire_timeout. I have committed in r1649515 a change to ensure, that if we can't get an endpoint, we always return 503. This will be part of version 1.2.41. Closing this an FIXED, because of the 503 part. If you see any deficit using the above suggestion, you can reopen this issue. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54121] add a option to disable checkThreadLocalMapForLeaks
https://issues.apache.org/bugzilla/show_bug.cgi?id=54121 Alex Panchenko changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #3 from Alex Panchenko --- I would like to reopen this bug, IMHO reporting this does not help at all as most of the time it is reported for external libraries, so the only result is wasted disk space. I believe everybody just restarts the tomcat process after updating their web applications - the most reliable approach. E.g. we have the following in logs: Dec 18, 2014 1:58:10 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [] created a ThreadLocal with key of type [com.google.common.escape.Platform$1] (value [com.google.common.escape.Platform$1@3fae9355]) and a value of type [char[]] (value [[C@27d94f22]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. this is just char[1024] reused and I am fine with that. And a few similar cases from other libraries, which we can't fix or stop using at the moment. I wonder if this warning is reported in each web project bugtracker, e.g. https://code.google.com/p/google-gson/issues/detail?id=402 https://www.jfrog.com/jira/browse/RTFACT-5567 https://confluence.atlassian.com/display/STASHKB/Harmless+checkThreadLocalMapForLeaks+messages+on+catalina.out I see 2 possible ways to fix this message which we don't care about: - an option to disable it per webapp/server - reporting it as INFO/WARN so the message can be suppressed in logging configuration What do you think of this? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54121] add a option to disable checkThreadLocalMapForLeaks
https://issues.apache.org/bugzilla/show_bug.cgi?id=54121 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |INVALID --- Comment #4 from Mark Thomas --- Re-closing as INVALID as that is the correct status for the original report. See BZ 50175 for the request to make the memory leak checks configurable. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[VOTE] Release Apache Tomcat 8.0.16
The proposed Apache Tomcat 8.0.16 release is now available for voting. The main changes since 8.0.15 are: - Correct a regression in annotation scanning introduced in 8.0.15 - The RemoteAddrValve and RemoteHostValve can now optionally include the port when filtering along with a new option to trigger authentication rather than denying access - Various edge cases fixes in WebSocket There is also a large collection of bug fixes, new features and performance improvements. For full details, see the changelog: http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.16/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-1028/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ The proposed 8.0.16 release is: [ ] Broken - do not release [ ] Stable - go ahead and release as 8.0.16 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 50175] Enhance memory leak detection by selectively applying methods [PATCH?]
https://issues.apache.org/bugzilla/show_bug.cgi?id=50175 --- Comment #7 from Rainer Jung --- I agree it would be nice if we could disable leak detection in case the JVM shuts down. This is a frequent case and in that case the leaks don't matter. The logs in this case only raise awareness for the sitution when one would switch from recycling the JVM to hot redeployment, embedded mode or similar. OTOH the output often lowers awareness for real problems logged during shutdown. Since many of the leak problems are non-trivial to fix, many users get used to the bunch of messages logged during shutdown and do no longer look at any (other) shutdown messages. I'm undecided whether the default during JVM shutdown should be doing leak detection or not doing leak detection. I had a look at how to detect the shutdown but found it hard to do without changing the lifecycle model. But maybe there's a way to detect JVM shutdown outside of our lifecycle model (using a global singleton or similar). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-280) Allow running deploy-only and redeploy-only goals without pom file
[ https://issues.apache.org/jira/browse/MTOMCAT-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264622#comment-14264622 ] Matteo TURRA commented on MTOMCAT-280: -- I think the requiresProject = false attribute is needed in the Mojo annotation, to skip the check that fire this Exception: Caused by: org.apache.maven.lifecycle.MissingProjectException: Goal requires a project to execute but there is no POM in this directory (/home/mturra/checkout/didanet/web/didanet/target). Please verify you invoked Maven from the correct directory. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) And the -Dtomcat.ignorePackaging=true must be added to skip the war type checking on pom. > Allow running deploy-only and redeploy-only goals without pom file > -- > > Key: MTOMCAT-280 > URL: https://issues.apache.org/jira/browse/MTOMCAT-280 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement > Components: tomcat7 >Reporter: Lauri Lehtinen >Assignee: Olivier Lamy (*$^¨%`£) > Labels: patch > Fix For: 2.3 > > Attachments: MTOMCAT-280.patch > > > Use case is as follows: > 0. A 2-step CI build exists for the sole purpose of deploying any artifact to > a remote tomcat server > 1. Run mvn dependency:get -D... -D... to download a war file from Nexus. > 2. Run mvn tomcat7:deploy -D... -D... to deploy the war file. > I would prefer to not involve a pom file in this. However, if the plugin > doesn't find one, it fail.s > Also, it appears that all the properties I need, except warFile, can be > overriden with -D's. The only way I'm able to make this work is create a > dummy pom file with tomcat7 plugin defined in the build section, and a > ${warFile} in its configuration section. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.0.16
On 05/01/2015 13:13, Mark Thomas wrote: > The proposed Apache Tomcat 8.0.16 release is now available for voting. > > The main changes since 8.0.15 are: > - Correct a regression in annotation scanning introduced in 8.0.15 > - The RemoteAddrValve and RemoteHostValve can now optionally include > the port when filtering along with a new option to trigger > authentication rather than denying access > - Various edge cases fixes in WebSocket > > There is also a large collection of bug fixes, new features and > performance improvements. For full details, see the changelog: > http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.16/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1028/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_16/ > > The proposed 8.0.16 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 8.0.16 Unit tests passed on 64-bit Windows, Linux and OSX. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-280) Allow running deploy-only and redeploy-only goals without pom file
[ https://issues.apache.org/jira/browse/MTOMCAT-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264753#comment-14264753 ] Dennis Lundberg commented on MTOMCAT-280: - Matteo, The fix I attached did not remove the requirement for a pom file. Please read the previous comments. > Allow running deploy-only and redeploy-only goals without pom file > -- > > Key: MTOMCAT-280 > URL: https://issues.apache.org/jira/browse/MTOMCAT-280 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement > Components: tomcat7 >Reporter: Lauri Lehtinen >Assignee: Olivier Lamy (*$^¨%`£) > Labels: patch > Fix For: 2.3 > > Attachments: MTOMCAT-280.patch > > > Use case is as follows: > 0. A 2-step CI build exists for the sole purpose of deploying any artifact to > a remote tomcat server > 1. Run mvn dependency:get -D... -D... to download a war file from Nexus. > 2. Run mvn tomcat7:deploy -D... -D... to deploy the war file. > I would prefer to not involve a pom file in this. However, if the plugin > doesn't find one, it fail.s > Also, it appears that all the properties I need, except warFile, can be > overriden with -D's. The only way I'm able to make this work is create a > dummy pom file with tomcat7 plugin defined in the build section, and a > ${warFile} in its configuration section. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649671 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AprEndpoint.java Nio2Endpoint.java NioEndpoint.java SocketWrapperBase.java
Author: markt Date: Mon Jan 5 21:41:25 2015 New Revision: 1649671 URL: http://svn.apache.org/r1649671 Log: Remove unused flush() method. Note that flush() (in some form) will alomst certainly return to the SocketWrapper in a future refactoring. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1649671&r1=1649670&r2=1649671&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Jan 5 21:41:25 2015 @@ -2606,12 +2606,6 @@ public class AprEndpoint extends Abstrac @Override -public void flush() { -// NO-OP -} - - -@Override public void regsiterForEvent(boolean read, boolean write) { ((AprEndpoint) getEndpoint()).getPoller().add( getSocket().longValue(), -1, read, write); Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1649671&r1=1649670&r2=1649671&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Jan 5 21:41:25 2015 @@ -1067,30 +1067,6 @@ public class Nio2Endpoint extends Abstra @Override -public void flush() throws IOException { -try { -// Block until a possible non blocking write is done -if (writePending.tryAcquire(getTimeout(), TimeUnit.MILLISECONDS)) { -writePending.release(); -getSocket().flush().get(getTimeout(), TimeUnit.MILLISECONDS); -} else { -throw new TimeoutException(); -} -} catch (ExecutionException e) { -if (e.getCause() instanceof IOException) { -throw (IOException) e.getCause(); -} else { -throw new IOException(e); -} -} catch (InterruptedException e) { -throw new IOException(e); -} catch (TimeoutException e) { -SocketTimeoutException ex = new SocketTimeoutException(); -throw ex; -} -} - -@Override public void regsiterForEvent(boolean read, boolean write) { // NO-OP. Appropriate handlers will already have been registered. } Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1649671&r1=1649670&r2=1649671&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon Jan 5 21:41:25 2015 @@ -1576,33 +1576,6 @@ public class NioEndpoint extends Abstrac @Override -public void flush() throws IOException { -NioEndpoint.NioSocketWrapper att = -(NioEndpoint.NioSocketWrapper) getSocket().getAttachment(); -if (att == null) { -throw new IOException("Key must be cancelled"); -} -long writeTimeout = att.getWriteTimeout(); -Selector selector = null; -try { -selector = pool.get(); -} catch ( IOException x ) { -//ignore -} -try { -do { -if (getSocket().flush(true, selector, writeTimeout)) { -break; -} -} while (true); -} finally { -if (selector != null) { -pool.put(selector); -} -} -} - -@Override public void regsiterForEvent(boolean read, boolean write) { SelectionKey key = getSocket().getIOChannel().keyFor( getSocket().getPoller().getSelector()); Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java?rev=1649671&r1=1649670&r2=1649671&view=diff =
[GUMP@vmgump]: Project tomcat-native-make (in module tomcat-native) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-native-make has an issue affecting its community integration. This issue affects 4 projects, and has been outstanding for 72 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-native-make : Tomcat native library using Apache Portable Runtime - tomcat-native-make-install : Tomcat native library using Apache Portable Runtime - tomcat-tc8.0.x-test-apr : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... - tomcat-trunk-test-apr : Tomcat 9.x, a web server implementing the Java Servlet 4.0, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-native/tomcat-native-make/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Failed with reason build failed The following work was performed: http://vmgump.apache.org/gump/public/tomcat-native/tomcat-native-make/gump_work/build_tomcat-native_tomcat-native-make.html Work Name: build_tomcat-native_tomcat-native-make (Type: Build) Work ended in a state of : Failed Elapsed: 13 secs Command Line: make [Working Directory: /srv/gump/public/workspace/tomcat-native/native] - /srv/gump/public/workspace/openssl/dest-20150106/include/openssl/ssl.h:2012:10: note: expected 'const struct SSL_METHOD *' but argument is of type 'int' SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); ^ src/sslcontext.c:111:13: warning: passing argument 1 of 'SSL_CTX_new' makes pointer from integer without a cast [enabled by default] ctx = SSL_CTX_new(SSLv2_server_method()); ^ In file included from /srv/gump/public/workspace/tomcat-native/native/include/ssl_private.h:44:0, from src/sslcontext.c:30: /srv/gump/public/workspace/openssl/dest-20150106/include/openssl/ssl.h:2012:10: note: expected 'const struct SSL_METHOD *' but argument is of type 'int' SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); ^ src/sslcontext.c:113:13: warning: passing argument 1 of 'SSL_CTX_new' makes pointer from integer without a cast [enabled by default] ctx = SSL_CTX_new(SSLv2_method()); ^ In file included from /srv/gump/public/workspace/tomcat-native/native/include/ssl_private.h:44:0, from src/sslcontext.c:30: /srv/gump/public/workspace/openssl/dest-20150106/include/openssl/ssl.h:2012:10: note: expected 'const struct SSL_METHOD *' but argument is of type 'int' SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); ^ /bin/bash /srv/gump/public/workspace/apr-1/dest-20150106/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20150106/include -I/srv/gump/public/workspace/apr-1/dest-20150106/include/apr-1 -o src/sslinfo.lo -c src/sslinfo.c && touch src/sslinfo.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20150106/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20150106/include -I/srv/gump/public/workspace/apr-1/dest-20150106/include/apr-1 -o src/sslnetwork.lo -c src/sslnetwork.c && touch src/sslnetwork.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20150106/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20150106/include -I/srv/gump/public/workspace/apr-1/dest-20150106/include/apr-1 -o src/sslutils.lo -c src/sslutils.c && touch src/sslutils.lo src/sslutils.c: In function 'get_dh': src/sslutils.c:259:13: warning: assignment makes pointer from integer without a cast [enabled by default] if ((dh = DH_new()) == NULL) ^ src/sslutils.c:263:15: error: dereferencing pointer to incomplete type dh->p = BN_bin2bn(dh0512_p, sizeof(dh0512_p), NULL); ^ src/sslutils.c:266:15: error: dereferencing pointer to incomplete type dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL); ^ s
svn commit: r1649728 - in /tomcat/jk/trunk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_logger.h
Author: rjung Date: Tue Jan 6 03:12:30 2015 New Revision: 1649728 URL: http://svn.apache.org/r1649728 Log: Further improve handling of piped loggers during graceful or normal restart. Some "Broken Pipe" errors in children mod_jk logging remain when doing graceful restart under load. This is because rotatelogs gets restarted very early during graceful restart and the pool cleanups in the children do not run for some time, so remaining requests log to the closed pipe. Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c tomcat/jk/trunk/native/apache-2.0/mod_jk.c tomcat/jk/trunk/native/common/jk_logger.h Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1649728&r1=1649727&r2=1649728&view=diff == --- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Tue Jan 6 03:12:30 2015 @@ -137,7 +137,6 @@ typedef struct * Log stuff */ char *log_file; -int log_fd; int log_level; jk_logger_t *log; @@ -265,7 +264,6 @@ typedef struct dir_config_struct static server_rec *main_server = NULL; static jk_logger_t *main_log = NULL; -static int main_log_is_piped = JK_FALSE; static table *jk_log_fds = NULL; static jk_worker_env_t worker_env; static char *jk_shm_file = NULL; @@ -2778,7 +2776,6 @@ static void *create_jk_config(ap_pool * jk_server_conf_t *c = (jk_server_conf_t *) ap_pcalloc(p, sizeof(jk_server_conf_t)); -c->log_fd = -1; c->mountcopy = JK_FALSE; c->was_initialized = JK_FALSE; @@ -3012,7 +3009,6 @@ static void open_jk_log(server_rec *s, p const char *fname; int jklogfd; piped_log *pl; -int is_piped = JK_FALSE; jk_logger_t *jkl; jk_file_logger_t *flp; jk_server_conf_t *conf = @@ -3054,7 +3050,6 @@ static void open_jk_log(server_rec *s, p exit(1); } jklogfd = ap_piped_log_write_fd(pl); -is_piped = JK_TRUE; } else { fname = ap_server_root_relative(p, conf->log_file); @@ -3077,19 +3072,21 @@ static void open_jk_log(server_rec *s, p } log_fd_set(p, conf->log_file, jklogfd); } -conf->log_fd = jklogfd; jkl = (jk_logger_t *)ap_palloc(p, sizeof(jk_logger_t)); flp = (jk_file_logger_t *)ap_palloc(p, sizeof(jk_file_logger_t)); if (jkl && flp) { jkl->log = jk_log_to_file; jkl->level = conf->log_level; jkl->logger_private = flp; -flp->log_fd = conf->log_fd; +flp->log_fd = jklogfd; +if (*conf->log_file == '|') +flp->is_piped = JK_TRUE; +else +flp->is_piped = JK_FALSE; conf->log = jkl; jk_set_time_fmt(conf->log, conf->stamp_format_string); if (main_log == NULL) main_log = conf->log; -main_log_is_piped = is_piped; return; } @@ -3550,10 +3547,27 @@ static int jk_fixups(request_rec * r) static void child_exit_handler(server_rec * s, ap_pool * p) { -wc_shutdown(main_log); +/* If the main log is piped, we need to make sure + * it is no longer used. The external log process + * (e.g. rotatelogs) will be gone now and the pipe will + * block, once the buffer gets full. Setting + * log_fd to -1 makes logging switch to error log. + */ +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s->module_config, + &jk_module); +jk_logger_t *l = conf->log; +if (l && l->logger_private) { +jk_file_logger_t *p = l->logger_private; +if (p && p->is_piped == JK_TRUE) { +p->log_fd = -1; +p->is_piped = JK_FALSE; +} +} +wc_shutdown(l); /* srevilak - refactor cleanup body to jk_generic_cleanup() */ jk_generic_cleanup(s); -jk_shm_close(main_log); +jk_shm_close(l); } static void child_init_handler(server_rec * s, ap_pool * p) @@ -3578,8 +3592,26 @@ static void child_init_handler(server_re /** srevilak -- registered as a cleanup handler in jk_init */ static void jk_server_cleanup(void *data) { -jk_generic_cleanup((server_rec *) data); -jk_shm_close(main_log); +/* If the main log is piped, we need to make sure + * it is no longer used. The external log process + * (e.g. rotatelogs) will be gone now and the pipe will + * block, once the buffer gets full. Setting + * log_fd to -1 makes logging switch to error log. + */ +server_rec *s = (server_rec *) data; +jk_server_conf_t *conf = +(jk_server_conf_t *) ap_get_module_config(s->module_config, + &jk_module); +jk_logger_t *l = conf->log; +if (l && l->logger_private) { +jk_file_logger_t *p = l->logger_private; +
svn commit: r1649729 - /tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Tue Jan 6 03:14:02 2015 New Revision: 1649729 URL: http://svn.apache.org/r1649729 Log: Add a changelog entry. Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1649729&r1=1649728&r2=1649729&view=diff == --- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Tue Jan 6 03:14:02 2015 @@ -180,6 +180,10 @@ 44571: Ensure that we return with status 503 if we can not get and endpoint for a worker. (rjung) + +Apache: Improve log handling during graceful or normal restart. +(rjung) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1649733 - in /tomcat/native/branches/1.1.x/native/src: ssl.c sslcontext.c sslutils.c
Author: billbarker Date: Tue Jan 6 04:42:24 2015 New Revision: 1649733 URL: http://svn.apache.org/r1649733 Log: More fixes to help Gump build. No change if compiling against any currently released version of openssl Modified: tomcat/native/branches/1.1.x/native/src/ssl.c tomcat/native/branches/1.1.x/native/src/sslcontext.c tomcat/native/branches/1.1.x/native/src/sslutils.c Modified: tomcat/native/branches/1.1.x/native/src/ssl.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/ssl.c?rev=1649733&r1=1649732&r2=1649733&view=diff == --- tomcat/native/branches/1.1.x/native/src/ssl.c (original) +++ tomcat/native/branches/1.1.x/native/src/ssl.c Tue Jan 6 04:42:24 2015 @@ -253,11 +253,15 @@ static int ssl_tmp_key_init_rsa(int bits static int ssl_tmp_key_init_dh(int bits, int idx) { +#if (OPENSSL_VERSION_NUMBER < 0x1010L) || defined(OPENSSL_USE_DEPRECATED) if (!(SSL_temp_keys[idx] = SSL_dh_get_tmp_param(bits))) return 1; else return 0; +#else +return 0; +#endif } Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/sslcontext.c?rev=1649733&r1=1649732&r2=1649733&view=diff == --- tomcat/native/branches/1.1.x/native/src/sslcontext.c (original) +++ tomcat/native/branches/1.1.x/native/src/sslcontext.c Tue Jan 6 04:42:24 2015 @@ -103,7 +103,7 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, ma ctx = SSL_CTX_new(SSLv3_server_method()); else ctx = SSL_CTX_new(SSLv3_method()); -#ifndef OPENSSL_NO_SSL2 +#if (OPENSSL_VERSION_NUMBER < 0x1010L) && !defined(OPENSSL_NO_SSL2) } else if (protocol == SSL_PROTOCOL_SSLV2) { if (mode == SSL_MODE_CLIENT) ctx = SSL_CTX_new(SSLv2_client_method()); Modified: tomcat/native/branches/1.1.x/native/src/sslutils.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/sslutils.c?rev=1649733&r1=1649732&r2=1649733&view=diff == --- tomcat/native/branches/1.1.x/native/src/sslutils.c (original) +++ tomcat/native/branches/1.1.x/native/src/sslutils.c Tue Jan 6 04:42:24 2015 @@ -254,6 +254,7 @@ static unsigned char dhxxx2_g[]={ static DH *get_dh(int idx) { +#if (OPENSSL_VERSION_NUMBER < 0x1010L) || defined(OPENSSL_USE_DEPRECATED) DH *dh; if ((dh = DH_new()) == NULL) @@ -279,6 +280,9 @@ static DH *get_dh(int idx) } else return dh; +#else +return NULL; +#endif } DH *SSL_dh_get_tmp_param(int key_len) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org