Re: OutOfMemoryError: PermGen space!!!! Dont know why?
On 09/15/10 08:28, abhishek jain wrote: Hi, i have the following in bin/catalina.sh JAVA_OPTS=$JAVA_OPTS -server -Xms512M -Xmx1024M -XX:MaxPermSize=1024M -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager still i get the permgen error exception everyday, pl. someone help, i have about 7 applications in struts running on the server, the applications are in struts 1.2 , mysql, tomcat 5.5, and are not big applications with about only a few jsps. I consider the applications written properly, pl. help, A few things that can fill PermGen space are... - repeated re-deployment of applications in tomcat - dynamically generating classes/JSP pages - doing really weird stuff with the classloader(s) Unless you are doing any of the above, I would try and monitor PermGen space usage in jconsole for a while. You might also want to consider separating those applications into several tomcat instances to narrow down the cause. Cheers, Edmund - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How stable is Tomcat?
On 08/25/10 16:51, David kerber wrote: On 8/25/2010 10:44 AM, Christopher Schultz wrote: I know alot depends on the applications architecture but just how good is tomcat? Really effing good. +1 Tomcat itself is usually the last thing to be worried about when it comes to performance and stability. Your webapp, your database, your network should come first. And if you are expecting really huge loads, Tomcat's clustering and load-balancing features can help you distribute that onto several servers. Cheers, Edmund - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
can't get TLS to work, only SSL3
Hello all, I have Tomcat 6.0.16 running with TLS enabled (at least I thought so) and would have expected it to support both SSL and TLS connections. The curious thing is, that only SSL3 works - with SSL3 disabled in eg. FF3 no connection is possible. The negotiated encryption (with SSL3 enabled in the browser) is AES-128. JVM is Sun's with version 1.6.0_07. And here's the connector config: Connector port=443 protocol=org.apache.coyote.http11.Http11NioProtocol SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS URIEncoding=UTF-8 keystoreFile=somewhereelse/.keystore keystorePass=unknowntoyou/ Any ideas why I can't get TLS1 in this setup? Cheers Edmund - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Single Sign On
Andrew Hole wrote: Single sign on using valve is interesting, but is it possible use him if I have different application running in different tomcat instances? I think that only works with different applications under same tomcat instance. Thank you You might want to take a look at the JOSSO project: http://www.josso.org/ I have not used JOSSO myself (yet), and I'm not sure whether you will be able to use it without modifying your webapps (maybe with some custom valves, depending on how your applications perform authentication), but it should be worth a try. Edmund - 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: 4.x series difference
Propes, Barry L [GCG-NAOT] wrote: Hello users, A while back I had posted about running different versions on a desktop to see if it caused conflicts, created problems and so on. The versions in question are 4.0.1 and 4.1.3. For a lengthy time, I had used 4.0.1 in my dev. environment and 4.1.3 on our production server, both of these servers in question being Win2K. Several of you replied back and said there should be no problem, and while on version wouldn't do DBCP and the other would allow for it, there seems like little difference. One thing that previously worked in both environments and now seems to not work ok is the structure of a Prepared Statement. I'll create one like I always have, and now Oracle seems to see the semicolon ending the SQL statement as an illegal character, whereas before it did not. I'm not saying or implying this is a Tomcat deal, but I wonder why it would work before and now suddenly would not. Basic prepared statement might look like this: String prepquer = UPDATE users_dev SET user_name = ?, USER_PASS = ?, USER_TIMSTMP = SYSDATE, USER_DBFLGAG = 0 + WHERE user_name = ?;; PreparedStatement preps = connection.prepareStatement(prepquer); The console now gives me this error, java.sql.SQLException: ORA-00911: invalid character. I say now, this behavior actually started coincidentally after I started using 4.1.3 in my dev. environment. If anyone can shed light on this here, feel free. Maybe I should address it in the Oracle forum, which I'll probably go ahead and do. But if it's concretely not Tomcat, let me know that, too. Thanks! Not sure whether this has anything to do with your problem, but I think it's odd that your SQL statement has a trailing semicolon. I never use semicolons with JDBC. So I thought maybe that's the invalid character. ... not that this would explain why you get this error now and not earlier... Cheers, Edmund - 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: Pointing domain to your application
Edmund Urbani wrote: Li wrote: On 8/3/06, Gamefaqs Philippines [EMAIL PROTECTED] wrote: But wouldn't this be specific to only one application? Also, wouldn't this expose the real url of my site like http://www.xxx.xxx.xxx.xxx:8080/myapp/requesServ.do?uid=12345 instead of http://www.mydomain.com/requesServ.do?uid=12345 ? Well, i realized that your webappp is Struts (I am also a Struts developer ^_^). About URI, the refreshing approach basically just redirect to your struts application from apache home page. For after redirect, you will see http://www.xxx.xxx.xxx.xxx:8080/myapp; instead of http://www.xxx.xxx.xxx.xxx/myapp;. But I dont see any difference between the above two. what do you wanna hide from customer(user)? If non tech user, they dont care how the URI looks like (based on real life experience from customers). Or If you use mod_jk, this view issue can be solved and apache will take care of static page processing which can reduce your java AS workload. You can decide whether to use or not according to the work load distribution need. If you still want to use the mod_jk variant. Here's how: http://tomcat.apache.org/connectors-doc/howto/apache.html Also, to get rid of the application context in the URL (judging from your example URL, you want to do this), I recommend changing the path attribute of the application's context to root (Context path=/ ..). http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Ah. Sorry. I missed the important part, where you said you had two applications in one tomcat. They can't both have the root context then. You could use 2 tomcat instances or (maybe) solve this with apache httpd's mod_rewrite. Handling the two domains however should not be to difficult with virtual hosts in apache httpd. Edmund - 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: DNS [OT]
Juba wrote: Hello, How do I configure my dns to point to the server where my application is installed in Tomcat? thanks Juba That depends on your DNS server and its config files/administration tools. That's about all I can tell you, since I don't know what DNS software you are using. And its off topic anyway for this mailing list. You should check your DNS server docs and ask whoever developed your DNS server (or whoever is in charge of DNS administration at your place) for support if you need it. Edmund - 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: JSP 2.0 tag files slowing development/deployment
Edmund Urbani wrote: John Cherouvim wrote: Hello I'm building a mid scale web application for use within an intranet. I'm using a custom web framework to handle flow, user input, validations, persistence with hibernate and views with JSP and JSP 2.0 tag files. I use tomcat 5.0.28 and in particular this feature it has where you can write you own tag files in the WEB-INF/tags folder, and tomcat will compile them and make them available in the JSPs. I like this feature because it provides me encapsulation. I can call any tag I like with parameters and in addition I also use JSTL and EL which allows me to do anything I would ever want on the presentation side of the application. I've used jsp tag files before, in a much smaller application where I had something like 10 tags. Right now I am 50% done with this application and I already have 120 tag files to render pojos, fields, various html controls etc. Most tags call other tags in order to generate the whole page. The first (small) problem is that every time I change something on a tag, particularly in fine grained tags (which are heavily being used from other tags) then tomcat has to recompile everything. It takes around 1.5 minutes to do that on my workstation. The second (big) problem, is when I try to deploy on the client's web server (intel xeon with 4 cpus with tomcat 5.0.28). I deploy and tomcat starts up in something like 9 seconds. Then I access the application for the first time, using a browser, and it takes more than an hour to build the work\Catalina\localhost\MY-APPLICATION\org\apache\jsp folder. Looking at the generated sources of those tag files it seems to me that its taking so much because tomcat has to calculate all the dependencies between tags. As soon as everything has compiled, the application runs smothly as expected. There are 118 tag files, and the work\Catalina\localhost\MY-APPLICATION\org\apache\jsp folder ends up with 238 files (one for .java and one for .class) and takes up 2.7mb. I don't know why such a fast machine needs so much time to generate 1.47mb of source code, and compile it. This situation is really bad for me and I'd like to know what can I do to improve the situation. 1. Would tomcat 5.5.17 improve anything on this issue? 2. Would precompiling the JSPs and tags improve anything? 3. Can I upload my work\Catalina\localhost\MY-APPLICATION folder to the client's server and force that tomcat not to re-compile? I tried it and it did start compiling the jsps/tags again. 4. Would changing some tags from tag files to proper Java javax.servlet.jsp.tagext.Tag classes improve anything? 5. If I package my tag files into a jar, would then tomcat had to do the work thing? 6. Should I change to another templating engine, such as Velocity? thanks, Ioannis 1-5 all sound like good ideas to try to me. 6 seems like a last resort kind of choice. i can't really provide you with a satisfying answer here since I don't know tomcat/jasper internals that well myself. and so far i never had to deal with that many custom tags. however i would like to suggest you do some java profiling. that should reveal which method(s) use up all the cpu time and may provide a hint to the source of the problem. Edmund Taken from http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html: ... Tomcat 5.5 uses the Jasper 2 JSP Engine to implement the JavaServer Pages 2.0 specification. Jasper 2 has been redesigned to significantly improve performance over the orignal Jasper. ... Looks like option 1 should solve your problem. Please let us know, whether it actually does. You might also want to check the above URL for some (minor) performance improvements for production environments. Edmund - 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: JSP 2.0 tag files slowing development/deployment
John Cherouvim wrote: Hello I'm building a mid scale web application for use within an intranet. I'm using a custom web framework to handle flow, user input, validations, persistence with hibernate and views with JSP and JSP 2.0 tag files. I use tomcat 5.0.28 and in particular this feature it has where you can write you own tag files in the WEB-INF/tags folder, and tomcat will compile them and make them available in the JSPs. I like this feature because it provides me encapsulation. I can call any tag I like with parameters and in addition I also use JSTL and EL which allows me to do anything I would ever want on the presentation side of the application. I've used jsp tag files before, in a much smaller application where I had something like 10 tags. Right now I am 50% done with this application and I already have 120 tag files to render pojos, fields, various html controls etc. Most tags call other tags in order to generate the whole page. The first (small) problem is that every time I change something on a tag, particularly in fine grained tags (which are heavily being used from other tags) then tomcat has to recompile everything. It takes around 1.5 minutes to do that on my workstation. The second (big) problem, is when I try to deploy on the client's web server (intel xeon with 4 cpus with tomcat 5.0.28). I deploy and tomcat starts up in something like 9 seconds. Then I access the application for the first time, using a browser, and it takes more than an hour to build the work\Catalina\localhost\MY-APPLICATION\org\apache\jsp folder. Looking at the generated sources of those tag files it seems to me that its taking so much because tomcat has to calculate all the dependencies between tags. As soon as everything has compiled, the application runs smothly as expected. There are 118 tag files, and the work\Catalina\localhost\MY-APPLICATION\org\apache\jsp folder ends up with 238 files (one for .java and one for .class) and takes up 2.7mb. I don't know why such a fast machine needs so much time to generate 1.47mb of source code, and compile it. This situation is really bad for me and I'd like to know what can I do to improve the situation. 1. Would tomcat 5.5.17 improve anything on this issue? 2. Would precompiling the JSPs and tags improve anything? 3. Can I upload my work\Catalina\localhost\MY-APPLICATION folder to the client's server and force that tomcat not to re-compile? I tried it and it did start compiling the jsps/tags again. 4. Would changing some tags from tag files to proper Java javax.servlet.jsp.tagext.Tag classes improve anything? 5. If I package my tag files into a jar, would then tomcat had to do the work thing? 6. Should I change to another templating engine, such as Velocity? thanks, Ioannis 1-5 all sound like good ideas to try to me. 6 seems like a last resort kind of choice. i can't really provide you with a satisfying answer here since I don't know tomcat/jasper internals that well myself. and so far i never had to deal with that many custom tags. however i would like to suggest you do some java profiling. that should reveal which method(s) use up all the cpu time and may provide a hint to the source of the problem. Edmund - 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: SuPHP alternative for JSP and Tomcat
Vaclav Kaspar wrote: I want to prevent these example situations user user1 have in his jsp script something like FileWriter fw = new FileWriter(/home/USER2/somefile); fw.write(blablabla); fw.close(); or File f = new File(/home/USER2/); String[] files =File.list(); FileReader fr = new FileReader(files[0]); fr.read() now these cases are possible because JSP runs in user Tomcat5 and if i want allow users JSP scripts to manipulate with IO I have to grant right to their homes to Tomcat I already know the posibility to use Peter's solution with multiple Tomcat's, but for hosting more then 100 domains I aware a big useless load of the server, and complicated starting of Tomcat's. I recommend taking a look at the catalina.policy file. You can set all sorts of permissions for tomcat and the individual webapps in the policy (not sure how one would set permissions for individual JSPs though). To enable it add the -security parameter when launching tomcat. Simply enabling the security manager is rather likely to break existing web applications. You will probably have to add the permissions they need to make them usable again. Edmund - 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: CVS checkout problem
[EMAIL PROTECTED] wrote: Hi, I want to use cvs to check out the Tomcat 5.0 source. First I used the ant with the default build.xml, but I got the following error: [cvs] cvs [checkout aborted]: connect to cvs.apache.org(140.211.166.113):2401 failed: Connection refused Then I tried to connect to the cvs server manually by using the following command: cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login I was able to connect to the server but when I use the 'anoncvs' as the password, the server rejected and the output was the following: cvs [login aborted]: connect to cvs.apache.org(140.211.166.113):2401 failed: Connection refused So I am wondering that has the password for user anoncvs been changed or the cvs server was no longer availabel or something else? Thanks a lot, Michael Not sure whether the Tomcat CVS repository is still online at all. AFAIK it has all been moved to SVN. See http://tomcat.apache.org/svn.html Regards, Edmund - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
failing webapp affects other sites
hi! the config: apache httpd 2.0 + mod_jk2 + several tomcat instances the problem: one of the webapps in a tomcat failed. the application continued to accept requests, but they just hanged without a response. after a while the number of hanging request reached the MaxClients number specified in the httpd configuration, causing httpd to stop processing new requests and effectively bringing down all other webapps on the system. the question: how do i set up httpd / mod_jk2 to be more robust in case of a failure of a webapp/tomcat? increasing MaxClients gives me more time to react, but it does not solve the problem. Thanks! Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: failing webapp affects other sites
feghoul mohamed wrote: hello why using mod_jk2 this version is not yet supported ? it's an older config. the system was originally set up before the use jk2 or go back to jk discussion. i might switch to mod_jk, if this helps solve the issue i've experienced. Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two DNS Entries Two Sites?
Scott Purcell wrote: Hello, Running Tomcat 5.5 @ home and running a website which has a DNS entry in it. I made the site the default webapp, and configured it in the server.xml. A week ago, I created another context (in the server.xml) for a dev-site, of my live site, and I am using that for QA. I want to run a second real-web site off this box, and same Tomcat. It has its own DNS entry, and want to know if this is doable? If so, what should I read about as far as configuration. I had read about the Engine, Server, Context but have not really seen how to put two site DNS entries in. Thanks, Scott Do you have several IPs (one per site) or just several hostnames pointing to the same IP? In the first case, creating one Host section per IP should do the trick. In the second case you need name-based virtual hosts. I'm not sure whether this can (easily/at all) be achieved with multiple Host tags as well. So far I have only set up name virtual hosts with Apache HTTPD using the NameVirtualHost directive. Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]