cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
billbarker2004/08/03 23:48:07 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Log: Adding methods for JMX managed Contexts. -- Adding method to get the configBase via JMX -- Adding methods to add and remove apps with minimal dependancy checks. This is for use with JMX apps (like the admin) that control the Context themselves. Revision ChangesPath 1.43 +74 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java Index: HostConfig.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- HostConfig.java 28 Jul 2004 10:30:10 - 1.42 +++ HostConfig.java 4 Aug 2004 06:48:07 - 1.43 @@ -422,6 +422,13 @@ } +/** + * Get the name of the configBase. + * For use with JMX management. + */ +public String getConfigBaseName() { +return configBase().getAbsolutePath(); +} /** * Given a context path, get the config file name. @@ -1133,8 +1140,72 @@ deployApps(name); } } - - + +/** + * Add a new Context to be managed by us. + * Entry point for the admin webapp, and other JMX Context controlers. + */ +public void manageApp(Context context) { + +String contextPath = context.getPath(); + +if (deployed.containsKey(contextPath)) +return; + +DeployedApplication deployedApp = new DeployedApplication(contextPath); + +// Add the associated docBase to the redeployed list if it's a WAR +boolean isWar = false; +if (context.getDocBase() != null) { +File docBase = new File(context.getDocBase()); +if (!docBase.isAbsolute()) { +docBase = new File(appBase(), context.getDocBase()); +} +deployedApp.redeployResources.put(docBase.getAbsolutePath(), + new Long(docBase.lastModified())); +if (docBase.getAbsolutePath().toLowerCase().endsWith(.war)) { +isWar = true; +} +} +host.addChild(context); +// Add the eventual unpacked WAR and all the resources which will be +// watched inside it +if (isWar unpackWARs) { +String name = null; +String path = context.getPath(); +if (path.equals()) { +name = ROOT; +} else { +if (path.startsWith(/)) { +name = path.substring(1); +} else { +name = path; +} +} +File docBase = new File(name); +if (!docBase.isAbsolute()) { +docBase = new File(appBase(), name); +} +deployedApp.redeployResources.put(docBase.getAbsolutePath(), +new Long(docBase.lastModified())); +addWatchedResources(deployedApp, docBase.getAbsolutePath(), context); +} else { +addWatchedResources(deployedApp, null, context); +} +deployed.put(contextPath, deployedApp); +} + +/** + * Remove a webapp from our control. + * Entry point for the admin webapp, and other JMX Context controlers. + */ +public void unmanageApp(String contextPath) { +if(isServiced(contextPath)) { +deployed.remove(contextPath); +host.removeChild(host.findChild(contextPath)); +} +} + // - Instance Variables 1.4 +23 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/mbeans-descriptors.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mbeans-descriptors.xml27 Jul 2004 07:17:21 - 1.3 +++ mbeans-descriptors.xml4 Aug 2004 06:48:07 - 1.4 @@ -39,6 +39,11 @@ type=java.lang.String writeable=false/ +attribute name=configBaseName + description=The base directory for Context configuration files + type=java.lang.String + writeable=false / + attribute name=configClass description=The Java class name of the
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
This email [EMAIL PROTECTED] is no longer available due to heavy spamming. Please visit our website http://www.alestron.com for contact info. Thank you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c mod_proxy.h
mturk 2004/08/03 23:51:00 Modified:ajp/proxy mod_proxy.c mod_proxy.h Log: Added API for creating balancers. Added property setter for balancers. Revision ChangesPath 1.14 +88 -17jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mod_proxy.c 3 Aug 2004 21:54:07 - 1.13 +++ mod_proxy.c 4 Aug 2004 06:51:00 - 1.14 @@ -115,7 +115,38 @@ return smax must be a positive number; worker-smax = ival; } +else { +return unknown parameter; +} +return NULL; +} + +static const char *set_balancer_param(struct proxy_balancer *balancer, + const char *key, + const char *val) +{ +int ival; +if (!strcasecmp(key, stickysession)) { +balancer-sticky = val; +} +else if (!strcasecmp(key, nofailover)) { +if (!strcasecmp(val, on)) +balancer-sticky_force = 1; +else if (!strcasecmp(val, off)) +balancer-sticky_force = 0; +else +return failover must be On|Off; +} +else if (!strcasecmp(key, timeout)) { +ival = atoi(val); +if (ival 1) +return timeout must be al least one second; +balancer-timeout = apr_time_from_sec(ival); +} +else { +return unknown parameter; +} return NULL; } @@ -786,8 +817,17 @@ if (strncasecmp(r, balancer:, 9) == 0) { struct proxy_balancer *balancer = ap_proxy_get_balancer(cmd-pool, conf, r); if (!balancer) { - +const char *err = ap_proxy_add_balancer(balancer, +cmd-pool, +conf, r); +if (err) +return apr_pstrcat(cmd-temp_pool, BalancerMember: , err, NULL); } +for (i = 0; i arr-nelts; i++) { +const char *err = set_balancer_param(balancer, elts[i].key, elts[i].val); +if (err) +return apr_pstrcat(cmd-temp_pool, ProxyPass: , err, NULL); +} } else { proxy_worker *worker = ap_proxy_get_worker(cmd-pool, conf, r); @@ -1177,22 +1217,11 @@ /* Try to find the balancer */ balancer = ap_proxy_get_balancer(cmd-temp_pool, conf, name); if (!balancer) { -apr_status_t rc = 0; -#if DEBUGGING -ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - Creating new balancer %s, path); -#endif -balancer = (struct proxy_balancer *)apr_pcalloc(cmd-pool, sizeof(struct proxy_balancer)); -balancer-name = path; -balancer-workers = apr_array_make(cmd-pool, 5, sizeof(proxy_runtime_worker)); -/* XXX Is this a right place to create mutex */ -#if APR_HAS_THREADS -if ((rc = apr_thread_mutex_create((balancer-mutex), -APR_THREAD_MUTEX_DEFAULT, cmd-pool)) != APR_SUCCESS) { -/* XXX: Do we need to log something here */ -return BalancerMember: system error. Can not create thread mutex; -} -#endif +const char *err = ap_proxy_add_balancer(balancer, +cmd-pool, +conf, path); +if (err) +return apr_pstrcat(cmd-temp_pool, BalancerMember: , err, NULL); } /* Add the worker to the load balancer */ ap_proxy_add_worker_to_balancer(balancer, worker); @@ -1424,6 +1453,48 @@ if (strcasecmp(balancers[i].name, uri) == 0) return balancers[i]; } +return NULL; +} + +PROXY_DECLARE(const char *) ap_proxy_add_balancer(struct proxy_balancer **balancer, + apr_pool_t *p, + proxy_server_conf *conf, + const char *url) +{ +char *c, *q, *uri = apr_pstrdup(p, url); +int port; +apr_status_t rc = 0; + +c = strchr(url, ':'); +if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') + return Bad syntax for a remote proxy server; +/* remove path from uri */ +if ((q = strchr(c + 3, '/'))) +*q = '\0'; + +q = strchr(c + 3, ':'); +if (q != NULL) { +if (sscanf(q + 1, %u, port) != 1 || port 65535) { +return Bad syntax for a remote proxy server (bad port number); +} +*q = '\0'; +} +else
Re: Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
This email [EMAIL PROTECTED] is no longer available due to heavy spamming. Please visit our website http://www.alestron.com for contact info. Thank you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java
billbarker2004/08/03 23:51:13 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java Log: Update the admin webapp to use the new Deployer. Revision ChangesPath 1.28 +65 -13 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java Index: MBeanFactory.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- MBeanFactory.java 30 Jul 2004 03:01:34 - 1.27 +++ MBeanFactory.java 4 Aug 2004 06:51:13 - 1.28 @@ -19,6 +19,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.Vector; +import java.io.File; import javax.management.MBeanException; import javax.management.MBeanServer; @@ -70,6 +71,9 @@ public class MBeanFactory extends BaseModelMBean { +private static org.apache.commons.logging.Log log = +org.apache.commons.logging.LogFactory.getLog(MBeanFactory.class); + /** * The codeMBeanServer/code for this application. */ @@ -632,6 +636,19 @@ createStandardContext(parent,path,docBase,false,false,false,false); } +/** + * Given a context path, get the config file name. + */ +private String getConfigFile(String path) { +String basename = null; +if (path.equals()) { +basename = ROOT; +} else { +basename = path.substring(1).replace('/', '#'); +} +return (basename); +} + /** * Create a new StandardContext. * @@ -665,14 +682,36 @@ // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); -Service service = getService(pname); -Engine engine = (Engine) service.getContainer(); -Host host = (Host) engine.findChild(pname.getKeyProperty(host)); -host.addChild(context); +ObjectName deployer = new ObjectName(pname.getDomain()+ + :type=Deployer,host=+ + pname.getKeyProperty(host)); +if(mserver.isRegistered(deployer)) { +String contextPath = context.getPath(); +mserver.invoke(deployer, addServiced, + new Object [] {contextPath}, + new String [] {java.lang.String}); +String configPath = (String)mserver.getAttribute(deployer, + configBaseName); +String baseName = getConfigFile(contextPath); +File configFile = new File(new File(configPath), baseName+.xml); +context.setConfigFile(configFile.getAbsolutePath()); +mserver.invoke(deployer, manageApp, + new Object[] {context}, + new String[] {org.apache.catalina.Context}); +mserver.invoke(deployer, removeServiced, + new Object [] {contextPath}, + new String [] {java.lang.String}); +} else { +log.warn(Deployer not found for +pname.getKeyProperty(host)); +Service service = getService(pname); +Engine engine = (Engine) service.getContainer(); +Host host = (Host) engine.findChild(pname.getKeyProperty(host)); +host.addChild(context); +} // Return the corresponding MBean name ObjectName oname = context.getJmxName(); -//MBeanUtils.createObjectName(pname.getDomain(), context); + return (oname.toString()); } @@ -942,20 +981,33 @@ ObjectName oname = new ObjectName(contextName); String domain = oname.getDomain(); StandardService service = (StandardService) getService(oname); -if (!service.getObjectName().getDomain().equals(domain)) { -throw new Exception(Service with the domain is not found); -} + Engine engine = (Engine) service.getContainer(); String name = oname.getKeyProperty(name); name = name.substring(2); int i = name.indexOf(/); String hostName = name.substring(0,i); String path = name.substring(i); -Host host = (Host) engine.findChild(hostName); +ObjectName deployer = new ObjectName(domain+:type=Deployer,host=+ + hostName); String pathStr = getPathStr(path); -Context context = (Context) host.findChild(pathStr); -
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
mturk 2004/08/03 23:55:12 Modified:ajp/proxy mod_proxy.c Log: Remove all worker/balancer API's to proxy_util. Revision ChangesPath 1.15 +0 -205jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- mod_proxy.c 4 Aug 2004 06:51:00 - 1.14 +++ mod_proxy.c 4 Aug 2004 06:55:11 - 1.15 @@ -20,7 +20,6 @@ #include mod_core.h #include apr_optional.h -#include ap_mpm.h #if (MODULE_MAGIC_NUMBER_MAJOR 20020903) #include mod_ssl.h @@ -1432,210 +1431,6 @@ } return 0; -} - -PROXY_DECLARE(struct proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p, - proxy_server_conf *conf, - const char *url) -{ -struct proxy_balancer *balancers; -char *c, *uri = apr_pstrdup(p, url); -int i; - -c = strchr(url, ':'); -if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') - return NULL; -/* remove path from uri */ -if ((c = strchr(c + 3, '/'))) -*c = '\0'; -balancers = (struct proxy_balancer *)conf-balancers; -for (i = 0; i conf-balancers-nelts; i++) { -if (strcasecmp(balancers[i].name, uri) == 0) -return balancers[i]; -} -return NULL; -} - -PROXY_DECLARE(const char *) ap_proxy_add_balancer(struct proxy_balancer **balancer, - apr_pool_t *p, - proxy_server_conf *conf, - const char *url) -{ -char *c, *q, *uri = apr_pstrdup(p, url); -int port; -apr_status_t rc = 0; - -c = strchr(url, ':'); -if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') - return Bad syntax for a remote proxy server; -/* remove path from uri */ -if ((q = strchr(c + 3, '/'))) -*q = '\0'; - -q = strchr(c + 3, ':'); -if (q != NULL) { -if (sscanf(q + 1, %u, port) != 1 || port 65535) { -return Bad syntax for a remote proxy server (bad port number); -} -*q = '\0'; -} -else -port = -1; -ap_str_tolower(uri); -*balancer = apr_array_push(conf-balancers); -(*balancer)-name = apr_pstrdup(p, uri); -*c = '\0'; -(*balancer)-workers = apr_array_make(p, 5, sizeof(proxy_runtime_worker)); -/* XXX Is this a right place to create mutex */ -#if APR_HAS_THREADS -if ((rc = apr_thread_mutex_create(((*balancer)-mutex), -APR_THREAD_MUTEX_DEFAULT, p)) != APR_SUCCESS) { -/* XXX: Do we need to log something here */ -return can not create thread mutex; -} -#endif - -return NULL; -} - -PROXY_DECLARE(proxy_worker *) ap_proxy_get_worker(apr_pool_t *p, - proxy_server_conf *conf, - const char *url) -{ -proxy_worker *workers; -char *c, *uri = apr_pstrdup(p, url); -int i; - -c = strchr(url, ':'); -if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') - return NULL; -/* remove path from uri */ -if ((c = strchr(c + 3, '/'))) -*c = '\0'; -workers = (proxy_worker *)conf-workers; -for (i = 0; i conf-workers-nelts; i++) { -if (strcasecmp(workers[i].name, uri) == 0) -return workers[i]; -} -return NULL; -} - -static void init_conn_pool(apr_pool_t *p, proxy_worker *worker) -{ -apr_pool_t *pool; -proxy_conn_pool *cp; - -/* Create a connection pool's subpool */ -apr_pool_create(pool, p); -cp = (proxy_conn_pool *)apr_pcalloc(pool, sizeof(proxy_conn_pool)); -cp-pool = pool; -#if APR_HAS_THREADS -{ -int mpm_threads; -ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads); -if (mpm_threads 1) { -/* Set hard max to no more then mpm_threads */ -if (worker-hmax == 0 || worker-hmax mpm_threads) - worker-hmax = mpm_threads; -if (worker-smax == 0 || worker-smax worker-hmax) - worker-smax = worker-hmax; -/* Set min to be lower then smax */ -if (worker-min worker-smax) - worker-min = worker-smax; -} -else { -/* This will supress the apr_reslist creation */ -worker-min = worker-smax = worker-hmax = 0; -} -}
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
mturk 2004/08/03 23:55:34 Modified:ajp/proxy proxy_util.c Log: Move all worker/balancer API's to proxy_util. Revision ChangesPath 1.3 +208 -3jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- proxy_util.c 3 Aug 2004 12:08:22 - 1.2 +++ proxy_util.c 4 Aug 2004 06:55:33 - 1.3 @@ -15,11 +15,12 @@ /* Utility routines for Apache proxy */ #include mod_proxy.h +#include ap_mpm.h -#if (APR_MAJOR_VERSION 1) +#if (APR_MAJOR_VERSION 1) #undef apr_socket_create -#define apr_socket_create apr_socket_create_ex -#endif +#define apr_socket_create apr_socket_create_ex +#endif static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r); static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r); @@ -984,6 +985,210 @@ count++; } apr_table_add(t, key, value + offset); +} + +PROXY_DECLARE(struct proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p, + proxy_server_conf *conf, + const char *url) +{ +struct proxy_balancer *balancers; +char *c, *uri = apr_pstrdup(p, url); +int i; + +c = strchr(url, ':'); +if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') + return NULL; +/* remove path from uri */ +if ((c = strchr(c + 3, '/'))) +*c = '\0'; +balancers = (struct proxy_balancer *)conf-balancers; +for (i = 0; i conf-balancers-nelts; i++) { +if (strcasecmp(balancers[i].name, uri) == 0) +return balancers[i]; +} +return NULL; +} + +PROXY_DECLARE(const char *) ap_proxy_add_balancer(struct proxy_balancer **balancer, + apr_pool_t *p, + proxy_server_conf *conf, + const char *url) +{ +char *c, *q, *uri = apr_pstrdup(p, url); +int port; +apr_status_t rc = 0; + +c = strchr(url, ':'); +if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') + return Bad syntax for a remote proxy server; +/* remove path from uri */ +if ((q = strchr(c + 3, '/'))) +*q = '\0'; + +q = strchr(c + 3, ':'); +if (q != NULL) { +if (sscanf(q + 1, %u, port) != 1 || port 65535) { +return Bad syntax for a remote proxy server (bad port number); +} +*q = '\0'; +} +else +port = -1; +ap_str_tolower(uri); +*balancer = apr_array_push(conf-balancers); +(*balancer)-name = apr_pstrdup(p, uri); +*c = '\0'; +(*balancer)-workers = apr_array_make(p, 5, sizeof(proxy_runtime_worker)); +/* XXX Is this a right place to create mutex */ +#if APR_HAS_THREADS +if ((rc = apr_thread_mutex_create(((*balancer)-mutex), +APR_THREAD_MUTEX_DEFAULT, p)) != APR_SUCCESS) { +/* XXX: Do we need to log something here */ +return can not create thread mutex; +} +#endif + +return NULL; +} + +PROXY_DECLARE(proxy_worker *) ap_proxy_get_worker(apr_pool_t *p, + proxy_server_conf *conf, + const char *url) +{ +proxy_worker *workers; +char *c, *uri = apr_pstrdup(p, url); +int i; + +c = strchr(url, ':'); +if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') + return NULL; +/* remove path from uri */ +if ((c = strchr(c + 3, '/'))) +*c = '\0'; +workers = (proxy_worker *)conf-workers; +for (i = 0; i conf-workers-nelts; i++) { +if (strcasecmp(workers[i].name, uri) == 0) +return workers[i]; +} +return NULL; +} + +static void init_conn_pool(apr_pool_t *p, proxy_worker *worker) +{ +apr_pool_t *pool; +proxy_conn_pool *cp; + +/* Create a connection pool's subpool */ +apr_pool_create(pool, p); +cp = (proxy_conn_pool *)apr_pcalloc(pool, sizeof(proxy_conn_pool)); +cp-pool = pool; +#if APR_HAS_THREADS +{ +int mpm_threads; +ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads); +if (mpm_threads 1) { +/* Set hard max to no more then mpm_threads */ +if (worker-hmax == 0 || worker-hmax mpm_threads) + worker-hmax = mpm_threads; +if (worker-smax == 0 || worker-smax worker-hmax)
tomcat.exe and tomcatw.exe
Hi, I was just wondering how tomcat.exe and tomcatw.exe get built. I grepped a number of the tomcat modules but could find a reference to files of these names. Regards, Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
Hi, Be carefull with our os: +++ #if (APR_MAJOR_VERSION 1)^M #undef apr_socket_create #define apr_socket_create apr_socket_create_ex^M #endif^M +++ It does not run on my OS(s): +++ [EMAIL PROTECTED]:~/apache20 bin/apachectl start httpd: Syntax error on line 287 of /home/apache20/apache20/conf/httpd.conf: Cannot load /home/apache20/apache20/modules/mod_proxy.so into server: /home/apache20/apache20/modules/mod_proxy.so: undefined symbol: apr_socket_create_ex +++ Cheers Jean-Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30460] New: - org.apache.coyote.tomcat5.MapperListener init - Error registering contexts - HTTP 1.1 connectors pauses
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30460. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30460 org.apache.coyote.tomcat5.MapperListener init - Error registering contexts - HTTP 1.1 connectors pauses Summary: org.apache.coyote.tomcat5.MapperListener init - Error registering contexts - HTTP 1.1 connectors pauses Product: Tomcat 5 Version: 5.0.27 Platform: Other OS/Version: AIX Status: NEW Severity: Critical Priority: Other Component: Connector:Coyote AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Tomcat with two Services each with one HTTP1.1 Connectors and one AJP-Connector Service A for administration (/admin) of Tomcat/doku etc. with one HTTP1.1 connector (Port 8080) for administration of Tomcat Service B for the webapplication with one HTTP1.1 connector (Port 8081) for manager (/webapplication/manager) of webapplication, so that developpers can stop/start, deploy/undeploy the webapplications one AJP-connector for communication with apache over mod_jk2 When the server starts, all seems good right up until the end of the Tomcat startup where the following exception is thrown: INFO: Starting Coyote HTTP/1.1 on http-a6ak-www-ccis-r.bedag.ch%2F162.23.4.136-8081 Aug 4, 2004 8:59:33 AM org.apache.coyote.tomcat5.MapperListener init WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:930) at java.util.HashMap$EntryIterator.next(HashMap.java:972) at java.util.HashMap.putAllForCreate(HashMap.java:505) at java.util.HashMap.clone(HashMap.java:799) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537) at org.apache.catalina.core.StandardService.start(StandardService.java:489) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) This causes the specific connector to pause This happens accidentally. Sometimes both HTTP connectors pauses sometimes only the first sometimes only the second. I had to restart Tomcat more than 10 times until it starts without failure. When it starts without failure the org.apache.coyote.tomcat5.MapperListener init is not executed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
jfclere 2004/08/04 00:44:34 Modified:ajp/proxy proxy_util.c Log: Make sure that APR_MAJOR_VERSION is defined. Revision ChangesPath 1.4 +1 -0 jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- proxy_util.c 4 Aug 2004 06:55:33 - 1.3 +++ proxy_util.c 4 Aug 2004 07:44:34 - 1.4 @@ -16,6 +16,7 @@ /* Utility routines for Apache proxy */ #include mod_proxy.h #include ap_mpm.h +#include apr_version.h #if (APR_MAJOR_VERSION 1) #undef apr_socket_create - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
mturk 2004/08/04 01:12:08 Modified:ajp/proxy mod_proxy.h Log: Add pre_request and post_request proxy hooks. They will be mainly used for loadbalancers for finding and maintaining workers. Revision ChangesPath 1.9 +30 -0 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h Index: mod_proxy.h === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_proxy.h 4 Aug 2004 06:51:00 - 1.8 +++ mod_proxy.h 4 Aug 2004 08:12:08 - 1.9 @@ -249,6 +249,14 @@ #endif }; +/* data structure for set/get module_config */ +typedef struct { +char *url; /* rewtitten url */ +struct proxy_balancer *balancer;/* load balancer to use */ +proxy_worker *worker; /* most suitable worker */ +void *opaque; /* module private data */ +} proxy_module_conf; + /* hooks */ /* Create a set of PROXY_DECLARE(type), PROXY_DECLARE_NONSTD(type) and @@ -287,6 +295,28 @@ APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, create_req, (request_rec *r, request_rec *pr)) APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, fixups, (request_rec *r)) + +/** + * pre request hook. + * It will return the most suitable worker at the moment + * and coresponding balancer. + * The url is rewritten from balancer://cluster/uri to scheme://host:port/uri + * and then the scheme_handler is called. + * + */ +APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, pre_request, (proxy_worker **worker, + struct proxy_balancer **balancer, + request_rec *r, + proxy_server_conf *conf, char **url, + const char *proxyhost, apr_port_t proxyport)) +/** + * post request hook. + * It is called after request for updating runtime balancer status. + */ +APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, post_request, (proxy_worker *worker, + struct proxy_balancer *balancer, request_rec *r, + proxy_server_conf *conf)) + /* proxy_util.c */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat.exe and tomcatw.exe
Glen Stampoultzis wrote: Hi, I was just wondering how tomcat.exe and tomcatw.exe get built. I grepped a number of the tomcat modules but could find a reference to files of these names. There is no official procrun (that's the tomcat and tomcatw) source distribution. You can grab the sources from cvs.jakarta.org. They are inside jakarta-commons/daemon/src/native/nt/procrun. You will find the .vcproj's for prunmgr and prunsrv inside apps dir. Build and rename the prunmgr.exe to tomcatw.exe and prunsrv.exe to tomcatw.exe. Regards, MT. smime.p7s Description: S/MIME cryptographic signature
RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
jean-frederic clere wrote: Be carefull with our os: +++ #if (APR_MAJOR_VERSION 1)^M #undef apr_socket_create #define apr_socket_create apr_socket_create_ex^M #endif^M +++ It does not run on my OS(s): And I thought that I'm the 'style police' ;-). MT. smime.p7s Description: S/MIME cryptographic signature
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
mturk 2004/08/04 01:56:24 Modified:ajp/proxy mod_proxy.h Log: Remove proxyhost and proxyport from pre_request hook. They are not needed for finding apropriate worker. Revision ChangesPath 1.10 +2 -3 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h Index: mod_proxy.h === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mod_proxy.h 4 Aug 2004 08:12:08 - 1.9 +++ mod_proxy.h 4 Aug 2004 08:56:24 - 1.10 @@ -306,9 +306,8 @@ */ APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, pre_request, (proxy_worker **worker, struct proxy_balancer **balancer, - request_rec *r, - proxy_server_conf *conf, char **url, - const char *proxyhost, apr_port_t proxyport)) + request_rec *r, + proxy_server_conf *conf, char **url)) /** * post request hook. * It is called after request for updating runtime balancer status. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
mturk 2004/08/04 01:56:54 Modified:ajp/proxy mod_proxy.c Log: Implement pre and post request hooks. Revision ChangesPath 1.16 +28 -1 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- mod_proxy.c 4 Aug 2004 06:55:11 - 1.15 +++ mod_proxy.c 4 Aug 2004 08:56:54 - 1.16 @@ -473,6 +473,8 @@ int direct_connect = 0; const char *str; long maxfwd; +struct proxy_balancer *balancer = NULL; +proxy_worker *worker = NULL; /* is this for us? */ if (!r-proxyreq || !r-filename || strncmp(r-filename, proxy:, 6) != 0) @@ -549,7 +551,12 @@ r-uri); #endif } - +/* Try to obtain the most suitable worker */ +access_status = proxy_run_pre_request(worker, balancer, r, conf, url); +if (access_status != DECLINED access_status != OK) { +return access_status; +} + /* firstly, try a proxy, unless a NoProxy directive is active */ if (!direct_connect) { for (i = 0; i proxies-nelts; i++) { @@ -591,6 +598,11 @@ using LoadModule., r-uri); return HTTP_FORBIDDEN; } +access_status = proxy_run_post_request(worker, balancer, r, conf); +if (access_status == DECLINED) { +access_status = OK; /* no post_request handler available */ +/* TODO: reclycle direct worker */ +} return access_status; } @@ -1481,6 +1493,8 @@ APR_HOOK_STRUCT( APR_HOOK_LINK(scheme_handler) APR_HOOK_LINK(canon_handler) + APR_HOOK_LINK(pre_request) + APR_HOOK_LINK(post_request) ) APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, scheme_handler, @@ -1491,6 +1505,19 @@ APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, canon_handler, (request_rec *r, char *url),(r, url),DECLINED) +APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, pre_request, ( + proxy_worker **worker, + struct proxy_balancer **balancer, + request_rec *r, + proxy_server_conf *conf, + char **url),(worker,balancer, + r,conf,url),DECLINED) +APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, post_request, + (proxy_worker *worker, + struct proxy_balancer *balancer, + request_rec *r, + proxy_server_conf *conf),(worker, + balancer,r,conf),DECLINED) APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, fixups, (request_rec *r), (r), OK, DECLINED) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat.exe and tomcatw.exe
Glen Stampoultzis wrote: Hi, I was just wondering how tomcat.exe and tomcatw.exe get built. I grepped a number of the tomcat modules but could find a reference to files of these names. I think it comes from jakarta-commons/daemon/src/native/nt/procrun. Regards, Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
[EMAIL PROTECTED] wrote: billbarker2004/08/03 23:48:07 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Log: Adding methods for JMX managed Contexts. -- Adding method to get the configBase via JMX -- Adding methods to add and remove apps with minimal dependancy checks. This is for use with JMX apps (like the admin) that control the Context themselves. I don't quite see how this is any different from check(String name). Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
jfclere 2004/08/04 03:43:15 Modified:ajp/proxy mod_proxy.c Log: dup real and fake. Revision ChangesPath 1.17 +2 -2 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- mod_proxy.c 4 Aug 2004 08:56:54 - 1.16 +++ mod_proxy.c 4 Aug 2004 10:43:15 - 1.17 @@ -819,8 +819,8 @@ return ProxyPass needs a path when not defined in a location; new = apr_array_push(conf-aliases); -new-fake = f; -new-real = r; +new-fake = apr_pstrdup(cmd-pool, f); +new-real = apr_pstrdup(cmd-pool, r); arr = apr_table_elts(params); elts = (const apr_table_entry_t *)arr-elts; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
[EMAIL PROTECTED] wrote: Log: Remove proxyhost and proxyport from pre_request hook. They are not needed for finding apropriate worker. They are needed for the use of mod_proxy as a forward proxy. The correct way of handling these in the AJP case is to DECLINE the request if proxyhost and proxyport are present, because in this case the request is supposed to be handled by proxy_http. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
[EMAIL PROTECTED] wrote: Log: Remove proxyhost and proxyport from pre_request hook. They are not needed for finding apropriate worker. Reading this again, I see better what is happening. The proxyhost and proxyport are used when a downstream proxy is used, would the balancer ever want to balancer these downstream connections? Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
[EMAIL PROTECTED] commited: new = apr_array_push(conf-aliases); -new-fake = f; -new-real = r; +new-fake = apr_pstrdup(cmd-pool, f); +new-real = apr_pstrdup(cmd-pool, r); There is no need to do that. The f is eventually set to cmd-path that is already duped from cmd pool. They r is always obtained using ap_getword_conf. MT. smime.p7s Description: S/MIME cryptographic signature
RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
Graham Leggett wrote: Log: Remove proxyhost and proxyport from pre_request hook. They are not needed for finding apropriate worker. They are needed for the use of mod_proxy as a forward proxy. The correct way of handling these in the AJP case is to DECLINE the request if proxyhost and proxyport are present, because in this case the request is supposed to be handled by proxy_http. The removed proxyhost and port are from new hook 'pre_request' that is used to obtain a valid worker and/or balancer for a scheme. It has nothing to do with the way the connection is going to be made. The load balancer if present will decide to which route (worker) the connection is going to be made or return HTTP_SERVER_BUSY, if no further connection to the cluster can be made. If there is no load balancer or it returns DECLINED then the worker will be pulled out from the created set of workers during ProxyPass initialization. I've changed ProxyPass from TAKE12 to RAW_ARGS, so that you can directly initialize connection pool without load balancer (if not required for example). The way that the worker connects to backend depends on scheme handler itself (direct or via proxy). The worker connection itself will be either bound to the client connection (http) or to a backend connection (ajp), and that is also set in scheme handler. I have to figure out how to effectively skip that for ftp scheme handler. Regards, MT. smime.p7s Description: S/MIME cryptographic signature
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h proxy_util.c
mturk 2004/08/04 05:31:12 Modified:ajp/proxy mod_proxy.h proxy_util.c Log: Add ap_proxy_pre_request API function. It calls the actual module pre_request hook if present Revision ChangesPath 1.11 +4 -2 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h Index: mod_proxy.h === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_proxy.h 4 Aug 2004 08:56:24 - 1.10 +++ mod_proxy.h 4 Aug 2004 12:31:12 - 1.11 @@ -249,11 +249,13 @@ #endif }; -/* data structure for set/get module_config */ +/* per connection data structure for set/get module_config */ typedef struct { char *url; /* rewtitten url */ struct proxy_balancer *balancer;/* load balancer to use */ proxy_worker *worker; /* most suitable worker */ +proxy_conn_rec*conn_rec; +proxy_conn*conn; void *opaque; /* module private data */ } proxy_module_conf; @@ -350,7 +352,7 @@ PROXY_DECLARE(struct proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p, proxy_server_conf *conf, const char *url); PROXY_DECLARE(const char *) ap_proxy_add_balancer(struct proxy_balancer **balancer, apr_pool_t *p, proxy_server_conf *conf, const char *url); PROXY_DECLARE(void) ap_proxy_add_worker_to_balancer(struct proxy_balancer *balancer, proxy_worker *worker); - +PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker, struct proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url); /* For proxy_util */ extern module PROXY_DECLARE_DATA proxy_module; 1.5 +41 -0 jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- proxy_util.c 4 Aug 2004 07:44:34 - 1.4 +++ proxy_util.c 4 Aug 2004 12:31:12 - 1.5 @@ -1192,6 +1192,47 @@ } +PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker, +struct proxy_balancer **balancer, +request_rec *r, +proxy_server_conf *conf, char **url) +{ +int access_status; + +access_status = proxy_run_pre_request(worker, balancer, r, conf, url); +if (access_status == DECLINED *balancer == NULL) { +*worker = ap_proxy_get_worker(r-pool, conf, *url); +if (*worker) { +*balancer = NULL; +access_status = OK; +} +else +access_status = DECLINED; +} +else if (access_status == DECLINED balancer != NULL) { +/* All the workers are busy */ +access_status = HTTP_SERVICE_UNAVAILABLE; +} +return access_status; +} + +PROXY_DECLARE(int) ap_proxy_post_request(proxy_worker *worker, + struct proxy_balancer *balancer, + request_rec *r, + proxy_server_conf *conf) +{ +int access_status; +if (balancer) +access_status = proxy_run_post_request(worker, balancer, r, conf); +else { + + +access_status = OK; +} + +return access_status; +} + PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock, const char *proxy_function, apr_sockaddr_t *backend_addr, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
mturk 2004/08/04 05:34:41 Modified:ajp/proxy mod_proxy.c Log: Use pre_pequest function and set proxy_module_conf bound to client connection so it cen be obtained inside scheme handlers. Revision ChangesPath 1.18 +45 -7 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- mod_proxy.c 4 Aug 2004 10:43:15 - 1.17 +++ mod_proxy.c 4 Aug 2004 12:34:41 - 1.18 @@ -457,6 +457,12 @@ return HTTP_MOVED_PERMANENTLY; } +static apr_status_t worker_cleanup(void *theworker) +{ + +return APR_SUCCESS; +} + /* -- */ /* Invoke handler */ @@ -475,6 +481,7 @@ long maxfwd; struct proxy_balancer *balancer = NULL; proxy_worker *worker = NULL; +proxy_module_conf *mconf; /* is this for us? */ if (!r-proxyreq || !r-filename || strncmp(r-filename, proxy:, 6) != 0) @@ -551,12 +558,41 @@ r-uri); #endif } + /* Try to obtain the most suitable worker */ -access_status = proxy_run_pre_request(worker, balancer, r, conf, url); -if (access_status != DECLINED access_status != OK) { +access_status = ap_proxy_pre_request(worker, balancer, r, conf, url); +if (access_status != OK) return access_status; + +/* only use stored info for top-level pages. Sub requests don't share + * in keepalives + */ +if (!r-main) { +mconf = (proxy_module_conf *)ap_get_module_config(r-connection-conn_config, + proxy_module); +} +/* create space for state information */ +if (!mconf) { +mconf = apr_pcalloc(r-connection-pool, sizeof(proxy_module_conf)); +if (!r-main) { +ap_set_module_config(r-connection-conn_config, + proxy_module, mconf); +} +#if 0 +/* register the connection-pool cleanup */ +apr_pool_cleanup_register(r-connection-pool, + (void *)mconf, worker_cleanup, + apr_pool_cleanup_null); +#endif } - +/* use the current balancer and worker. + * the proxy_conn will be set in particular scheme handler + * if not already set. + */ +mconf-balancer = balancer; +mconf-worker = worker; +mconf-url = url; + /* firstly, try a proxy, unless a NoProxy directive is active */ if (!direct_connect) { for (i = 0; i proxies-nelts; i++) { @@ -598,10 +634,12 @@ using LoadModule., r-uri); return HTTP_FORBIDDEN; } -access_status = proxy_run_post_request(worker, balancer, r, conf); -if (access_status == DECLINED) { -access_status = OK; /* no post_request handler available */ -/* TODO: reclycle direct worker */ +if (balancer) { +access_status = proxy_run_post_request(worker, balancer, r, conf); +if (access_status == DECLINED) { +access_status = OK; /* no post_request handler available */ +/* TODO: reclycle direct worker */ +} } return access_status; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30462] New: - deploying war with META-INF/context.xml included results in error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30462. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30462 deploying war with META-INF/context.xml included results in error Summary: deploying war with META-INF/context.xml included results in error Product: Tomcat 5 Version: 5.0.27 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Deploying a war file (by dropping it in de webapps dir) called test.war witch includes an context.xml file in a dir called META-INF, results in directory called test.xml created in the conf/Catalina/localhost/ directory. The war file is correctly unpacked in the webapps dir. Next the server reports an error in the catalina.out log like: Aug 4, 2004 1:16:46 PM org.apache.catalina.startup.HostConfig deployDescriptors SEVERE: Error deploying configuration descriptor test.xml java.io.IOException: java.io.FileNotFoundException: /usr2/app/apache/jakarta-tomcat-5.0.27/conf/Catalina/localhost/test.xml (Is a directory) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:494) at org.apache.catalina.core.StandardHost.install(StandardHost.java:863) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1068) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:800) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1619) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1628) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1608) at java.lang.Thread.run(Thread.java:536) A workaround forr the moment is to remove the faulty directory and manually copying the correct context.xml file from de unpacked webapp to the conf/Catalina/localhost/ directory and calling it test.xml success, Robin Betjes, Ecomsulting B.V. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30463] New: - install4iis.js fail on Windows 2000
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30463. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30463 install4iis.js fail on Windows 2000 Summary: install4iis.js fail on Windows 2000 Product: Tomcat 5 Version: 5.0.24 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Connector:AJP AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Compare: ()E:\ExieAs\Tomcat\Tomcat_5.0.24\bin\New install4iis.js (16337 bytes) with: ()E:\ExieAs\Tomcat\Tomcat_5.0.24\bin\Old install4iis.js (16055 bytes) 185,187c185,186 // Case sensitive comparison will fail for Root / ROOT etc. if (adsiObjects.item().Class == clsName adsiObjects.item().Name.toUpperCase() == objName.toUpperCase ()) --- if (adsiObjects.item().Class == clsName adsiObjects.item().Name == objName) 228,229d227 // If KeyType is not set for IIS 4 (Windows 2000) the type will be IIsWebDirectory and the findADSIObject above will fail. newDir.KeyType = _IIS_WEBDIR; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30463] - install4iis.js fail on Windows 2000
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30463. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30463 install4iis.js fail on Windows 2000 --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 13:03 --- Created an attachment (id=12325) New version of file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
Mladen Turk wrote: [EMAIL PROTECTED] commited: new = apr_array_push(conf-aliases); -new-fake = f; -new-real = r; +new-fake = apr_pstrdup(cmd-pool, f); +new-real = apr_pstrdup(cmd-pool, r); There is no need to do that. The f is eventually set to cmd-path that is already duped from cmd pool. They r is always obtained using ap_getword_conf. Without the apr_pstrdup() it does not work on my machine... I have seen that real gets corrupted. (fake does not but in my test it set to cmd-path). MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Error Message
Hey there all I get the following line when running my servlet on Tomcat version 5.0.25: java.lang.UnsupportedClassVersionError: org/volume4/searchEngine/lawSearch (Unsupported major.minor version 49.0) What exactly does this mean and how do I go about fixing this? Thanks! -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/xdocs proxy.xml
jfclere 2004/08/04 06:57:19 Added: jk/xdocs proxy.xml Log: Start to document the new proxy code. Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/xdocs/proxy.xml Index: proxy.xml === ?xml version=1.0? document copyright Copyright 1999-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. /copyright properties titleUsing proxies with Tomcat/title date$Date: 2004/08/04 13:57:19 $/date /properties section name=Http proxy p It easy to use the standard Http proxy of Apache when single Tomcat is connected to Apache. source lt;Location /examples/gt; ProxyPass http://localhost:8080/examples/ ProxyPassReverse http://localhost:8080/examples/ lt;/Locationgt; /source /p /section section name=Ajp proxy p The Ajp proxy is a new module based on the standard Http proxy it uses AJP instead of HTTP. source lt;Location /examples/gt; ProxyPass ajp://localhost:8009/examples/ lt;/Locationgt; /source /p /section /document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
mturk 2004/08/04 07:34:56 Modified:ajp/proxy mod_proxy.h Log: Added ap_proxy_determine_connection API call. It will be used both for http and ajp handlers. Revision ChangesPath 1.12 +4 -0 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h Index: mod_proxy.h === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mod_proxy.h 4 Aug 2004 12:31:12 - 1.11 +++ mod_proxy.h 4 Aug 2004 14:34:55 - 1.12 @@ -195,6 +195,7 @@ typedef struct { apr_pool_t *pool; /* Subpool used for creating socket */ apr_socket_t *sock; +int flags; /* 0: newly created 1: initialized -1: in error */ int close; /* Close 'this' connection */ } proxy_conn; @@ -353,6 +354,9 @@ PROXY_DECLARE(const char *) ap_proxy_add_balancer(struct proxy_balancer **balancer, apr_pool_t *p, proxy_server_conf *conf, const char *url); PROXY_DECLARE(void) ap_proxy_add_worker_to_balancer(struct proxy_balancer *balancer, proxy_worker *worker); PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker, struct proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url); +PROXY_DECLARE(apr_status_t) ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, proxy_server_conf *conf, proxy_module_conf *mconf, + apr_pool_t *ppool, apr_uri_t *uri, char **url, const char *proxyname, apr_port_t proxyport, + char *server_portstr, int server_portstr_size); /* For proxy_util */ extern module PROXY_DECLARE_DATA proxy_module; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
mturk 2004/08/04 07:35:39 Modified:ajp/proxy proxy_util.c Log: Added ap_proxy_determine_connection. Started writing apr_reslist connection pool. Revision ChangesPath 1.6 +132 -0jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- proxy_util.c 4 Aug 2004 12:31:12 - 1.5 +++ proxy_util.c 4 Aug 2004 14:35:39 - 1.6 @@ -1303,4 +1303,136 @@ } return connected ? 0 : 1; } + +static apr_status_t proxy_conn_cleanup(void *theconn) +{ +proxy_conn *conn = (proxy_conn *)theconn; +/* Close the socket */ +if (conn-sock) +apr_socket_close(conn-sock); +conn-sock = NULL; +return APR_SUCCESS; +} + +/* reslist constructor */ +static apr_status_t connection_constructor(void **resource, void *params, + apr_pool_t *pool) +{ +apr_pool_t *ctx; +proxy_conn *conn; +server_rec *s = (server_rec *)params; +/* Create the subpool for each connection + * This keeps the memory consumption constant + * when disconnecting from backend. + */ +apr_pool_create(ctx, pool); +conn = apr_pcalloc(ctx, sizeof(proxy_conn)); + +conn-pool = ctx; +*resource = conn; +/* register the pool cleanup */ +apr_pool_cleanup_register(ctx, (void *)conn, + proxy_conn_cleanup, apr_pool_cleanup_null); + +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + proxy: socket is constructed); + +return APR_SUCCESS; +} + +/* reslist destructor */ +static apr_status_t connection_destructor(void *resource, void *params, + apr_pool_t *pool) +{ +proxy_conn *conn = (proxy_conn *)resource; +server_rec *s = (server_rec *)params; + +apr_pool_destroy(conn-pool); +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + proxy: socket is destructed); + +return APR_SUCCESS; +} + + +PROXY_DECLARE(apr_status_t) +ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, + proxy_server_conf *conf, + proxy_module_conf *mconf, + apr_pool_t *ppool, + apr_uri_t *uri, + char **url, + const char *proxyname, + apr_port_t proxyport, + char *server_portstr, + int server_portstr_size) +{ +int server_port; +apr_status_t err = APR_SUCCESS; +/* + * Break up the URL to determine the host to connect to + */ + +/* we break the URL into host, port, uri */ +if (APR_SUCCESS != apr_uri_parse(p, *url, uri)) { +return ap_proxyerror(r, HTTP_BAD_REQUEST, + apr_pstrcat(p,URI cannot be parsed: , *url, + NULL)); +} +if (!uri-port) { +uri-port = apr_uri_port_of_scheme(uri-scheme); +} + +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server, + proxy: HTTP connecting %s to %s:%d, *url, uri-hostname, + uri-port); + +/* allocate these out of the specified connection pool + * The scheme handler decides if this is permanent or + * short living pool. + */ +/* are we connecting directly, or via a proxy? */ +if (proxyname) { +mconf-conn_rec-hostname = apr_pstrdup(ppool, proxyname); +mconf-conn_rec-port = proxyport; +/* see memory note above */ +} else { +mconf-conn_rec-hostname = apr_pstrdup(ppool, uri-hostname); +mconf-conn_rec-port = uri-port; +*url = apr_pstrcat(p, uri-path, uri-query ? ? : , + uri-query ? uri-query : , + uri-fragment ? # : , + uri-fragment ? uri-fragment : , NULL); +} +if (!mconf-worker-cp-addr) +err = apr_sockaddr_info_get((mconf-worker-cp-addr), +mconf-conn_rec-hostname, APR_UNSPEC, +mconf-conn_rec-port, 0, +mconf-worker-cp-pool); + +/* do a DNS lookup for the destination host */ +if (err != APR_SUCCESS) { +return ap_proxyerror(r, HTTP_BAD_GATEWAY, + apr_pstrcat(p, DNS lookup failure for: , + mconf-conn_rec-hostname, NULL)); +} + +
DO NOT REPLY [Bug 30462] - deploying war with META-INF/context.xml included results in error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30462. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30462 deploying war with META-INF/context.xml included results in error [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 14:38 --- Marking as duplicate... *** This bug has been marked as a duplicate of 29688 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29688] - HostConfig NullPointerException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29688. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29688 HostConfig NullPointerException [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 14:38 --- *** Bug 30462 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
mturk 2004/08/04 07:37:48 Modified:ajp/proxy mod_proxy.c Log: Remove unusable code from. The constructor and destructor will be in proxy_util. Revision ChangesPath 1.19 +2 -14 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_proxy.c 4 Aug 2004 12:34:41 - 1.18 +++ mod_proxy.c 4 Aug 2004 14:37:48 - 1.19 @@ -457,12 +457,6 @@ return HTTP_MOVED_PERMANENTLY; } -static apr_status_t worker_cleanup(void *theworker) -{ - -return APR_SUCCESS; -} - /* -- */ /* Invoke handler */ @@ -578,12 +572,6 @@ ap_set_module_config(r-connection-conn_config, proxy_module, mconf); } -#if 0 -/* register the connection-pool cleanup */ -apr_pool_cleanup_register(r-connection-pool, - (void *)mconf, worker_cleanup, - apr_pool_cleanup_null); -#endif } /* use the current balancer and worker. * the proxy_conn will be set in particular scheme handler @@ -857,8 +845,8 @@ return ProxyPass needs a path when not defined in a location; new = apr_array_push(conf-aliases); -new-fake = apr_pstrdup(cmd-pool, f); -new-real = apr_pstrdup(cmd-pool, r); +new-fake = f; +new-real = r; arr = apr_table_elts(params); elts = (const apr_table_entry_t *)arr-elts; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
Mladen Turk wrote: The removed proxyhost and port are from new hook 'pre_request' that is used to obtain a valid worker and/or balancer for a scheme. It has nothing to do with the way the connection is going to be made. Cool, this makes sense. The load balancer if present will decide to which route (worker) the connection is going to be made or return HTTP_SERVER_BUSY, if no further connection to the cluster can be made. If there is no load balancer or it returns DECLINED then the worker will be pulled out from the created set of workers during ProxyPass initialization. I've changed ProxyPass from TAKE12 to RAW_ARGS, so that you can directly initialize connection pool without load balancer (if not required for example). Cool. The way that the worker connects to backend depends on scheme handler itself (direct or via proxy). The worker connection itself will be either bound to the client connection (http) or to a backend connection (ajp), and that is also set in scheme handler. I have to figure out how to effectively skip that for ftp scheme handler. Ideally all three (http, ajp and ftp) should work the same way using a pool: The http method of only reusing the connection if the client reuses the connection is a bit bogus, there really should be a pool. Ftp is the same - there should be a pool of ftp connections. In the case of ftp, all it needs to do is logout completely but keep the connection open, or - for extra points teaching the pool that some connections require login (like ftp) and to reuse connections wheree the login details match might also be an idea. Ajp supports a pool anyway. Making all three the same - ie all three come from a pool would solve this problem I think. The timeout characteristics on each protocol would be different (I would imagine that ajp would have a long lived connection, while http connections would be constrained by the timeout on HTTP keepalives on backend servers) but this is details. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
jfclere 2004/08/04 07:48:13 Modified:ajp/proxy mod_proxy.c Log: Add a trace. Revision ChangesPath 1.20 +4 -1 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- mod_proxy.c 4 Aug 2004 14:37:48 - 1.19 +++ mod_proxy.c 4 Aug 2004 14:48:13 - 1.20 @@ -521,8 +521,11 @@ url = r-filename + 6; p = strchr(url, ':'); -if (p == NULL) +if (p == NULL) { +ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + proxy_handler no URL in %s, r-filename); return HTTP_BAD_REQUEST; +} /* If the host doesn't have a domain name, add one and redirect. */ if (conf-domain != NULL) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
mturk 2004/08/04 07:50:13 Modified:ajp/proxy proxy_util.c Log: Add some source comments about worker DNS lookup. Revision ChangesPath 1.7 +5 -2 jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- proxy_util.c 4 Aug 2004 14:35:39 - 1.6 +++ proxy_util.c 4 Aug 2004 14:50:13 - 1.7 @@ -1396,7 +1396,6 @@ if (proxyname) { mconf-conn_rec-hostname = apr_pstrdup(ppool, proxyname); mconf-conn_rec-port = proxyport; -/* see memory note above */ } else { mconf-conn_rec-hostname = apr_pstrdup(ppool, uri-hostname); mconf-conn_rec-port = uri-port; @@ -1405,13 +1404,17 @@ uri-fragment ? # : , uri-fragment ? uri-fragment : , NULL); } +/* Worker can have the single constant backend adress. + * The single DNS lookup is used once per worker. + * If dynamic change is needed then set the addr to NULL + * inside dynamic config to force the lookup. + */ if (!mconf-worker-cp-addr) err = apr_sockaddr_info_get((mconf-worker-cp-addr), mconf-conn_rec-hostname, APR_UNSPEC, mconf-conn_rec-port, 0, mconf-worker-cp-pool); -/* do a DNS lookup for the destination host */ if (err != APR_SUCCESS) { return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p, DNS lookup failure for: , - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
mturk 2004/08/04 08:12:13 Modified:ajp/proxy mod_proxy.h Log: Make proxy_conn always accesible for preforked MPM and APR_HAS_THREADS enabled. Revision ChangesPath 1.13 +1 -2 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h Index: mod_proxy.h === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- mod_proxy.h 4 Aug 2004 14:34:55 - 1.12 +++ mod_proxy.h 4 Aug 2004 15:12:13 - 1.13 @@ -205,9 +205,8 @@ apr_sockaddr_t *addr; /* Preparsed remote address info */ #if APR_HAS_THREADS apr_reslist_t *res;/* Connection resource list */ -#else -proxy_conn *conn; /* Single connection for prefork mpm's */ #endif +proxy_conn *conn; /* Single connection for prefork mpm's */ } proxy_conn_pool; /* Worker configuration */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
mturk 2004/08/04 08:13:35 Modified:ajp/proxy proxy_util.c Log: Add init_conn_worker for creating apr_reslist that maintains connection pool. For prefork mpm's use the single connection container. Revision ChangesPath 1.8 +25 -0 jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- proxy_util.c 4 Aug 2004 14:50:13 - 1.7 +++ proxy_util.c 4 Aug 2004 15:13:35 - 1.8 @@ -1355,6 +1355,31 @@ return APR_SUCCESS; } +static apr_status_t init_conn_worker(proxy_worker *worker, server_rec *s) +{ +apr_status_t rv; +#if APR_HAS_THREADS +if (worker-hmax) { +rv = apr_reslist_create((worker-cp-res), +worker-min, worker-smax, +worker-hmax, worker-ttl, +connection_constructor, connection_destructor, +s, worker-cp-pool); +} +else +#endif +{ +worker-cp-conn = apr_pcalloc(worker-cp-pool, sizeof(proxy_conn)); +/* register the pool cleanup */ +apr_pool_cleanup_register(worker-cp-pool, (void *)worker-cp-conn, + proxy_conn_cleanup, apr_pool_cleanup_null); + +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + proxy: socket is created); +rv = APR_SUCCESS; +} +return rv; +} PROXY_DECLARE(apr_status_t) ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
On add, there isn't a context.xml file (yet), and there is no particular relationship between the Context path and the docBase. On remove, it's not conditional on changing watched resources. - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 2:40 AM Subject: Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml [EMAIL PROTECTED] wrote: billbarker2004/08/03 23:48:07 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Log: Adding methods for JMX managed Contexts. -- Adding method to get the configBase via JMX -- Adding methods to add and remove apps with minimal dependancy checks. This is for use with JMX apps (like the admin) that control the Context themselves. I don't quite see how this is any different from check(String name). Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
jfclere 2004/08/04 08:53:21 Modified:ajp/proxy proxy_util.c Log: Arrange the handling of apr_array_header_t arrays. Revision ChangesPath 1.9 +12 -10jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- proxy_util.c 4 Aug 2004 15:13:35 - 1.8 +++ proxy_util.c 4 Aug 2004 15:53:21 - 1.9 @@ -992,7 +992,7 @@ proxy_server_conf *conf, const char *url) { -struct proxy_balancer *balancers; +struct proxy_balancer *balancer; char *c, *uri = apr_pstrdup(p, url); int i; @@ -1002,10 +1002,11 @@ /* remove path from uri */ if ((c = strchr(c + 3, '/'))) *c = '\0'; -balancers = (struct proxy_balancer *)conf-balancers; +balancer = (struct proxy_balancer *)conf-balancers-elts; for (i = 0; i conf-balancers-nelts; i++) { -if (strcasecmp(balancers[i].name, uri) == 0) -return balancers[i]; +if (strcasecmp(balancer-name, uri) == 0) +return balancer; +balancer++; } return NULL; } @@ -1056,7 +1057,7 @@ proxy_server_conf *conf, const char *url) { -proxy_worker *workers; +proxy_worker *worker; char *c, *uri = apr_pstrdup(p, url); int i; @@ -1066,10 +1067,11 @@ /* remove path from uri */ if ((c = strchr(c + 3, '/'))) *c = '\0'; -workers = (proxy_worker *)conf-workers; +worker = (proxy_worker *)conf-workers-elts; for (i = 0; i conf-workers-nelts; i++) { -if (strcasecmp(workers[i].name, uri) == 0) -return workers[i]; +if (strcasecmp(worker-name, uri) == 0) +return worker; +worker++; } return NULL; } @@ -1115,7 +1117,7 @@ char *c, *q, *uri = apr_pstrdup(p, url); int port; -c = strchr(url, ':'); +c = strchr(uri, ':'); if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') return Bad syntax for a remote proxy server; /* remove path from uri */ @@ -1133,7 +1135,7 @@ port = -1; ap_str_tolower(uri); *worker = apr_array_push(conf-workers); -(*worker)-name = apr_pstrdup(p, uri); +(*worker)-name = apr_pstrdup(p, url); *c = '\0'; (*worker)-scheme = uri; if (port == -1) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
Mladen Turk wrote: IMO we could perhaps use exiting Proxy: Proxy balancer://myCluster BalancerMember ajp://host1:port [balancer params] etc... /Proxy Or.. Proxy balancer://myCluser[/StickySessionName] BalancerMember http://host1:port [balancer params] etc ... /Proxy I just looked at the manual for Proxy - it defines config that is common to a particular part of the URL space (it seems to refer to the backend URL space). As the URL defined in Proxy must match the URL defined in ProxyPass, sticking stuff on the end of it like the StickySessionName would probably cause hassles and confusion. Rather have a directive for sticksession, or add it as an option to the ProxyBalancer directive. I am still mulling over whether using Proxy is a good idea, initially I thought not, but thinking about it some more it's making sense. The idea of this kind of config seems to work, what do you think? Is this how you've done it? Proxy balancer://myCluster/myWebapp ProxyBalancer http://host1:port1/myWebapp ProxyBalancer http://host2:port2/myWebapp /Proxy ProxyPass /myWebapp balancer://myCluster/myWebapp You can even do funky mixing and matching of protocols inside the load balancer, like this: Proxy balancer://myCluster/myWebapp ProxyBalancer ajp://host1:port1/myWebapp ProxyBalancer http://host2:port2/theServerIsDown Proxy Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
jfclere 2004/08/04 09:07:03 Modified:ajp/proxy mod_proxy.c Log: DON'T remove it. It doesn't work without it!!! Revision ChangesPath 1.21 +2 -2 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- mod_proxy.c 4 Aug 2004 14:48:13 - 1.20 +++ mod_proxy.c 4 Aug 2004 16:07:03 - 1.21 @@ -848,8 +848,8 @@ return ProxyPass needs a path when not defined in a location; new = apr_array_push(conf-aliases); -new-fake = f; -new-real = r; +new-fake = apr_pstrdup(cmd-pool, f); +new-real = apr_pstrdup(cmd-pool, r); arr = apr_table_elts(params); elts = (const apr_table_entry_t *)arr-elts; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
mturk 2004/08/04 09:43:40 Modified:ajp/proxy proxy_util.c Log: Use the worker pool for creating proxy_conn_poll to suppress it's destruction when cleaning worker. Revision ChangesPath 1.10 +15 -3 jakarta-tomcat-connectors/ajp/proxy/proxy_util.c Index: proxy_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- proxy_util.c 4 Aug 2004 15:53:21 - 1.9 +++ proxy_util.c 4 Aug 2004 16:43:39 - 1.10 @@ -1081,9 +1081,16 @@ apr_pool_t *pool; proxy_conn_pool *cp; -/* Create a connection pool's subpool */ +/* Create a connection pool's subpool. + * This pool is used for connection recycling. + * Once the worker is added it is never removed but + * it can be disabled. + */ apr_pool_create(pool, p); -cp = (proxy_conn_pool *)apr_pcalloc(pool, sizeof(proxy_conn_pool)); +/* Alloc from the same pool as worker. + * proxy_conn_pool is permanently attached to the worker. + */ +cp = (proxy_conn_pool *)apr_pcalloc(p, sizeof(proxy_conn_pool)); cp-pool = pool; #if APR_HAS_THREADS { @@ -1372,7 +1379,12 @@ #endif { worker-cp-conn = apr_pcalloc(worker-cp-pool, sizeof(proxy_conn)); -/* register the pool cleanup */ +/* register the pool cleanup. + * The cleanup is registered on conn_pool pool, so that + * the same mechanism (apr_pool_cleanup) can be used + * for both nonthreaded and threaded servers when closing + * the entire worker. + */ apr_pool_cleanup_register(worker-cp-pool, (void *)worker-cp-conn, proxy_conn_cleanup, apr_pool_cleanup_null); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
Remy Maucherat [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: billbarker2004/08/03 23:48:07 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Log: Adding methods for JMX managed Contexts. -- Adding method to get the configBase via JMX -- Adding methods to add and remove apps with minimal dependancy checks. This is for use with JMX apps (like the admin) that control the Context themselves. I don't quite see how this is any different from check(String name). Well, for 'add', there isn't necessarily any context.xml file, and there isn't necessarily any relationship between the Context path and docBase. For 'remove', the remove is unconditional and doesn't require touching resources that may have never existed. One alternative would be to have the admin webapp alway create context.xml for the Create Context action, and delete it for the Remove Context action. However, this creates way more problems then it will ever solve (at least with the config as it is now). Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
I'm experiencing cca 2 hour mail delay on minotaur. Can you cc: to [EMAIL PROTECTED],hr jean-frederic clere wrote: [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 3:20 PM To: Tomcat Developers List Subject: Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c Mladen Turk wrote: [EMAIL PROTECTED] commited: new = apr_array_push(conf-aliases); -new-fake = f; -new-real = r; +new-fake = apr_pstrdup(cmd-pool, f); +new-real = apr_pstrdup(cmd-pool, r); There is no need to do that. The f is eventually set to cmd-path that is already duped from cmd pool. They r is always obtained using ap_getword_conf. Without the apr_pstrdup() it does not work on my machine... I have seen that real gets corrupted. (fake does not but in my test it set to cmd-path). Well, then there is some other bug (I'll check). The real is always obtained using ap_getword_conf that internally makes apr_palloc for the return value. Further more the same (cmd-pool) pool is used for them, so it should fail on apr_pstrdup(cmd-pool, r). MT. smime.p7s Description: S/MIME cryptographic signature
RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.h
Seams that the minotaur is behaving badly, so I'm getting mails with couple of hours delay :) Graham Leggett wrote: The way that the worker connects to backend depends on scheme handler itself (direct or via proxy). The worker connection itself will be either bound to the client connection (http) or to a backend connection (ajp), and that is also set in scheme handler. I have to figure out how to effectively skip that for ftp scheme handler. Ideally all three (http, ajp and ftp) should work the same way using a pool: The http method of only reusing the connection if the client reuses the connection is a bit bogus, there really should be a pool. Ftp is the same - there should be a pool of ftp connections. In the case of ftp, all it needs to do is logout completely but keep the connection open, or - for extra points teaching the pool that some connections require login (like ftp) and to reuse connections wheree the login details match might also be an idea. Ajp supports a pool anyway. Making all three the same - ie all three come from a pool would solve this problem I think. The timeout characteristics on each protocol would be different (I would imagine that ajp would have a long lived connection, while http connections would be constrained by the timeout on HTTP keepalives on backend servers) but this is details. They are planned to be the same. I'll make a generic obtain_connection that will be pulled out from the worker (connection pool), with opened socket (if closed). The way how it gets processed further depends on how the scheme handler says. For http connector the connection will be bound to the client connection. It will be returned to the pool (and closing the socket) when their connection id's are different. I have to see how to resolve the case when client breaks the connection. any ideas? For ajp connector the connection will be returned to the pool on request end (AJP can handle different clients trough the same socket). The ftp will probably call 'login' for new connections, but I'll first finish the upper two cases, and deal with ftp later (couple of days :) MT. smime.p7s Description: S/MIME cryptographic signature
RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c
Graham Leggett wrote: Proxy balancer://myCluser[/StickySessionName] BalancerMember http://host1:port [balancer params] etc ... /Proxy I just looked at the manual for Proxy - it defines config that is common to a particular part of the URL space (it seems to refer to the backend URL space). Yes, I saw that too and left the idea of having params inside Proxy I am still mulling over whether using Proxy is a good idea, initially I thought not, but thinking about it some more it's making sense. The idea of this kind of config seems to work, what do you think? Is this how you've done it? Proxy balancer://myCluster/myWebapp ProxyBalancer http://host1:port1/myWebapp ProxyBalancer http://host2:port2/myWebapp /Proxy It does not have ProxyBalancer directive but rather BalancerMember (just a string so easily changeable :) ProxyPass /myWebapp balancer://myCluster/myWebapp stickysession=jsessionid nofailover=On retry=3 Or just ... ProxyPass /myOherApp ajp://server:port/myOtherApp min=25 max=75 timeout=2 The Proxy section is not required. It can be also written as: ProxyPass /myClusterApp balancer://myCluster ProxyBalancer balancer://myCluster http://host1:port1/myWebapp lbfactor=25 ProxyBalancer balancer://myCluster http://host1:port1/myWebapp lbfactor=75 You can even do funky mixing and matching of protocols inside the load balancer, like this: Proxy balancer://myCluster/myWebapp ProxyBalancer ajp://host1:port1/myWebapp ProxyBalancer http://host2:port2/theServerIsDown Proxy Sure, the mixture is allowed, cause the balancer is not protocol dependant. MT. smime.p7s Description: S/MIME cryptographic signature
cvs commit: jakarta-tomcat-connectors/ajp/proxy mod_proxy.c mod_proxy.h
mturk 2004/08/04 11:39:27 Modified:ajp/proxy mod_proxy.c mod_proxy.h Log: Add worker timeout inherited from ProxyTimeout. Revision ChangesPath 1.22 +4 -0 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c Index: mod_proxy.c === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- mod_proxy.c 4 Aug 2004 16:07:03 - 1.21 +++ mod_proxy.c 4 Aug 2004 18:39:26 - 1.22 @@ -876,6 +876,8 @@ if (err) return apr_pstrcat(cmd-temp_pool, ProxyPass: , err, NULL); } +if (conf-timeout_set) +worker-timeout = conf-timeout; for (i = 0; i arr-nelts; i++) { const char *err = set_worker_param(worker, elts[i].key, elts[i].val); if (err) @@ -1246,6 +1248,8 @@ if ((err = ap_proxy_add_worker(worker, cmd-pool, conf, name)) != NULL) return apr_pstrcat(cmd-temp_pool, BalancerMember: , err, NULL); } +if (conf-timeout_set) +worker-timeout = conf-timeout; arr = apr_table_elts(params); elts = (const apr_table_entry_t *)arr-elts; 1.14 +2 -0 jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h Index: mod_proxy.h === RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/mod_proxy.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mod_proxy.h 4 Aug 2004 15:12:13 - 1.13 +++ mod_proxy.h 4 Aug 2004 18:39:26 - 1.14 @@ -225,6 +225,8 @@ int hmax; /* Hard maximum on the total number of connections */ apr_interval_time_t ttl;/* maximum amount of time in seconds a connection * may be available while exceeding the soft limit */ +apr_interval_time_t timeout; /* connection timeout */ + proxy_conn_pool *cp;/* Connection pool to use */ void*opaque;/* per scheme worker data */ } proxy_worker; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30460] - org.apache.coyote.tomcat5.MapperListener init - Error registering contexts - HTTP 1.1 connectors pauses
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30460. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30460 org.apache.coyote.tomcat5.MapperListener init - Error registering contexts - HTTP 1.1 connectors pauses [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 18:46 --- *** This bug has been marked as a duplicate of 29671 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29671] - Context don't start with multiple HTTP 1.1 connectors
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29671. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29671 Context don't start with multiple HTTP 1.1 connectors [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 18:46 --- *** Bug 30460 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30479] New: - Can't compile JSP using tag attribute name starting with capital
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30479. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30479 Can't compile JSP using tag attribute name starting with capital Summary: Can't compile JSP using tag attribute name starting with capital Product: Tomcat 5 Version: 5.0.27 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 1) Have a Tag library with a tag which has an attribute starting with capital. 2) Use it in a JSP. 3) An org.apache.jasper.JasperException occures (see attachment) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30479] - Can't compile JSP using tag attribute name starting with capital
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30479. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30479 Can't compile JSP using tag attribute name starting with capital --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 18:49 --- Created an attachment (id=12338) org.apache.jasper.JasperException - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 28949] - Occasional NoClassDefFoundError for tag classes at startup
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=28949. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=28949 Occasional NoClassDefFoundError for tag classes at startup [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 16:12 --- This seems to happen after each restart of the applicaton on one development computer. It appears only sporadically on other computers. I can't send the application. If you have indications, I can apply them on this computer to help solving this bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
Bill Barker wrote: Remy Maucherat [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: billbarker2004/08/03 23:48:07 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Log: Adding methods for JMX managed Contexts. -- Adding method to get the configBase via JMX -- Adding methods to add and remove apps with minimal dependancy checks. This is for use with JMX apps (like the admin) that control the Context themselves. I don't quite see how this is any different from check(String name). Well, for 'add', there isn't necessarily any context.xml file, and there isn't necessarily any relationship between the Context path and docBase. For 'remove', the remove is unconditional and doesn't require touching resources that may have never existed. One alternative would be to have the admin webapp alway create context.xml for the Create Context action, and delete it for the Remove Context action. However, this creates way more problems then it will ever solve (at least with the config as it is now). Yes, why not. To be perfectly honest, I envisioned that these manager/admin/etc would indeed create the needed context.xml file (or the folder or war in the docBase; you get the idea). The most important thing is that all deployment operations are fully handled by one component (otherwise, we fall back in the previous situation where the auto deployer doesn't talk to the deployer, which doesn't know about the manager webapp). The new methods don't change this, so it's not a problem. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL and preloading pool
Hi all I am using JSTL with precompilation (JSPC). I am wondering why the first time I go on a page with JSTL inside, it took longer to display. But when I go on it a second time, it displays as quick as with scriptlet. So I had a look to the code generated by JSPC and I noticed that there is a pool system with reused objects : org.apache.jasper.runtime.TagHandlerPool So my question is : is there a way to preload all that things ? I tried to do : Class cl = Class.forName(dang.www.websnmp.admin.hostgen_jsp); Object obj = cl.newInstance(); Method m = cl.getMethod(_jspInit, null); m.invoke(obj, null); But no amelioration... Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: Does hte following ring a bell
Hey there As there is LAMP for PHP does anyone know of JAMM-TL? -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
- Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 12:19 PM Subject: Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Bill Barker wrote: Remy Maucherat [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: billbarker2004/08/03 23:48:07 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml Log: Adding methods for JMX managed Contexts. -- Adding method to get the configBase via JMX -- Adding methods to add and remove apps with minimal dependancy checks. This is for use with JMX apps (like the admin) that control the Context themselves. I don't quite see how this is any different from check(String name). Well, for 'add', there isn't necessarily any context.xml file, and there isn't necessarily any relationship between the Context path and docBase. For 'remove', the remove is unconditional and doesn't require touching resources that may have never existed. One alternative would be to have the admin webapp alway create context.xml for the Create Context action, and delete it for the Remove Context action. However, this creates way more problems then it will ever solve (at least with the config as it is now). Yes, why not. To be perfectly honest, I envisioned that these manager/admin/etc would indeed create the needed context.xml file (or the folder or war in the docBase; you get the idea). The most important thing is that all deployment operations are fully handled by one component (otherwise, we fall back in the previous situation where the auto deployer doesn't talk to the deployer, which doesn't know about the manager webapp). The new methods don't change this, so it's not a problem. The way that the admin works at the moment, any change you make only affects the currently running instance of Tomcat unless you hit the Commit Changes button. With my patch, that doesn't change. If I create the context.xml file when you do a Create Context action, then you will still have that Context defined next time Tomcat is started, even if you didn't do a Commit Changes. Even worse is that if I delete the context.xml file when you do a Delete Context action, then your Context is still gone the next time Tomcat is started. That being said, I'm +-0 on the issue as a whole (the admin is one of the first things I remove when installing Tomcat :). I can change the admin to use check(String) if people think that admin should work like manager. However, I'm going to be without computer access through the weekend, so it will have to wait until next week. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java mbeans-descriptors.xml
Bill Barker wrote: The way that the admin works at the moment, any change you make only affects the currently running instance of Tomcat unless you hit the Commit Changes button. With my patch, that doesn't change. If I create the context.xml file when you do a Create Context action, then you will still have that Context defined next time Tomcat is started, even if you didn't do a Commit Changes. Even worse is that if I delete the context.xml file when you do a Delete Context action, then your Context is still gone the next time Tomcat is started. That being said, I'm +-0 on the issue as a whole (the admin is one of the first things I remove when installing Tomcat :). I can change the admin to use check(String) if people think that admin should work like manager. However, I'm going to be without computer access through the weekend, so it will have to wait until next week. No, don't change it, it looks ok. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30398] - Wrong content type when using mod_jk with mod_cache
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30398. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30398 Wrong content type when using mod_jk with mod_cache --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 20:47 --- No, you cannot use my patch as I patched mod_jk to solve my problem. You need a patch for mod_disk_cache. But as I mentioned in 30398, I was not quite sure if this problem is a bug in mod_jk or mod_cache / mod_disk_cache (BTW: mod_mem_cache does not have this problem). After I read this report here I am quite sure that it is a bug in mod_disk_cache and that it should be fixed there. mod_disk_cache.c already contains the needed code in write_headers, but it is executed too late. So I just moved this piece of code and created an appropriate patch for this which I will attach. I removed my patch from my mod_jk and added my patch to mod_disk_cache and my problem from 30398 remains silent. I hope that this patch will also solve your problem. A short feedback on your experience with the patch would be much appreciated. BTW: If you have any problems with mod_cache storing Cookies unintentional, or with other weird HTTP header caching behaviour you may find the following links useful: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30399 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30419 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30398] - Wrong content type when using mod_jk with mod_cache
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30398. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30398 Wrong content type when using mod_jk with mod_cache --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 20:48 --- Sorry wrong bug report :-(. Should have gone to 30278. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30398] - Wrong content type when using mod_jk with mod_cache
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30398. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30398 Wrong content type when using mod_jk with mod_cache --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 20:51 --- As I stumbled over Bug 30278 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30278) I am now sure that this problem is a bug of mod_disk_cache and that it should be fixed there. Although my patch does not harm mod_jk, it is no longer needed to solve the problem provided the patch from 30278 is used and applied to mod_disk_cache. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30479] - Can't compile JSP using tag attribute name starting with capital
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30479. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30479 Can't compile JSP using tag attribute name starting with capital [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 20:52 --- *** This bug has been marked as a duplicate of 27810 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27810] - Setter method not found for tag attributes that begin with 2 letters of different case
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27810. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27810 Setter method not found for tag attributes that begin with 2 letters of different case [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2004-08-04 20:52 --- *** Bug 30479 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30482] New: - ERROR:JSP:_jspx_meth_bean_message_0:struts compile error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=30482. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30482 ERROR:JSP:_jspx_meth_bean_message_0:struts compile error Summary: ERROR:JSP:_jspx_meth_bean_message_0:struts compile error Product: Tomcat 5 Version: 5.0.26 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I encountered this problem trying to deploy a struts based application on JBoss 3.2.5 running the bundled Tomcat 5.0.26. Was able to reproduce on 5.0.27. Basically, when deploying a WAR file, it appears the JSP compiler is having some problems finding portions of the taglibs and/or message resources. This application will run on both Tomcat 4.1 and JBoss 3.2.3 which runs Tomcat 4.1. Have included the stacktrace here and will attach a sample project that can be deployed to test any fixes. Have encountered some inklings of this problem on various forums, etc. http://www.junlu.com/msg/49694.html http://www.junlu.com/msg/77969.html http://forums.atlassian.com/thread.jspa?threadID=2372tstart=0 However, they mention previous versions and it seems to be very strange that it is happening again in the latter versions. Stacktrace: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /forms/loginForm.jsp Generated servlet error: /home/cuppett/jboss-3.2.5/server/all/work/jboss.web/localhost/_/org/apache/jsp/forms/loginForm_jsp.java:109: _jspx_meth_bean_message_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.forms.loginForm_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_bean_message_0(_jspx_th_html_form_0, _jspx_page_context)) ^ An error occurred at line: 7 in the jsp file: /forms/loginForm.jsp Generated servlet error: /home/cuppett/jboss-3.2.5/server/all/work/jboss.web/localhost/_/org/apache/jsp/forms/loginForm_jsp.java:115: _jspx_meth_bean_message_1(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.forms.loginForm_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_bean_message_1(_jspx_th_html_form_0, _jspx_page_context)) ^ An error occurred at line: 7 in the jsp file: /forms/loginForm.jsp Generated servlet error: /home/cuppett/jboss-3.2.5/server/all/work/jboss.web/localhost/_/org/apache/jsp/forms/loginForm_jsp.java:119: _jspx_meth_html_text_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.forms.loginForm_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_html_text_0(_jspx_th_html_form_0, _jspx_page_context)) ^ An error occurred at line: 7 in the jsp file: /forms/loginForm.jsp Generated servlet error: /home/cuppett/jboss-3.2.5/server/all/work/jboss.web/localhost/_/org/apache/jsp/forms/loginForm_jsp.java:125: _jspx_meth_bean_message_2(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.forms.loginForm_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_bean_message_2(_jspx_th_html_form_0, _jspx_page_context)) ^ An error occurred at line: 7 in the jsp file: /forms/loginForm.jsp Generated servlet error: /home/cuppett/jboss-3.2.5/server/all/work/jboss.web/localhost/_/org/apache/jsp/forms/loginForm_jsp.java:129: _jspx_meth_html_password_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.forms.loginForm_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_html_password_0(_jspx_th_html_form_0, _jspx_page_context)) ^ An error occurred at line: 7 in the jsp file: /forms/loginForm.jsp Generated servlet error: /home/cuppett/jboss-3.2.5/server/all/work/jboss.web/localhost/_/org/apache/jsp/forms/loginForm_jsp.java:135: _jspx_meth_html_submit_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.forms.loginForm_jsp cannot be applied to (org.apache.struts.taglib.html.FormTag,javax.servlet.jsp.PageContext) if (_jspx_meth_html_submit_0(_jspx_th_html_form_0, _jspx_page_context)) ^ 6 errors org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
Re: DO NOT REPLY [Bug 30482] New: -ERROR:JSP:_jspx_meth_bean_message_0:struts compile error
Thanks for your email. This is an auto response to confirm we have received your email. If you are wishing to check the whereabouts of an order please use our order tracker at - http://www.seetickets.com/tracker have your reference number and email address handy! If you wish to change your delivery address, we have an on-line address change facility. Please send a blank e-mail to [EMAIL PROTECTED] with your reference number and the last four digits of the card used to place the order in the subject line. Many thanks for booking with See Tickets If your query is urgent we can be contacted by telephone on *0871 22 00 260 24 hours a day. *For customers outside UK please call us on +44 115 912 9000 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Request dispatching question
Tomcat devs, I've noticed an interesting behaviour when moving some webapp code from Winstone to Tomcat, and I'd like to get an opinion on whether what it's by design, accidental or I've misinterpreted the spec (equal likelihood of any of the above). The webapp implements access control using a filter and a request wrapper. The filter is mapped to the protected directory, and any request that passes through gets checked for a token. If the token is not found, it dumps the contents of the request into a session object, and forwards to the login servlet. After the login is approved, the token is set, and a client side redirect to the original location is sent with a key added. On this second pass through the filter, the key is used to look up the session object storing the details of the original request. The filter constructs a request wrapper from that session object that makes the new request mimic the original one (eg when getRequestURI is called, it returns what the pre-authentication request's uri was, same for getServletPath, etc) This approach seems to work well with the first servlet, but if that servlet forwards to another servlet, it breaks down. It seems like on a forward, Tomcat sees that the request object it is handling is not the CoyoteRequestFacade and doesn't bother trying to reset the pathInfo, servletPath etc, so forwarding to a JSP seems to fail. It works ok on Winstone, because on a forward it unwraps the request until it hits something that's not a wrapper, resets the pathInfo/servletPath/etc, and passes it into the filter chain. It seems (from the outside) like Tomcat doesn't try more than one unwrap attempt. All of this is without yet looking at Tomcat source, so if I'm making a fool of myself just point me at a file and I'll disappear. My question is this (sorry I took so long to get to it) - what is the correct behaviour here ? Should it unwrap all the way, or only one step ? Is the behaviour I'm seeing expected or is something wrong ? Thanks in advance, Rick Knowles -- Servlet v2.4 container in a single 140KB jar file ? Try Winstone (http://winstone.sf.net/) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]