Re: HTTP/1.1 400 Bad Request --- Tomcat 5.0.28/IIS6 (Win2003)/JK-1.2.15
That was only the GET. The complete headers was so: GET /geonetwork/srv/en/main.search?extended=offremote=offattrset=geoany=hitsPerPage=10 HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://dev.heidi.it/geonetwork/srv/en/main.home Accept-Language: it Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) Host: myhost Proxy-Connection: Keep-Alive Cookie: JSESSIONID=9721047A40A1D2323EFAD7E1D836FBB7; .ASPXAUTH=8E388B49677A4A3E2EB5D6040CB9CE19B4CF4FB52AFE22827A48DA09ED387D7C80FAA40463D0C62F38192C564B5AC6DD15C868F7D2D16C86A8CC2089E50313597D38C92372BFE7A3D21B69DD7936983D; ASP.NET_SessionId=lk0msmbi5221htunjk5rx4qc Where u can see there is the Host. Piero Darryl Miles ha scritto: Piero Cavalieri wrote: The get: GET /geonetwork/srv/en/main.search?extended=offremote=offattrset=geoany=hitsPerPage=10 HTTP/1.1 The response: HTTP/1.1 400 Bad Request Content-Type: text/html Date: Thu, 31 Aug 2006 10:02:04 GMT Connection: close Content-Length: 35 Is it because you are missing the _MANDATORY_ Host: header, which is required for HTTP/1.1. Darryl - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Il contenuto di questo messaggio e' confidenziale e la lettura non autorizzata dello stesso viola i diritti di privacy del mittente e del destinatario. Se avete ricevuto questo messaggio per errore siete pregati di rimuoverlo dal Vostro sistema. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why cannot I put JSVC into a shell script to run
Pat, Send us your entire script. Also, which Linux, Tomcat, and Java are you using? That'll help us, too. warren From: Patrick Wang [EMAIL PROTECTED] Date: 2006/08/31 Thu PM 05:41:32 EDT To: users@tomcat.apache.org Subject: Why cannot I put JSVC into a shell script to run Hi, I can only copy/paste the contents from startTomcat.sh to the console, everything works fine. But when I run the command from the console startTomcat.sh, it gave me no error, however the http://www.experts-exchange.com/Programming/Programming_Platforms/Linux_Program ming/Q_21972914.html## tomcat doesnot get started, I make sure the execute rights is assigned, etc. One thing is that I make all these strings into one single line in the startTomcat.sh, will this have any effect? ./bin/jsvc -jvm http://www.experts-exchange.com/Programming/Programming_Platforms/Linux_Program ming/Q_21972914.html## server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap Do I need to setup the environment variable? However I can run the command from the console without the environment setup either. Pat - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deployment and virtual hosts
Hello! I´m having a problem to deploy an aplication that is configured as a virtual domain in server.xml. When I deploy the application it works fine IF I use the default url. But when I use my subdomain (x.y.com) , the application is not deployed!! I have to restart tomcat, and then the changes are applied. My definition of the virtual host is like this: Host name=x.y.com debug=0 appBase=/usr/local/apache-tomcat-5.5.17/webapps/myapp unpackWARs=true autoDeploy=true Context path= docBase= debug=0/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=myapp_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host Thanks! Marcelo
mod_jk validate failed / factory failed error
Can anyone give me a hint what makes the following mod_jk error. I use isapi_redirect.dll 1.2.14 with IIS 6.0 on Windows 2003. The log is : [Fri Aug 18 14:57:31 2006] [error] jk_worker.c (158): validate failed for ajp13 [Fri Aug 18 14:57:31 2006] [error] jk_worker.c (256): failed to create worker ajp13 [Fri Aug 18 16:58:36 2006] [error] jk_worker.c (146): factory for lb failed for ajp13 [Fri Aug 18 16:58:36 2006] [error] jk_worker.c (256): failed to create worker ajp13 [Fri Aug 18 21:00:01 2006] [error] jk_worker.c (146): factory for lb failed for ajp13 [Fri Aug 18 21:00:01 2006] [error] jk_worker.c (256): failed to create worker ajp13 [Sat Aug 19 08:51:01 2006] [error] jk_worker.c (146): factory for lb failed for ajp13 [Sat Aug 19 08:51:01 2006] [error] jk_worker.c (256): failed to create worker ajp13 Here is the workers.properties file (IP address is partly masked with XXX) worker.list=ajp13 worker.swuwpa03_servlet_mdscm.host=XXX.XXX.XXX.183 worker.swuwpa03_servlet_mdscm.port=17041 worker.swuwpa03_servlet_mdscm.type=ajp13 worker.swuwpa03_servlet_mdscm.cache_timeout=720 worker.swuwpa03_servlet_mdscm.socket_timeout=720 worker.swuwpa03_servlet_mdscm.cachesize=25 worker.swuwpa03_servlet_mdscm.retries=0 worker.swuwpa04_servlet_mdscm.host=XXX.XXX.XXX.184 worker.swuwpa04_servlet_mdscm.port=17041 worker.swuwpa04_servlet_mdscm.type=ajp13 worker.swuwpa04_servlet_mdscm.cache_timeout=720 worker.swuwpa04_servlet_mdscm.socket_timeout=720 worker.swuwpa04_servlet_mdscm.cachesize=25 worker.swuwpa04_servlet_mdscm.retries=0 worker.swuwpa03_servlet_mdscm2.host=XXX.XXX.XXX.183 worker.swuwpa03_servlet_mdscm2.port=17241 worker.swuwpa03_servlet_mdscm2.type=ajp13 worker.swuwpa03_servlet_mdscm2.cache_timeout=720 worker.swuwpa03_servlet_mdscm2.socket_timeout=720 worker.swuwpa03_servlet_mdscm2.cachesize=25 worker.swuwpa03_servlet_mdscm2.retries=0 worker.swuwpa04_servlet_mdscm2.host=XXX.XXX.XXX.184 worker.swuwpa04_servlet_mdscm2.port=17241 worker.swuwpa04_servlet_mdscm2.type=ajp13 worker.swuwpa04_servlet_mdscm2.cache_timeout=720 worker.swuwpa04_servlet_mdscm2.socket_timeout=720 worker.swuwpa04_servlet_mdscm2.cachesize=25 worker.swuwpa04_servlet_mdscm2.retries=0 worker.ajp13.balanced_workers=swuwpa03_servlet_mdscm, swuwpa04_servlet_mdscm, swuwpa03_servlet_mdscm2, swuwpa04_servlet_mdscm2 worker.ajp13.sticky_session=false worker.ajp13.type=lb Thanks. /Jongjin - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk validate failed / factory failed error
Jongjin Choi wrote: Can anyone give me a hint what makes the following mod_jk error. I use isapi_redirect.dll 1.2.14 with IIS 6.0 on Windows 2003. Syntax error. retries=0 BTW, 1.2.15 is broken. Use at least 1.2.16 Regards, Mladen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk validate failed / factory failed error
Thanks for your quick response. I have another question. In tomcat-connector document (http://tomcat.apache.org/connectors-doc/config/workers.html) , I can not find any clue of syntax error about 'retries=0'. Isn't zero valid value when I don't want to retry? What value should I use when I don't want to retry? It feel that the syntax error ('retries=0') is NOT the direct reason of 'validate failed for XXX' or 'factory failed lb for XXX' error, because the error shows up occasionally. /Jongjin On 9/1/06, Mladen Turk [EMAIL PROTECTED] wrote: Jongjin Choi wrote: Can anyone give me a hint what makes the following mod_jk error. I use isapi_redirect.dll 1.2.14 with IIS 6.0 on Windows 2003. Syntax error. retries=0 BTW, 1.2.15 is broken. Use at least 1.2.16 Regards, Mladen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk validate failed / factory failed error
Jongjin Choi wrote: Thanks for your quick response. It feel that the syntax error ('retries=0') is NOT the direct reason of 'validate failed for XXX' or 'factory failed lb for XXX' error, because the error shows up occasionally. Right, you should have at least a warning in the log that the retries was set to 1 (without retry). Anyhow, the message: [error] jk_worker.c (158): validate failed for ajp13 means that you have some error in the cofiguration. Try to rename the loadbalancer from ajp13 to something else. ajp13 is reserved single worker name, so that might be the reason (have no time to validate :) so try: worker.list=ajp13b ... worker.ajp13b.balanced_workers=swuwpa03_servlet_mdscm,swuwpa04_servlet_mdscm,swuwpa03_servlet_mdscm2,swuwpa04_servlet_mdscm2 worker.ajp13b.sticky_session=false worker.ajp13b.type=lb And of course modify the JkMount's Regards, Mladen. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk validate failed / factory failed error
On 9/1/06, Mladen Turk [EMAIL PROTECTED] wrote: Jongjin Choi wrote: Thanks for your quick response. It feel that the syntax error ('retries=0') is NOT the direct reason of 'validate failed for XXX' or 'factory failed lb for XXX' error, because the error shows up occasionally. Right, you should have at least a warning in the log that the retries was set to 1 (without retry). I have my log level 'emerge' so the log does not appear. Anyway, It's better to describe the meaning of 'retries=1' clearly in connector doc. Anyhow, the message: [error] jk_worker.c (158): validate failed for ajp13 means that you have some error in the cofiguration. Try to rename the loadbalancer from ajp13 to something else. ajp13 is reserved single worker name, so that might be the reason (have no time to validate :) so try: worker.list=ajp13b Okay, I'll try it. ... worker.ajp13b.balanced_workers=swuwpa03_servlet_mdscm,swuwpa04_servlet_mdscm,swuwpa03_servlet_mdscm2,swuwpa04_servlet_mdscm2 worker.ajp13b.sticky_session=false worker.ajp13b.type=lb And of course modify the JkMount's You mean the 'uriworkermap.properties' file in my case (IIS 6.0)? Regards, Mladen. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks. /Jongjin - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mulit-byte character username in DataSoureRealm
Hi Mark, Thank you for your help. This is the information I need! -Kikuchi Mark Thomas wrote: Toshiaki Kikuchi wrote: Hi, I would like to use username with multi-byte character(Shift-JIS) in FORM BASED Authentication of DataSourceRealm. But it does not work. username with ascii character works well. The reason seems that encoding of ServletRequest.getParameter() in FormAuthenticator.java does not work. Is it possible by changing setting of Tomcat? The authentication passes when I add ServletRequest.setCharacterEncoding(Shift_JIS) by hand to FormAuthenticator.java which is in the tomcat source code and use it. But for this case, username of ServletRequest.getRemoteUser() is not correctly encoded. Look at the bottom of http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html You want the characterEncoding attribute of the FormAuthenticator valve. Mark Thank in advance. -- For All Sports Lovers! http://pr.mail.yahoo.co.jp/yells/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- For All Sports Lovers! http://pr.mail.yahoo.co.jp/yells/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Handling file downloads?
Hi everyone, What is the best method of handling files that are to be offered for download? I have a web application that uses JSF as presentation framework. This web app is available as both stand-alone application in Tomcat as well as portlet deployed within a portlet container that relies on tomcat. This app is supposed to deliver files. For instance, it renders a button or link and when a user clicks on it, one of the two following things should happen: 1. the file is offered for download so the user can just download it 2. the file is a html file and should be displayed in a new browser window, thereby obtaining embedded objects (e.g. images that the html file refers to) However, this functionality should be offered to users depending on their access rights. If user B is not allowed to download file X, he should not be able to. What is the best method / way of handling this? The simple way of storing all files in something like %CATALINA_HOME%/webapps/files and then just render a download link referring to a file within won't work because everyone could access the files via URL. (Plus I don't like storing the files within CATALINA_HOME. What if I want to store them anywhere in the file system of the host?) In addition, some files have to be altered for some persons (e.g. before being delivered to user A, file X.html has to be processed and altered to meet the needs of user A. ONLY user A should see the altered X.html (X_altered_for_user_A.html). So this above approach looks dirty to me and doesn't live up to my expectations. But how does one deal with this offering files for download issue in a good, elegant way? There must be some nice way because like every CMS that uses tomcat offers just that. Any idea? Thanks a lot Matt - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat not finding servlet....
Have you checked to see how your servlets are mapped in the web.xml file? i.e. servlet servlet-namechngctrl.ChangeControlApprovalServlet/servlet-name servlet-classchngctrl.ChangeControlApprovalServlet/servlet-class /servlet servlet-mapping servlet-namechngctrl.ChangeControlApprovalServlet/servlet-name url-pattern/chngctrl/ChangeControlApproval.jsp/url-pattern /servlet-mapping in other words within the web-app tags you first declare a servlet by name, then mapped. Do your's match correctly? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 6:28 PM To: Tomcat Users List Subject: Re: tomcat not finding servlet OK i fixed the warning. The second.xml file located in the C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost\second needed to be changed to just say: Context path=/second / Restarted Tomcat (no error message) but I am still getting a 404 on my servlets. I also wanted to mention that my example servlets that came with tomcat work fine in their example context. THanks Jim WARNING: A docBase C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\second inside the host appBase has been specified, and will be ignored try correcting the above error first, then continue your troubleshooting [EMAIL PROTECTED] wrote: The only entries that look abnormal in the logs are as follows: From catalina.xxx NFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem WARNING: A docBase C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\second inside the host appBase has been specified, and will be ignored Aug 31, 2006 5:27:41 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/16 config=null Other than that I do not see any SAX related errors... are you getting any kind of SAX error when you start up tomcat? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 4:19 PM To: users@tomcat.apache.org Subject: tomcat not finding servlet Hello everyone I am running windows xp, tomcat 5.5.17, java jdk1.5.0_08. I have created an webapp called second have created the file: C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost\second which contains: Context path=/second reloadable=true docBase=C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\second workDir=C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\second\work / In /webapps/second I have a index.jsp file which works fine. In /webapps/second/WEB-INF/classes I have a three.class file which I compiled in Eclipse 3.2 without error. In /webapps/second/WEB-INF/ I have a web.xml file which contains... servlet servlet-namethree/servlet-name servlet-classthree/servlet-class /servlet servlet-mapping servlet-namethree/servlet-name url-pattern/three/url-pattern /servlet-mapping As I said when I go to localhost/second the .jsp file shows up perfectly. When I try localhost/second/three I am getting a 404 error. I have tried everything and am starting to get frustrated. Any ideas?? Thanks in advance... Jim - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling file downloads?
Matthias Klein wrote: Hi everyone, What is the best method of handling files that are to be offered for download? I have a web application that uses JSF as presentation framework. This web app is available as both stand-alone application in Tomcat as well as portlet deployed within a portlet container that relies on tomcat. This app is supposed to deliver files. For instance, it renders a button or link and when a user clicks on it, one of the two following things should happen: 1. the file is offered for download so the user can just download it 2. the file is a html file and should be displayed in a new browser window, thereby obtaining embedded objects (e.g. images that the html file refers to) The first approach that occurs to me would be that your button/link is to a url (w/ the filename as a query parameter) handled by a servlet that decides (presumably based on session info) whether it falls into case 1 or 2. If case 1, it could then copy the data out to the response, with the appropriate mime type. For case 2, it could build return the html page, but it would probably be better redirect to another url (w/ appropriate parameters). That url could be handled by a servlet or jsp that personalizes the html as appropriate. Actually, case 1 could be handled by an internal redirect as well; but then, in principle, you've got a url to the datafile w/o protection, even though the user doesn't (easily) see it. I'd be interested in hearing of any weaknesses (or strengths) to this approach. However, this functionality should be offered to users depending on their access rights. If user B is not allowed to download file X, he should not be able to. What is the best method / way of handling this? The simple way of storing all files in something like %CATALINA_HOME%/webapps/files and then just render a download link referring to a file within won't work because everyone could access the files via URL. (Plus I don't like storing the files within CATALINA_HOME. What if I want to store them anywhere in the file system of the host?) In addition, some files have to be altered for some persons (e.g. before being delivered to user A, file X.html has to be processed and altered to meet the needs of user A. ONLY user A should see the altered X.html (X_altered_for_user_A.html). So this above approach looks dirty to me and doesn't live up to my expectations. But how does one deal with this offering files for download issue in a good, elegant way? There must be some nice way because like every CMS that uses tomcat offers just that. Any idea? Thanks a lot Matt - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- [EMAIL PROTECTED] http://math.nist.gov/~BMiller/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Startup Error
I have a problem with Tomcat and I cannot figure out what is going on. I am using Tomcat 4.1.31. When running bootstrap.jar's main, I get Starting service Tomcat-Standalone Apache Tomcat/4.1.31 Catalina.start: LifecycleException: Context startup failed due to previous errors LifecycleException: Context startup failed due to previous errors at org.apache.catalina.core.StandardContext.start(StandardContext.java:3578 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) ... In reviewing the logs, I have 2006-09-01 09:33:58 WebappLoader[]: Deploying class repositories to work directory U:\...\work\Standalone\localhost\_ 2006-09-01 09:33:58 ContextConfig[] Parse error in default web.xml java.lang.ClassNotFoundException: org.apache.catalina.Container at org.apache.commons.digester.Digester.createSAXException(Digester.java:25 40) ... at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) 2006-09-01 09:33:58 ContextConfig[]: Occurred at line 58 column 15 2006-09-01 09:33:58 ContextConfig[]: Missing application web.xml, using defaults only 2006-09-01 09:33:58 ContextConfig[]: Marking this application unavailable due to previous error(s) 2006-09-01 09:33:58 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2006-09-01 09:33:58 StandardManager[]: Seeding of random number generator has been completed 2006-09-01 09:33:58 StandardContext[]: Context startup failed due to previous errors I reviewed the web.xml and it passed a validator. Does anyone have any suggestions? This web used to run just fine, so I'm wondering if maybe a dtd is out of place or if I'm missing something simple. The error in the web.xml is: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Introduction == -- !-- This document defines default values for *all* web applications -- !-- loaded into this instance of Tomcat. As each application is -- !-- deployed, this file is processed, followed by the -- !-- /WEB-INF/web.xml deployment descriptor from your own -- !-- applications. -- !-- -- !-- WARNING: Do not configure application-specific resources here! -- !-- They should go in the /WEB-INF/web.xml file in your application. -- !-- == Built In Servlet Definitions -- !-- The default servlet for all web applications, that serves static -- !-- resources. It processes all requests that are not mapped to other -- !-- servlets with servlet mappings (defined either here or in your own -- !-- web.xml file. This servlet supports the following initialization -- !-- parameters (default values are in square brackets): -- !-- -- !-- debug Debugging detail level for messages logged -- !-- by this servlet. [0] -- !-- -- !-- input Input buffer size (in bytes) when reading -- !-- resources to be served. [2048] -- !-- -- !-- listingsShould directory listings be produced if there -- !-- is no welcome file in this directory? [true] -- !-- -- !-- output Output buffer size (in bytes) when writing -- !-- resources to be served. [2048] -- !-- -- !-- readonlyIs this context read only, so HTTP -- !-- commands like PUT and DELETE are -- !-- rejected? [true] -- !-- -- !-- encodeRedirects Call encodeRedirectURL() on welcomefile or -- !-- directory redirects. [false] -- servlet servlet-namedefault/servlet-name servlet-class org.apache.catalina.servlets.DefaultServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet ERROR POINTS TO THE END OF THIS TAG
Problem with Mod_JK 1.2.15 and 1.2.18
Hi everyone, We have a application that run at the Tomcat container. This application was made at the Tomcat 4.1 using the Mod_jk 1.2.12 with this configuration the application run perfectly without any problem, at this days we want to make an upgrade at the servers to use the new Mod_Jk 1.2.15 or 1.2.18, but when we do this the application broken. The problem is that with this new Mod_jk the Exceptions was never call for example at this code: [code] try { while (true) { out.println(Nonononononnoonnonono); try { Thread.Sleep(1000); } catch(Exception ex) {} } } catch(Exception ex) { try { BufferedWriter writer = new BufferedWriter(new FileWriter(/srv/www/default/html/log/exception.txt)); writer.write(Eror !); writer.close(); writer = null; } catch (IOException ioe) { ioe.printStackTrace(); } } [/code] When the brownser is closed the server never create the file (exception.txt) it will only create this file when the Tomcat is shuted down, with the older version 1.2.12 or oldest the server always call this exception beforer 1 or 2 seconds and create the file. We open at the Bugzila a report of this problem (http://issues.apache.org/bugzilla/show_bug.cgi?id=39290) but didn't have any help to fix it. Thanx. Marcio Camurati - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why cannot I put JSVC into a shell script to run
Samuel: Thanks for the reply, you are correct. The same command line doesnot work when I put into a shell command. I used the command netstat to see if Tomcat has started since it listen to the port. Command from console works, starting shell script not working without an error shown up on the console. Since I am new to the bash shell script, I am not sure how to debug it. I checked the catalina.err, it seems cannot find a file, classpath was not setup? But everything in the console works great. Could the environment on the console and shell script different? THanks Pat -Original Message- From: Sameer Acharya [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 12:48 AM To: Tomcat Users List Subject: Re: Why cannot I put JSVC into a shell script to run Are you saying that when you run a command from console it works but when you put it into a shell script and try and run the script it doesnt work ? Are you using the same command from console , did you try and do a ps to see if tomcat has started/not started ? Putting the entire command on one line shouldnt be an issue . -Sameer Patrick Wang [EMAIL PROTECTED] wrote: Hi, I can only copy/paste the contents from startTomcat.sh to the console, everything works fine. But when I run the command from the console startTomcat.sh, it gave me no error, however the ming/Q_21972914.html## tomcat doesnot get started, I make sure the execute rights is assigned, etc. One thing is that I make all these strings into one single line in the startTomcat.sh, will this have any effect? ./bin/jsvc -jvm ming/Q_21972914.html## server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap Do I need to setup the environment variable? However I can run the command from the console without the environment setup either. Pat - All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 setting two JSESSIONID cookies in same response
I send a request into my web app and the response contains two JSESSIONID cookies. This doesn't cause a problem on most browsers but on some OpernWave mobile browsers the two identicle cookies seems to be cause the browser not to return the cookie is subsequent request thereby dropping the session between requests. Perhaps this is a known issue. My application has a few filters that the request passes through before getting to a servlet and these filters are crerating or accessing the session. HTTP-raw HTTP/1.1 200 OK HTTP-raw Server: Apache-Coyote/1.1 HTTP-raw Set-Cookie: JSESSIONID=C90DF7930E158150140E41FB2FAC; Path=/globalen HTTP-raw Set-Cookie: tbs_identity=1043786:3032; Expires=Sun, 01-Oct-2006 15:51:23 GMT; Path=/globalen HTTP-raw Set-Cookie: JSESSIONID=F974FDF3E26ACF12203F9F2C190735DA; Path=/globalen HTTP-raw Date: Fri, 01 Sep 2006 15:51:23 GMT HTTP-raw Connection: close HTTP-raw Cache-Control: no-cache HTTP-raw Pragma: no-cache HTTP-raw Content-Type: text/html;charset=ISO-8859-1 HTTP-raw Transfer-Encoding: chunked Would appreciate any help on this - in the meantime I will try to find the issue trhough elimination. Regards, David
training for java in NYC?
Hi, Sorry for the off-topic post. One of my programmers who helps maintain our tomcat 5.5 install asked about getting training in java, specifically J2EE/J2SE/J2ME among other things. If anyone knows where to find good courses in training for java in Manhattan, that'd be awesome. Thanks for any help, joon yoo - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why cannot I put JSVC into a shell script to run
Patrick Wang wrote: Thanks for the reply, you are correct. The same command line doesnot work when I put into a shell command. I used the command netstat to see if Tomcat has started since it listen to the port. Rather use lsof -i instead of netstat + having to grep the output: if lsof -i:8080 /dev/null; then # something is listening on 8080 else # nothing is listening on 8080 fi Another approach is to use netcat in zero I/O mode to make a TCP connect on the port: if netcat -n -w 1 -z localhost 8080; then # something responds to connect on 8080 else # nothing responds to connect on 8080 fi N.B.: -n is to avoid host and protocol name lookups -w 1 is to set the timeout for the connect to 1 second -z is for zero I/O mode -- i.e. just connect() and close Command from console works, starting shell script not working without an error shown up on the console. Just a wild guess: what about your JAVA_HOME, JRE_HOME and other environment variables that affect Tomcat ? Are you starting that shell script from the same environment as when you do it with the command, directly ? Same environment means: same user, also from an interactive shell, etc... If, for example, that shell script is being started by init as root, you will end up having a totally different environment as when you log in into an interactive shell. Since I am new to the bash shell script, I am not sure how to debug it. bash -x ./my_script.sh I checked the catalina.err, it seems cannot find a file, classpath was not setup? But everything in the console works great. Could the environment on the console and shell script different? See above. Personally, I always setup the full environment (well, at least the environment variables that affect Tomcat) in bin/setenv.sh If that file exists, it will automatically be sourced by catalina.sh That's where you should do your environment settings, especially JAVA_HOME and JRE_HOME. Do not rely on the environment as it is setup by an interactive login (e.g. ~/.profile or ~/.bashrc) e.g. ---8--- JAVA_HOME=/usr/java/jdk1.5.0 JRE_HOME=$JAVA_HOME JAVA_OPTS=-Xms128m -Xmx128m PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME JRE_HOME ---8--- cheers -- -o) Pascal Bleser ATOS Worldline/Aachen(DE) /\\ System Architect WLP Business Platform _\_v Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect.-L.Torvalds - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: training for java in NYC?
On 1 Sep 2006 at 12:02, joon yoo wrote: Hi, Sorry for the off-topic post. One of my programmers who helps maintain our tomcat 5.5 install asked about getting training in java, specifically J2EE/J2SE/J2ME among other things. If anyone knows where to find good courses in training for java in Manhattan, that'd be awesome. I get catalogs from www.learningtree.com , they have j2ee, jsf, struts training. They have classes in NYC I don't know how good they are though, I haven't attended any of their training. Thanks for any help, joon yoo - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why cannot I put JSVC into a shell script to run
Pascal: Thanks for the detailed explanation, The procedure I used to launch jsvc Login in SERVER using root account through SSH. Go to TOMCAT directory, Run startTomcat.sh, nothing happened. Then run command cat startTomcat.sh and copy/paste the command to the console, hit enter. Tocmat started after verifying the netstat -nlp | grep jsvc I setup all the environment variable like inside Catalina.sh By adding 4 echo in my startTomcat.sh echo JAVA_HOME: $JAVA_HOME echo CATALINA_HOME: $CATALINA_HOME echo CATALINA_BASE: $CATALINA_BASE echo CATALINA_TMPDIR: $CATALINA_TMPDIR ./bin/jsvc -jvm server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap [EMAIL PROTECTED] tomcat]# ./bin/jsvc -jvm server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap What is going on here? Thanks Pat -Original Message- From: Pascal Bleser [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 9:09 AM To: Tomcat Users List Subject: Re: Why cannot I put JSVC into a shell script to run Patrick Wang wrote: Thanks for the reply, you are correct. The same command line doesnot work when I put into a shell command. I used the command netstat to see if Tomcat has started since it listen to the port. Rather use lsof -i instead of netstat + having to grep the output: if lsof -i:8080 /dev/null; then # something is listening on 8080 else # nothing is listening on 8080 fi Another approach is to use netcat in zero I/O mode to make a TCP connect on the port: if netcat -n -w 1 -z localhost 8080; then # something responds to connect on 8080 else # nothing responds to connect on 8080 fi N.B.: -n is to avoid host and protocol name lookups -w 1 is to set the timeout for the connect to 1 second -z is for zero I/O mode -- i.e. just connect() and close Command from console works, starting shell script not working without an error shown up on the console. Just a wild guess: what about your JAVA_HOME, JRE_HOME and other environment variables that affect Tomcat ? Are you starting that shell script from the same environment as when you do it with the command, directly ? Same environment means: same user, also from an interactive shell, etc... If, for example, that shell script is being started by init as root, you will end up having a totally different environment as when you log in into an interactive shell. Since I am new to the bash shell script, I am not sure how to debug it. bash -x ./my_script.sh I checked the catalina.err, it seems cannot find a file, classpath was not setup? But everything in the console works great. Could the environment on the console and shell script different? See above. Personally, I always setup the full environment (well, at least the environment variables that affect Tomcat) in bin/setenv.sh If that file exists, it will automatically be sourced by catalina.sh That's where you should do your environment settings, especially JAVA_HOME and JRE_HOME. Do not rely on the environment as it is setup by an interactive login (e.g. ~/.profile or ~/.bashrc) e.g. ---8--- JAVA_HOME=/usr/java/jdk1.5.0 JRE_HOME=$JAVA_HOME JAVA_OPTS=-Xms128m -Xmx128m PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME JRE_HOME ---8--- cheers -- -o) Pascal Bleser ATOS Worldline/Aachen(DE) /\\ System Architect WLP Business Platform _\_v Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect.-L.Torvalds - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: training for java in NYC?
| -Original Message- | From: Steve Ochani [mailto:[EMAIL PROTECTED] | | I get catalogs from www.learningtree.com , they have j2ee, jsf, struts | training. They have classes in NYC | | I don't know how good they are though, I haven't attended any of their | training. I took a course on Oracle development from them. The instructor was a former development manager from Oracle and really knew his stuff. I can't vouch for any of their other courses, but I was impressed by this one. It was worth the money, but it was pricey (~$1300 for a 3-day course). --- Tracy Nelson / Nelnet Business Solutions 402 / 617-9449 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why cannot I put JSVC into a shell script to run
I got an error code in Catalina.err java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.commons.daemon.support.DaemonLoader.check(DaemonLoader.java:109) daemonec error: An error was detected checking the org.apache.catalina.startup.Bootstrap jsvc.exec error: Service exit with a return value of 2 -Original Message- From: Patrick Wang [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 9:45 AM To: 'Tomcat Users List' Subject: RE: Why cannot I put JSVC into a shell script to run Pascal: Thanks for the detailed explanation, The procedure I used to launch jsvc Login in SERVER using root account through SSH. Go to TOMCAT directory, Run startTomcat.sh, nothing happened. Then run command cat startTomcat.sh and copy/paste the command to the console, hit enter. Tocmat started after verifying the netstat -nlp | grep jsvc I setup all the environment variable like inside Catalina.sh By adding 4 echo in my startTomcat.sh echo JAVA_HOME: $JAVA_HOME echo CATALINA_HOME: $CATALINA_HOME echo CATALINA_BASE: $CATALINA_BASE echo CATALINA_TMPDIR: $CATALINA_TMPDIR ./bin/jsvc -jvm server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap [EMAIL PROTECTED] tomcat]# ./bin/jsvc -jvm server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap What is going on here? Thanks Pat -Original Message- From: Pascal Bleser [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 9:09 AM To: Tomcat Users List Subject: Re: Why cannot I put JSVC into a shell script to run Patrick Wang wrote: Thanks for the reply, you are correct. The same command line doesnot work when I put into a shell command. I used the command netstat to see if Tomcat has started since it listen to the port. Rather use lsof -i instead of netstat + having to grep the output: if lsof -i:8080 /dev/null; then # something is listening on 8080 else # nothing is listening on 8080 fi Another approach is to use netcat in zero I/O mode to make a TCP connect on the port: if netcat -n -w 1 -z localhost 8080; then # something responds to connect on 8080 else # nothing responds to connect on 8080 fi N.B.: -n is to avoid host and protocol name lookups -w 1 is to set the timeout for the connect to 1 second -z is for zero I/O mode -- i.e. just connect() and close Command from console works, starting shell script not working without an error shown up on the console. Just a wild guess: what about your JAVA_HOME, JRE_HOME and other environment variables that affect Tomcat ? Are you starting that shell script from the same environment as when you do it with the command, directly ? Same environment means: same user, also from an interactive shell, etc... If, for example, that shell script is being started by init as root, you will end up having a totally different environment as when you log in into an interactive shell. Since I am new to the bash shell script, I am not sure how to debug it. bash -x ./my_script.sh I checked the catalina.err, it seems cannot find a file, classpath was not setup? But everything in the console works great. Could the environment on the console and shell script different? See above. Personally, I always setup the full environment (well, at least the environment variables that affect Tomcat) in bin/setenv.sh If that file exists, it will automatically be sourced by catalina.sh That's where you should do your environment settings, especially JAVA_HOME and JRE_HOME. Do not rely on the environment as it is setup by an interactive login (e.g. ~/.profile or ~/.bashrc) e.g. ---8--- JAVA_HOME=/usr/java/jdk1.5.0 JRE_HOME=$JAVA_HOME JAVA_OPTS=-Xms128m -Xmx128m PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME JRE_HOME ---8--- cheers -- -o) Pascal Bleser ATOS Worldline/Aachen(DE) /\\ System Architect WLP Business Platform _\_v Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect.-L.Torvalds - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 setting two JSESSIONID cookies in same response
This turns out to be because I call session.invalidate() and then request.getSession(true). I don't have to do this so it's fine. Don't know if two JSESSIONIDs is valid behaviour. Regards, David On 9/1/06, David Cotter [EMAIL PROTECTED] wrote: I send a request into my web app and the response contains two JSESSIONID cookies. This doesn't cause a problem on most browsers but on some OpernWave mobile browsers the two identicle cookies seems to be cause the browser not to return the cookie is subsequent request thereby dropping the session between requests. Perhaps this is a known issue. My application has a few filters that the request passes through before getting to a servlet and these filters are crerating or accessing the session. HTTP-raw HTTP/1.1 200 OK HTTP-raw Server: Apache-Coyote/1.1 HTTP-raw Set-Cookie: JSESSIONID=C90DF7930E158150140E41FB2FAC; Path=/globalen HTTP-raw Set-Cookie: tbs_identity=1043786:3032; Expires=Sun, 01-Oct-2006 15:51:23 GMT; Path=/globalen HTTP-raw Set-Cookie: JSESSIONID=F974FDF3E26ACF12203F9F2C190735DA; Path=/globalen HTTP-raw Date: Fri, 01 Sep 2006 15:51:23 GMT HTTP-raw Connection: close HTTP-raw Cache-Control: no-cache HTTP-raw Pragma: no-cache HTTP-raw Content-Type: text/html;charset=ISO-8859-1 HTTP-raw Transfer-Encoding: chunked Would appreciate any help on this - in the meantime I will try to find the issue trhough elimination. Regards, David
Regarding SSL (http-https) installation or importing the trusted certificate
Hi everybody, I am trying to convert the tomcat container from http to https. But I want to do it by installing the trusted certificate. So I wanted to know how would you install the trusted certificate into your keystore. First of all I created the CSR and send it to the CA who will sign the CSR and returned me a chain of certificates. One is root certificate, intermediate certifcate and the CSR signed certificate. So I created the CSR with alias tomcat. Now I have a confusion of how should I install or import the certificate into the keystore. I can import the root certificate by creating the alias root, the chain certificate by creating the alias chain. But the confusion I have is do I have to import the CSR signed certificate using the alias tomcat only. Will it not tell that tomcat alias already exists? .. And if the alias are different does it matter while importing the certificate? Waiting for your reply. Thanking you, Keyur - How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
Re: training for java in NYC?
Thanks, I was looking through their site and wondering what quality instructors they had. Hopefully the java instructors will have worked at Sun. joon On 9/1/06, Tracy Nelson [EMAIL PROTECTED] wrote: | -Original Message- | From: Steve Ochani [mailto:[EMAIL PROTECTED] | | I get catalogs from www.learningtree.com , they have j2ee, jsf, struts | training. They have classes in NYC | | I don't know how good they are though, I haven't attended any of their | training. I took a course on Oracle development from them. The instructor was a former development manager from Oracle and really knew his stuff. I can't vouch for any of their other courses, but I was impressed by this one. It was worth the money, but it was pricey (~$1300 for a 3-day course). --- Tracy Nelson / Nelnet Business Solutions 402 / 617-9449 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.17 role-name*/role-name behavior change
I recently upgraded from tomcat 5.0.28 to 5.5.17. I have security set up on all my apps to allow any user that can authenticate against ldap access to the application So in 5.0.28, I defined role-name*/role-name to allow all role names. In 5.5.17 the behavior changes on the role-name attribute, and apparently the * now means all roles defined inside of web.xml instead of the previous all/any roles.. I understand that after tomcat 5.5.12, tomcat was fixed to conform to the 2.4 servlet spec, in which the * 's meaning is redefined. Suck. I dont want to have to define 300 roles in web.xml.. Once I do that, I am now maintaning roles in 2 places. ***As a test/workaround, I downloaded 5.5.12 and copied catalina.jar from server/lib to my 5.5.17 installation.. !Voila! authentication now works with the role-name*/role-name questions: Why is there no backwards compatibility? or is there and I just have to tell it which servlet spec to use? ***As, for my workaround. I cant see this as being a very good solution... I'm guessing this will cause problems elsewhere?? I could just use 5.5.12, but I'm sure there are some bug fixes along the way that I would benefit from.. thanks, Brian
Re: Problem with Mod_JK 1.2.15 and 1.2.18
i think you need this in your httpd.conf mod_jk related configuration section: JkOptions +FlushPackets Rgds, Fred Marcio Camurati wrote: Hi everyone, We have a application that run at the Tomcat container. This application was made at the Tomcat 4.1 using the Mod_jk 1.2.12 with this configuration the application run perfectly without any problem, at this days we want to make an upgrade at the servers to use the new Mod_Jk 1.2.15 or 1.2.18, but when we do this the application broken. The problem is that with this new Mod_jk the Exceptions was never call for example at this code: [code] try { while (true) { out.println(Nonononononnoonnonono); try { Thread.Sleep(1000); } catch(Exception ex) {} } } catch(Exception ex) { try { BufferedWriter writer = new BufferedWriter(new FileWriter(/srv/www/default/html/log/exception.txt)); writer.write(Eror !); writer.close(); writer = null; } catch (IOException ioe) { ioe.printStackTrace(); } } [/code] When the brownser is closed the server never create the file (exception.txt) it will only create this file when the Tomcat is shuted down, with the older version 1.2.12 or oldest the server always call this exception beforer 1 or 2 seconds and create the file. We open at the Bugzila a report of this problem (http://issues.apache.org/bugzilla/show_bug.cgi?id=39290) but didn't have any help to fix it. Thanx. Marcio Camurati - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-Mod_JK-1.2.15-and-1.2.18-tf2202971.html#a6103299 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat as a Service
Hi, I am having a problem with starting Tomcat as a service. Here are some of the details of the environment: Tomcat 5 OS: MS Windows Server 2003 SP 1 Ram: 960 JDK: jdk1.5.0_07 If i start it manually with the starttom.bat it works. If I go and try service install and then go to Administrative Tools and services and try to start the servic it will not work. I get the following error: Could not start Apache Tomcat Service on local computer Error 1053: The service did not respond to start or control request in a timely manner. Any help would be great. Thanks ab
Re: Tomcat as a Service
I would suggest you use http://people.apache.org/~fhanik/wrapper.html with that kit, comes a script called TomcatService.bat, this is the same as you would have started it as a service and you can troubleshoot. This also lets you control a few more options and settings, as well as generate thread dumps Filip Anca Barbuc wrote: Hi, I am having a problem with starting Tomcat as a service. Here are some of the details of the environment: Tomcat 5 OS: MS Windows Server 2003 SP 1 Ram: 960 JDK: jdk1.5.0_07 If i start it manually with the starttom.bat it works. If I go and try service install and then go to Administrative Tools and services and try to start the servic it will not work. I get the following error: Could not start Apache Tomcat Service on local computer Error 1053: The service did not respond to start or control request in a timely manner. Any help would be great. Thanks ab No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/435 - Release Date: 8/31/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat as a Service
you have to take the command line and cram it into one .bat file to start, then make that .bat file a service. -Original Message- From: Anca Barbuc [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 1:41 PM To: users@tomcat.apache.org Subject: Tomcat as a Service Hi, I am having a problem with starting Tomcat as a service. Here are some of the details of the environment: Tomcat 5 OS: MS Windows Server 2003 SP 1 Ram: 960 JDK: jdk1.5.0_07 If i start it manually with the starttom.bat it works. If I go and try service install and then go to Administrative Tools and services and try to start the servic it will not work. I get the following error: Could not start Apache Tomcat Service on local computer Error 1053: The service did not respond to start or control request in a timely manner. Any help would be great. Thanks ab - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clustering with mod_jk
Hello List, scenario: - 4 node tc 5.0.28 vertical cluster ( :-| same server... still testing, but it could have been 8) listening on ajp Connector address=x.x.x.x port=8009 maxProcessors=150 minProcessors=50 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 - 1 httpd 2.0.52 with mod_ajp 1.2.15 and prefork config on RH AS4, kernel 2.6.9-5.EL sticky sessions are disabled to avoid stress scripts hitting only one node IfModule prefork.c StartServers 40 MinSpareServers80 MaxSpareServers280 ServerLimit4096 MaxClients 4096 MaxRequestsPerChild 4096 /IfModule - 1 application where a couple of thousand users should hammer the app deployed on the webapp What happens is the app takes the stresser for a ride until 240 circa users then starts to die; jkmonitor sees linear increase on busy and max requests on only one node and pages hang; disabling the node moves the hung request handling to the next node. Where's the bottleneck? Any known bug in mod_jk? Should I increase threads on the tomcat nodes? Tnx, e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering with mod_jk
since you are using prefork, you must set cachesize=1 for your workers.properties file. However, you have 4096 MaxClients, in order to serve this up in tomcat, your JK connector should have maxProcessors=4096. An alternative, and safe solution, although much less performance, is to set MaxRequestsPerChild 1, this way you can get away with MaxClients 4096 and still have a much less maxProcessor value on Tomcat Filip Edoardo Causarano wrote: Hello List, scenario: - 4 node tc 5.0.28 vertical cluster ( :-| same server... still testing, but it could have been 8) listening on ajp Connector address=x.x.x.x port=8009 maxProcessors=150 minProcessors=50 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 - 1 httpd 2.0.52 with mod_ajp 1.2.15 and prefork config on RH AS4, kernel 2.6.9-5.EL sticky sessions are disabled to avoid stress scripts hitting only one node IfModule prefork.c StartServers 40 MinSpareServers80 MaxSpareServers280 ServerLimit4096 MaxClients 4096 MaxRequestsPerChild 4096 /IfModule - 1 application where a couple of thousand users should hammer the app deployed on the webapp What happens is the app takes the stresser for a ride until 240 circa users then starts to die; jkmonitor sees linear increase on busy and max requests on only one node and pages hang; disabling the node moves the hung request handling to the next node. Where's the bottleneck? Any known bug in mod_jk? Should I increase threads on the tomcat nodes? Tnx, e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/435 - Release Date: 8/31/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Mod_JK 1.2.15 and 1.2.18
Hi, Fred I forget to say at the post that I use it (JkOptions +FlushPackets) at my httpd.conf and it fix the flush call, but don't get a exception only when I shutdown the container. I found this post of another person about the same problem (http://threebit.net/mail-archive/tomcat-users/msg00254.html) but without answer. Thanx Marcio Camurati On Fri, 1 Sep 2006 10:45:45 -0700 (PDT), fredk2 [EMAIL PROTECTED] escreveu: De: fredk2 [EMAIL PROTECTED] Data: Fri, 1 Sep 2006 10:45:45 -0700 (PDT) Para: users@tomcat.apache.org Assunto: Re: Problem with Mod_JK 1.2.15 and 1.2.18 i think you need this in your httpd.conf mod_jk related configuration section: JkOptions +FlushPackets Rgds, Fred Marcio Camurati wrote: Hi everyone, We have a application that run at the Tomcat container. This application was made at the Tomcat 4.1 using the Mod_jk 1.2.12 with this configuration the application run perfectly without any problem, at this days we want to make an upgrade at the servers to use the new Mod_Jk 1.2.15 or 1.2.18, but when we do this the application broken. The problem is that with this new Mod_jk the Exceptions was never call for example at this code: [code] try { while (true) { out.println(Nonononononnoonnonono); try { Thread.Sleep(1000); } catch(Exception ex) {} } } catch(Exception ex) { try { BufferedWriter writer = new BufferedWriter(new FileWriter(/srv/www/default/html/log/exception.txt)); writer.write(Eror !); writer.close(); writer = null; } catch (IOException ioe) { ioe.printStackTrace(); } } [/code] When the brownser is closed the server never create the file (exception.txt) it will only create this file when the Tomcat is shuted down, with the older version 1.2.12 or oldest the server always call this exception beforer 1 or 2 seconds and create the file. We open at the Bugzila a report of this problem (http://issues.apache.org/bugzilla/show_bug.cgi?id=39290) but didn't have any help to fix it. Thanx. Marcio Camurati - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-Mod_JK-1.2.15-and-1.2.18-tf2202971.html#a6103299 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering with mod_jk
Using mpm_worker gave less impressive results; I'd say about 1/2, a much worse load average (way more than 5), and lots of swap. Seems like prefork works better on linux and I'm surprised. Anyway, assuming that I got the maxProcessors wrong I should have seen queues building up @ 150*4 instead they start 50% that value. The thing that makes me think it's a mod_jk issue is the fact that suddenly all request flow locks onto a node and stays busy until I restart apache. e On 01/set/06, at 21:21GMT+02:00, Filip Hanik - Dev Lists wrote: since you are using prefork, you must set cachesize=1 for your workers.properties file. However, you have 4096 MaxClients, in order to serve this up in tomcat, your JK connector should have maxProcessors=4096. An alternative, and safe solution, although much less performance, is to set MaxRequestsPerChild 1, this way you can get away with MaxClients 4096 and still have a much less maxProcessor value on Tomcat Filip Edoardo Causarano wrote: Hello List, scenario: - 4 node tc 5.0.28 vertical cluster ( :-| same server... still testing, but it could have been 8) listening on ajp Connector address=x.x.x.x port=8009 maxProcessors=150 minProcessors=50 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 - 1 httpd 2.0.52 with mod_ajp 1.2.15 and prefork config on RH AS4, kernel 2.6.9-5.EL sticky sessions are disabled to avoid stress scripts hitting only one node IfModule prefork.c StartServers 40 MinSpareServers80 MaxSpareServers280 ServerLimit4096 MaxClients 4096 MaxRequestsPerChild 4096 /IfModule - 1 application where a couple of thousand users should hammer the app deployed on the webapp What happens is the app takes the stresser for a ride until 240 circa users then starts to die; jkmonitor sees linear increase on busy and max requests on only one node and pages hang; disabling the node moves the hung request handling to the next node. Where's the bottleneck? Any known bug in mod_jk? Should I increase threads on the tomcat nodes? Tnx, e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/435 - Release Date: 8/31/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache 80 Tomcat 8080
I can broswe my html site with www.myhtml.com.. I can't get to my Tomcat deployed webapps without adding 8080 on the end, This is my workers.properties entry, [uri:/mysite/*] info=MySite.org ...http-vhosts.conf entry, VirtualHost *:80 Directory /usr/opt/tomcat/webapps/mysite Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory ServerAdmin [EMAIL PROTECTED] ServerAlias .org *.MySite.org DocumentRoot /usr/opt/tomcat/webapps/mysite /VirtualHost Tomcat 5.1.17 Apache 2.2.3 JK 2.1.18 What do I need to configure? Thanks, Jim _ Check the weather nationwide with MSN Search: Try it now! http://search.msn.com/results.aspx?q=weatherFORM=WLMTAG - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CGI Parameter Passing
jakarta-tomcat-5.0.18 running on Solaris 8 Sparc I have CGI turned on http://ir13.accuvoice.com/cgi-bin/test-cgi works fine However passing a parameter bombs http://ir13.accuvoice.com/cgi-bin/test-cgi?xyq=pdq Throws a HTTP 500 page with the following tomcat log. 2006-09-01 14:36:33 StandardContext[]cgi: findCGI: path=/test-cgi, /webadm/jakar ta-tomcat-5.0.18/webapps/ROOT/WEB-INF/cgi 2006-09-01 14:36:33 StandardContext[]cgi: findCGI: currentLoc=/webadm/jakarta-to mcat-5.0.18/webapps/ROOT/WEB-INF/cgi 2006-09-01 14:36:33 StandardContext[]cgi: findCGI: currentLoc=/webadm/jakarta-to mcat-5.0.18/webapps/ROOT/WEB-INF/cgi 2006-09-01 14:36:33 StandardContext[]cgi: findCGI: FOUND cgi at /webadm/jakarta- tomcat-5.0.18/webapps/ROOT/WEB-INF/cgi/test-cgi 2006-09-01 14:36:33 StandardContext[]cgi: findCGI calc: name=test-cgi, path=/web adm/jakarta-tomcat-5.0.18/webapps/ROOT/WEB-INF/cgi/test-cgi, scriptname=/cgi-bin /test-cgi, cginame=/test-cgi 2006-09-01 14:36:33 StandardContext[]cgi: runCGI(envp=[{HTTP_USER_AGENT=Mozilla/ 5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414, HTTP_ACCEPT_E NCODING=gzip,deflate, REQUEST_METHOD=GET, AUTH_TYPE=, HTTP_ACCEPT_LANGUAGE=en-us ,en;q=0.5, SERVER_NAME=ir13.accuvoice.com, SERVER_SOFTWARE=TOMCAT, HTTP_KEEP_ALI VE=300, HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7, HTTP_HOST=ir13.accuv oice.com, GATEWAY_INTERFACE=CGI/1.1, X_TOMCAT_SCRIPT_PATH=/webadm/jakarta-tomcat -5.0.18/webapps/ROOT/WEB-INF/cgi/test-cgi, REMOTE_ADDR=192.168.2.101, SERVER_PRO TOCOL=HTTP/1.1, PATH_INFO=, REMOTE_HOST=192.168.2.101, QUERY_STRING=bob, HTTP_CO NNECTION=keep-alive, SERVER_PORT=80, CONTENT_TYPE=, CONTENT_LENGTH=, HTTP_ACCEPT =application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xm l,te xt/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q= 0.2, text/css,*/*;q=0.1, SCRIPT_NAME=/cgi-bin/test-cgi, REMOTE_USER=, REMOTE_IDENT=}] , command=/webadm/jakarta-tomcat-5.0.18/webapps/ROOT/WEB-INF/cgi/test-cgi) 2006-09-01 14:36:33 StandardWrapperValve[cgi]: Servlet.service() for servlet cgi threw exception java.lang.NoSuchMethodError at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java :1573) at org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:633) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard ContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20 6) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ssConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java :584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:683) at java.lang.Thread.run(Thread.java:479) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache 80 Tomcat 8080
in the server.xml file, (in the conf dir) see if you have a line like this: !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- port=8080 is where you configure it. -Original Message- From: Jim Weir [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 2:59 PM To: users@tomcat.apache.org Subject: Apache 80 Tomcat 8080 I can broswe my html site with www.myhtml.com.. I can't get to my Tomcat deployed webapps without adding 8080 on the end, This is my workers.properties entry, [uri:/mysite/*] info=MySite.org ...http-vhosts.conf entry, VirtualHost *:80 Directory /usr/opt/tomcat/webapps/mysite Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory ServerAdmin [EMAIL PROTECTED] ServerAlias .org *.MySite.org DocumentRoot /usr/opt/tomcat/webapps/mysite /VirtualHost Tomcat 5.1.17 Apache 2.2.3 JK 2.1.18 What do I need to configure? Thanks, Jim _ Check the weather nationwide with MSN Search: Try it now! http://search.msn.com/results.aspx?q=weatherFORM=WLMTAG - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering with mod_jk
it is a mod_jk issue, it uses permanent connections, that is how it was designed. setting MaxRequestsPerClient to 1, will kill the child, hence kill the mod_jk connection, this way, you can have maxProcessorsMaxClients otherwise, they must match Filip Edoardo Causarano wrote: Using mpm_worker gave less impressive results; I'd say about 1/2, a much worse load average (way more than 5), and lots of swap. Seems like prefork works better on linux and I'm surprised. Anyway, assuming that I got the maxProcessors wrong I should have seen queues building up @ 150*4 instead they start 50% that value. The thing that makes me think it's a mod_jk issue is the fact that suddenly all request flow locks onto a node and stays busy until I restart apache. e On 01/set/06, at 21:21GMT+02:00, Filip Hanik - Dev Lists wrote: since you are using prefork, you must set cachesize=1 for your workers.properties file. However, you have 4096 MaxClients, in order to serve this up in tomcat, your JK connector should have maxProcessors=4096. An alternative, and safe solution, although much less performance, is to set MaxRequestsPerChild 1, this way you can get away with MaxClients 4096 and still have a much less maxProcessor value on Tomcat Filip Edoardo Causarano wrote: Hello List, scenario: - 4 node tc 5.0.28 vertical cluster ( :-| same server... still testing, but it could have been 8) listening on ajp Connector address=x.x.x.x port=8009 maxProcessors=150 minProcessors=50 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 - 1 httpd 2.0.52 with mod_ajp 1.2.15 and prefork config on RH AS4, kernel 2.6.9-5.EL sticky sessions are disabled to avoid stress scripts hitting only one node IfModule prefork.c StartServers 40 MinSpareServers80 MaxSpareServers280 ServerLimit4096 MaxClients 4096 MaxRequestsPerChild 4096 /IfModule - 1 application where a couple of thousand users should hammer the app deployed on the webapp What happens is the app takes the stresser for a ride until 240 circa users then starts to die; jkmonitor sees linear increase on busy and max requests on only one node and pages hang; disabling the node moves the hung request handling to the next node. Where's the bottleneck? Any known bug in mod_jk? Should I increase threads on the tomcat nodes? Tnx, e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/435 - Release Date: 8/31/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/435 - Release Date: 8/31/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.17 role-name*/role-name behavior change
SOLVED! Well since no one else seems to care about ldap authentication and user roles, I guess I'll reply to myself.. Apparently backwards compatiblity is built into the source code for tomcat. To work around the problem of role-name*/role-name you need to got and grab the tomcat source code, not the binaries.. If you have the binaries installed already, this is fine. All we are going to do is replace catalina.jar... In my source directory C:\apache- tomcat-5.5.17-src\container\catalina\src\share\org\apache\catalina\realm, I edited RealmBase.java. I Changed protected AllRolesMode allRolesMode = AllRolesMode.STRICT_MODE; to protected AllRolesMode allRolesMode = AllRolesMode.STRICT_AUTH_ONLY_MODE; I then built from source and copied the newly build catalina.jar file to my current binary distribution of tomcat..$TOMCAT_HOME/server/lib thats it.. Now role-name*/role-name authenticates all roles. Brian Bay On 9/1/06, brian bay [EMAIL PROTECTED] wrote: I recently upgraded from tomcat 5.0.28 to 5.5.17. I have security set up on all my apps to allow any user that can authenticate against ldap access to the application So in 5.0.28, I defined role-name*/role-name to allow all role names. In 5.5.17 the behavior changes on the role-name attribute, and apparently the * now means all roles defined inside of web.xml instead of the previous all/any roles.. I understand that after tomcat 5.5.12, tomcat was fixed to conform to the 2.4 servlet spec, in which the * 's meaning is redefined. Suck. I dont want to have to define 300 roles in web.xml.. Once I do that, I am now maintaning roles in 2 places. ***As a test/workaround, I downloaded 5.5.12 and copied catalina.jar from server/lib to my 5.5.17 installation.. !Voila! authentication now works with the role-name*/role-name questions: Why is there no backwards compatibility? or is there and I just have to tell it which servlet spec to use? ***As, for my workaround. I cant see this as being a very good solution... I'm guessing this will cause problems elsewhere?? I could just use 5.5.12, but I'm sure there are some bug fixes along the way that I would benefit from.. thanks, Brian
Re: Tomcat 5.5 setting two JSESSIONID cookies in same response
David Cotter wrote: This turns out to be because I call session.invalidate() and then request.getSession(true). I don't have to do this so it's fine. Don't know if two JSESSIONIDs is valid behaviour. In the case of the sample quoted the new one will just overwrite it. There are a few minor problems with cookie handling in TC, seeing two cookies for the same value is one I've seen before (and there is no API call to ask for a list of currently set cookies in the response, I can only ask what I was given in the request, Duh!). Invalidating the session should setup the cookie to expire/delete the current value, the session object maybe live during the request but after the request has been processed its destroys. It should be valid to call getSession(true) afterwards (within the same request) and you should be guaranteed a brand new JSESSIONID. This would be a very common way of writing a web-app and conceptually there isn't any technical reason why you can't allocate and invalidate multiple times within the same request. But maybe the specs have something to say about the matter as I've seen the issue raised as an unexpected thorn before. HTTP-raw Set-Cookie: JSESSIONID=C90DF7930E158150140E41FB2FAC; Path=/globalen HTTP-raw Set-Cookie: tbs_identity=1043786:3032; Expires=Sun, 01-Oct-2006 15:51:23 GMT; Path=/globalen HTTP-raw Set-Cookie: JSESSIONID=F974FDF3E26ACF12203F9F2C190735DA; Path=/globalen Darryl - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Migration from jk2 to jk, problems with uri context
I am moving to jk (1.2.18) from jk2 am having problems with the workers.properties file. I have separate apache and tomcat servers. Here is my working jk2 (workers2.properties) config: [logger] level=ERROR [config:] file=${serverRoot}/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 [logger.file:0] level=ERROR file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 [channel.socket:whatever.whoever.com:] host=whatever.whoever.com port= info=Ajp13 forwarding over socket debug=0 tomcatId=myTomcat [ajp13:whatever.whoever.com:] channel=channel.socket:myTomcat [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [vm:] info=Parameters used to load a JVM in the server process classpath=${CATALINA_HOME}/bin/tomcat-jni.jar classpath=${CATALINA_HOME}/server/lib/commons-logging.jar OPT=-Dtomcat.home=${CATALINA_HOME} OPT=-Dcatalina.home=${CATALINA_HOME} OPT=-Xmx768M disabled=1 [uri:/foo/*] context=/foo debug=0 I am trying to get a basic config working before I convert the rest from the old config. I cannot get the uri part to work. Here is the config I am running (workers.properties): worker.list= worker1 worker.worker1.type=ajp13 worker.worker1.host=whatever.whoever.com worker.worker1.port= worker.worker1.connection_pool_size=10 worker.worker1.connection_pool_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.mount=/foo/* foo Here are the error logs from apache: [Fri Sep 01 14:37:06 2006] [notice] Graceful restart requested, doing restart [Fri Sep 01 14:37:06 2006] [notice] Apache/2.0.55 (Unix) mod_ssl/2.0.55 OpenSSL/0.9.7a PHP/5.1.2 mod_jk/1.2.18 configured -- resuming normal operations [Fri Sep 01 14:37:17 2006] [error] [client 222.33.45.67] File does not exist: /var/www/html/foo, referer: http://noone.whoever.com The jk logs: [Fri Sep 01 15:20:53 2006] [21388:34496] [error] uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo [Fri Sep 01 15:20:53 2006] [21388:34496] [error] wc_create_worker::jk_worker.c (183): validate failed for worker1 [Fri Sep 01 15:20:53 2006] [21388:34496] [error] build_worker_map::jk_worker.c (256): failed to create worker worker1 [Fri Sep 01 15:20:53 2006] [21389:34496] [error] uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo [Fri Sep 01 15:20:53 2006] [21389:34496] [error] wc_create_worker::jk_worker.c (183): validate failed for worker1 [Fri Sep 01 15:20:53 2006] [21389:34496] [error] build_worker_map::jk_worker.c (256): failed to create worker worker1 I have tried several variations with the / and * syntax here: worker.worker1.mount=/foo/* foo With no luck. Can someone point me in the right direction ? -- James H. Edwards Senior Network Systems Administrator Judicial Information Division [EMAIL PROTECTED]
Re: Migration from jk2 to jk, problems with uri context
I have this working with tomcat 5.5.17 and apache2, jk1 You need mod_jk.so in apache/modules..for me /usr/lib/apache2/modules/mod_jk.so In apache home ---create workers.properties workers.tomcat.home=/path/to/tomcat ps=/ workers.list=worker1 worker.ajp13.type=ajp13 worker.ajp13.host=whatever.whoever.com worker.ajp13.port=8009 In httpd.conf or apache2.conf--- LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /path/to/apache/workers.properties in virtual-host section of apache JkMount /foo* worker1 #worker1 defined in workers.properties. JkMount /*.jsp worker1 #if you do http://wherever.whoever.com/index.jsp #you will bring up the tomcat homepage On the tomcat end, there is a small amount of config in server.xml Listener className=org.apache.jk.config.ApacheConfig modJk=/usr/lib/apache2/modules/mod_jk.so workersConfig=/etc/apache2/workers.properties/ Connector port=8009 redirectPort=8443 connectionTimeout=-1 protocol=AJP/1.3 /Connector make sure to stop and restart apache.. hope this helps... On 9/1/06, james edwards [EMAIL PROTECTED] wrote: I am moving to jk (1.2.18) from jk2 am having problems with the workers.properties file. I have separate apache and tomcat servers. Here is my working jk2 (workers2.properties) config: [logger] level=ERROR [config:] file=${serverRoot}/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 [logger.file:0] level=ERROR file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 [channel.socket:whatever.whoever.com:] host=whatever.whoever.com port= info=Ajp13 forwarding over socket debug=0 tomcatId=myTomcat [ajp13:whatever.whoever.com:] channel=channel.socket:myTomcat [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [vm:] info=Parameters used to load a JVM in the server process classpath=${CATALINA_HOME}/bin/tomcat-jni.jar classpath=${CATALINA_HOME}/server/lib/commons-logging.jar OPT=-Dtomcat.home=${CATALINA_HOME} OPT=-Dcatalina.home=${CATALINA_HOME} OPT=-Xmx768M disabled=1 [uri:/foo/*] context=/foo debug=0 I am trying to get a basic config working before I convert the rest from the old config. I cannot get the uri part to work. Here is the config I am running (workers.properties ): worker.list= worker1 worker.worker1.type=ajp13 worker.worker1.host=whatever.whoever.com worker.worker1.port= worker.worker1.connection_pool_size=10 worker.worker1.connection_pool_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.mount=/foo/* foo Here are the error logs from apache: [Fri Sep 01 14:37:06 2006] [notice] Graceful restart requested, doing restart [Fri Sep 01 14:37:06 2006] [notice] Apache/2.0.55 (Unix) mod_ssl/2.0.55 OpenSSL/0.9.7a PHP/5.1.2 mod_jk/1.2.18 configured -- resuming normal operations [Fri Sep 01 14:37:17 2006] [error] [client 222.33.45.67] File does not exist: /var/www/html/foo, referer: http://noone.whoever.com The jk logs: [Fri Sep 01 15:20:53 2006] [21388:34496] [error] uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo [Fri Sep 01 15:20:53 2006] [21388:34496] [error] wc_create_worker::jk_worker.c (183): validate failed for worker1 [Fri Sep 01 15:20:53 2006] [21388:34496] [error] build_worker_map::jk_worker.c (256): failed to create worker worker1 [Fri Sep 01 15:20:53 2006] [21389:34496] [error] uri_worker_map_add::jk_uri_worker_map.c (322): invalid context foo [Fri Sep 01 15:20:53 2006] [21389:34496] [error] wc_create_worker::jk_worker.c (183): validate failed for worker1 [Fri Sep 01 15:20:53 2006] [21389:34496] [error] build_worker_map::jk_worker.c (256): failed to create worker worker1 I have tried several variations with the / and * syntax here: worker.worker1.mount=/foo/* foo With no luck. Can someone point me in the right direction ? -- James H. Edwards Senior Network Systems Administrator Judicial Information Division [EMAIL PROTECTED]
Re: Tomcat 5.5.17 role-name*/role-name behavior change
It would have been easier to change server.xml, to something like: Realm allRolesMode=strictAuthOnly .. / brian bay [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] SOLVED! Well since no one else seems to care about ldap authentication and user roles, I guess I'll reply to myself.. Apparently backwards compatiblity is built into the source code for tomcat. To work around the problem of role-name*/role-name you need to got and grab the tomcat source code, not the binaries.. If you have the binaries installed already, this is fine. All we are going to do is replace catalina.jar... In my source directory C:\apache- tomcat-5.5.17-src\container\catalina\src\share\org\apache\catalina\realm, I edited RealmBase.java. I Changed protected AllRolesMode allRolesMode = AllRolesMode.STRICT_MODE; to protected AllRolesMode allRolesMode = AllRolesMode.STRICT_AUTH_ONLY_MODE; I then built from source and copied the newly build catalina.jar file to my current binary distribution of tomcat..$TOMCAT_HOME/server/lib thats it.. Now role-name*/role-name authenticates all roles. Brian Bay On 9/1/06, brian bay [EMAIL PROTECTED] wrote: I recently upgraded from tomcat 5.0.28 to 5.5.17. I have security set up on all my apps to allow any user that can authenticate against ldap access to the application So in 5.0.28, I defined role-name*/role-name to allow all role names. In 5.5.17 the behavior changes on the role-name attribute, and apparently the * now means all roles defined inside of web.xml instead of the previous all/any roles.. I understand that after tomcat 5.5.12, tomcat was fixed to conform to the 2.4 servlet spec, in which the * 's meaning is redefined. Suck. I dont want to have to define 300 roles in web.xml.. Once I do that, I am now maintaning roles in 2 places. ***As a test/workaround, I downloaded 5.5.12 and copied catalina.jar from server/lib to my 5.5.17 installation.. !Voila! authentication now works with the role-name*/role-name questions: Why is there no backwards compatibility? or is there and I just have to tell it which servlet spec to use? ***As, for my workaround. I cant see this as being a very good solution... I'm guessing this will cause problems elsewhere?? I could just use 5.5.12, but I'm sure there are some bug fixes along the way that I would benefit from.. thanks, Brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding SSL (http-https) installation or importing the trusted certificate
RTFM: http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html keyur sheth [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everybody, I am trying to convert the tomcat container from http to https. But I want to do it by installing the trusted certificate. So I wanted to know how would you install the trusted certificate into your keystore. First of all I created the CSR and send it to the CA who will sign the CSR and returned me a chain of certificates. One is root certificate, intermediate certifcate and the CSR signed certificate. So I created the CSR with alias tomcat. Now I have a confusion of how should I install or import the certificate into the keystore. I can import the root certificate by creating the alias root, the chain certificate by creating the alias chain. But the confusion I have is do I have to import the CSR signed certificate using the alias tomcat only. Will it not tell that tomcat alias already exists? .. And if the alias are different does it matter while importing the certificate? Waiting for your reply. Thanking you, Keyur - How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.17 role-name*/role-name behavior change
I would have responded sooner, but I've been to busy banging my head against my desk.. :-) Much easier indeed, and better.. thanks for the heads up! I wish I had posted this question earlier.. I understand that it's hard to keep documentation up-to-the-minute on every change, but this seems like allRolesMode might be a good canidate to include in the Realm doc.. unless I just missed it..I know it's in the javadoc, but dummies, like me, need things spelled out.. :-) In hindsight, your solution seems obvious to me, but the general consensus that I got from reading the small number of convoluted threads out there, was nobody had a clue what to do.. besides defining tons of roles in the web app.. or reverting to 5.5.12.. Maybe it's just not that common of situation?? thanks for the help! I'll come here first next time, instead of spending countless hours reading dead-end-threads.. Brian On 9/1/06, Bill Barker [EMAIL PROTECTED] wrote: It would have been easier to change server.xml, to something like: Realm allRolesMode=strictAuthOnly .. / brian bay [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] SOLVED! Well since no one else seems to care about ldap authentication and user roles, I guess I'll reply to myself.. Apparently backwards compatiblity is built into the source code for tomcat. To work around the problem of role-name*/role-name you need to got and grab the tomcat source code, not the binaries.. If you have the binaries installed already, this is fine. All we are going to do is replace catalina.jar... In my source directory C:\apache- tomcat-5.5.17-src\container\catalina\src\share\org\apache\catalina\realm , I edited RealmBase.java. I Changed protected AllRolesMode allRolesMode = AllRolesMode.STRICT_MODE ; to protected AllRolesMode allRolesMode = AllRolesMode.STRICT_AUTH_ONLY_MODE; I then built from source and copied the newly build catalina.jar file to my current binary distribution of tomcat..$TOMCAT_HOME/server/lib thats it.. Now role-name*/role-name authenticates all roles. Brian Bay On 9/1/06, brian bay [EMAIL PROTECTED] wrote: I recently upgraded from tomcat 5.0.28 to 5.5.17. I have security set up on all my apps to allow any user that can authenticate against ldap access to the application So in 5.0.28, I defined role-name*/role-name to allow all role names. In 5.5.17 the behavior changes on the role-name attribute, and apparently the * now means all roles defined inside of web.xml instead of the previous all/any roles.. I understand that after tomcat 5.5.12, tomcat was fixed to conform to the 2.4 servlet spec, in which the * 's meaning is redefined. Suck. I dont want to have to define 300 roles in web.xml.. Once I do that, I am now maintaning roles in 2 places. ***As a test/workaround, I downloaded 5.5.12 and copied catalina.jarfrom server/lib to my 5.5.17 installation.. !Voila! authentication now works with the role-name*/role-name questions: Why is there no backwards compatibility? or is there and I just have to tell it which servlet spec to use? ***As, for my workaround. I cant see this as being a very good solution... I'm guessing this will cause problems elsewhere?? I could just use 5.5.12, but I'm sure there are some bug fixes along the way that I would benefit from.. thanks, Brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]