Kerberos authentication
Hello Happy people, I'm cross-posting this to tomcat and archiva. In our company we have a well established Active Directory infrastructure, I'm running an Apache Archiva 1.3.1 installation in Tomcat 6, on Solaris 10. The OS has been Kerberos enabled and I would very much like to make use of this for Tomcat/Archiva in order to provide secure authenticated access to it. We need to provide secure and scalable authentication. Thus, everything else has been ruled out: * No authentication -- not good, because we need some form of auditing on who uploaded/deployed what (i.e.: who broke it) * SSH/SCP doesn't scale from an administration point of view (i.e.: we'd have to do something. That could be done wrong, forgotten about or any number of things when people have to do mundane tasks) * Basic authentication -- not so good from an admin's point of view, because clear-text passwords are stored in a Developer's settings.xml. Not so good from a developer's point of view, because s/he has to change their password in settings.xml every month or so. (sic) Given the lack of (official) documentation: http://www.google.com/search?hl=ensitesearch=tomcat.apache.orgq=kerberos+OR+krbaq=faqi=aql=oq=gs_rfai= http://wiki.apache.org/tomcat/FrontPage?action=fullsearchcontext=180value=kerberos+krbfullsearch=Text http://www.google.at/search?client=operarls=enq=site:archiva.apache.org+kerberos+OR+krbsourceid=operaie=utf-8oe=utf-8 http://www.google.com/search?hl=endomains=cwiki.apache.org%2FARCHIVAsitesearch=cwiki.apache.org%2FARCHIVAq=kerberos+OR+krbsitesearch=cwiki.apache.org%2FARCHIVAaq=faqi=aql=oq=gs_rfai= I was wondering if that's even in remotely in scope of either Project. It seems fairly simple to integrate Tomcat into a Kerberos Infrastructure (although I haven't had the time to do this so far), the question that remains unanswered to me is how to make Archiva profit from such integration. I appreciate any kind of feedback from people who similarily are stuck between a rock and a hard place, and even more so from those who have a sensible solution :) So long, i -- Igor Galić Tel: +43 (0) 664 886 22 883 Mail: i.ga...@brainsware.org URL: http://brainsware.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: unable to access comm ports on apache tomcat 6.0.18
On 11/10/2010 04:31, ramkumar wrote: Hi Pid, Thank you for your response. Not only for this comunication api, if i put thr jar files in WEBAPPS/MY APPLICATION/WENINF/LIB it is showing the No Class found. plese help me. Whw]at are rthe chnages i have to do? Thank you. That's probably true actually. I misread* the exception. java.lang.ClassNotFoundException: javax.comm.PortInUseException at Presumably you're catching and rethrowing the exception, using the wrong exception, because these two shouldn't interact like this. javax.comm is reporting that the port is already in use (PortInUseException), possibly because you've left one of your other versions of the program running in the IDE still. Stop them, before running Tomcat. If there are no other programs connected to the port, then we need to know more about how and when the javax.comm code you've implemented runs and how you are testing it. Is it in a Listener or a Servlet? Where is it defined in this class? Either way, I suspect that this model isn't going to work very well. p * Again! My hit rate is appalling recently. 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: unable to access comm ports on apache tomcat 6.0.18
hi, Thank you for the response. I am sure that no other programs using the port.I am suspecting that Tomcat not loading the jar file. I got same error while using the api coomons.fileupload for uploading the files to server.I put the all the required jar files in my project.But it is telling that Class not found.Tell me if u have any idea. Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configuring which Servlet is invoked
Hello, I have a slight problem, and am having difficulty determining which part of the Tomcat documentation applies in my case. Apache HTTP Server version (as proxy): 2.2.9 (Debian) Tomcat version: 6.0.29 **My Problem** Apache Roller weblogger is running on Tomcat with ROOT context, and is hosting several blog pages, each with a unique domain (Roller supports this). Here are two: http://blog.bread.co.nz http://blog.christopher.net.nz By way of mod_proxy, requests to the above are forwarded on to Tomcat, AJP port 8009. Moreover, mod_rewrite modifies the URLs thus: http://blog.bread.co.nz/bread/ http://blog.christopher.net.nz/christopher/ Roller uses the last part of the URL to determine which particular blog to serve up. In the first example, bread. However, the second isn't working as intended. Because I also happen to have an unrelated web application running at webapps/christopher (bearing in mind that Roller is found at webapps/ROOT), requests to the second URL above are being forwarded on to webapps/christopher. So the response comes from a Servlet found here, and not from Roller. I imagine adding a directive to server.xml will have the situation sorted. Obviously, webapps/christopher should respond to requests made to http://my_main_domain:8080/christopher. But webapps/ROOT should respond to requests made to http://blog.christopher.net.nz/christopher. I'd appreciate some help in getting this sorted. In the meanwhile, I've had to switch webapps/christopher off. Thanks regards, Chris. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
connection pool
Why if I reload application which use connection pool doesn't release connection's to MySQL DB? Only if I restart Tomcat connection's are released, is this a bug. I use: Apache Tomcat/6.0.181.6.0_16-b01Sun Microsystems Inc. Linux 2.6.18-194.3.1.el5PAE i386 Regards, Tomaz - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring which Servlet is invoked
On 11/10/2010 08:53, Christopher Dodunski wrote: Hello, I have a slight problem, and am having difficulty determining which part of the Tomcat documentation applies in my case. Apache HTTP Server version (as proxy): 2.2.9 (Debian) Tomcat version: 6.0.29 **My Problem** Apache Roller weblogger is running on Tomcat with ROOT context, and is hosting several blog pages, each with a unique domain (Roller supports this). Here are two: http://blog.bread.co.nz http://blog.christopher.net.nz By way of mod_proxy, requests to the above are forwarded on to Tomcat, AJP port 8009. Moreover, mod_rewrite modifies the URLs thus: http://blog.bread.co.nz/bread/ http://blog.christopher.net.nz/christopher/ Roller uses the last part of the URL to determine which particular blog to serve up. In the first example, bread. However, the second isn't working as intended. Because I also happen to have an unrelated web application running at webapps/christopher (bearing in mind that Roller is found at webapps/ROOT), requests to the second URL above are being forwarded on to webapps/christopher. So the response comes from a Servlet found here, and not from Roller. I imagine adding a directive to server.xml will have the situation sorted. Obviously, webapps/christopher should respond to requests made to http://my_main_domain:8080/christopher. But webapps/ROOT should respond to requests made to http://blog.christopher.net.nz/christopher. I'd appreciate some help in getting this sorted. In the meanwhile, I've had to switch webapps/christopher off. Deploy this app on it's own domain, leave the rest on the default domain. http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: unable to access comm ports on apache tomcat 6.0.18
On 11/10/2010 08:47, ramkumar wrote: hi, Thank you for the response. I am sure that no other programs using the port.I am suspecting that Tomcat not loading the jar file. I got same error while using the api coomons.fileupload for uploading the files to server.I put the all the required jar files in my project.But it is telling that Class not found.Tell me if u have any idea. Well, in the former case, some class in javax.comm is throwing a PortInUseException. The latter case may be a separate problem. Are you deploying a .war file to Tomcat? If so, exactly how are you doing that? Please remove all of the comments any passwords from your server.xml (this is important) and post it, inline in an email, here. How are you starting Tomcat, a script file? If so which one? p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: connection pool
On 11/10/2010 09:08, TomazM wrote: Why if I reload application which use connection pool doesn't release connection's to MySQL DB? Which connection pool and how is it defined? Where is the JDBC driver placed, and which one (exact version) are you using? Can you upgrade to the latest version of Tomcat? p Only if I restart Tomcat connection's are released, is this a bug. I use: Apache Tomcat/6.0.18 1.6.0_16-b01Sun Microsystems Inc. Linux 2.6.18-194.3.1.el5PAE i386 Regards, Tomaz - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux
Hi Spec : Java 1.5 WebApp : Tomcat 6.0.29 O/s Win 2000 / Linux / Unix Linux : 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux Question : Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux ? I am not able to connect TOMCAT 6.0.29 (on Linux, JDK1.5 )with JConsole (JDK 1.6 on windows ) Note : Earlier I had configured the same for UNIX / Windows for JConsole to Tomcat 6.0.14 URL : http://old.nabble.com/JMX---jconsole-for-TOMCAT6.0.14-td17778173.html with regards N.S.Karthik
Re: unable to access comm ports on apache tomcat 6.0.18
Hi , i am exporting war file using ecclipse ide(Ecclipse has option to export .war file). I am starting tomcat service runner(tomcat6.exe) and my server.xml file is ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Documentation at /docs/jndi-resources-howto.html GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- Connector port=2 maxHttpHeaderSize=8192 maxThreads=150 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true sslProtocol=TLS SSLEnabled=true SSLCertificateFile=C:\apache-tomcat-6.0.18\bin\tomcatcert.pem SSLCertificateKeyFile=C:\apache-tomcat-6.0.18\bin\tomcatkey.pem / Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Catalina defaultHost=localhost !--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) -- !-- Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ -- !-- The request dumper valve dumps useful debugging information about the request and response data received and sent by Tomcat. Documentation at: /docs/config/valve.html -- !-- Valve className=org.apache.catalina.valves.RequestDumperValve/ -- Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html -- !-- Valve className=org.apache.catalina.authenticator.SingleSignOn / -- !-- Access log processes all example. Documentation at: /docs/config/valve.html -- !-- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ -- /Host /Engine /Service /Server - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Starting/Stopping Tomcat from Java program
Hi, I've to write methods on calling which i'd be able to start and stop the tomcat app server. I tried this - I'm using Tomcat 6.0.26. String[] command = new String[4]; command[0] = cmd; command[1] = /C; command[2] = startup.bat; command[3] = C:\\; String x[] = {PATH=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26\\bin,CATALINA_HOME=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26,JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_21,JRE_HOME=C:\\Program Files\\Java\\jre6}; Process p = Runtime.getRuntime().exec(command,x); This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties, while it actually exists. If instead of setting the path, I give the absolute path of startup.bat in command[3], it works fine - Process p = Runtime.getRuntime().exec(cmd /C start C:\\broadway\\bat\\startup.bat); //I copied the startup.bat to a folder and ran it from there, it worked fine. Please give me pointers to the right direction! -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering.
Re: Configuring which Servlet is invoked
Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=blog.christopher.net.nz appBase=webapps/ROOT / /Engine Previously, the URL http://blog.christopher.net.nz/christopher called up webapps/christopher, when it should instead have been handled by Apache Roller running with ROOT context. Now that I have added the above directive, Tomcat reports The requested resource () is not available. The URL http://blog.bread.co.nz/bread is handled by Roller, as intended, because there is no competing application at webapps/bread. Regards, Chris. On 11/10/2010 08:53, Christopher Dodunski wrote: Hello, I have a slight problem, and am having difficulty determining which part of the Tomcat documentation applies in my case. Apache HTTP Server version (as proxy): 2.2.9 (Debian) Tomcat version: 6.0.29 **My Problem** Apache Roller weblogger is running on Tomcat with ROOT context, and is hosting several blog pages, each with a unique domain (Roller supports this). Here are two: http://blog.bread.co.nz http://blog.christopher.net.nz By way of mod_proxy, requests to the above are forwarded on to Tomcat, AJP port 8009. Moreover, mod_rewrite modifies the URLs thus: http://blog.bread.co.nz/bread/ http://blog.christopher.net.nz/christopher/ Roller uses the last part of the URL to determine which particular blog to serve up. In the first example, bread. However, the second isn't working as intended. Because I also happen to have an unrelated web application running at webapps/christopher (bearing in mind that Roller is found at webapps/ROOT), requests to the second URL above are being forwarded on to webapps/christopher. So the response comes from a Servlet found here, and not from Roller. I imagine adding a directive to server.xml will have the situation sorted. Obviously, webapps/christopher should respond to requests made to http://my_main_domain:8080/christopher. But webapps/ROOT should respond to requests made to http://blog.christopher.net.nz/christopher. I'd appreciate some help in getting this sorted. In the meanwhile, I've had to switch webapps/christopher off. Deploy this app on it's own domain, leave the rest on the default domain. http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring which Servlet is invoked
Christopher Dodunski wrote: Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. See here : http://wiki.apache.org/tomcat/HowTo #39 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring which Servlet is invoked
Christopher Dodunski wrote: Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=blog.christopher.net.nz appBase=webapps/ROOT / /Engine Previously, the URL http://blog.christopher.net.nz/christopher called up webapps/christopher, when it should instead have been handled by Apache Roller running with ROOT context. Now that I have added the above directive, Tomcat reports The requested resource () is not available. The URL http://blog.bread.co.nz/bread is handled by Roller, as intended, because there is no competing application at webapps/bread. It is difficult to respond clearly to your questions, because they seem to be based on the wrong premises, and/or they are confusing as to what you are really trying to achieve. We also have no idea what the ROLLER application is, and how itself needs to be set up. But here are some basic principles : 1) this line : Engine name=Catalina defaultHost=localhost indicates which one of your Host below, is the default host. The default Host is the one which will handle any request which arrives at this server, and for which the hostname does not match one of the other Host tags. In you case thus, this Host name=localhost.. is the default Host. 2) each separate Host should have a separate appBase, not overlapping the others. So, having one Host with appBase=webapps, and another Host with appBase=webapps/ is a nono, you should not do that. Create another directory, for example (tomcat_dir)/webapps-blog, and use that one to put the applications related to your host blog.christopher.net.nz, like Host name=blog.christopher.net.nz appBase=webapps-blog / (You can also define this directory totally outside the hierarchy of the main Tomcat, like at /var/websites/blog.christopher.net.nz, and then use Host name=blog.christopher.net.nz appBase=/var/websites/blog.christopher.net.nz / 3) within each applications base (appBase), each application will correspond to a directory, with the same name as the application. So for example, under (tomcat_dir)/webapps/, you can have one application called app1 and another called app2, for a structure like this tomcat_dir/webapps/ app1/ app2/ 4) To call any of these applications, you will use a URL like : http://host-name/app1 http://host-name/app2 etc.. 5) the special name ROOT is reserved for the default application within a Host. That is the application which users would get if they simply entered http://host-name/ So, to modify the structure given above so that there would be, in addition to app1 anbd app2, a default application, you would have : a) a file structure like this : tomcat_dir/webapps/ ROOT/ app1/ app2/ and users could ask for : http://host-name/ (to get the default application) http://host-name/app1 (to get the app1 application) http://host-name/app2 (to get the app2 application) Does this clarify things ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Connecting Tomcat 6.0.26 to MySQL 5.1
Hello Having rebuilt my Windows PC, I am trying to get Tomcat running under NetBeans to connect to MySQL. I believe MySQL is alright because the various tools retrieve data correctly. But when my Java web app is run from NetBeans, Tomcat shows the homepage but then gives a Java null pointer error. The logs tell me this is to do with retrieving user data from the database. So I'm assuming that the two system components are not able to talk to each other. But why? I have mySQLConnector in the NetBeans library my web app is using. I've placed MySQL Connector in Tomcat's config folder, MySQL Connector is also in the classpath of the PC. The context.xml file in the web app is set to use the root user in MySQL and all relevant authorities in MySQL are set. But I get nothing! Although I have the same tools on another PC and they are fine. Any ideas? Is there something I've missed? Thanks Martin O'Shea. Thanks Martin O'Shea
RE: Starting/Stopping Tomcat from Java program
Hi Probably u may need to use Embedded version of TOMCAT to do this activity... With regards karthik -Original Message- From: kshitij chandrasen [mailto:kshtjchnd...@gmail.com] Sent: Monday, October 11, 2010 2:49 PM To: users@tomcat.apache.org Subject: Starting/Stopping Tomcat from Java program Hi, I've to write methods on calling which i'd be able to start and stop the tomcat app server. I tried this - I'm using Tomcat 6.0.26. String[] command = new String[4]; command[0] = cmd; command[1] = /C; command[2] = startup.bat; command[3] = C:\\; String x[] = {PATH=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26\\bin,CATALINA_HOME=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26,JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_21,JRE_HOME=C:\\Program Files\\Java\\jre6}; Process p = Runtime.getRuntime().exec(command,x); This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties, while it actually exists. If instead of setting the path, I give the absolute path of startup.bat in command[3], it works fine - Process p = Runtime.getRuntime().exec(cmd /C start C:\\broadway\\bat\\startup.bat); //I copied the startup.bat to a folder and ran it from there, it worked fine. Please give me pointers to the right direction! -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Starting/Stopping Tomcat from Java program
I call the scripts via code to both stop and start Tomcat. There is a problem with even calling these scripts via Unix unless you change (cd) into the bin directory before running startup.sh as the log paths are generated relative to the startup.sh location. String strCatalinaBin = System.getenv(CATALINA_HOME) + \\bin\\; File objDir = new File(strCatalinaBin); r = Runtime.getRuntime(); p = r.exec(new String[] { cmd.exe, /C, start, strCatalinaBin + catalina.bat, start }, null, objDir); p.waitFor(); p.destroy(); Hope this helps. Rob -Original Message- From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Sent: 11 October 2010 13:26 To: Tomcat Users List Subject: RE: Starting/Stopping Tomcat from Java program Hi Probably u may need to use Embedded version of TOMCAT to do this activity... With regards karthik -Original Message- From: kshitij chandrasen [mailto:kshtjchnd...@gmail.com] Sent: Monday, October 11, 2010 2:49 PM To: users@tomcat.apache.org Subject: Starting/Stopping Tomcat from Java program Hi, I've to write methods on calling which i'd be able to start and stop the tomcat app server. I tried this - I'm using Tomcat 6.0.26. String[] command = new String[4]; command[0] = cmd; command[1] = /C; command[2] = startup.bat; command[3] = C:\\; String x[] = {PATH=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26\\bin,CATALINA_HOME=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26,JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_21,JRE_HOME=C:\\Program Files\\Java\\jre6}; Process p = Runtime.getRuntime().exec(command,x); This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties, while it actually exists. If instead of setting the path, I give the absolute path of startup.bat in command[3], it works fine - Process p = Runtime.getRuntime().exec(cmd /C start C:\\broadway\\bat\\startup.bat); //I copied the startup.bat to a folder and ran it from there, it worked fine. Please give me pointers to the right direction! -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disabling session management
Hi Christopher Which classes, specifically? Thousands of Session instances inside the sessioins attribute of the org.apache.catalina.session.StandardManager. In theory we are not calling getSessions on the middle tier and as you mentioned, we have no JSPs either. However, we might be passing a jsession parameter from the frontend to the middle tier. Would that be an issue, causing the session to be created in the middle tier? What is the impact of using session-timeout = 0? Your sessions will never time out, and your problem will likely get worse. In the only place I see any reference to it is here: http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/session/StandardSessionFacade.html#setMaxInactiveInterval(int) And it says that A negative time indicates the session should never timeout.. there is no mention about setting as 0. Regards Emerson On 8 October 2010 15:35, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Emerson, On 10/8/2010 10:25 AM, emerson wrote: We been doing some tuning on our TC environment and noticed that tomcat is holding 30 megabytes of classes related to session management. This is on our middletier servler, where sessions are irrelevant. Okay, great. Is there a way to disabled session management for this server? Don't call request.getSession(). If you have JSPs (in a middle tier?), make sure they all have session=false in their @page directives. What is the impact of using session-timeout = 0? Your sessions will never time out, and your problem will likely get worse. We currently use 30 minutes for the session-timeout. You could always set it to 1 minute just to be sure they don't last very long if they are accidentally created. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyvLCgACgkQ9CaO5/Lv0PCOYgCfZTNhOQlUiCkqJ17HAjkOuBqp AP0Aniew/AE4rFaoKkTwGJGq5uOFRb7P =iXPl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.5.25 | Memory leak in Web Application
Thanks Chris and Chuck for your help so far. I have added my problem statement with Images to by blog here: http://anuragkapur-techbytes.blogspot.com/2010/10/tomcat-5527-memory-leak-in-escenic-cms.html http://anuragkapur-techbytes.blogspot.com/2010/10/tomcat-5527-memory-leak-in-escenic-cms.html On Sat, Oct 9, 2010 at 12:13 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote Attachments are stripped: there is no image to view, here. I have attached the heap usage graph as a file this time (heap_usage.jpg) Please read Chris' statement again: attachments are stripped. If you want us to look at the pictures, you'll have to post them in some public location on the web. Heap utilization is like this: http://3.bp.blogspot.com/_Oq9OlP-8ap0/TLMAno5Z2lI/CPA/pUr70osY3HU/s1600/heap_usage.jpg An object call reference tree snapshot that I wanted to show you is here: http://2.bp.blogspot.com/_Oq9OlP-8ap0/TLMBRLiUzTI/CPE/ogO2HI2uYig/s1600/object_reference_tree.jpg Or can the address of the object change in the lifetime of the tomcat jvm? An object can move on each GC. So how should I determine if an object (HashMap entry or character array) that I saw in the first heap dump exists in the next hump dump I obtained after the 4th Full GC? Struggling to determine the root cause. Any further pointers would be much appreciated. Thanks Anurag
Re: Connecting Tomcat 6.0.26 to MySQL 5.1
Code seems to be wrong only in IE so must be something to do with security settings. Thanks anyway. From: m.os...@dsl.pipex.com Sent: Monday, October 11, 2010 12:32 PM To: users@tomcat.apache.org Subject: Connecting Tomcat 6.0.26 to MySQL 5.1 Hello Having rebuilt my Windows PC, I am trying to get Tomcat running under NetBeans to connect to MySQL. I believe MySQL is alright because the various tools retrieve data correctly. But when my Java web app is run from NetBeans, Tomcat shows the homepage but then gives a Java null pointer error. The logs tell me this is to do with retrieving user data from the database. So I'm assuming that the two system components are not able to talk to each other. But why? I have mySQLConnector in the NetBeans library my web app is using. I've placed MySQL Connector in Tomcat's config folder, MySQL Connector is also in the classpath of the PC. The context.xml file in the web app is set to use the root user in MySQL and all relevant authorities in MySQL are set. But I get nothing! Although I have the same tools on another PC and they are fine. Any ideas? Is there something I've missed? Thanks Martin O'Shea. Thanks Martin O'Shea
Re: Starting/Stopping Tomcat from Java program
Rob, Is the snippet working for you? For me it opens a command prompt from which it does call catalina.bat, but strangely the cmd window in which catalina.bat is running is just like a normal cmd window without tomcat output. The Tomcat did not start either. Thanks Kshitij On Mon, Oct 11, 2010 at 6:13 PM, Rob Gregory rob.greg...@ibsolutions.comwrote: I call the scripts via code to both stop and start Tomcat. There is a problem with even calling these scripts via Unix unless you change (cd) into the bin directory before running startup.sh as the log paths are generated relative to the startup.sh location. String strCatalinaBin = System.getenv(CATALINA_HOME) + \\bin\\; File objDir = new File(strCatalinaBin); r = Runtime.getRuntime(); p = r.exec(new String[] { cmd.exe, /C, start, strCatalinaBin + catalina.bat, start }, null, objDir); p.waitFor(); p.destroy(); Hope this helps. Rob -Original Message- From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Sent: 11 October 2010 13:26 To: Tomcat Users List Subject: RE: Starting/Stopping Tomcat from Java program Hi Probably u may need to use Embedded version of TOMCAT to do this activity... With regards karthik -Original Message- From: kshitij chandrasen [mailto:kshtjchnd...@gmail.com] Sent: Monday, October 11, 2010 2:49 PM To: users@tomcat.apache.org Subject: Starting/Stopping Tomcat from Java program Hi, I've to write methods on calling which i'd be able to start and stop the tomcat app server. I tried this - I'm using Tomcat 6.0.26. String[] command = new String[4]; command[0] = cmd; command[1] = /C; command[2] = startup.bat; command[3] = C:\\; String x[] = {PATH=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26\\bin,CATALINA_HOME=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26,JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_21,JRE_HOME=C:\\Program Files\\Java\\jre6}; Process p = Runtime.getRuntime().exec(command,x); This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties, while it actually exists. If instead of setting the path, I give the absolute path of startup.bat in command[3], it works fine - Process p = Runtime.getRuntime().exec(cmd /C start C:\\broadway\\bat\\startup.bat); //I copied the startup.bat to a folder and ran it from there, it worked fine. Please give me pointers to the right direction! -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering.
Re: Starting/Stopping Tomcat from Java program
Hi. I do not really understand the issue here. If you are under Windows, with Tomcat running as a Service, then you can just run the commands net start tomcat6 / net stop tomcat6 to start/stop tomcat. If you are under Linux, then you can just issue the command /etc/init.d/tomcat6 (start|stop). Under most Unixes, the procedure is similar. So where is the problem ? Rob Gregory wrote: I call the scripts via code to both stop and start Tomcat. There is a problem with even calling these scripts via Unix unless you change (cd) into the bin directory before running startup.sh as the log paths are generated relative to the startup.sh location. String strCatalinaBin = System.getenv(CATALINA_HOME) + \\bin\\; File objDir = new File(strCatalinaBin); r = Runtime.getRuntime(); p = r.exec(new String[] { cmd.exe, /C, start, strCatalinaBin + catalina.bat, start }, null, objDir); p.waitFor(); p.destroy(); Hope this helps. Rob -Original Message- From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Sent: 11 October 2010 13:26 To: Tomcat Users List Subject: RE: Starting/Stopping Tomcat from Java program Hi Probably u may need to use Embedded version of TOMCAT to do this activity... With regards karthik -Original Message- From: kshitij chandrasen [mailto:kshtjchnd...@gmail.com] Sent: Monday, October 11, 2010 2:49 PM To: users@tomcat.apache.org Subject: Starting/Stopping Tomcat from Java program Hi, I've to write methods on calling which i'd be able to start and stop the tomcat app server. I tried this - I'm using Tomcat 6.0.26. String[] command = new String[4]; command[0] = cmd; command[1] = /C; command[2] = startup.bat; command[3] = C:\\; String x[] = {PATH=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26\\bin,CATALINA_HOME=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26,JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_21,JRE_HOME=C:\\Program Files\\Java\\jre6}; Process p = Runtime.getRuntime().exec(command,x); This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties, while it actually exists. If instead of setting the path, I give the absolute path of startup.bat in command[3], it works fine - Process p = Runtime.getRuntime().exec(cmd /C start C:\\broadway\\bat\\startup.bat); //I copied the startup.bat to a folder and ran it from there, it worked fine. Please give me pointers to the right direction! -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Disable class monitoring for reloading container classes
I really think all times should be stored Zulu Standard Time, and then converted only for display purposes. This does make the conversion process more complicated, as the system has to have all timezone/dst tables for Forever to properly display the time to the user for that particular point in time to whatever the user's TZ was at that time. All comparatives are done on raw standardized data. (Yes, you don't have to do GMT for your base, but you might as well.) -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, October 08, 2010 5:04 PM To: Tomcat Users List Subject: Re: [OT] Disable class monitoring for reloading container classes Jeffrey Janner wrote: .. God I really hate DST. Don't let me get started on a rant.) .. Right. As someone once asked me : Why could they not leave the time as God gave us, he ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.
Re: Starting/Stopping Tomcat from Java program
Hi, perhaps this has the solution out of the box: http://cargo.codehaus.org/ Michael Hi. I do not really understand the issue here. If you are under Windows, with Tomcat running as a Service, then you can just run the commands net start tomcat6 / net stop tomcat6 to start/stop tomcat. If you are under Linux, then you can just issue the command /etc/init.d/tomcat6 (start|stop). Under most Unixes, the procedure is similar. So where is the problem ? Rob Gregory wrote: I call the scripts via code to both stop and start Tomcat. There is a problem with even calling these scripts via Unix unless you change (cd) into the bin directory before running startup.sh as the log paths are generated relative to the startup.sh location. String strCatalinaBin = System.getenv(CATALINA_HOME) + \\bin\\; File objDir = new File(strCatalinaBin); r = Runtime.getRuntime(); p = r.exec(new String[] { cmd.exe, /C, start, strCatalinaBin + catalina.bat, start }, null, objDir); p.waitFor(); p.destroy(); Hope this helps. Rob -Original Message- From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Sent: 11 October 2010 13:26 To: Tomcat Users List Subject: RE: Starting/Stopping Tomcat from Java program Hi Probably u may need to use Embedded version of TOMCAT to do this activity... With regards karthik -Original Message- From: kshitij chandrasen [mailto:kshtjchnd...@gmail.com] Sent: Monday, October 11, 2010 2:49 PM To: users@tomcat.apache.org Subject: Starting/Stopping Tomcat from Java program Hi, I've to write methods on calling which i'd be able to start and stop the tomcat app server. I tried this - I'm using Tomcat 6.0.26. String[] command = new String[4]; command[0] = cmd; command[1] = /C; command[2] = startup.bat; command[3] = C:\\; String x[] = {PATH=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26\\bin,CATALINA_HOME=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 6.0.26,JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_21,JRE_HOME=C:\\Program Files\\Java\\jre6}; Process p = Runtime.getRuntime().exec(command,x); This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties, while it actually exists. If instead of setting the path, I give the absolute path of startup.bat in command[3], it works fine - Process p = Runtime.getRuntime().exec(cmd /C start C:\\broadway\\bat\\startup.bat); //I copied the startup.bat to a folder and ran it from there, it worked fine. Please give me pointers to the right direction! -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. -- Kshitij Chandrasen Engineer, Software Engineering, Cisco Systems, CBSBU Engineering. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Michael Knümann Senior Consultant BusinessCoDe GmbH Ollenhauerstr.1 D-53113 Bonn Geschäftsführer: Hanno Gehron, Joerg Kunze HRB 008660 - Sitz Bonn Office Phone: +49 (0) 228 / 33885-242 Mobile Phone: +49 (0) 174 / 3178178 Fax:+49 (0) 228 / 33885--225 EMail: m...@business-code.de http://www.business-code.de - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux
On 11/10/2010 09:41, Karthik Nanjangude wrote: Hi Spec : Java 1.5 WebApp : Tomcat 6.0.29 O/s Win 2000 / Linux / Unix Linux : 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux Question : Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux ? None that I'm aware of. Works for me. I am not able to connect TOMCAT 6.0.29 (on Linux, JDK1.5 )with JConsole (JDK 1.6 on windows ) How have you set the JMX this time, as below? Are you connecting through a firewall? p Note : Earlier I had configured the same for UNIX / Windows for JConsole to Tomcat 6.0.14 URL : http://old.nabble.com/JMX---jconsole-for-TOMCAT6.0.14-td17778173.html with regards N.S.Karthik 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
RE: JSESSIONID weakness Severity in Tomcat 6.0.29?
Hi Mark, Well, it seems that www.securitymetrics.com got crazy! They already told me that they made some changes in their system, and now they are having problems (bugs). I was just asking myself: How can their automatized procedure know if I am vulnerable to the session fixation problem, if it doesnt know a valid user+password, so it is not being able to actually login to my system? Anyway, something good came from this: I realized that actually my system was not safe to session fixation. After the login process, it was not invalidating the session and creating a new one. Now it is. I just had to program the system to save the attributes, invalidadte the current session, create a new one, and recreate the attributes. Fortunately, Tomcat generates a new session ID for the new session. It seems that it was not happening in the previous versions of Tomcat and in other containers (according to what I have read in some forums), but now it is. Thanks for all your help! -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Sunday, October 10, 2010 03:09 PM To: Tomcat Users List Subject: Re: JSESSIONID weakness Severity in Tomcat 6.0.29? On 10/10/2010 20:59, Brian wrote: Hi Mark, Do you understand exactly what vulnerability are they talking about? No. It doesn't make much sense to me at the minute. I'd ask for more specific information. For some reason, they have determined that I have it, even though I'm not using Jrun but they wrongly assume I am. Looks like it so far. It all depends how they are detecting the vulnerability. It could be a false positive but there isn't enough information to tell. What do you mean exactly with app managing its own authentication? Sorry if it is a dumb question. If you use Tomcat's authentication (BASIC, FORM, etc) then Tomcat will change the session ID on authentication and therefore protect against session fixation. If the app has its own authentication mechanism it is possible that the session ID will not be changed on authentication creating the possibility for a session fixation attack. I found this on Google, and now that I read it I realize they are quoting you! :-) http://www.developer.com/java/web/article.php/3904871/Top-7-Features-i n-Tomc at-7-The-New-and-the-Improved.htm Is this the same subject? Yep, although that is looking at Tomcat 7. The session fixation protection (along with a handle of other things originally developed for Tomcat 7) got back-ported to Tomcat 6. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.5.25 | Memory leak in Web Application
The objects holding references to the character arrays that ultimately consume all the memory are of type org.apache.jasper.runtime.BodyContentImpl as indicated in the object reference tree below: There was a bug reported in Tomcat 5.5.9 which says The problem is that this huge array never gets reset due to the object pooling implementation in Jasper (JspFactoryImpl maintains a pool of PageContextImpl objects. Each PageContextImpl object maintains an array of BodyContentImpl objects), so the memory it consumed is never returned to the heap. https://issues.apache.org/bugzilla/show_bug.cgi?id=37793 We do not use the suggest JVM argument in our Tomcat 5.5.27 JVM -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true Could adding this argument to the Tomcat JVM resolve the problem? -Anurag On Mon, Oct 11, 2010 at 1:55 PM, Anurag Kapur anuragka...@gmail.com wrote: Thanks Chris and Chuck for your help so far. I have added my problem statement with Images to by blog here: http://anuragkapur-techbytes.blogspot.com/2010/10/tomcat-5527-memory-leak-in-escenic-cms.html On Sat, Oct 9, 2010 at 12:13 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote Attachments are stripped: there is no image to view, here. I have attached the heap usage graph as a file this time (heap_usage.jpg) Please read Chris' statement again: attachments are stripped. If you want us to look at the pictures, you'll have to post them in some public location on the web. Heap utilization is like this: http://3.bp.blogspot.com/_Oq9OlP-8ap0/TLMAno5Z2lI/CPA/pUr70osY3HU/s1600/heap_usage.jpg An object call reference tree snapshot that I wanted to show you is here: http://2.bp.blogspot.com/_Oq9OlP-8ap0/TLMBRLiUzTI/CPE/ogO2HI2uYig/s1600/object_reference_tree.jpg Or can the address of the object change in the lifetime of the tomcat jvm? An object can move on each GC. So how should I determine if an object (HashMap entry or character array) that I saw in the first heap dump exists in the next hump dump I obtained after the 4th Full GC? Struggling to determine the root cause. Any further pointers would be much appreciated. Thanks Anurag - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.5.25 | Memory leak in Web Application
On 11/10/2010 17:30, Anurag Kapur wrote: The objects holding references to the character arrays that ultimately consume all the memory are of type org.apache.jasper.runtime.BodyContentImpl as indicated in the object reference tree below: There was a bug reported in Tomcat 5.5.9 which says The problem is that this huge array never gets reset due to the object pooling implementation in Jasper (JspFactoryImpl maintains a pool of PageContextImpl objects. Each PageContextImpl object maintains an array of BodyContentImpl objects), so the memory it consumed is never returned to the heap. https://issues.apache.org/bugzilla/show_bug.cgi?id=37793 We do not use the suggest JVM argument in our Tomcat 5.5.27 JVM -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true Could adding this argument to the Tomcat JVM resolve the problem? I suspect it would only work if the app has JSPs which were pre-compiled against 5.5.9, rather than a newer version. p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Error 503 ocurring when server under load
Christopher Schultz wrote This directive has been deprecated since 1.2.16. Cachesize defines the number of connections made to the AJP backend that are maintained as a connection pool. It will limit the number of those connection that each web server child process can make. Cachesize property is used only for multi threaded web servers such as Apache 2.0 (worker), IIS and Netscape. The cachesize property should reflect the number of threads per child process. JK will discover the number of threads per child process on Apache 2 web server with worker-mpm and set its default value to match the ThreadsPerChild Apache directive. [...] Since mpm_winnt (like mpm_worker) uses ThreadsPerChild to set the number of worker threads (and therefore simultaneous requests that can be accepted), you'll have to know what ThreadsPerChild is set to. That's easy: just search for that directive in httpd.conf. If it's not there, or commented-out, the default is 64 on mpm_winnt (http://httpd.apache.org/docs/2.0/mod/mpm_common.html#threadsperchild). If you've left it as the default (64) and you've set worker.cachesize (really worker.connection_pool_size) to 10, then you can accept 64 connections from clients but only call-out to Tomcat over 10 of those connections: the others will have to wait. I'm not sure what the scheduling algorithm is for choosing which thread gets the next available connection from the pool (FIFO?), but it's very possible to starve your clients even after 10 simultaneous connections. - -chris So if I'm reading your email and the docs correctly. I should just comment out the cachesize=10 from the workers.properties. And since for connection_pool_size (that replaced it) JK will discover this number for the Apache web server automatically and set the pool size to this value, I don't need to add anything to the workers.properties file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring which Servlet is invoked
Hi, Thank you André for your clear explanation below. I am aware already of how the directory structure relates to URL formation and, thanks to you and others, now understand the significance of Host elements within an Engine. And I see how the default host is configured. It doesn't, though, quite answer my particular issue. Apache Roller is a weblog server, that handles multiple domains - e.g. blog.host1.com, blog.host2, etc. But, at the present time, to correctly form URLs within the HTML it serves up, Roller must run as the default Tomcat application. Therefore, it is installed at /usr/local/tomcat/webapps/ROOT. Here is what is happening: 1) HTTP request comes into my webserver with the URL: http://blog.christopher.net.nz 2) Apache HTTP server receives this on port #80 3) mod_rewrite appends /christopher to the end of the URL of the request header (Roller recognises this as the handle, so it serves up the correct blog page) 4) mod_proxy forwards request on to Tomcat's AJP port #8009 5) Tomcat receives this but, with the current configuration, invokes the application at webapps/christopher. Instead, I would like it to invoke the default (Roller) application at webapps/ROOT. Interestingly, if I browse to another domain hosted by Roller - http://blog.bread.co.nz(/bread) - as I don't happen to have an application at webapps/bread, Tomcat handles this fine. The default application (Roller) serves up the weblog for handle=bread. Thanks regards, Chris. Christopher Dodunski wrote: Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=blog.christopher.net.nz appBase=webapps/ROOT / /Engine Previously, the URL http://blog.christopher.net.nz/christopher called up webapps/christopher, when it should instead have been handled by Apache Roller running with ROOT context. Now that I have added the above directive, Tomcat reports The requested resource () is not available. The URL http://blog.bread.co.nz/bread is handled by Roller, as intended, because there is no competing application at webapps/bread. It is difficult to respond clearly to your questions, because they seem to be based on the wrong premises, and/or they are confusing as to what you are really trying to achieve. We also have no idea what the ROLLER application is, and how itself needs to be set up. But here are some basic principles : 1) this line : Engine name=Catalina defaultHost=localhost indicates which one of your Host below, is the default host. The default Host is the one which will handle any request which arrives at this server, and for which the hostname does not match one of the other Host tags. In you case thus, this Host name=localhost.. is the default Host. 2) each separate Host should have a separate appBase, not overlapping the others. So, having one Host with appBase=webapps, and another Host with appBase=webapps/ is a nono, you should not do that. Create another directory, for example (tomcat_dir)/webapps-blog, and use that one to put the applications related to your host blog.christopher.net.nz, like Host name=blog.christopher.net.nz appBase=webapps-blog / (You can also define this directory totally outside the hierarchy of the main Tomcat, like at /var/websites/blog.christopher.net.nz, and then use Host name=blog.christopher.net.nz appBase=/var/websites/blog.christopher.net.nz / 3) within each applications base (appBase), each application will correspond to a directory, with the same name as the application. So for example, under (tomcat_dir)/webapps/, you can have one application called app1 and another called app2, for a structure like this tomcat_dir/webapps/ app1/ app2/ 4) To call any of these applications, you will use a URL like : http://host-name/app1 http://host-name/app2 etc.. 5) the special name ROOT is reserved for the default application within a Host. That is the application which users would get if they simply entered http://host-name/ So, to modify the structure given above so that there would be, in addition to app1 anbd app2, a default application, you would have : a) a file structure like this : tomcat_dir/webapps/ ROOT/ app1/ app2/ and users could ask for : http://host-name/ (to get the default application) http://host-name/app1 (to get the app1 application) http://host-name/app2 (to get the app2 application) Does this clarify things ? - To unsubscribe, e-mail:
Re: Configuring which Servlet is invoked
Hi André, So, based on your explanation below, Tomcat can actually have more than one default application? It can have one for each and every Host? This is most interesting. I had assumed that the default application had to be installed at webapps/ROOT (or anywhere else the default host's appBase happened to be). Chris. Christopher Dodunski wrote: Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=blog.christopher.net.nz appBase=webapps/ROOT / /Engine Previously, the URL http://blog.christopher.net.nz/christopher called up webapps/christopher, when it should instead have been handled by Apache Roller running with ROOT context. Now that I have added the above directive, Tomcat reports The requested resource () is not available. The URL http://blog.bread.co.nz/bread is handled by Roller, as intended, because there is no competing application at webapps/bread. It is difficult to respond clearly to your questions, because they seem to be based on the wrong premises, and/or they are confusing as to what you are really trying to achieve. We also have no idea what the ROLLER application is, and how itself needs to be set up. But here are some basic principles : 1) this line : Engine name=Catalina defaultHost=localhost indicates which one of your Host below, is the default host. The default Host is the one which will handle any request which arrives at this server, and for which the hostname does not match one of the other Host tags. In you case thus, this Host name=localhost.. is the default Host. 2) each separate Host should have a separate appBase, not overlapping the others. So, having one Host with appBase=webapps, and another Host with appBase=webapps/ is a nono, you should not do that. Create another directory, for example (tomcat_dir)/webapps-blog, and use that one to put the applications related to your host blog.christopher.net.nz, like Host name=blog.christopher.net.nz appBase=webapps-blog / (You can also define this directory totally outside the hierarchy of the main Tomcat, like at /var/websites/blog.christopher.net.nz, and then use Host name=blog.christopher.net.nz appBase=/var/websites/blog.christopher.net.nz / 3) within each applications base (appBase), each application will correspond to a directory, with the same name as the application. So for example, under (tomcat_dir)/webapps/, you can have one application called app1 and another called app2, for a structure like this tomcat_dir/webapps/ app1/ app2/ 4) To call any of these applications, you will use a URL like : http://host-name/app1 http://host-name/app2 etc.. 5) the special name ROOT is reserved for the default application within a Host. That is the application which users would get if they simply entered http://host-name/ So, to modify the structure given above so that there would be, in addition to app1 anbd app2, a default application, you would have : a) a file structure like this : tomcat_dir/webapps/ ROOT/ app1/ app2/ and users could ask for : http://host-name/ (to get the default application) http://host-name/app1 (to get the app1 application) http://host-name/app2 (to get the app2 application) Does this clarify things ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring which Servlet is invoked
From: Christopher Dodunski [mailto:chrisfromsquir...@christopher.net.nz] Subject: Re: Configuring which Servlet is invoked So, based on your explanation below, Tomcat can actually have more than one default application? Yes - there is always one per Host. You need to make the blog Host the defaultHost, and have your christopher app handled by a separate Host for blog.christopher.net.nz, with a different appBase setting. You could remove the fiddling done by httpd, and just rename the christopher app to ROOT for the second Host. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring which Servlet is invoked
Hi, Okay, I have now set up two Host elements inside server.xml with appBases in two entirely different places... Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=http://blog.christopher.net.nz; appBase=/home/roller/application unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false / /Engine Have restarted Tomcat, but Tomcat isn't unpacking /home/roller/application/ROOT.war as expected. The catalina.out log doesn't seem to give a reason. Have I missed an important step? Thanks, Chris. From: Christopher Dodunski [mailto:chrisfromsquir...@christopher.net.nz] Subject: Re: Configuring which Servlet is invoked So, based on your explanation below, Tomcat can actually have more than one default application? Yes - there is always one per Host. You need to make the blog Host the defaultHost, and have your christopher app \ handled by a separate Host for blog.christopher.net.nz, with a different appBase \ setting. You could remove the fiddling done by httpd, and just rename the \ christopher app to ROOT for the second Host. - Chuck - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring which Servlet is invoked
From: Christopher Dodunski [mailto:chrisfromsquir...@christopher.net.nz] Subject: RE: Configuring which Servlet is invoked I have now set up two Host elements inside server.xml with appBases in two entirely different places... Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host The first Host above should be the one running the blogging app; is that correct? Host name=http://blog.christopher.net.nz; appBase=/home/roller/application unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false / Are the appBase settings switched? I would have thought the roller directory would be associated with the blogging webapp, based on your previous descriptions. Have restarted Tomcat, but Tomcat isn't unpacking /home/roller/application/ROOT.war as expected. Does Tomcat have read and write access to that directory? The catalina.out log doesn't seem to give a reason. Possibly the wrong log file to look at. What do the others have in them? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring which Servlet is invoked
Hi Chuck, The unpacking matter is now sorted - Tomcat didn't have write access. Regarding which is default host, I already have several applications hosted on Tomcat, and these are called by Apache HTTP (proxy) server like so: ProxyPass /tomcat ajp://127.0.0.1:8009/christopher/ ProxyPassReverse /tomcat ajp://127.0.0.1:8009/christopher/ My preference would be to leave localhost/127.0.0.1 as the default host. All applications (except Roller) are installed at /usr/local/tomcat/webapps. Roller hosts multiple domains, and so I can't see how this can be the default host. I thought the best option might be to set up a Host for each domain Roller serves, all with appBase=/home/roller/application. Is this the best solution in your opinion? Thanks, Chris. From: Christopher Dodunski [mailto:chrisfromsquir...@...] Subject: RE: Configuring which Servlet is invoked I have now set up two Host elements inside server.xml with appBases in two entirely different places... Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host The first Host above should be the one running the blogging app; is that correct? Host name=http://blog.christopher.net.nz; appBase=/home/roller/application unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false / Are the appBase settings switched? I would have thought the roller directory would be associated with the blogging webapp, based on your previous descriptions. Have restarted Tomcat, but Tomcat isn't unpacking /home/roller/application/ROOT.war as expected. Does Tomcat have read and write access to that directory? The catalina.out log doesn't seem to give a reason. Possibly the wrong log file to look at. What do the others have in them? - Chuck - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring which Servlet is invoked
From: Christopher Dodunski [mailto:chrisfromsquir...@christopher.net.nz] Subject: RE: Configuring which Servlet is invoked Roller hosts multiple domains, and so I can't see how this can be the default host. That is exactly the situation where you want it to be the defaultHost, so you don't have to configure a Host per domain. However, that does restrict you to one default webapp servicing all of the domains. Either that webapp or a filter can route each request to the proper domain-related webapps, if needed. I thought the best option might be to set up a Host for each domain Roller serves, all with appBase=/home/roller/application. Not good. You should have a separate appBase for each Host. If you don't, incorrect deployment may occur based on the timing of each Host seeing the webapps underneath the shared appBase. If you run with expanded directories rather than .war files, it may work, but it's not recommended. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring which Servlet is invoked
What I probably omitted to say is that localhost is likely to be associated with many more domains than the Roller application alone. So marrying the default host to Roller isn't likely to save me work. Instead, I have added Alias elements to the Roller host for each blog domain. And so far so good! Roller serves up the bread blog with http://blog.bread.co.nz, and Tomcat no longer invokes webapps/christopher (a localhost app) with http://blog.christopher.net.nz. However, it doesn't appear to invoke Roller either. Instead Tomcat reports The requested resource () is not available. Why is host below invoking Roller for some of the Alias elements, but not all? Puzzling! Host name=blog.optomus.com appBase=/home/roller/application unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasblog.bread.co.nz/Alias Aliasblog.capereinga.co.nz/Alias Aliasblog.doubtlessbay.co/Alias Aliasblog.christopher.net.nz/Alias Aliasblog.isaac.net.nz/Alias /Host Chris. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring which Servlet is invoked
Catalina logs contain some entries that may shine some light on the matter... SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/roller/application/optomus does not exist or is not a readable directory INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[blog.optomus.com].[/optomus] has not been started SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/roller/application/christopher does not exist or is not a readable directory INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[blog.optomus.com].[/christopher] has not been started SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/roller/application/host-manager does not exist or is not a readable directory INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[blog.optomus.com].[/host-manager] has not been started SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/roller/application/manager does not exist or is not a readable directory INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[blog.optomus.com].[/manager] has not been started Is it a Tomcat requirement that additional hosts (appBase) must each contain manager and host-manager? This appBase currently contains ROOT (Roller) only. The first two errors above make no sense to me. Chris. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux
Hi Are you connecting through a firewall? No Firewall ( ALL of these server's are behind the Firewall and the servers are available thru a local hub ) I am able to use Putty (SSH Port 22) to connect to that server for other Activities as Start /Srop of TOMCAT 6.0.29 . With regards Karthik -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Monday, October 11, 2010 8:23 PM To: Tomcat Users List Subject: Re: Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux On 11/10/2010 09:41, Karthik Nanjangude wrote: Hi Spec : Java 1.5 WebApp : Tomcat 6.0.29 O/s Win 2000 / Linux / Unix Linux : 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux Question : Is there a Bug with JConsole for monitering TOMCAT 6.0.29 Running on Linux ? None that I'm aware of. Works for me. I am not able to connect TOMCAT 6.0.29 (on Linux, JDK1.5 )with JConsole (JDK 1.6 on windows ) How have you set the JMX this time, as below? Are you connecting through a firewall? p Note : Earlier I had configured the same for UNIX / Windows for JConsole to Tomcat 6.0.14 URL : http://old.nabble.com/JMX---jconsole-for-TOMCAT6.0.14-td17778173.html with regards N.S.Karthik - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org