Problem with tomcat behind IIS and modjk using integrated windows authentication
Hello, I developed a webapplication with tomcat 6.0.14 behind IIS 6 (IIS5 isolation mode) using modJK (1.2.25) and integrated wíndows authentication. I configured IIS and modJK following the descriptions in the connectors documentation. For most of the users (~70%) it works without problems. The rest always gets service unavailable from IIS. Other ASP Applications which are using integrated windows authentication work for the affected users. I looked in the log files of IIS and modJK and found nothing. I think it must have something to do with the windows profile because when we delete the windows profile of the user (c:\Documents and Settings\user) and recreate it then all works well for this user. We don't no why this happens, we can't see a difference between working profiles and not working ones e.g. the IE settings are the same. The problem is we can not kill and recreate all the profiles of the affected users. Thanks in advance, Martin Virus checked by G DATA AntiVirusKit Version: AVKA 18.165 from 02.04.2008 Virus news: www.antiviruslab.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]
Changing Tomcat Home Page
I want to change the default home page from /webapps/ROOT to something like /webapps/MyWebSpace. Can anyone advise how I do this please? I'm using Apache Tomcat/6.0.14 (Win32) Regards, Ian __ Sent from Yahoo! Mail. A Smarter Inbox http://uk.docs.yahoo.com/nowyoucan.html
Re: Changing Tomcat Home Page
Remove the ROOT folder and rename MyWebSpace to ROOT. --David Ian Bloggs wrote: I want to change the default home page from /webapps/ROOT to something like /webapps/MyWebSpace. Can anyone advise how I do this please? I'm using Apache Tomcat/6.0.14 (Win32) Regards, Ian __ Sent from Yahoo! Mail. A Smarter Inbox http://uk.docs.yahoo.com/nowyoucan.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem serializing JDK dynamic proxies
Hi all, I am using Tomcat 6, and running in a cluster, with session-replication. When I put in the session a JDK dynamic proxy, the serialization fails, like so: Apr 3, 2008 2:09:24 PM org.apache.catalina.ha.session.DeltaManager messageReceived SEVERE: Manager [localhost#/users]: Unable to receive message through TCP channel java.lang.ClassNotFoundException: app.web.user.TestBean 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 java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:676) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.readExternal(DeltaRequest.java:361) at org.apache.catalina.ha.session.DeltaRequest.readExternal(DeltaRequest.java:255) at org.apache.catalina.ha.session.DeltaManager.deserializeDeltaRequest(DeltaManager.java:619) at org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1363) at org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1320) at org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1083) at org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:87) at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:916) at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:897) at org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:264) at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79) at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79) at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:110) at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79) at org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:241) at org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:225) at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:185) at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:88) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Here is the relevant code: The servlet: TestBeantestBean = new TestBeanImpl(); Class[] proxiedInterfaces = testBean.getClass().getInterfaces(); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); TestProxy proxy = new TestProxy(testBean); TestBeanproxiedBean = (TestBean) Proxy.newProxyInstance(classLoader, proxiedInterfaces, proxy); request.getSession().setAttribute(testBean, proxiedBean); The TestBean interface: public interface TestBean { public void op1(); } The TestBeanImpl class: public class TestBeanImpl implements TestBean, Serializable { public void op1() { System.out.println(doing op1); } } The TestProxy class: public class TestProxy implements InvocationHandler, Serializable { private static final long serialVersionUID = 1L; private Object target; public TestProxy(Object target) { this.target= target; } public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { System.out.println(proxy invoked); return method.invoke(target, args); } } My application is deployed as a WAR file. Has anyone been able to put proxies in the HttpSession and replicate successfully? Is this a Tomcat bug? Is
Re: How can I refresh tomcat in the java code?
Didn't get it... it just doesn't work... what do I need to use instead of the response.redirect ? 2008/4/2, Alan Chaney [EMAIL PROTECTED]: You don't need the redirect. The response to the request IS the pdf file. HTH Guilherme Orioli wrote: It just doesn't show the Download dialog on the screen when i click the button... 2008/4/2, Guilherme Orioli [EMAIL PROTECTED]: ok... here's what i'm doing... in system out, something like a pdf file is printed... itś probably there... just don't know how to show it from the button i'm clicking on: public String geraReportBois(){ try{ //Generating the report String caminho_arquivo = new File().getAbsolutePath() + /workspace/safeTrace/WebContent/reports/cliente/frigorifico/; String nome_arquivo = reportBois.jasper; JasperReport jasperReport = (JasperReport)JRLoader.loadObject(caminho_arquivo + nome_arquivo); Map parameters = new HashMap(); parameters.put(Caminho, caminho_arquivo); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, this.getRelatorioBois()); //-- //Exporting to File (outputStream) ByteArrayOutputStream pdfStream = new ByteArrayOutputStream(); JasperExportManager.exportReportToPdfStream(jasperPrint, pdfStream); HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); response.setContentType(application/pdf); response.setHeader(Content-Disposition, inline; filename=myPDF.pdf); response.setContentLength(pdfStream.size()); try{ ServletOutputStream sos = response.getOutputStream(); pdfStream.writeTo(sos); System.out.println(pdsStream - +pdfStream); response.sendRedirect(myPDF.pdf); sos.flush(); sos.close(); pdfStream.close(); pdfStream = null; }catch(IOException e){ e.printStackTrace(); } return ; }catch(JRException e){ System.out.println(entrou no catch geraReportBois); e.printStackTrace(); } return null; } !DSPAM:47f3d27e207721697119596! - 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 and keep-alive and http connector
On 02/04/2008, at 6:02 PM, Andrew Miehs wrote: On 02/04/2008, at 5:51 PM, Caldarale, Charles R wrote: It appears that the chart at the bottom of the above page answers your question, unless I'm misreading it. Since there is no NIO connector in 5.5, it looks like you'll need a very large maxThreads value or set up the APR connector (or move to Tomcat 6, which is what I'd do). Put another way: Does tomcat a) Assign a connection to a single thread and only use this thread for the connection until the connection is closed? or b) Assign a request to a thread, and return the thread back to a controlling thread on completion of the request? My understanding is that the answer is 'A' except for the case of NIO and Tomcat 6. BTW: The last thing I heard is that APR is still recommended for performance and stability over TC 6 NIO - or do you have any newer info? Regards Andrew smime.p7s Description: S/MIME cryptographic signature
RE: Tomcat 5.5 and keep-alive and http connector
From: Andrew Miehs [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5.5 and keep-alive and http connector Does tomcat a) Assign a connection to a single thread and only use this thread for the connection until the connection is closed? or b) Assign a request to a thread, and return the thread back to a controlling thread on completion of the request? My understanding is that the answer is 'A' except for the case of NIO and Tomcat 6. I believe you are correct, but I'd like to hear from Filip H to make sure. BTW: The last thing I heard is that APR is still recommended for performance and stability over TC 6 NIO - or do you have any newer info? I think the only significant performance difference is with SSL - the OpenSSL package is noticeably faster than JCE. I'm not aware of any stability issues with either. - 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 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 serializing JDK dynamic proxies
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Naaman, nlif wrote: | I am using Tomcat 6, and running in a cluster, with session-replication. | When I put in the session a JDK dynamic proxy, the serialization fails, like | so: | | Apr 3, 2008 2:09:24 PM org.apache.catalina.ha.session.DeltaManager | messageReceived | SEVERE: Manager [localhost#/users]: Unable to receive message through TCP | channel | java.lang.ClassNotFoundException: app.web.user.TestBean This doesn't look like the proxy is failing; it looks like the TestBean class is not available to the receiving Tomcat instance. This happens on the /other/ Tomcat, right (i.e. not the one where the object was put into the session)? Are you sure you put your test class on all of the servers? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf03HAACgkQ9CaO5/Lv0PAKtQCgrqgQcvWhpPFy/WXaqhjPm0QW OKEAoIJr1CuFPaRyu26PKFhK4EThW3M3 =GXyK -END PGP SIGNATURE- - 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: How can I refresh tomcat in the java code?
. Hi Guilherme I can see that English isn't your first language and I have a lot of respect for anyone who is trying to work on technical things in a foreign language - I could never do it! To help our communication I have tried to explain below what I think it is that you are trying to do. I may have misunderstood what it is that you are doing so I apologize if what I am saying is wrong. I've joined this thread a bit late, but looking at the previous emails it seems to me that your need is that a user should be able to download a pdf file which has been generated by your server? This is 'dynamic content'. The server responds to the request for a file by creating an OutputStream of pdf data Your use case is that the user clicks on a link in a web page and the PDF file appears in their browser? Here's what I would expect the sequence of events to be: 1. The user clicks on the link in the browser. The link has as its href for example www.mycompany/xyz.pdf 2. The browser generates an http GET request with the url www,mycompany/xzy.pdf and sends it out over the net. 3. Your container detects this request, looks up the appropriate servlet in its web.xml and calls the HttpServlet 'doGet' method. 4. Your servlet responds to this request and generates the pdf in a temporary file. 5. You set any response headers that you need to set. 6. You read the temporary file as a byte InputStream and write this to the servlet OutputStream. 7. The container takes the data from the output stream and transmits across the wire back to the browser. It inserts any headers you have specified (and a few others) at the beginning. 8. You return from the doGet. That's it. Done! So the stream of data which is returned as the response to .../xyz.pdf IS the data you want displayed. You don't need to send a redirect to xyz.pdf because you have already responded to the request. The exact point at which the container (Tomcat) starts to transmit data is up to the container. You can force it to send data by issuing a 'flush'. However, once it has started to respond to the specific request you cannot issue things like a redirect. I'm simplifying a bit here. Looking at your code there doesn't appear to be the doGet method - I assumed initially that you were calling your class from within the doGet of a servlet. Is this the case? Have you checked the tomcat logs? I would have expected the server to have thrown an exception when you attempted to send a redirect after you have already written data. Guilherme Orioli wrote: Didn't get it... it just doesn't work... what do I need to use instead of the response.redirect ? 2008/4/2, Alan Chaney [EMAIL PROTECTED]: You don't need the redirect. The response to the request IS the pdf file. HTH Guilherme Orioli wrote: It just doesn't show the Download dialog on the screen when i click the button... 2008/4/2, Guilherme Orioli [EMAIL PROTECTED]: ok... here's what i'm doing... in system out, something like a pdf file is printed... itś probably there... just don't know how to show it from the button i'm clicking on: public String geraReportBois(){ try{ //Generating the report String caminho_arquivo = new File().getAbsolutePath() + /workspace/safeTrace/WebContent/reports/cliente/frigorifico/; String nome_arquivo = reportBois.jasper; JasperReport jasperReport = (JasperReport)JRLoader.loadObject(caminho_arquivo + nome_arquivo); Map parameters = new HashMap(); parameters.put(Caminho, caminho_arquivo); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, this.getRelatorioBois()); //-- //Exporting to File (outputStream) ByteArrayOutputStream pdfStream = new ByteArrayOutputStream(); JasperExportManager.exportReportToPdfStream(jasperPrint, pdfStream); HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); response.setContentType(application/pdf); response.setHeader(Content-Disposition, inline; filename=myPDF.pdf); response.setContentLength(pdfStream.size()); try{ ServletOutputStream sos = response.getOutputStream(); pdfStream.writeTo(sos); System.out.println(pdsStream - +pdfStream); response.sendRedirect(myPDF.pdf); sos.flush(); sos.close(); pdfStream.close(); pdfStream = null; }catch(IOException e){ e.printStackTrace(); } return ; }catch(JRException e){ System.out.println(entrou no catch geraReportBois); e.printStackTrace(); } return null; } - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:47f4c55058681264652389! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL
Re: How can I refresh tomcat in the java code?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guilherme, Guilherme Orioli wrote: | Didn't get it... it just doesn't work... what do I need to use instead of | the response.redirect ? These good folks are telling you to do something differently than you are currently doing it. Right now you are trying to: 1. generate your content 2. write the content to a file on the disk 3. redirect the user to the newly-generated file on disk Everyone is telling you to: 1. generate your content 2. write the content out to the ServletOutputStream directly ~ (not to System.out, nor to a FileOutputStream) No disk file; no redirect. Each request re-generates the content and sends it back to the client (browser) as the response to the original request. Let me lay it out for you. You currently have this code: | try{ | ServletOutputStream sos = response.getOutputStream(); | pdfStream.writeTo(sos); | System.out.println(pdsStream - +pdfStream); | response.sendRedirect(myPDF.pdf); | sos.flush(); | sos.close(); | pdfStream.close(); | pdfStream = null; | }catch(IOException e){ | e.printStackTrace(); | } | return ; You should change it to: try{ ~ServletOutputStream sos = response.getOutputStream(); ~pdfStream.writeTo(sos); ~sos.flush(); ~sos.close(); ~pdfStream.close(); } catch(IOException e) { ~e.printStackTrace(); ~response.sendError(HttpServletResponse.INTERNAL_SERVER_ERROR, ~ e.getMessage()); } return ; /// ^^^ What is this? I'm not sure why your method returns a String. There's no reason for it to do so. Is this in a servlet? If it is, then you are going to run in to trouble with the request and response objects being members of the class. Two simultaneous requests will completely break your application. You can simplify the code somewhat, as well as reducing the amount of memory required to operate by eliminating your use of a ByteArrayOutputStream. The only downside is that your servlet will not be returning a Content-Length with the response (which isn't that big of a deal). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf030UACgkQ9CaO5/Lv0PAZUgCdFrgxEz2Ni1O7TTxcEWqvYyXN TzAAmwRB3Oau5Q4BMOr2/1YpamUXSyz+ =bmNA -END PGP SIGNATURE- - 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: How can I refresh tomcat in the java code?
Chris Very nicely put. The only thing that I'm not clear on is your comment about sending the data as a String. The OP is trying to return a pdf file, which is a byte stream. I'd worry about trying to wrap that in a String because of encoding issues. You make a good point about two simultaneous requests breaking the app. The other issue is of course that Jasper isn't necessarily that quick at creating a report and the report generation is in line with the servlet request and response. A more sophisticated solution would probably follow a pattern of: 1. Respond to request. 2. Schedule a process (thread) to create report. 3. Return from the request saying something like Your report is being prepared... 4. When the process in 2. is complete send an email saying please go to ... to pick up your report. You can then make a design decision as to whether or not you want the report generating process to allow multiple instances to run or not (probably not in most cases). Another tweak is to cache the generated reports if they are unlikely to change frequently etc etc... I've written systems that work this way. It may be that the OP was trying to do something like this. Alan Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guilherme, Guilherme Orioli wrote: | Didn't get it... it just doesn't work... what do I need to use instead of | the response.redirect ? These good folks are telling you to do something differently than you are currently doing it. Right now you are trying to: 1. generate your content 2. write the content to a file on the disk 3. redirect the user to the newly-generated file on disk Everyone is telling you to: 1. generate your content 2. write the content out to the ServletOutputStream directly ~ (not to System.out, nor to a FileOutputStream) No disk file; no redirect. Each request re-generates the content and sends it back to the client (browser) as the response to the original request. Let me lay it out for you. You currently have this code: | try{ | ServletOutputStream sos = response.getOutputStream(); | pdfStream.writeTo(sos); | System.out.println(pdsStream - +pdfStream); | response.sendRedirect(myPDF.pdf); | sos.flush(); | sos.close(); | pdfStream.close(); | pdfStream = null; | }catch(IOException e){ | e.printStackTrace(); | } | return ; You should change it to: try{ ~ServletOutputStream sos = response.getOutputStream(); ~pdfStream.writeTo(sos); ~sos.flush(); ~sos.close(); ~pdfStream.close(); } catch(IOException e) { ~e.printStackTrace(); ~response.sendError(HttpServletResponse.INTERNAL_SERVER_ERROR, ~ e.getMessage()); } return ; /// ^^^ What is this? I'm not sure why your method returns a String. There's no reason for it to do so. Is this in a servlet? If it is, then you are going to run in to trouble with the request and response objects being members of the class. Two simultaneous requests will completely break your application. You can simplify the code somewhat, as well as reducing the amount of memory required to operate by eliminating your use of a ByteArrayOutputStream. The only downside is that your servlet will not be returning a Content-Length with the response (which isn't that big of a deal). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf030UACgkQ9CaO5/Lv0PAZUgCdFrgxEz2Ni1O7TTxcEWqvYyXN TzAAmwRB3Oau5Q4BMOr2/1YpamUXSyz+ =bmNA -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:47f4dff582799080218370! - 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: How can I refresh tomcat in the java code?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan, Alan Chaney wrote: | Very nicely put. The only thing that I'm not clear on is your comment | about sending the data as a String. The OP is trying to return a pdf | file, which is a byte stream. I'd worry about trying to wrap that in a | String because of encoding issues. He's returning a String from the (Java) method, not the HTTP request. | You make a good point about two simultaneous requests breaking the app. | The other issue is of course that Jasper isn't necessarily that quick at | creating a report and the report generation is in line with the servlet | request and response. Right. This will certainly work, but probably not well. This is why projects like Open Reports offer scheduling and batching so that you aren't tied to the request/response HTTP model. When you do things asynchronously, you can do them when the load on the server is low, or, better still, do it on another server that isn't handling loads of user requests. | Another tweak is to cache the generated reports if they are unlikely to | change frequently etc etc... I think this was the OP's original desire, but everyone pushed him towards generating content directly to the servlet output stream. Unfortunately, Tomcat seems to take a snapshot of the content it serves as the webapp comes up, and it doesn't believe that new content can be added during the life of the webapp. That was the original question (see the subject line): how can I tell Tomcat to refresh its content snapshot? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf05t8ACgkQ9CaO5/Lv0PDUfwCfVvvMu4zodnjNxTRc2UrVRb0O +CwAn33hs1elwqVBZY4NO6kIzICkVEhS =bXEw -END PGP SIGNATURE- - 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 podcast server
Hi everybody We've just put into service a set of web applications running under tomcat which works as a sophisticated podcast server. We deliver several thousand podcasts a day of about 20MB to 70MB in size. Originally when we started we used an Apache server (because it worked... just...) However it was clear to me that this was a poor solution for large volumes of traffic -- and I was right! So I have written a specialized http server which has the following features: 1. Adaptive rate-control algorithm which balances the load on a per-request basis to optimize the number of simultaneous requests to be serviced. The algorithm is 'pluggable' 2. Easy clustering of servers (no session state) to make it scalable. 3. Sophisticated logging to allow the easy generation of detailed reports on download activity. 4. JMX management. 5. A black-list scheme to mitigate badly written mulitmedia bots which can easily swamp a server. 6. A simple content management system to manage the import of media files. Although it is originally designed for use with mp3 files, it should work with any large media files or data downloads. The next stage of this project is to add a database controlled ad insertion facility which would insert sponsorship messages into the outgoing stream on a pre request basis. We are considering making this an open source project. If people think that this would be of interest to them to use, or if they might like to join the project, then please email me off-list at the following (substitutions obvious) alan A + T writingshow dot com So far I have only deployed this on Tomcat, but it is just a set of standard servlet 2.5 wars and should work on other containers. Currently it is running on a dual core opteron. Even at heavy loads the CPU utilization is low and it only needs about 100MB of heap to support 100 simultaneous connections. (which could represent 7GB of download) It is written using Spring and Hibernate (and a lot of other wonderful open source projects) Regards Alan Chaney - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error invoking operation addEnvironment
Hi List, me again, my last error could be solved. I hope this case too. I have a Problem in tomcat-admin . I got error 500 when addmin Environment Entries. Path is: Tomcat--Service--Host -- Context--Resources--Environment Entries When i choose create new env antry i got error 500. Webpage says: HTTP Status 500 - Error invoking operation addEnvironment type Status report message Error invoking operation addEnvironment description The server encountered an internal error (Error invoking operation addEnvironment) that prevented it from fulfilling this request. Apache Tomcat/5.5.26 localhost_access.log shows the 500er: POST /admin/resources/saveEnvEntry.do HTTP/1.1 500 1117 admin.log says: SCHWERWIEGEND: action: Error invoking operation addEnvironment javax.management.InstanceNotFoundException: Catalina:type=NamingResources,resourcetype=Context,path=/mycontext,host=localhost at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at org.apache.webapp.admin.resources.SaveEnvEntryAction.execute(SaveEnvEntryAction.java:155) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.webapp.admin.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) InstanceNotFoundException? What is missing? It is a typical installation of current tomcat 5.5.26 download. Is this correct? Most folders in server/webapps/admin are empty, but this is just like in downloaded package. http://tomcat.apache.org/download-55.cgi http://apache.easy-webs.de/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26-admin.tar.gz Dont know what to do now. ;( Hope there is some help. Thank you Andre - 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 32-bit on Windows 64-bit.
Can you use a 32-bit Tomcat on 64-bit Windows 2k3, with a 64-bit Isapi redirector? -- Sincerely, Ardo S. Panian H: 508-969-9935 M: 781-771-6728 F: 484-771-6726
Threads
List members: I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? As an aside, this issue did not occur with Mac OS X 10.4 Server. If you have time, what causes a process to generate threads? Any advice will be appreciated. Stephen Caine Soft Breeze Systems, LLC - 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: How to force HTTPS on some of Struts-based site
See my comments inline. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2008 8:50 PM To: Tomcat Users List Subject: Re: How to force HTTPS on some of Struts-based site -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gordon, Hyatt, Gordon wrote: | The intent is as follows: | | For the main site: plain HTTP access | | For the administration and sample submission areas, require | authentication over HTTPS | | Disallow DELETE and PUT methods from all areas. [snip] | security-constraint | display-nameAdministration Methods/display-name | web-resource-collection | web-resource-nameadmin methods/web-resource-name | description/ | url-pattern/admin/*/url-pattern | http-methodGET/http-method | http-methodPOST/http-method | /web-resource-collection | auth-constraint | role-nameadmin_user/role-name | /auth-constraint | user-data-constraint | transport-guaranteeCONFIDENTIAL/transport-guarantee | /user-data-constraint | /security-constraint That ought to fill your first 2 requirements. In order to prohibit PUT and DELETE, you'll need another security-condstraint section that specified no valid roles for the PUT and DELETE methods. | I've also added a filter to capture all requests (/*) that checks the | requested path; if that path is a privileged path (admin or | submission), then check that the user is authenticated and within the | specified role (as configured in the filter). This should not be necessary; the container should already handle the role checking (it's already configured in web.xml). | I changed the role-name to * in the above auth-constraint and removed | (commented out) the login-config section of web.xml. Why? | So my question is this: how do I force HTTPS on some portions of a | Struts-based web site. With the filter, I can force authentication, but | not the HTTPS constraint. user-data-constraint should be enough to make that happen. Are you saying that a security-constraint with only the transport-guarantee in it is not being respected by Tomcat? Which version? Can you post your new web.xml instead of the original one that has since been modified? I had everything working correctly using container-based security (using digested passwords), including denying DELETE and PUT requests. But, due to the enhanced password encryption requirements of this site (a requirements change near the time of delivery - a simple one-way digest was deemed insufficient), I cannot use container-based authentication. I won't go into too many details, but suffice it to say that the passwords can now be easily discovered - each password is encrypted with the exact same key. So I decided on the fallback to write a simple filter to handle the authentication and redirection with Struts-based forms (simply because the rest of the site uses Struts) and handle the actual authentication (including password encryption) in a Struts Action. In order for the filter to receive the request, I had to remove some of the container-based security (the PUT and DELETE security-constraint still exists). The only other way I could think of handling the password encryption scheme was to write a custom Realm, which at the time, seemed over-the-top to me. Looking back, perhaps a custom Realm would have been the way to go. Gord - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf0KawACgkQ9CaO5/Lv0PBfQgCeLQFA0sJNAG7MfPoa2I52orWz 20QAnjZd1EwJIEQoBzoK/g8nFmaGGuIh =s08N -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Tomcat 32-bit on Windows 64-bit.
Hello, I didn't try it but the isapi redirektor talks over a network socket (AJP13 protokoll) with the tomcat instance. From my thinking it should work! Mit freundlichen Grüssen / Kind regards Martin Grüneberg -Ursprüngliche Nachricht- Von: Panian, Ardo [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 3. April 2008 16:46 An: Tomcat Users List Betreff: Tomcat 32-bit on Windows 64-bit. Can you use a 32-bit Tomcat on 64-bit Windows 2k3, with a 64-bit Isapi redirector? -- Sincerely, Ardo S. Panian H: 508-969-9935 M: 781-771-6728 F: 484-771-6726 Virus checked by G DATA AntiVirusKit Version: AVKA 18.165 from 02.04.2008 Virus news: www.antiviruslab.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]
RE: Threads
From: Stephen Caine [mailto:[EMAIL PROTECTED] Subject: Threads My question is how to increase the capacity of the JVM to handle more threads. There's no limit within the JVM itself on the number of threads, other than heap space required to hold the Thread objects. It's the underlying OS that imposes the actual limit, including the amount of process space available for stacks and other thread-specific structures. If you're not getting an OOME, it's an OS limit that's killing the process. If you have time, what causes a process to generate threads? This kind of Java code: new Thread().run() (or variations thereof). What are you really asking for here? - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 6.0.14 SSIs
I've followed the directions in the ssi-howto.html and editted the conf/web.xml to enable these and under 6.0 it fails. I pulled the servlets-ssi.jar from the 5.5 version and tried putting that in the lib directory to no avail. I tried both the servlet and filter and neither one seemed to work. os - linux Any ideas what I'm doing wrong? - 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 32-bit on Windows 64-bit.
From: Panian, Ardo [mailto:[EMAIL PROTECTED] Subject: Tomcat 32-bit on Windows 64-bit. Can you use a 32-bit Tomcat on 64-bit Windows 2k3, with a 64-bit Isapi redirector? Tomcat is Java, and therefore platform independent. If you're using the service wrapper or APR, you'll need the 64-bit versions of those. - 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 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 tomcat behind IIS and modjk using integrated windows authentication
Martin Grüneberg wrote: I think it must have something to do with the windows profile because when we delete the windows profile of the user (c:\Documents and Settings\user) and recreate it then all works well for this user. We don't no why this happens, we can't see a difference between working profiles and not working ones e.g. the IE settings are the same. The problem is we can not kill and recreate all the profiles of the affected users. In this scenario I would suggest using one of the following to look at the traffic so see what the difference is because there must be one: - ieHttpHeaders - TCPMon from the Apache Axis project Mark - 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: Threads
From: Stephen Caine [mailto:[EMAIL PROTECTED] I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? I'm not a Mac person, but... does the Mac JVM use native threads? In which case, the 2500 (plus other threads) could be an OS limit that has changed in 10.5. If you have time, what causes a process to generate threads? Calls to the API that generates a thread. Next? - Peter - 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: How can I refresh tomcat in the java code?
Christopher, You got it right. I was trying to generate the content, write it into server disk and redirect it to the user. Everyone recomended me to generate it and send it as a response. If that's the only option, I can accept that. If there's a way to refresh the content under tomcat server folder, it would be better. The problem with the recomended option is: It doesn't send the content to be downloaded. The system.out was just a test to see if the file was generated correctly. It seems to be, since it prints tons of unknown chars. ^^ What this code I sent previously tries to do is: 1) Generate the pdf report (working fine) 2) Create a ByteArrayOutputStream with it (working fine) 3) Show it to be downloaded by the user (not working) This code is located on a managed bean. The method is invoked when a h:commandButton is pressed. That's why I return a String. Hope you guys can help me now. Sorry for the english. I finished my course four years ago and haven't practiced since then... Gui Orioli. 2008/4/3, Christopher Schultz [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guilherme, Guilherme Orioli wrote: | Didn't get it... it just doesn't work... what do I need to use instead of | the response.redirect ? These good folks are telling you to do something differently than you are currently doing it. Right now you are trying to: 1. generate your content 2. write the content to a file on the disk 3. redirect the user to the newly-generated file on disk Everyone is telling you to: 1. generate your content 2. write the content out to the ServletOutputStream directly ~ (not to System.out, nor to a FileOutputStream) No disk file; no redirect. Each request re-generates the content and sends it back to the client (browser) as the response to the original request. Let me lay it out for you. You currently have this code: | try{ | ServletOutputStream sos = response.getOutputStream(); | pdfStream.writeTo(sos); | System.out.println(pdsStream - +pdfStream); | response.sendRedirect(myPDF.pdf); | sos.flush(); | sos.close(); | pdfStream.close(); | pdfStream = null; | }catch(IOException e){ | e.printStackTrace(); | } | return ; You should change it to: try{ ~ServletOutputStream sos = response.getOutputStream(); ~pdfStream.writeTo(sos); ~sos.flush(); ~sos.close(); ~pdfStream.close(); } catch(IOException e) { ~e.printStackTrace(); ~response.sendError(HttpServletResponse.INTERNAL_SERVER_ERROR, ~ e.getMessage()); } return ; /// ^^^ What is this? I'm not sure why your method returns a String. There's no reason for it to do so. Is this in a servlet? If it is, then you are going to run in to trouble with the request and response objects being members of the class. Two simultaneous requests will completely break your application. You can simplify the code somewhat, as well as reducing the amount of memory required to operate by eliminating your use of a ByteArrayOutputStream. The only downside is that your servlet will not be returning a Content-Length with the response (which isn't that big of a deal). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf030UACgkQ9CaO5/Lv0PAZUgCdFrgxEz2Ni1O7TTxcEWqvYyXN TzAAmwRB3Oau5Q4BMOr2/1YpamUXSyz+ =bmNA -END PGP SIGNATURE- - 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: How to force HTTPS on some of Struts-based site
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gordon, Hyatt, Gordon wrote: | I had everything working correctly using container-based security (using | digested passwords), including denying DELETE and PUT requests. But, | due to the enhanced password encryption requirements of this site (a | requirements change near the time of delivery - a simple one-way digest | was deemed insufficient), I cannot use container-based authentication. :( | So I decided on the fallback to write a simple filter to handle the | authentication and redirection with Struts-based forms (simply because | the rest of the site uses Struts) and handle the actual authentication | (including password encryption) in a Struts Action. In order for the | filter to receive the request, I had to remove some of the | container-based security (the PUT and DELETE security-constraint still | exists). You should check out securityfilter (http://securityfilter.sourceforge.net/) which does exactly what you want. Yes, you will have to write your own realm type thing, but at least you are not tying yourself to Tomcat (which isn't so bad, really). | The only other way I could think of handling the password encryption | scheme was to write a custom Realm, which at the time, seemed | over-the-top to me. Looking back, perhaps a custom Realm would have | been the way to go. Yeah, it wouldn't have been too bad. If you want to use something a little more flexible than Tomcat's built-in security, you could look at securityfilter. It gives you a little more freedom with the requirements (for instance, you can do drive-by logins) and doesn't tie you to a specific container. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf1DUoACgkQ9CaO5/Lv0PAB/wCeJMGFc4p27acQGipcSdOIXqGA Ud0AoLV1bFcwNfz0d1pjVnF8MvRrIaJ9 =ye77 -END PGP SIGNATURE- - 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: Threads
We recently resolved a similar problem on a win32 platform which presented as a java.lang.OutOfMememoryError when attempting to create a new native thread. Native threads were being created [each with their own 1Mb stack in the non-JVM heap space] in association with Thread objects as they were being managed in the JVM. In a paradox, increasing the heap available to the JVM can actually cause a thread-greedy app to fail by limiting the memory available to native threads. It's possible to change the default native thread stack size on that platform, but we didn't go down that route. It turned out to be thread leak; unnecessary threads were being created and the GC wasn't reclaiming their space [and therefore the native thread stack space]. Brad Harper EPSIIA Inc. -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:34 AM To: 'Tomcat Users List' Subject: RE: Threads From: Stephen Caine [mailto:[EMAIL PROTECTED] I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? I'm not a Mac person, but... does the Mac JVM use native threads? In which case, the 2500 (plus other threads) could be an OS limit that has changed in 10.5. If you have time, what causes a process to generate threads? Calls to the API that generates a thread. Next? - Peter - 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: Threads
Actually another question is what is it in your application that NEEDS 2500 threads? What does the application do? Is it 3rd party or in house? Normally the creation of a thread is considered an expensive operation and typically one tries to avoid creating new threads all over the place. Hence thread pools as used by tomcat. Peter Crowther wrote: From: Stephen Caine [mailto:[EMAIL PROTECTED] I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? I'm not a Mac person, but... does the Mac JVM use native threads? In which case, the 2500 (plus other threads) could be an OS limit that has changed in 10.5. If you have time, what causes a process to generate threads? Calls to the API that generates a thread. Next? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:47f507bc127041839419991! - 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: How can I refresh tomcat in the java code?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guilherme, Guilherme Orioli wrote: | Everyone recommended me to generate it and send it as a response. | If that's the only option, I can accept that. If there's a way to refresh | the content under tomcat server folder, it would be better. There's no way that I know, short of reloading the entire webapp (which is probably no what you want to do). Another option would be to generate the content into a directory outside your webapp (which is a good idea, anyway, since reloading the webapp from a WAR would probably delete your generated content) and serve the files yourself using a simple servlet that serves files out of a particular directory. There is full code for such a servlet that was posted (by me!) to the list within the last 7 days or so with the subject displaying an image from outside the webapps directory. Check it out. | The problem with the recommended option is: It doesn't send the content to be | downloaded. It should be. You must have something else going on that is not working. | The system.out was just a test to see if the file was generated correctly. | It seems to be, since it prints tons of unknown chars. ^^ Well, what did you expect? ;) | What this code I sent previously tries to do is: | 1) Generate the pdf report (working fine) | 2) Create a ByteArrayOutputStream with it (working fine) | 3) Show it to be downloaded by the user (not working) Which browser? Displaying in the browser window, or forcing a download? It could even be a browser issue, especially if you are using Adobe's PDF plug-in and Mozilla Firefox -- they don't play well together for some reason. | This code is located on a managed bean. The method is invoked when a | h:commandButton is pressed. That's why I return a String. Ugh. Do you mean EJB? sigh | Hope you guys can help me now. I'm sure we can, but it might take some time. Be patient with us ;) | Sorry for the English. Your English is just fine. I hope we're not using too many phrases that don't translate very well. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf1D3sACgkQ9CaO5/Lv0PA4MwCeKaF+Dz78BVY7tb10u492uxeK lNAAniAw2bQKYN/HG2vZIx/QS8WJELcM =iSqR -END PGP SIGNATURE- - 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: [OT] Threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan, Alan Chaney wrote: | Actually another question is what is it in your application that NEEDS | 2500 threads? Ooh! I know... it's a ray-tracer that goes ral fast if you give each output pixel its own thread. More threads = faster, right? Hoo-ray for threads! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf1EHkACgkQ9CaO5/Lv0PC+6gCgrfa7qUR+MGSHpqGvboABSI0g IREAoLhkjH/YalcVmuRkhOeTjQeVHWw8 =C3d1 -END PGP SIGNATURE- - 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: Threads
Are you running on 32-bit or 64-bit JVM on OS X 10.5.2? If you are running java without -d64, it would be running 32-bit by default. Typicaly around 2000 or so is the thread number limit on 32-bit process due to its virtual address space limit (1 thread may claim 1MB of virtual space for stack). Running java with -d64 will invoke 64-bit JVM on leopard, and should increase the threads limit accordingly. The actual physical heap space is different story. It needs to increase only if you app/thread really use/allocate memory. But I am wondering why Tiger server did not have the issue. AFAIK, 64- bit JVM is only available on Leopard. Yong On 3-Apr-08, at 7:49 AM, Stephen Caine wrote: List members: I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? As an aside, this issue did not occur with Mac OS X 10.4 Server. If you have time, what causes a process to generate threads? Any advice will be appreciated. Stephen Caine Soft Breeze Systems, LLC - 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: Threads
From: Stephen Caine [mailto:[EMAIL PROTECTED] Subject: Re: Threads I am asking if there is any way to increase the number of threads that can be handled by decreasing the thread size allocation (a java option) There are some thread-specific parameters you can play with, in particular -Xss. But as others have pointed out, changing one factor moves the limits on others. Your best bet (assuming you really, really need that many threads) is to run in a 64-bit process, also as previously suggested. increasing the size of the heap (from 1 to 1 gigs). That's not much of an increase... - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Threads
Yong, Are you running on 32-bit or 64-bit JVM on OS X 10.5.2? If you are running java without -d64, it would be running 32-bit by default. Typicaly around 2000 or so is the thread number limit on 32-bit process due to its virtual address space limit (1 thread may claim 1MB of virtual space for stack). Running java with -d64 will invoke 64-bit JVM on leopard, and should increase the threads limit accordingly. The actual physical heap space is different story. It needs to increase only if you app/thread really use/allocate memory. But I am wondering why Tiger server did not have the issue. AFAIK, 64-bit JVM is only available on Leopard. This is the exact route I was thinking. We have an XServe running 10.5, so I want to run in 64 bit mode. I think I am currently in 32 bit mode as I have not set any special flag to change the default. I have found the magic flag, -d64, but I do not know where to set this. We are using a start up script as follows: #!/bin/sh export CATALINA_HOME=$2 export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export JAVA_OPTS=-Xms1024m -Xmx1024m -XX:+MaxFDLimit -server - Djava.awt.headless=false cd $CATALINA_HOME cd bin ./startup.sh Where (and how) is the 64 bit flag set? Thank you for your assistance. Stephen Caine Soft Breeze Systems, LLC - 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: Threads
From: Stephen Caine [mailto:[EMAIL PROTECTED] I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? What error message are you seeing in catalina.out? You are probably running out of memory. Each thread needs a certain amount of heap and stack. You may also want to look at the limits you set in the shell Defaults from mac os x 10.5.2 $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) 6144 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 256 pipe size(512 bytes, -p) 1 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 266 virtual memory (kbytes, -v) unlimited $ smime.p7s Description: S/MIME cryptographic signature
Re: [OT] Threads
On 03/04/2008, at 7:14 PM, Christopher Schultz wrote: Alan Chaney wrote: | Actually another question is what is it in your application that NEEDS | 2500 threads? Ooh! I know... it's a ray-tracer that goes ral fast if you give each output pixel its own thread. More threads = faster, right? Hoo-ray for threads! Doh! and I thought he had 2500 processors!... Silly me. Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Threads
Chuck, There are some thread-specific parameters you can play with, in particular -Xss. But as others have pointed out, changing one factor moves the limits on others. Your best bet (assuming you really, really need that many threads) is to run in a 64-bit process, also as previously suggested. I posted a response and hopefully I will get some good advice. increasing the size of the heap (from 1 to 1 gigs). That's not much of an increase... True enough. I meant to say, 1 to 2 gigs (but I bet you knew that). Stephen - 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: Threads
On 3-Apr-08, at 11:27 AM, Stephen Caine wrote: Yong, Are you running on 32-bit or 64-bit JVM on OS X 10.5.2? If you are running java without -d64, it would be running 32-bit by default. Typicaly around 2000 or so is the thread number limit on 32-bit process due to its virtual address space limit (1 thread may claim 1MB of virtual space for stack). Running java with -d64 will invoke 64-bit JVM on leopard, and should increase the threads limit accordingly. The actual physical heap space is different story. It needs to increase only if you app/thread really use/allocate memory. But I am wondering why Tiger server did not have the issue. AFAIK, 64-bit JVM is only available on Leopard. This is the exact route I was thinking. We have an XServe running 10.5, so I want to run in 64 bit mode. I think I am currently in 32 bit mode as I have not set any special flag to change the default. I have found the magic flag, -d64, but I do not know where to set this. We are using a start up script as follows: #!/bin/sh export CATALINA_HOME=$2 export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export JAVA_OPTS=-Xms1024m -Xmx1024m -XX:+MaxFDLimit -server - Djava.awt.headless=false cd $CATALINA_HOME cd bin ./startup.sh Where (and how) is the 64 bit flag set? Add to here: export JAVA_OPTS=-d64 -Xms1024m -Xmx1024m -XX:+MaxFDLimit -server - Djava.awt.headless=false Yong Thank you for your assistance. Stephen Caine Soft Breeze Systems, LLC - 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: Threads
Yong, Add to here: export JAVA_OPTS=-d64 -Xms1024m -Xmx1024m -XX:+MaxFDLimit -server - Djava.awt.headless=false Thank you. Stephen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get Tomcat to pick up Oracle database connections after database shutdown?
Hi- I'm an Oracle DBA, but since I work in a small company, I've been tasked with restarting our Tomcat servers everytime I have to shut down or restart our database. (If I shutdown the Oracle database and then don't do a Tomcat restart when the database comes back up, we get HTTP 500 errors). To me, this seems silly though- Tomcat should be able to be aware that no database connection is available, but when one *does* become available, it should just pick it up, instead of requiring a restart. Does anyone here know how to configure this? Also- FYI, we are using Hibernate. Any help would be greatly appreciated. Thanks! -Steve. You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.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]
rolling the console log
Hello! We are running Tomcat 5.0 in a production environment (so upgrading isn't an option) and have encountered an issue where our console log is getting to be quite large (on the order of gigabytes). Is there any way via Tomcat configuration to set this log up to roll daily? Ideally of course we'd fix the code to not print so much, but that's not an option either. Thanks in advance for your help! - 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: rolling the console log
May be you can pipe it to rotatelogs? See [1]. [1] http://httpd.apache.org/docs/2.0/programs/rotatelogs.html ++Vamsi On Fri, Apr 4, 2008 at 2:57 AM, Angelina Talley [EMAIL PROTECTED] wrote: Hello! We are running Tomcat 5.0 in a production environment (so upgrading isn't an option) and have encountered an issue where our console log is getting to be quite large (on the order of gigabytes). Is there any way via Tomcat configuration to set this log up to roll daily? Ideally of course we'd fix the code to not print so much, but that's not an option either. Thanks in advance for your help! - 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: rolling the console log
Angelina Talley wrote: Hello! We are running Tomcat 5.0 in a production environment (so upgrading isn't an option) and have encountered an issue where our console log is getting to be quite large (on the order of gigabytes). Is there any way via Tomcat configuration to set this log up to roll daily? Ideally of course we'd fix the code to not print so much, but that's not an option either. Thanks in advance for your help! logrotate might be the simplest option. Mark - 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: How to get Tomcat to pick up Oracle database connections after database shutdown?
I think you are correct. We manage our Oracle connections ourselves using classes12 and a ConnectionPool. I have no need to restart tomcat after an Oracle bounce. I do restart my Tomcats much more often than Oracle - every day. It has been almost a year since we restarted Oracle. It could be that Hibernate is your issue. I know that Tomcat can manage connections perhaps there is something in that configuration that will help. Good luck. Dave On Apr 3, 2008, at 2:45 PM, steve kerver wrote: Hi- I'm an Oracle DBA, but since I work in a small company, I've been tasked with restarting our Tomcat servers everytime I have to shut down or restart our database. (If I shutdown the Oracle database and then don't do a Tomcat restart when the database comes back up, we get HTTP 500 errors). To me, this seems silly though- Tomcat should be able to be aware that no database connection is available, but when one *does* become available, it should just pick it up, instead of requiring a restart. Does anyone here know how to configure this? Also- FYI, we are using Hibernate. Any help would be greatly appreciated. Thanks! -Steve. You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.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: rolling the console log
Sadly, we're not running Apache. Just Tomcat standalone. On Fri, Apr 4, 2008 at 4:33 AM, Vamsavardhana Reddy [EMAIL PROTECTED] wrote: May be you can pipe it to rotatelogs? See [1]. [1] http://httpd.apache.org/docs/2.0/programs/rotatelogs.html ++Vamsi On Fri, Apr 4, 2008 at 2:57 AM, Angelina Talley [EMAIL PROTECTED] wrote: Hello! We are running Tomcat 5.0 in a production environment (so upgrading isn't an option) and have encountered an issue where our console log is getting to be quite large (on the order of gigabytes). Is there any way via Tomcat configuration to set this log up to roll daily? Ideally of course we'd fix the code to not print so much, but that's not an option either. Thanks in advance for your help! - 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: rolling the console log
Ideally, it would be. But, I neglected to mention we're running on Windows Server. That's the other reason I am looking for a configuration option. Thanks! On Fri, Apr 4, 2008 at 4:34 AM, Mark Thomas [EMAIL PROTECTED] wrote: Angelina Talley wrote: Hello! We are running Tomcat 5.0 in a production environment (so upgrading isn't an option) and have encountered an issue where our console log is getting to be quite large (on the order of gigabytes). Is there any way via Tomcat configuration to set this log up to roll daily? Ideally of course we'd fix the code to not print so much, but that's not an option either. Thanks in advance for your help! logrotate might be the simplest option. Mark - 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]
How can applications be isolated in Tomcat?
Hi, I'm currently putting together a solution for an off-the-shelf document management application that requires Tomcat to run a form design component. I'd like to have a single Tomcat server supporting the production and five non-production environments but isolate these instances. I’m hoping this will give some isolation so non-prod doesn’t take prod off-line but that I can also test new versions of the form design component in non-prod before rolling it into prod. It appears this could be done through virtual hosting and appbase settings but this is way beyond my knowledge and I’m just architecting the solution. I know we'll have to get a Tomcat expert in at some point in the future but just wondered if I'm going down the right or wrong road here. Any help or advice would be greatly appreciated and apologies if I got all of the terminology wrong. Regards, Pablo No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.5/1358 - Release Date: 4/3/2008 6:36 PM - 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 serializing JDK dynamic proxies
Christopher Schultz-2 wrote: This doesn't look like the proxy is failing; it looks like the TestBean class is not available to the receiving Tomcat instance. This happens on the /other/ Tomcat, right (i.e. not the one where the object was put into the session)? Are you sure you put your test class on all of the servers? Yes. I am sure. It's there, and this happens either when replicating from Node A to Node B or the other way around. -- View this message in context: http://www.nabble.com/Problem-serializing-JDK-dynamic-proxies-tp16467407p16484982.html Sent from the Tomcat - User mailing list archive 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]