RE: Default webapp
Depends on your viewpoint; for me, it's much more elegant and straightforward to use the name of the webapp. Thats definitly true for anything but the ROOT app. I can't see the elegance in moving around multiple wars which are all called ROOT.war (One for each Host) I think I will just install Tomcat 4.x to be happy again ;) Thanks for your comments anyways. -- View this message in context: http://www.nabble.com/Default-webapp-tp20559346p20575773.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]
JVM/Tomcat startup parameters, HPUX
Hi. On a customer HPUX B.11.11 system that we are (remotely and partially) managing, I would like to know with which java options (default or otherwise) the JVM is being started, particularly the options regarding memory usage by the JVM and Tomcat. Tomcat runs as follows (ps -ex output) : 19866 pts/2 0:21 /opt/java1.5/bin/PA_RISC2.0/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -XdoCloseWithReadPending -Djava.endorsed.dirs=/opt/hpws/tomcat/common/endorsed -classpath :/opt/hpws/tomcat/bin/bootstrap.jar:/opt/hpws/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/opt/hpws/tomcat -Dcatalina.home=/opt/hpws/tomcat -Djava.io.tmpdir=/opt/hpws/tomcat/temp org.apache.catalina.startup.Bootstrap start top shows the following for that process : SIZE RES 1 pts/2 19866 root 152 20 1291M 199M run 0:23 0.38 0.38 java /opt/hpws/tomcat/bin/version.sh shows the following : Using CATALINA_BASE: /opt/hpws/tomcat Using CATALINA_HOME: /opt/hpws/tomcat Using CATALINA_TMPDIR: /opt/hpws/tomcat/temp Using JRE_HOME: /opt/java1.5 Server version: Apache Tomcat/5.5.9 Server built: Oct 22 2005 03:27:12 Server number: 5.5.0.0 OS Name:HP-UX OS Version: B.11.11 Architecture: PA_RISC2.0 JVM Version:1.5.0.07-_20_mar_2007_05_31 JVM Vendor: Hewlett-Packard Company I cannot find in any of the startup scripts being used, any particular Java -X options being set. I thus imagine it is using default options, but which are these ? Is there a default startup script that the JVM uses for that somewhere ? Thanks - 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 clustering with JAAS
I add anything to support clustering, dont know if there is a special configuration for JAAS, you mean jaas.conf? JaasConf { package.MyLoginModule required; }; thanks Gustavo Araujo wrote: Can you send us the logs and the conf. files? Thanks 2008/11/14 lmk [EMAIL PROTECTED] Hello, I use tomcat clustering with session replication, and JAAS module authentication; when tomcat instance loose session, the other cannot authenticate the user. how I keep the user authenticated on all the tomcat instance? thanks! -- View this message in context: http://www.nabble.com/tomcat-5.5-clustering-with-JAAS-tp20502551p20502551.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] -- Gustavo Campos Araujo -- View this message in context: http://www.nabble.com/tomcat-5.5-clustering-with-JAAS-tp20502551p20577077.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]
Re: Close an HttpServletRequest without consuming the whole HTTP client stream [Tomcat 6.0.18]
Thank you very much Bill for the useful update! There is probably a typo below, request.getOutputStream().close() would be request.getInputStream() or response.getOutputStream(). So, do you mean the request.getInputStream().close() actually closes the underlying connection stream or that the request.getInputStream() will be closed by setting a status code on the response (or similarly sending an error through the response) ? Thanks, Mauri Bill Barker wrote: However, in TC 6.0.19 the code below will work (however, the request.getOutputStream().close() will still have no effect, it will trigger because of the status code). Also, response.setStatus(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE) will work as well. Bill Barker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is currently no way to do this in Tomcat. Tomcat will always drain the input stream, even in cases like this where it should know better. Maurizio Melato [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello! is there a way to dispose an HttpServletRequest closing the underlying inputstream without consuming the entire HTTP client stream? Before answering request.getInputStream().close() let me explain the scenario ;) The scenario involves a client application executing a potentially big HTTP chunked POST (100mb or even gb) and the server, for some reason, may want to close the connection after a while. The Server code closing the request is: -- try { request.getInputStream().close(); }catch(IOException ignore) {} } try { response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, Error); response.flushBuffer(); }catch(IOException ignore) {} try { response.getOutputStream().close(); } catch (IOException e) {} -- I logged each step and I know for sure these operations are actually executed. After the Server performs the operations above I would expect the client to get an IOException while still writing the request body stream but this does not happen! The client posts all the request stream (consuming resources on the client machine, etc, etc..) till the end while Tomcat seems to simply discard those data without closing the underlying connection. Do you know if this behaviour is supposed to be correct? Any workaround to force a different one? Thanks in advance for your availability! Best regards, Maurizio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat request processing gets stuck
Michal Singer wrote: Hi. I am not sure the stuck as any thing to do with the Request Processor accumulation. I work with nio connector. I use acceptCount=200 so maybe this is why i see the 200 Request Processors. This is the full configuratin i use for connector: Connector executor=AgentExecutor useExecutor=true port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol SSLEnabled=false scheme=http secure=false redirectPort=8443 connectionTimeout=2 enableLookups=false disableUploadTimeout=true allowTrace=false maxSpareThreads=15 maxThreads=500 acceptCount=200/ Odd configuration. You appear to have mixed up using executor and non-executor configuration. After running a high load for about an hour, using jmeter as my simulator for load, the tomcat stops hanling the requests. jmeter stops sending messages since tomcat does not process them. I can't see any stuck on the application side. I see that all requests are handled. Maybe the configuration i use is not good for the connector, maybe there is a problem with nio connectors. Again, no. It is an application issue. Get the thread dumps and find out where the app has locked up. 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: Tomcat 6 and javamail
Start by making sure there is only one copy of the javamail jar. Remove either the one in tomcat's lib directory or your webapp's lib directory. -- David On Nov 19, 2008, at 6:04 AM, Lyallex [EMAIL PROTECTED] wrote: Hi Tomcat 6.0.16 jdk1.6.0_06 javamail 1.4.1 I have a simple component that uses javamail 1.4.1 to send e-mail It works perfectly 'standalone' (executed from Eclipse). It connects to the server (mail.smtp.auth = false) and sends the email I've read the available docs at http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html which talk about activation.jar among others As I am using jdk 1.6 I understand that this is no longer required (it is included in the distro). The javamail 1.4.1 jars are in CATALINA_HOME/lib I have also tried them in WEB-INF/classes/lib when I invoke the component in the webapp I get javax.mail.AuthenticationFailedException debug output shows that my components configuration parameters are IDENTICAL to those used in standalone mode. I am not using jndi resources or resources defined in context.xml, I am not using tomcats JavaMail session management. I just need this to work as a simple component without lots of config to start with. Can anyone let me in on the 'secret' to getting this to work. I've had similar components working in earlier releases (and they are still working) Something must have changed, I'm rather hoping it's not a securuity thing but I suspect it might be. I'm not asking anyone to debug my application I could just do with a pointer or two. Any help much appreciated Cheers lyallex - 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: Request Logging in Tomcat 6
Thank you a lot Kees, acctually I'm checking 2 possible implementations out. These two options seems to be good. 1- to use Servlet Filters 2- to extend a AccessLogValve Regarding CPU time I have searched deep in the link you have passed me and I found something about http://www.javaworld.com/javaworld/javatips/jw-javatip92.html?page=1 JVMPI (JVM Profiler Interface). It seems to offer a way to obtain such information So, thanks again Best Regards Kees Jan Koster wrote: Dear Raphael, I've been working with performance measurements of web services and I've faced this problem. For each request to my system (running in a tomcat 6) I need to log these information: Received Bytes (request content length) Served Bytes (response content length) Response Time (the time taken by the server to process the request) CPU Time (optional) I/O Time (optional) URI Cookies(the value of some specific cookies) Request Content Data If you need this much detail, best write your own servlet filter and log it yourself. http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html CPU and I/O times are tricky. If you get that to work, let me know. :-) -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - --- Raphael Santos http://www.inf.ufes.br/~santos http://www.inf.ufes.br/~santos -- View this message in context: http://www.nabble.com/Request-Logging-in-Tomcat-6-tp20561773p20578312.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]
Tomcat 6 and javamail
Hi Tomcat 6.0.16 jdk1.6.0_06 javamail 1.4.1 I have a simple component that uses javamail 1.4.1 to send e-mail It works perfectly 'standalone' (executed from Eclipse). It connects to the server (mail.smtp.auth = false) and sends the email I've read the available docs at http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html which talk about activation.jar among others As I am using jdk 1.6 I understand that this is no longer required (it is included in the distro). The javamail 1.4.1 jars are in CATALINA_HOME/lib I have also tried them in WEB-INF/classes/lib when I invoke the component in the webapp I get javax.mail.AuthenticationFailedException debug output shows that my components configuration parameters are IDENTICAL to those used in standalone mode. I am not using jndi resources or resources defined in context.xml, I am not using tomcats JavaMail session management. I just need this to work as a simple component without lots of config to start with. Can anyone let me in on the 'secret' to getting this to work. I've had similar components working in earlier releases (and they are still working) Something must have changed, I'm rather hoping it's not a securuity thing but I suspect it might be. I'm not asking anyone to debug my application I could just do with a pointer or two. Any help much appreciated Cheers lyallex - 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: Relative redirect with sendRedirect(...)
If not, why doesn't a HttpServletResponse.sendRedirect(../../go/here) work? As far as I can read from the servlet spec, the servlet engine _must_ resolve relative redirects before sending the redirect back to the browser. But as far as I can tell, Tomcat does not do this. And furthermore, the watchdog tests does not have a test for this. Where were you when you issued the redirect? I stand in this url: http://host/servletpath/ication/test/fr/ca and want to go to this url: http://host/servletpath/ibs/name/test.jar When calling httpresponse.sendRedirect(../../../../ibs/name/test.jar) Tomcat generates this url: http://host/servletpath/ication/test/fr/ca/../../../../ibs/name/test.jar The same worked in Jetty. Regards, Stig -- View this message in context: http://www.nabble.com/Relative-redirect-with-sendRedirect%28...%29-tp20561735p20578482.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]
Re: JVM/Tomcat startup parameters, HPUX
Most of these are set via catalina.sh (which you don't want to touch). But if you wish to add your own -X params. See /opt/hpws/tomcat/bin/setenv.sh In there - you'll see that HP already has added CATALINA_OPTS=-XdoCloseWithReadPending -Tim André Warnier wrote: Hi. On a customer HPUX B.11.11 system that we are (remotely and partially) managing, I would like to know with which java options (default or otherwise) the JVM is being started, particularly the options regarding memory usage by the JVM and Tomcat. Tomcat runs as follows (ps -ex output) : 19866 pts/2 0:21 /opt/java1.5/bin/PA_RISC2.0/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -XdoCloseWithReadPending -Djava.endorsed.dirs=/opt/hpws/tomcat/common/endorsed -classpath :/opt/hpws/tomcat/bin/bootstrap.jar:/opt/hpws/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/opt/hpws/tomcat -Dcatalina.home=/opt/hpws/tomcat -Djava.io.tmpdir=/opt/hpws/tomcat/temp org.apache.catalina.startup.Bootstrap start top shows the following for that process : SIZE RES 1 pts/2 19866 root 152 20 1291M 199M run 0:23 0.38 0.38 java /opt/hpws/tomcat/bin/version.sh shows the following : Using CATALINA_BASE: /opt/hpws/tomcat Using CATALINA_HOME: /opt/hpws/tomcat Using CATALINA_TMPDIR: /opt/hpws/tomcat/temp Using JRE_HOME: /opt/java1.5 Server version: Apache Tomcat/5.5.9 Server built: Oct 22 2005 03:27:12 Server number: 5.5.0.0 OS Name:HP-UX OS Version: B.11.11 Architecture: PA_RISC2.0 JVM Version:1.5.0.07-_20_mar_2007_05_31 JVM Vendor: Hewlett-Packard Company I cannot find in any of the startup scripts being used, any particular Java -X options being set. I thus imagine it is using default options, but which are these ? Is there a default startup script that the JVM uses for that somewhere ? - 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: Relative redirect with sendRedirect(...)
Stig Kleppe-Jørgensen wrote: If not, why doesn't a HttpServletResponse.sendRedirect(../../go/here) work? As far as I can read from the servlet spec, the servlet engine _must_ resolve relative redirects before sending the redirect back to the browser. But as far as I can tell, Tomcat does not do this. And furthermore, the watchdog tests does not have a test for this. Where were you when you issued the redirect? I stand in this url: http://host/servletpath/ication/test/fr/ca and want to go to this url: http://host/servletpath/ibs/name/test.jar When calling httpresponse.sendRedirect(../../../../ibs/name/test.jar) Tomcat generates this url: http://host/servletpath/ication/test/fr/ca/../../../../ibs/name/test.jar Which is perfectly legal. The spec says the URL must be fully qualified / absolute. It does not say it has to be normalised. The same worked in Jetty. Which is also perfectly legal and spec compliant. 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: Tomcat 6 and javamail
Hi Well I've had problems with this before. As I'm sure you know, the JavaMail API 1.4.1 distribution contains dsn.jar, imap.jar, mailapi.jar, pop3.jar and smtp.jar I was very careful to make sure that I only had the above jars in EITHER the web application's lib directory (WEB-INF/lib) OR tomcat's lib directory (../apache-tomcat-6.0.16/lib) restarting every time I made a change. I just tried again, searching the entire tomcat filesystem each time to ensure that there were no duplicates but still no luck. Unfortunately the mail server admin is being less than helpful so I can't even see what is happening at the other end. Any other ideas ? Thanks anyway lyallex 2008/11/25 David Smith [EMAIL PROTECTED]: Start by making sure there is only one copy of the javamail jar. Remove either the one in tomcat's lib directory or your webapp's lib directory. -- David On Nov 19, 2008, at 6:04 AM, Lyallex [EMAIL PROTECTED] wrote: Hi Tomcat 6.0.16 jdk1.6.0_06 javamail 1.4.1 I have a simple component that uses javamail 1.4.1 to send e-mail It works perfectly 'standalone' (executed from Eclipse). It connects to the server (mail.smtp.auth = false) and sends the email I've read the available docs at http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html which talk about activation.jar among others As I am using jdk 1.6 I understand that this is no longer required (it is included in the distro). The javamail 1.4.1 jars are in CATALINA_HOME/lib I have also tried them in WEB-INF/classes/lib when I invoke the component in the webapp I get javax.mail.AuthenticationFailedException debug output shows that my components configuration parameters are IDENTICAL to those used in standalone mode. I am not using jndi resources or resources defined in context.xml, I am not using tomcats JavaMail session management. I just need this to work as a simple component without lots of config to start with. Can anyone let me in on the 'secret' to getting this to work. I've had similar components working in earlier releases (and they are still working) Something must have changed, I'm rather hoping it's not a securuity thing but I suspect it might be. I'm not asking anyone to debug my application I could just do with a pointer or two. Any help much appreciated Cheers lyallex - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hard limits in Tomcat?
Dear Chris, I am setting up a monitoring system for Tomcat servers and I am looking for hard limits in Tomcat servers in general. I found a few so far: file descriptors, memory pools (ok, these are jdk limits) and thread pools. Are there any other hard limits that I can run into? I would call these soft limits, as they can be changed. Ah, sorry for the confusion. I should have asked for limits that are hard at run-time. Thread pool sizes may be editable, but they are fixed once Tomcat runs. What limits are relevant? For instance, Java doesn't allow you to have any method with more than 64k of code. I suppose that's of little consequence to a running JVM, since the code would never be loaded. Yes, I ran into that limit for a generated servlet once. This is not the kind of limit that I am looking for, as it is caught compile-time, not run-time. If you are going to count memory (heap?) and file descriptors, I suppose you could also count CPU time, since that is a limitable resource on *NIX systems. Hmm. It's really only useful if I can monitor both the maximum available time and the used time. I have no idea how I would measure that, even at unix level. It gets even more messy in virtual servers. If you really are talking about soft limits, then you probably also want to see the number of requests accepted but not yet being handled (controlled by the Connector's acceptCount attribute), the number of request processors (is this thread pools above?), the number of connections total/available/used in JDBC connection pools. Ah, that is interesting too: queue fill levels that should under normal circumstances be more or less empty. Much like the ObjectPendingFinalizationCount. Thanks for that. How would I use it, though? In my Tomcat acceptCount has a value of 100. That's probaly an upper limit. What is the 'un-use' property that goes with this upper limit? What MBean can I talk to about JDBC connection pooling? -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - 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: Hard limits in Tomcat?
I think the question you wanna ask yourself first is, do you want to monitor tomcat or do you want to monitor your application? regards Leon On Wed, Nov 19, 2008 at 3:18 PM, Kees Jan Koster [EMAIL PROTECTED] wrote: Dear Chris, I am setting up a monitoring system for Tomcat servers and I am looking for hard limits in Tomcat servers in general. I found a few so far: file descriptors, memory pools (ok, these are jdk limits) and thread pools. Are there any other hard limits that I can run into? I would call these soft limits, as they can be changed. Ah, sorry for the confusion. I should have asked for limits that are hard at run-time. Thread pool sizes may be editable, but they are fixed once Tomcat runs. What limits are relevant? For instance, Java doesn't allow you to have any method with more than 64k of code. I suppose that's of little consequence to a running JVM, since the code would never be loaded. Yes, I ran into that limit for a generated servlet once. This is not the kind of limit that I am looking for, as it is caught compile-time, not run-time. If you are going to count memory (heap?) and file descriptors, I suppose you could also count CPU time, since that is a limitable resource on *NIX systems. Hmm. It's really only useful if I can monitor both the maximum available time and the used time. I have no idea how I would measure that, even at unix level. It gets even more messy in virtual servers. If you really are talking about soft limits, then you probably also want to see the number of requests accepted but not yet being handled (controlled by the Connector's acceptCount attribute), the number of request processors (is this thread pools above?), the number of connections total/available/used in JDBC connection pools. Ah, that is interesting too: queue fill levels that should under normal circumstances be more or less empty. Much like the ObjectPendingFinalizationCount. Thanks for that. How would I use it, though? In my Tomcat acceptCount has a value of 100. That's probaly an upper limit. What is the 'un-use' property that goes with this upper limit? What MBean can I talk to about JDBC connection pooling? -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - 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: Tomcat vs Daemons
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nathan, [EMAIL PROTECTED] wrote: In my code, I have a ServletContextListener (configured in web.xml or similar file, don't remember exactly), so when the servlet context is created it calls contextInitialized(ServletContextEvent). In this function I start the daemon threads. There is a function contextDestroyed which you can use to stop the threads (but note Thread.stop is deprecated). Yup, that'll work. If you subclass Thread (or, better yet, Runnable), you can add a method that tells the process to stop itself: basically, you set a flag that your long-running loop (or whatever) periodically checks to see if it's been set. If it's been set, you simply return from the run method and the thread stops. This is much better than calling Thread.stop(). It sounds like a good idea to start these background threads in a new process. However, I don't know if you can do this in a hosted web server environment like the kind you find at mochahost.com and dailyrazor.com. Will need to test it out. Yeah, you'll need to see what they allow you to do. cron is, of course, the best choice if it's available. Otherwise, you may have to run your process from within your web application. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkIcEACgkQ9CaO5/Lv0PChigCaAhi4PtzdVngSBdAZ4aRiq8IS c/IAoIaNVjkBxa8Z9MUpwQxEEsGysHcc =GttZ -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: Tomcat request processing gets stuck
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michal, Michal Singer wrote: I am not sure the stuck as any thing to do with the Request Processor accumulation. I work with nio connector. I use acceptCount=200 so maybe this is why i see the 200 Request Processors. acceptCount=200 just means that the socket will accept 200 clients /in addition/ to those currently being served by RequestProcessor threads. The only way to see those waiting clients would be to query the socket itself (maybe only available at the C-library level?). This is the full configuration i use for connector: Connector executor=AgentExecutor useExecutor=true port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol SSLEnabled=false scheme=http secure=false redirectPort=8443 connectionTimeout=2 enableLookups=false disableUploadTimeout=true allowTrace=false maxSpareThreads=15 maxThreads=500 acceptCount=200/ Your configuration allows for 500 request processors, so seeing only 200 doesn't seem too bad. I agree with Mark's confusion over your configuration: you seem to be trying to use both a standard connector as well as an executer. You should pick one and stick with it. After running a high load for about an hour, using jmeter as my simulator for load, the tomcat stops hanling the requests. jmeter stops sending messages since tomcat does not process them. I can't see any stuck on the application side. I see that all requests are handled. Thread dump, thread dump, thread dump! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkIvoACgkQ9CaO5/Lv0PDjAQCgorj69K3azqmYCASIexi4cMCN qhcAoItqx00LrA4wjAPjLUXgOatJZwie =4GQT -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: Hard limits in Tomcat?
Dear Leon, I think the question you wanna ask yourself first is, do you want to monitor tomcat or do you want to monitor your application? I want to monitor Tomcat, not the application. I'm using the information to improve the Tomcat monitoring on Java-monitor.com. Currently you can see the memory pools/thread pools/file descriptors and their limits. I was just curious if there are any other pool-like structures inside Tomcat. I'm sure that there are many applications out there that have pools and limits, but Java-monitor works for all Tomcats. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - 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: Relative redirect with sendRedirect(...)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stig, Stig Kleppe-Jørgensen wrote: I stand in this url: http://host/servletpath/ication/test/fr/ca and want to go to this url: http://host/servletpath/ibs/name/test.jar Why not just use absolute URLs? httpResponse.sendRedirect(response.encodeRedirectURL(/ibs/name/test.jar)); When calling httpresponse.sendRedirect(../../../../ibs/name/test.jar) That's too many .. by the way, unless your original URL up at the top of the message was a path without a resource (i.e. it should have been .../ca/something). Taking /servletpath/ication/test/fr/ca and applying 4 .. to it gives you: / :( Tomcat generates this url: http://host/servletpath/ication/test/fr/ca/../../../../ibs/name/test.jar And what does your client (browser) do with this URL? The same worked in Jetty. I'll bet this works in Jetty because Jetty actually does the normalization, and won't let you redirect a relative path outside of the current webapp. Try putting ../../../../../../../../../../../../.. into Jetty and see if it still works. With Tomcat, the client (browser) is left to interpret the URL and normalize the path. I'm assuming it does it correctly and sends the user to http://host/ibs/name/test.jar which, I would imagine, does not exist. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkJLQACgkQ9CaO5/Lv0PBl0QCfSbnPbcSHGJbsk9TjItURlo5B /UUAnRGbafBUFrSChPfcByG1TB8Ux+2I =IVdu -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: Hard limits in Tomcat?
is there a demo available on the java-monitor.com? sofar i only find a php forum :-) Leon On Wed, Nov 19, 2008 at 3:31 PM, Kees Jan Koster [EMAIL PROTECTED] wrote: Dear Leon, I think the question you wanna ask yourself first is, do you want to monitor tomcat or do you want to monitor your application? I want to monitor Tomcat, not the application. I'm using the information to improve the Tomcat monitoring on Java-monitor.com. Currently you can see the memory pools/thread pools/file descriptors and their limits. I was just curious if there are any other pool-like structures inside Tomcat. I'm sure that there are many applications out there that have pools and limits, but Java-monitor works for all Tomcats. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - 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]
6.0.18 download link yeilds HTTP 404
http://www.devlib.org/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6 .0.18.exe Maybe the site is down?
Re: Hard limits in Tomcat?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Keen Jan, Kees Jan Koster wrote: Ah, sorry for the confusion. I should have asked for limits that are hard at run-time. Thread pool sizes may be editable, but they are fixed once Tomcat runs. Gotcha. Hard runtime limits makes a whole lot more sense. Sorry for not jumping to that obvious conclusion. I wasn't trying to be a jerk ;) What limits are relevant? For instance, Java doesn't allow you to have any method with more than 64k of code. I suppose that's of little consequence to a running JVM, since the code would never be loaded. Yes, I ran into that limit for a generated servlet once. This is not the kind of limit that I am looking for, as it is caught compile-time, not run-time. Yup: one big, nasty JSP will get you some day. If you are going to count memory (heap?) and file descriptors, I suppose you could also count CPU time, since that is a limitable resource on *NIX systems. Hmm. It's really only useful if I can monitor both the maximum available time and the used time. I have no idea how I would measure that, even at unix level. It gets even more messy in virtual servers. I don't see why virtual servers would be trickier: the kernel should be counting beans properly. In terms of getting that information, you need to call getrlimit to see what the limit is. I'm not sure where to get the current resource usage, though. If you really are talking about soft limits, then you probably also want to see the number of requests accepted but not yet being handled (controlled by the Connector's acceptCount attribute), the number of request processors (is this thread pools above?), the number of connections total/available/used in JDBC connection pools. Ah, that is interesting too: queue fill levels that should under normal circumstances be more or less empty. Much like the ObjectPendingFinalizationCount. Thanks for that. How would I use it, though? In my Tomcat acceptCount has a value of 100. That's probaly an upper limit. What is the 'un-use' property that goes with this upper limit? Do you mean something like a minimum accept count? By definition, the minimum accept count is 0, since you're talking about the number of connections that the socket will accept. It can certainly always be zero. But this is an OS thing, and is set when you bind to the socket. I don't think there's a way to change this through Java after the socket has been bound. What MBean can I talk to about JDBC connection pooling? You should get yourself a copy of LabmdaProbe and basically steal all that code. Better yet, just use LambdaProbe and save yourself a lot of headache. I'm sure they'd appreciate any code you'd like to donate to the project to sniff other limits (like file descriptors). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkJikACgkQ9CaO5/Lv0PBuXQCeKp58nHImA6fWFpQmwL59+h9l uqkAoMKrYz4eRVN8rt57KzPcwVlzQFIM =P2f6 -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: 6.0.18 download link yeilds HTTP 404
Leo Donahue - PLANDEVX wrote: http://www.devlib.org/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6 .0.18.exe Maybe the site is down? Works for me. Or you can just use a different mirror. 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: 6.0.18 download link yeilds HTTP 404
From: Leo Donahue - PLANDEVX [mailto:[EMAIL PROTECTED] Subject: 6.0.18 download link yeilds HTTP 404 http://www.devlib.org/apache/tomcat/tomcat-6/v6.0.18/bin/apach e-tomcat-6.0.18.exe Maybe the site is down? It's unlikely the DevLib people are monitoring this mailing list, so you should probably contact them directly. In the meantime, try another mirror from the drop-down list. - 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: How do i specify the filename for a binary file generated by a JSP?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan, Jonathan Mast wrote: I am writing a report generator that has the ability to generate Excel files. This question has already been answered by Youssef, Hassan, and Bill. I'm going to add a few things that I think are worth mentioning. There was a magazine at one time called JavaPro that seems to have been wiped off the face of the planet. I have in front of me a printed article called Send Files to Browser Clients the /Right Way/ which answers your question in a 2-page writeup. The basics are: 1. Use Content-Disposition (as suggested by other responses) 2. Set the Content-Type to application/octet-stream (This may force a download for browsers such as MSIE that would rather show you the content than download it) 3. Make sure you don't send more content than is appropriate. Since you're using a JSP, watch out for excess newlines and stuff like that you might get with sloppy JSP syntax. Sweet. The Way Back Machine comes to the rescue: http://web.archive.org/web/20020604100834/http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_08/ Enjoy. It's a really old article, but it is actually still correct (which just isn't true for most of what has been published about Java - aside from the basics - since it was introduced). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkKEcACgkQ9CaO5/Lv0PAPbACffXS7jmqO5m5mX+a9xqrKzs51 8O4AniTQoEYFpvZQTGVyRChPIAHlZI+R =0i+q -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: Question on Performance Tuning
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vasanth, Vasanth Kumar ravi wrote: We did many rounds of load/performance testing with 50 Virtual users, to find bottlenecks with the application, major problem found was CPU utilization. 1. We did load testing with 1 apache and 1 tomcat, the CPU was arnd 70% 2. We did load testing with 2 apache and 2 tomcat, the CPU was arnd 70% 3. We did load testing with 2 apache and 3 tomcat, the CPU was arnd 70% 4. We did load testing with 2 apache and 4 tomcat, the CPU was arnd 70% Was your load test designed to test your peak load expectations? IMO, 70% CPU utilization means that you have appropriately sized your hardware for your demand. I would call that a successful capacity planning job: you even have a bit of room to grow before adding more hardware. Are you just upset that you are using such a high percentage of your CPU? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkKmYACgkQ9CaO5/Lv0PAwsgCghztrPqEqZr8qOgU9D/wQICcd oFsAoKeDf44p9qPHOr0jlEA3LA1lEUhc =lcEb -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: Tomcat request processing gets stuck
Hi, thanks for the response. I have A few questions regarding your comment: 1. request processors are equivalent to threads? 2. doesn't nio work with one thread? (I thougt that this thread configuration is irrelevant since nio works with one thread to receive requests.) 3. I shouldn't work with Executor while working with nio connector? 4. can you send me an example of nio good configuration? Thank you very much, Michal Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michal, Michal Singer wrote: I am not sure the stuck as any thing to do with the Request Processor accumulation. I work with nio connector. I use acceptCount=200 so maybe this is why i see the 200 Request Processors. acceptCount=200 just means that the socket will accept 200 clients /in addition/ to those currently being served by RequestProcessor threads. The only way to see those waiting clients would be to query the socket itself (maybe only available at the C-library level?). This is the full configuration i use for connector: Connector executor=AgentExecutor useExecutor=true port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol SSLEnabled=false scheme=http secure=false redirectPort=8443 connectionTimeout=2 enableLookups=false disableUploadTimeout=true allowTrace=false maxSpareThreads=15 maxThreads=500 acceptCount=200/ Your configuration allows for 500 request processors, so seeing only 200 doesn't seem too bad. I agree with Mark's confusion over your configuration: you seem to be trying to use both a standard connector as well as an executer. You should pick one and stick with it. After running a high load for about an hour, using jmeter as my simulator for load, the tomcat stops hanling the requests. jmeter stops sending messages since tomcat does not process them. I can't see any stuck on the application side. I see that all requests are handled. Thread dump, thread dump, thread dump! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkIvoACgkQ9CaO5/Lv0PDjAQCgorj69K3azqmYCASIexi4cMCN qhcAoItqx00LrA4wjAPjLUXgOatJZwie =4GQT -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] -- View this message in context: http://www.nabble.com/Tomcat-request-processing-gets-stuck-tp20526036p20581747.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]
Re: JVM/Tomcat startup parameters, HPUX
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, André Warnier wrote: On a customer HPUX B.11.11 system that we are (remotely and partially) managing, I would like to know with which java options (default or otherwise) the JVM is being started, particularly the options regarding memory usage by the JVM and Tomcat. I think the only way to observe effective memory settings is to either run jmap against the running process, or examine it from within by interrogating the Runtime object. You can also attach a debugger to it, of course. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkLKsACgkQ9CaO5/Lv0PC2uACeIodipzv5Rz4G+3rLabkE4ox/ l+AAn2T6hITsy9EjmOQoy2A+iQ0zyW9K =O9Qt -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: Hard limits in Tomcat?
Dear Leon, is there a demo available on the java-monitor.com? sofar i only find a php forum :-) The forum has the monitoring tool built-in. A bit weird at forst, but it makes it really simple to post questions, as you can just post graphs from the tool right on the forum. No need to make screenshots. If you register and log in, the tool shows up. I have not put any screenshots hi-res on-line yet. I have only two hands. :-( I should do that. Here are some low-res ones: http://java-monitor.com/forum/showthread.php?t=123 -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Rule 1 for being in a hole: stop digging. - 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 request processing gets stuck
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michal, Michal Singer wrote: 1. request processors are equivalent to threads? Yes. The only thing that can execute code is a thread. Given your configuration, it appears that you will have 500 maximum threads. I am a little unfamiliar with the NIO connector, but this is what the documentation says when using useExecutor=true: If set to true(default) then the max pool size is the maxThreads attribute and the core pool size is the minSpareThreads. This value is ignored if the executor attribute is present and points to a valid shared thread pool. 2. doesn't nio work with one thread? (I thougt that this thread configuration is irrelevant since nio works with one thread to receive requests.) Nope. The NIO connector is just a non-blocking one. A single thread could never supply suitable performance for a web application. You might be thinking of Comet, which is a completely different beast. http://tomcat.apache.org/tomcat-6.0-doc/aio.html 3. I shouldn't work with Executor while working with nio connector? Using the executor is perfectly find. I think Chuck and I were confused since the executor is typically specified separately (as Executor) but the documentation appears to suggest that an executor will be automatically created given your configuration. 4. can you send me an example of nio good configuration? Your configuration appears to be good, actually. The only problems are: 1. You are nervous about the number of request processors appearing (and you probably shouldn't be, unless you are hardly using your app at all and you are still seeing hundreds of request processor threads being created) 2. Your application hangs, which is, of course, a serious problem. For that last one, you'll need to take thread dumps to find out what your app is waiting on. You might want to scale back the number of request processors (maxThreads setting) so your thread dumps are small enough to read without losing your mind. My guess is that you are hitting your database thread pool limit and the application is simply waiting for db connections to become available. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkMOQACgkQ9CaO5/Lv0PBYWACgwsqRM2XG4N1SOMSt722XlY/Q MbkAnjjThQY/WEFv65JtmkdENyltkFCF =yIAC -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: JVM/Tomcat startup parameters, HPUX
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: JVM/Tomcat startup parameters, HPUX I think the only way to observe effective memory settings is to either run jmap against the running process, or examine it from within by interrogating the Runtime object. You can also attach a debugger to it, of course. JConsole will provide all the requested information (and much more), assuming the HP JVM will accommodate it. Look at the VM Summary tab for the startup options and general heap status; use the Memory tab for details about the heap. If you run JConsole on the same machine as Tomcat, you don't even need to set the com.sun.management.jmxremote system property to look at the basic data. - 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: Tomcat request processing gets stuck
Thanks again for the great response. I am not worried about the request processors any more now that i understand what they mean. However, i see that when i use the nio, my application gets stuck. i think working without nio is better. I am not sure why, if as i know nio is supposed to improve performance. I am checking my connectors configuration as well as my application getting stuck. Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michal, Michal Singer wrote: 1. request processors are equivalent to threads? Yes. The only thing that can execute code is a thread. Given your configuration, it appears that you will have 500 maximum threads. I am a little unfamiliar with the NIO connector, but this is what the documentation says when using useExecutor=true: If set to true(default) then the max pool size is the maxThreads attribute and the core pool size is the minSpareThreads. This value is ignored if the executor attribute is present and points to a valid shared thread pool. 2. doesn't nio work with one thread? (I thougt that this thread configuration is irrelevant since nio works with one thread to receive requests.) Nope. The NIO connector is just a non-blocking one. A single thread could never supply suitable performance for a web application. You might be thinking of Comet, which is a completely different beast. http://tomcat.apache.org/tomcat-6.0-doc/aio.html 3. I shouldn't work with Executor while working with nio connector? Using the executor is perfectly find. I think Chuck and I were confused since the executor is typically specified separately (as Executor) but the documentation appears to suggest that an executor will be automatically created given your configuration. 4. can you send me an example of nio good configuration? Your configuration appears to be good, actually. The only problems are: 1. You are nervous about the number of request processors appearing (and you probably shouldn't be, unless you are hardly using your app at all and you are still seeing hundreds of request processor threads being created) 2. Your application hangs, which is, of course, a serious problem. For that last one, you'll need to take thread dumps to find out what your app is waiting on. You might want to scale back the number of request processors (maxThreads setting) so your thread dumps are small enough to read without losing your mind. My guess is that you are hitting your database thread pool limit and the application is simply waiting for db connections to become available. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkMOQACgkQ9CaO5/Lv0PBYWACgwsqRM2XG4N1SOMSt722XlY/Q MbkAnjjThQY/WEFv65JtmkdENyltkFCF =yIAC -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] -- View this message in context: http://www.nabble.com/Tomcat-request-processing-gets-stuck-tp20526036p20582385.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]
RE: Tomcat request processing gets stuck
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat request processing gets stuck 2. doesn't nio work with one thread? (I thougt that this thread configuration is irrelevant since nio works with one thread to receive requests.) Nope. The NIO connector is just a non-blocking one. To elaborate a bit: that means that HTTP connections in a keep-alive state do not consume requests. The NIO poller will dispatch incoming messages to threads on a request basis, rather than allocating a thread per connection as the basic HTTP connector does. 3. I shouldn't work with Executor while working with nio connector? Using the executor is perfectly find. I think Chuck and I were confused since the executor is typically specified separately (as Executor) When Tomcat 6 was originally released, Remy M cautioned against using an executor due to performance problems. A recent posting by Filip H indicates those problems have been resolved and that an executor is the proper thing to use for fine-grained control of thread pools. 4. can you send me an example of nio good configuration? Your configuration appears to be good, actually. Not really - a good one would not include attributes that are ignored. Can't really tell if you config is o.k. with seeing the corresponding Executor element. Since you're using an executor, you should remove the min/max threads attributes. My guess is that you are hitting your database thread pool limit and the application is simply waiting for db connections to become available. Or the app is failing to return connections to the DB pool. As many have suggested in other threads, try testing with a DB pool size of one - it will be slow, but any mishandling of DB connections will become painfully obvious. - 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: Tomcat request processing gets stuck
From: Michal Singer [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat request processing gets stuck I am not sure why, if as i know nio is supposed to improve performance. Not true; NIO improves *capacity*, but it will slightly degrade throughput due to more thread switching. I am checking my connectors configuration as well as my application getting stuck. Take thread dumps! Note that JConsole and JVisualVM (among other tools) will let you watch your threads on the fly so you can see where they're getting stuck. - 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 Native 6 Remote Debugging (JPDA)
Hi guys, we're running Tomcat on Debian on port 80 using Tomcat Native (JSVC). Now I'm wondering wether it's possible to get remote debugging working here. I've adapted the the startup-script as follows: code #!/bin/sh export LD_LIBRARY_PATH=/home/tomcat/www/bin/tomcat-native-1.1.3/jni/native/.libs JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun CATALINA_HOME=/home/tomcat/www/ DAEMON_HOME=/home/tomcat/www TOMCAT_USER=tomcat # for multi instances adapt those lines. TMP_DIR=/var/tmp PID_FILE=/var/run/jsvc.pid CATALINA_BASE=/home/tomcat/www if [ $2 = jpda ] then JPDA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n fi CATALINA_OPTS=-Djava.library.path=/home/tomcat/www/bin/tomcat-native-1.1.3/jni/native/.libs $JPDA_OPTS #CATALINA_OPTS= CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar case $1 in start) # # Start Tomcat # #$DAEMON_HOME/src/native/unix/jsvc \ echo Starting tomcat $DAEMON_HOME/bin/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Dcatalina.base=$CATALINA_BASE \ -Djava.io.tmpdir=$TMP_DIR \ -Dlog4j.configuration=log4j.xml \ -wait 10 \ -pidfile $PID_FILE \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ exit $? ;; stop) # # Stop Tomcat # echo Stopping tomcat $DAEMON_HOME/bin/jsvc \ -stop \ -pidfile $PID_FILE \ org.apache.catalina.startup.Bootstrap exit $? ;; *) echo Usage tomcat.sh start/stop exit 1;; esac /code netstat shows me that tomcat is listening on port 8787, however, when connection from within Eclipse (Ganymed), it tell's me Failed to connect to remote VM. Connection timed out. tcp0 0 0.0.0.0:87870.0.0.0:* LISTEN 6780/jsvc.exec tcp0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2328/vsftpd tcp0 0 10.170.202.3:4430.0.0.0:* LISTEN 6780/jsvc.exec tcp6 0 0 :::8009 :::* LISTEN 6780/jsvc.exec tcp6 0 0 :::80 :::* LISTEN 6780/jsvc.exec Now I'm wondering: - Is it a problem with the native wrapper that it can't cope with remote-debugging? - Is it that we're running on port 80, but eclipse requires port 8080 ? (haven't found anything to specify a port in Eclipse anyway) Has anybody got that combination running ever before? Tomcat-version is 5.5.20 btw. Cheers Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - 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: Hard limits in Tomcat?
Dear Chris, Ah, sorry for the confusion. I should have asked for limits that are hard at run-time. Thread pool sizes may be editable, but they are fixed once Tomcat runs. Gotcha. Hard runtime limits makes a whole lot more sense. Sorry for not jumping to that obvious conclusion. I wasn't trying to be a jerk ;) Don't worry. Better to ask for clarification than to assume. I wish more people would follow your example. If you are going to count memory (heap?) and file descriptors, I suppose you could also count CPU time, since that is a limitable resource on *NIX systems. Hmm. It's really only useful if I can monitor both the maximum available time and the used time. I have no idea how I would measure that, even at unix level. It gets even more messy in virtual servers. I don't see why virtual servers would be trickier: the kernel should be counting beans properly. In terms of getting that information, you need to call getrlimit to see what the limit is. I'm not sure where to get the current resource usage, though. Hmmyeah. We're way off into OS-land here. Virtual servers get esepcially tricky when a few are running on a host and you're in one of them. You may still be able to measure your own cpu usage, but you have no idea at all how much was available. So you can never tell if you're using what is available or not. I run Java- monitor's components on the bare iron for that very reason. So that I can see what uses the cpu and optimise the right places. If you really are talking about soft limits, then you probably also want to see the number of requests accepted but not yet being handled (controlled by the Connector's acceptCount attribute), the number of request processors (is this thread pools above?), the number of connections total/available/used in JDBC connection pools. Ah, that is interesting too: queue fill levels that should under normal circumstances be more or less empty. Much like the ObjectPendingFinalizationCount. Thanks for that. How would I use it, though? In my Tomcat acceptCount has a value of 100. That's probaly an upper limit. What is the 'un-use' property that goes with this upper limit? Do you mean something like a minimum accept count? By definition, the minimum accept count is 0, since you're talking about the number of connections that the socket will accept. It can certainly always be zero. But this is an OS thing, and is set when you bind to the socket. I don't think there's a way to change this through Java after the socket has been bound. Grr. Off into OS-land again. Oh well. :-) What MBean can I talk to about JDBC connection pooling? You should get yourself a copy of LabmdaProbe and basically steal all that code. Better yet, just use LambdaProbe and save yourself a lot of headache. I'm sure they'd appreciate any code you'd like to donate to the project to sniff other limits (like file descriptors). Yes, LambdaProbe sure looks nice. My probe code is available from Google code (http://code.google.com/p/java-monitor-probes/) but really all I do so query JMX mbeans. Hmm. Maybe I should talk to the devs of the new default connection pool to incorporate a pool MBean too. That's useful for all of us, regardless of monitoring tool in use. For Java-monitor I have to keep in mind that I cannot do anything invasive. I want the probe to be so lightweigth that installation is a mere 5 minutes work and has no measurable impact on the JVM's run-time performance. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - 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: Servlets / JSP can't connect to MySQL in Ubuntu Server
On Nov 18, 2008, at 7:58 , David Smith wrote: Can you post your database config and code snippet for accessing the db? Obfuscate the username/password info. One immediate observation is the JDBC url should have the name of the database you are trying to access like this: jdbc:mysql://localhost/myDatabase?user= --David TRIMMED - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Here is the test JSP page that I have been using to test multiple urls. On my OS X machine they all pass and on the Ubuntu machine they all fail with the CommunicationException. As for the url without the database, my application attempts to connect to the specific database and if that fails it will then try to connect without the database specified in the url so it can create the database. Therefore, the connection to the url database is only attempted after the connection to the url with the database has failed. This method seems to work flawlessly on my OS X machine so I dont think that it should cause a problem. You will see in my test JSP though, that I'm trying multiple different url variations and they all fail with the exact same exception. %-- Document : index Created on : Nov 16, 2008, 1:19:22 PM Author : ambrose --% [EMAIL PROTECTED] contentType=text/html pageEncoding=UTF-8% [EMAIL PROTECTED] import=java.sql.* % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleJSP Page/title /head body % Class.forName(com.mysql.jdbc.Driver).newInstance(); String[] url = new String[] { jdbc:mysql://localhost/ testdb?user=inventorypassword=password, jdbc:mysql://localhost/ testdb?user=rootpassword=admin, jdbc:mysql://127.0.0.1/ testdb?user=inventorypassword=password, jdbc:mysql://127.0.0.1/ testdb?user=rootpassword=admin, jdbc:mysql://localhost: 3306/testdb?user=inventorypassword=password, jdbc:mysql://localhost: 3306/testdb?user=rootpassword=admin, jdbc:mysql:// 127.0.0.1:3306/testdb?user=inventorypassword=password, jdbc:mysql:// 127.0.0.1:3306/testdb?user=rootpassword=admin, jdbc:mysql://localhost? user=inventorypassword=password, jdbc:mysql://localhost? user=rootpassword=admin, jdbc:mysql://127.0.0.1? user=inventorypassword=password, jdbc:mysql://127.0.0.1? user=rootpassword=admin, jdbc:mysql://localhost: 3306?user=inventorypassword=password, jdbc:mysql://localhost: 3306?user=rootpassword=admin, jdbc:mysql:// 127.0.0.1:3306?user=inventorypassword=password, jdbc:mysql:// 127.0.0.1:3306?user=rootpassword=admin, jdbc:mysql://localhost/? user=inventorypassword=password, jdbc:mysql://localhost/? user=rootpassword=admin, jdbc:mysql://127.0.0.1/? user=inventorypassword=password, jdbc:mysql://127.0.0.1/? user=rootpassword=admin, jdbc:mysql://localhost: 3306/?user=inventorypassword=password, jdbc:mysql://localhost: 3306/?user=rootpassword=admin, jdbc:mysql:// 127.0.0.1:3306/?user=inventorypassword=password, jdbc:mysql:// 127.0.0.1:3306/?user=rootpassword=admin, jdbc:mysql:///? user=inventorypassword=password, jdbc:mysql:///testdb? user=inventorypassword=password }; for( int i = 0; i url.length; i++ ) { String retVal = openConnection(url[i]); if( retVal == null ) { out.write(Successful: + url[i] + br/); } else { out.write(Failed: + url[i] + ( + retVal + )br/); } } % %! public String openConnection(String url)
Re: Servlets / JSP can't connect to MySQL in Ubuntu Server
On Nov 18, 2008, at 7:37 , André Warnier wrote: Krapacs Ambrose wrote: I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10 Server with MySQL 5 and Tomcat6. I also tried setting up a Ubuntu 8.04 server with Tomcat 5.5 and MySQL 5. I have even configured Tomcat running on the 8.10 server to try to connect to MySQL running on the 8.04 server. Still no luck! The exception that is thrown is here: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Hi. I know little about MySQL and JDBC, but the above seems to be purely at the TCP/IP level : your JDBC driver cannot connect to your MySQL server. It seems from the above that you are connecting to localhost without indicating a port. I thus suppose that JDBC is going to try the standard port on which MySQL is supposed to be listening. 1) So first of all, is that the case ? Is MySQL really listening on that port ? (and first of all, is MySQL started ?) (Try netstat -n | grep LISTEN to see all ports being listened on) 2) are your Tomcat and your MySQL server on the same system ? (since you're trying to connect to localhost) 3) if yes, on that system, when you try ping localhost, what does it show you ? 4) finally, on the same system, try telnet localhost , where is the port where MySQL is supposedly listening. What do you see then ? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I have verified that MySQL is running on the correct port. In /etc/ conf/my.cnf the bind-address is 127.0.0.1 and the port specified is 3306. I was able to get the standalone j2se application to connect to the MySQL server using the JDBC connector so tomcat should be running. I'm trying to set up both Tomcat and MySQL on the same system but during my troubleshooting I tried to set up another server with MySQL and I could not connect to that server either through Tomcat (same result). I've checked the /etc/hosts file to make sure that there is an entry for localhost, and pinging localhost seems to return expected results. Also, I have tried using telnet to connect to port 3306 and it does appear that the server is listening because it refuses the telnet connection.
Re: Servlets / JSP can't connect to MySQL in Ubuntu Server
On Nov 18, 2008, at 7:36 , Antonio Vidal Ferrer wrote: Hi, It's your mysql listening on Localhost? Have you tried to use the ip address instead of Localhost? Best, Toni -Original Message- From: Krapacs Ambrose [mailto:[EMAIL PROTECTED] Sent: martes, 18 de noviembre de 2008 13:22 To: users@tomcat.apache.org Subject: Servlets / JSP can't connect to MySQL in Ubuntu Server I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10 Server with MySQL 5 and Tomcat6. I also tried setting up a Ubuntu 8.04 server with Tomcat 5.5 and MySQL 5. I have even configured Tomcat running on the 8.10 server to try to connect to MySQL running on the 8.04 server. Still no luck! The exception that is thrown is here: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 0 ms ago.(jdbc:mysql://localhost? user=invuserpassword=admin)) org .apache .jasper .runtime.PageContextImpl.doHandlePageException(PageContextImpl.java: 852) org.apache.jasper.runtime.PageContextImpl.access $1100(PageContextImpl.java:71) org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java: 768) java.security.AccessController.doPrivileged(Native Method) org .apache .jasper .runtime.PageContextImpl.handlePageException(PageContextImpl.java:766) org.apache.jsp.install_jsp._jspService(install_jsp.java:141) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org .apache .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 57) sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java: 43) java.lang.reflect.Method.invoke(Method.java:616) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:537) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java: 276) org .apache .catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java: 162) I have verified that MySQL is running and everything with Tomcat seems to be configured correctly because I can execute servlets and JSP just fine it's just the connections to MySql to that fail. I have also executed a standalone java application using the MySQL Connector/J and that worked fine. I've even tried different ways of deploying the MySql Connector/J (which is the newest version available) to see if it was a permissions problem with the library. The key to this is that the web applications that I am trying to deploy run flawlessly on my Mac OS X development machine with MySQL. I haven't tried Windows yet but if I can get this set up to host my web application I may have to set up a Windows machine to try it. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yes I'm sure it is listening on localhost. In /etc/mysql/my.cnf the bind-address is set to 127.0.0.1 and also I explained that the standalone j2se java application successfully connected to the MySQL server via the MySQL JDBC connector. However I have tried using the ip address, and I have also tried different combinations specifying and omitting the port. Still no luck :(
Re: Servlets / JSP can't connect to MySQL in Ubuntu Server
If you have command line access on the system, can you test your MySQL connectivity by connecting this way?: mysql -u inventory -h localhost -p The -h option forces mysql command to connect via TCP/IP instead of unix sockets. --David Ambrose Krapacs wrote: On Nov 18, 2008, at 7:58 , David Smith wrote: Can you post your database config and code snippet for accessing the db? Obfuscate the username/password info. One immediate observation is the JDBC url should have the name of the database you are trying to access like this: jdbc:mysql://localhost/myDatabase?user= --David TRIMMED - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Here is the test JSP page that I have been using to test multiple urls. On my OS X machine they all pass and on the Ubuntu machine they all fail with the CommunicationException. As for the url without the database, my application attempts to connect to the specific database and if that fails it will then try to connect without the database specified in the url so it can create the database. Therefore, the connection to the url database is only attempted after the connection to the url with the database has failed. This method seems to work flawlessly on my OS X machine so I dont think that it should cause a problem. You will see in my test JSP though, that I'm trying multiple different url variations and they all fail with the exact same exception. %-- Document : index Created on : Nov 16, 2008, 1:19:22 PM Author : ambrose --% [EMAIL PROTECTED] contentType=text/html pageEncoding=UTF-8% [EMAIL PROTECTED] import=java.sql.* % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleJSP Page/title /head body % Class.forName(com.mysql.jdbc.Driver).newInstance(); String[] url = new String[] { jdbc:mysql://localhost/testdb?user=inventorypassword=password, jdbc:mysql://localhost/testdb?user=rootpassword=admin, jdbc:mysql://127.0.0.1/testdb?user=inventorypassword=password, jdbc:mysql://127.0.0.1/testdb?user=rootpassword=admin, jdbc:mysql://localhost:3306/testdb?user=inventorypassword=password, jdbc:mysql://localhost:3306/testdb?user=rootpassword=admin, jdbc:mysql://127.0.0.1:3306/testdb?user=inventorypassword=password, jdbc:mysql://127.0.0.1:3306/testdb?user=rootpassword=admin, jdbc:mysql://localhost?user=inventorypassword=password, jdbc:mysql://localhost?user=rootpassword=admin, jdbc:mysql://127.0.0.1?user=inventorypassword=password, jdbc:mysql://127.0.0.1?user=rootpassword=admin, jdbc:mysql://localhost:3306?user=inventorypassword=password, jdbc:mysql://localhost:3306?user=rootpassword=admin, jdbc:mysql://127.0.0.1:3306?user=inventorypassword=password, jdbc:mysql://127.0.0.1:3306?user=rootpassword=admin, jdbc:mysql://localhost/?user=inventorypassword=password, jdbc:mysql://localhost/?user=rootpassword=admin, jdbc:mysql://127.0.0.1/?user=inventorypassword=password, jdbc:mysql://127.0.0.1/?user=rootpassword=admin, jdbc:mysql://localhost:3306/?user=inventorypassword=password, jdbc:mysql://localhost:3306/?user=rootpassword=admin, jdbc:mysql://127.0.0.1:3306/?user=inventorypassword=password, jdbc:mysql://127.0.0.1:3306/?user=rootpassword=admin, jdbc:mysql:///?user=inventorypassword=password, jdbc:mysql:///testdb?user=inventorypassword=password }; for( int i = 0; i url.length; i++ ) { String retVal = openConnection(url[i]); if( retVal == null ) {
Re: Hard limits in Tomcat?
well, downloaded, installed, started, klicked, ... deleted... you should announce that your war is SENDING DATA to the central server in LARGE letters :-) which users are you targeting? No one i know (and i'm in the webapp business for about 10 years) will ever going to use this stuff, since its opposes all security guidelines which exists in the real applications world, without considering if its useful or not. It may sound a bit harsh, but any admin who installs java-monitor webapp on companies server should be fired at once (and probably will be). regards Leon On Wed, Nov 19, 2008 at 4:27 PM, Kees Jan Koster [EMAIL PROTECTED] wrote: Dear Leon, is there a demo available on the java-monitor.com? sofar i only find a php forum :-) The forum has the monitoring tool built-in. A bit weird at forst, but it makes it really simple to post questions, as you can just post graphs from the tool right on the forum. No need to make screenshots. If you register and log in, the tool shows up. I have not put any screenshots hi-res on-line yet. I have only two hands. :-( I should do that. Here are some low-res ones: http://java-monitor.com/forum/showthread.php?t=123 - 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: Servlets / JSP can't connect to MySQL in Ubuntu Server
Ambrose Krapacs wrote: [...] I have tried using telnet to connect to port 3306 and it does appear that the server is listening because it refuses the telnet connection. Well, that would tend to indicate exactly the opposite : either MySQL is *not* listening on that port, or something is blocking your telnet from connecting to that port. Otherwise, it would accept to connect. But try what David suggested first. If that does not connect, then you do have a TCP/IP problem connecting to the MySQL port. And then maybe there is some kind of firewall or other port-blocking software active there. - 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 6 and javamail
Are you sure that the mail server, serving the host you are deploying to does not require authentication? I got this same error trying to go through the Google Mail Server without proper authentication. when I invoke the component in the webapp I get javax.mail.AuthenticationFailedException debug output shows that my components configuration parameters are IDENTICAL to those used in standalone mode. You say in Eclipse you use - (mail.smtp.auth = false) and sends the email. Try sending authentication. private class SMTPAuthenticator extends javax.mail.Authenticator { @ Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(d_email, d_password); } } Don At 06:41 AM 11/25/2008, you wrote: Start by making sure there is only one copy of the javamail jar. Remove either the one in tomcat's lib directory or your webapp's lib directory. -- David On Nov 19, 2008, at 6:04 AM, Lyallex [EMAIL PROTECTED] wrote: Hi Tomcat 6.0.16 jdk1.6.0_06 javamail 1.4.1 I have a simple component that uses javamail 1.4.1 to send e-mail It works perfectly 'standalone' (executed from Eclipse). It connects to the server (mail.smtp.auth = false) and sends the email I've read the available docs at http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html which talk about activation.jar among others As I am using jdk 1.6 I understand that this is no longer required (it is included in the distro). The javamail 1.4.1 jars are in CATALINA_HOME/lib I have also tried them in WEB-INF/classes/lib when I invoke the component in the webapp I get javax.mail.AuthenticationFailedException debug output shows that my components configuration parameters are IDENTICAL to those used in standalone mode. I am not using jndi resources or resources defined in context.xml, I am not using tomcats JavaMail session management. I just need this to work as a simple component without lots of config to start with. Can anyone let me in on the 'secret' to getting this to work. I've had similar components working in earlier releases (and they are still working) Something must have changed, I'm rather hoping it's not a securuity thing but I suspect it might be. I'm not asking anyone to debug my application I could just do with a pointer or two. Any help much appreciated Cheers lyallex - 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: Tomcat request processing gets stuck
From: Christopher Schultz [mailto:[EMAIL PROTECTED] acceptCount=200 just means that the socket will accept 200 clients /in addition/ to those currently being served by RequestProcessor threads. The only way to see those waiting clients would be to query the socket itself (maybe only available at the C-library level?). Rarely even that - these connections are held in limbo in the kernel. There are sometimes ways of examining the next request in the queue (to see whether you want to accept it or reject it), but I'm not aware of a general way of examining *all* requests in an accept queue. I'd love to hear about any that exist, as in the past I've needed to monitor these! - 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: Hard limits in Tomcat?
Better yet do you want to know how the application uses Tomcat resources? To do what Leon mentions requires a profilier that is approved for production use or have the developers write timers in the code for critical measurements say around time it takes for a request versus jdbc calls some may have to be an aggragate of many calls if that is what is happening like say 1000 calls to get data for one servlet method request. If you can have measurements around the edge of your app and servlet container measuements you should bet set for isolating performance issues for some time. Regards, -Tony --- On Wed, 11/19/08, Leon Rosenberg [EMAIL PROTECTED] wrote: From: Leon Rosenberg [EMAIL PROTECTED] Subject: Re: Hard limits in Tomcat? To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, November 19, 2008, 7:23 AM I think the question you wanna ask yourself first is, do you want to monitor tomcat or do you want to monitor your application? regards Leon On Wed, Nov 19, 2008 at 3:18 PM, Kees Jan Koster [EMAIL PROTECTED] wrote: Dear Chris, I am setting up a monitoring system for Tomcat servers and I am looking for hard limits in Tomcat servers in general. I found a few so far: file descriptors, memory pools (ok, these are jdk limits) and thread pools. Are there any other hard limits that I can run into? I would call these soft limits, as they can be changed. Ah, sorry for the confusion. I should have asked for limits that are hard at run-time. Thread pool sizes may be editable, but they are fixed once Tomcat runs. What limits are relevant? For instance, Java doesn't allow you to have any method with more than 64k of code. I suppose that's of little consequence to a running JVM, since the code would never be loaded. Yes, I ran into that limit for a generated servlet once. This is not the kind of limit that I am looking for, as it is caught compile-time, not run-time. If you are going to count memory (heap?) and file descriptors, I suppose you could also count CPU time, since that is a limitable resource on *NIX systems. Hmm. It's really only useful if I can monitor both the maximum available time and the used time. I have no idea how I would measure that, even at unix level. It gets even more messy in virtual servers. If you really are talking about soft limits, then you probably also want to see the number of requests accepted but not yet being handled (controlled by the Connector's acceptCount attribute), the number of request processors (is this thread pools above?), the number of connections total/available/used in JDBC connection pools. Ah, that is interesting too: queue fill levels that should under normal circumstances be more or less empty. Much like the ObjectPendingFinalizationCount. Thanks for that. How would I use it, though? In my Tomcat acceptCount has a value of 100. That's probaly an upper limit. What is the 'un-use' property that goes with this upper limit? What MBean can I talk to about JDBC connection pooling? -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CometProcessor questions
Hi Filip, Ok, my (partly) mistake. I've missread this comment: ///GET method or application/x-www-form-urlencoded/ in BayeuxServlet.checkBayeux... Anyway, I can't change everything now and I need to read the request input stream (I'm getting AMF3 binary data), not to get a request parameter as in: String message = cometEvent.getHttpServletRequest().getParameter(Bayeux.MESSAGE_PARAMETER); When you speak about patches in the trunk, does it apply to comet support in general or the Bayeux impl, and what issue is it intented to fix? Will it be available in 6.0.19 and (approximatively) when? Thanks for your reply, Franck. it only does POST, no GET messages, there is a patch pending (and one already applied) for 6.0 when it comes to comet, so testing with trunk would be best Filpi Franck Wolff wrote: Hi again, I just checked the Bayeux in Tomcat and it cannot work for me: it seems to only support GET request (am I wrong?)... Regards, Franck. Hi, Thanks for your reply! I didn't know about this Bayeux impl in Tomcat, so I developed my own implementation (that is not strictly conforming to the spec, just very close). I'm going to check this module and see if I can get some hints. What about the CLIENT_DISCONNECT event sub type? Any hints? Regards, Franck. hi Franck, are you using this Bayeux impl? http://svn.apache.org/viewvc/tomcat/trunk/modules/bayeux/ or do you have your own? Filip Franck Wolff wrote: Hi, I'm developing Tomcat/Comet support for Granite Data Service http://www.graniteds.org (Flex clients) and I've got few questions about CometEvents processing. Basically, my implementation is based on the Bayeux protocol (long-polling only) and two connections (command/tunnel) are opened for each clients (producer/consumer). I use a thread pool in order to dispatch received messages to each consumer subscribed to the relevant topic. Here are my questions: 1. What should happen exactly if Tomcat send a timeout event when the current event (ie: a previous BEGIN event whose request input stream was fully read when it was received) is used for writing a response? Is this previous BEGIN still valid and may be used to write the response? If not, should it be close right away and may I use the timeout event instead or should I wait for a next BEGIN event? Is it the same event instance whose type/subtype has changed? 2. Tomcat send me sometime (rather rare but it happens) invalid END events (getHttpServletRequest() issues a NullPointerException). I'm just trying by now to close them and it don't affect my application behavior but I'm wondering why those invalid event aren't thrown away by Tomcat from the beginning and what should be done exactly with them? 3. I'm never receiving any ERROR event except for TIMEOUTs. I would be of course very interested in CLIENT_DISCONNECT events but I couldn't find any case where Tomcat would send me this handful event... I was expecting this event to be raised when the client app is closed or the net connection broken but Tomcat just stops sending me TIMEOUT events. It may be useful to say that I'm using APR and not NIO... 3. Would it be possible to use the Tomcat pool thread for sending the responses instead of creating and managing my own thread pool (I'm using standard Runnable objects submitted to my own pool but I could submit them to any other thread pool as well)? 4. Under stress tests (12 clients sending 10 messages/sec. while listening for the same topic, ie: they may get 12*10 messages/sec., but some of them (~5-10) are generally packaged in the same response), asynchronous read doesn't work anymore: a full read of the input stream must be done on the BEGIN event, otherwise, it seems that most incomming requests are lost... I didn't try to figure out what's going on but, as a matter of fact, asynchronous read seems to be broken on heavy load (just informative, I can use full read on the begin event). Regards, thanks in advance for any reply, Franck. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets / JSP can't connect to MySQL in Ubuntu Server
On Nov 19, 2008, at 11:13 , David Smith wrote: If you have command line access on the system, can you test your MySQL connectivity by connecting this way?: mysql -u inventory -h localhost -p The -h option forces mysql command to connect via TCP/IP instead of unix sockets. --David Yes I can log into mysql using the command terminal fro the system and specifying the -h parameter. Again, my test using the standard j2se application to connect to MySQL using the JDBC connector proves that the problem does not have to do with MySQL. - 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: Supporting Large Number of Web Application Instances
I am looking at having to support tens or even hundres of instances of our web application in an ASP Model. We use Tomcat as our application server and it seems to me that three possibilities as a base model for each physical server 1. Have a single Tomcat instance per server with multiple virtual hosts 2. Have multiple Tomcat instances on a single OS instance and host one web app per Tomcat instance 3. User virtual servers to host one Tomcat Instance per Virtual OS and host one web app per Tomcat instance. As you go down the stack it seems you use more resources per app instance but get more isolation. This is really like an SMP at the application level but each application instance will connect to a distinct database (this is a domain where crossing the beams would be bad). Do people really do option #1 in a production environment? I can figure out how to set up realms for initialization parameters but it is still a single class namespace within the Tomcat container, right? It seems that special care must be taken with singleton objects (such as the Hibernate Session Factory) so make sure that they are managed in the context of their Virtual Host/App Instance. Are there established practices for doing #1? Thanks, John
Re: Hard limits in Tomcat?
Dear Leon, well, downloaded, installed, started, klicked, ... deleted... you should announce that your war is SENDING DATA to the central server in LARGE letters :-) which users are you targeting? No one i know (and i'm in the webapp business for about 10 years) will ever going to use this stuff, since its opposes all security guidelines which exists in the real applications world, without considering if its useful or not. It may sound a bit harsh, but any admin who installs java-monitor webapp on companies server should be fired at once (and probably will be). Oh, don't be so dramatic. There is a whole world out there of smaller companies that have one or two Tomcat servers in production, running on the cheapest shared server environment they could find. This product targets companies that have two or three developers, one of whom has been pressed into doing the admin role on the side. I apologize if the operational model of Java-monitor startled you. That was not my intention. It works this way because that takes the care and feeding of the monitoring platform away from the user. Some people like that while others, such as yourself, prefer not to work like this. Even in large companies, Java-monitor has its place. I spoke to one of my users this week and he tells me that he uses Java-monitor on the test machine because the process of getting JBoss performance statistics out of their hosting company takes days. I like it because I can check the status of my servers from my iPhone. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Rule 1 for being in a hole: stop digging. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.Exception: Socket bind failed: [730048]
Hi Everybody, I have been using Apache Tomcat 5.5.23 with Java 1.5.0_12. OS is Windown Server 2003. Tomcat connects to an Informix database and I have been using this application at my company without any major issues so far for more than 2 years. Lately we noticed some suspicious activities reported by Symantec and there seems to be some phony user ids being created under Local Users and Groups. Soon after that, the response from the Tomcat application seems to be pretty slow. I use jsp and jdbc to connect to the Informix database and there is nothing too complex about that. I have attached a log file of the errors I am getting while trying to start Tomcat. It would be great as we are apprehensive that it is a security breach as the application starts fine every time. My development servers that have same configuration and connecting to the same Informix Database are running fine. Please help at the earliest as the application is critical to the company. Do let me know of other information you may need. Here is the log file error: Nov 19, 2008 12:55:22 PM org.apache.coyote.http11.Http11AprProtocol init SEVERE: Error initializing endpoint java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted. at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116) at org.apache.catalina.connector.Connector.initialize(Connector.java:1017) at org.apache.catalina.core.StandardService.initialize(StandardService.java:578) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782) at org.apache.catalina.startup.Catalina.load(Catalina.java:504) at org.apache.catalina.startup.Catalina.load(Catalina.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Nov 19, 2008 12:55:22 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed: java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted. at org.apache.catalina.connector.Connector.initialize(Connector.java:1019) at org.apache.catalina.core.StandardService.initialize(StandardService.java:578) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782) at org.apache.catalina.startup.Catalina.load(Catalina.java:504) at org.apache.catalina.startup.Catalina.load(Catalina.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Nov 19, 2008 12:55:22 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1906 ms Nov 19, 2008 12:55:22 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Nov 19, 2008 12:55:22 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.23 Nov 19, 2008 12:55:22 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Nov 19, 2008 12:55:26 PM org.apache.coyote.http11.Http11AprProtocol start SEVERE: Error starting endpoint java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted. at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:686) at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:146) at org.apache.catalina.connector.Connector.start(Connector.java:1090) at org.apache.catalina.core.StandardService.start(StandardService.java:457) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
Re: Servlets / JSP can't connect to MySQL in Ubuntu Server
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ambrose, Ambrose Krapacs wrote: catch( Exception e ) { retVal = e.toString(); } And this gives you CommunicationLinkFailure for every URL you are trying? A few things about the URLs: 1. Don't bother testing 127.0.0.1 /and/ localhost. If your machine hasn't been misconfigured, localhost should point to 127.0.0.1. 2. You must specify the name of a database, so URLs like jdbc:mysql://localhost?foo=bar are malformed. 3. Consider picking a single username/password and sticking with it. If you can't open a connection, the use of multiple sets of credentials is just complicating your script and gathering excess (useless) data. 4. The default port is 3306, so you don't need to specify it in your URLs. Are you running Tomcat under a security manager? That would certainly prevent you from communicating. Can you use 'ps' to show us the command line that is being used to start Tomcat? That would help. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkbtMACgkQ9CaO5/Lv0PAYHgCePuPp3zaFS5DzTWPZkWztE0f5 sx8An3YE1nwEsX3Sadmq4qBwsSPFS2Q1 =EI1G -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: java.lang.Exception: Socket bind failed: [730048]
From: Toby Kurien [mailto:[EMAIL PROTECTED] Subject: java.lang.Exception: Socket bind failed: [730048] I have attached a log file of the errors I am getting while trying to start Tomcat. Nov 19, 2008 12:55:22 PM org.apache.coyote.http11.Http11AprProtocol init SEVERE: Error initializing endpoint java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted. at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116) The error indicates something else is already using port 80, thereby preventing Tomcat from accessing it. Since you also have an AJP connector, you may be running Tomcat behind IIS or some other web server that handles port 80 and forwards requests to AJP on 8009. If you don't expect anything else to be using port 80, then something has crept in that's usurping Tomcat. (Or you may just be trying to run the same Tomcat twice.) - 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: Supporting Large Number of Web Application Instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, John Shilling wrote: Do people really do option #1 in a production environment? Sure. I can figure out how to set up realms for initialization parameters but it is still a single class namespace within the Tomcat container, right? Not really. One of the container's jobs is to isolate webapps from each other so they don't interfere. It seems that special care must be taken with singleton objects (such as the Hibernate Session Factory) so make sure that they are managed in the context of their Virtual Host/App Instance. Yes. Each webapp gets its own ClassLoader which loads classes from that webapp's WEB-INF/lib/*.jar files. Assuming that your webapps are self-contained, even singletons should operate correctly alongside each other in different webapps. I'm not expert at Tomcat internal workings, but I expect that the level of isolation between two webapps in the same Virtual Host is the same as the level of isolation between two webapps in different Virtual Hosts. Are there established practices for doing #1? Do not put any libraries in the server's shared class loaders unless it's okay that they actually be shared. For instance, don't shove Hibernate's JAR in there so you can save a little memory by sharing the classes. If you do that, you've crossed the streams so to speak. The main thing I would be worried about is the apps stealing time from each other. There's not a whole lot you can do about that except get more hardware. There's also the possibility of upgrades and such. do you want to be able to run some clients/customers on different versions of your application that require different JVMs, for instance? It should be obvious that a Tomcat instance must run on only one JVM at a time ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkcdkACgkQ9CaO5/Lv0PA89QCgjkZxgWiQTi/9tAN0WiiDpKoF pCgAn06jbdr4DDysNXNfLoK8uRP9DqLm =fOpP -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]
cluster configuration
I'm having an issue with clustering in tomcat and tribes. I get this output, I'm not sure why Tribes can't bind to the multicast address? It then binds to localhost which doesn't allow machines to see each other. Any help is appreciated. 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.transport.ReceiverBase bind INFO: Receiver Server Socket bound to:/10.6.2.89:4000 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Attempting to bind the multicast socket to /239.176.50.121:45566 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Binding to multicast address, failed. Binding to port only. 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting multihome multicast interface to:localhost/127.0.0.1 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting cluster mcast soTimeout to 500 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:4 19-Nov-2008 3:30:24 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:4 19-Nov-2008 3:30:24 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:8 19-Nov-2008 3:30:25 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:8 Initializing 3rdParty Loggers - 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: Hard limits in Tomcat?
Hello Kees Jan, On Wed, Nov 19, 2008 at 8:25 PM, Kees Jan Koster [EMAIL PROTECTED] wrote: Dear Leon, Oh, don't be so dramatic. There is a whole world out there of smaller companies that have one or two Tomcat servers in production, running on the cheapest shared server environment they could find. This product targets companies that have two or three developers, one of whom has been pressed into doing the admin role on the side. yes, but why should they give their very sensitive data into the hand of someone? You understand that tomcat operation profile provides perfect opportunity for a potential attacker or competitor? Especially when there are tools which does the same without giving the data away. I apologize if the operational model of Java-monitor startled you. That was not my intention. It works this way because that takes the care and feeding of the monitoring platform away from the user. Some people like that while others, such as yourself, prefer not to work like this. Why dont you just supply another web/app which collects the data locally in the customers environment? Even in large companies, Java-monitor has its place. I spoke to one of my users this week and he tells me that he uses Java-monitor on the test machine because the process of getting JBoss performance statistics out of their hosting company takes days. I like it because I can check the status of my servers from my iPhone. Again, there are tools which perform the same or more without giving the data to potential competitor or hacker. Check lambdaprobe (tomcat level) or moskito (application level). Regards Leon - 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: cluster configuration
Instead of puting 127.0.0.1 in your conf file (server.xml) put the real ip adress of your server. Restart the server and look at catalina.out. Regards. 2008/11/19 Mike Wannamaker [EMAIL PROTECTED] I'm having an issue with clustering in tomcat and tribes. I get this output, I'm not sure why Tribes can't bind to the multicast address? It then binds to localhost which doesn't allow machines to see each other. Any help is appreciated. 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.transport.ReceiverBase bind INFO: Receiver Server Socket bound to:/10.6.2.89:4000 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Attempting to bind the multicast socket to /239.176.50.121:45566 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Binding to multicast address, failed. Binding to port only. 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting multihome multicast interface to:localhost/127.0.0.1 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting cluster mcast soTimeout to 500 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:4 19-Nov-2008 3:30:24 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:4 19-Nov-2008 3:30:24 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:8 19-Nov-2008 3:30:25 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:8 Initializing 3rdParty Loggers - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Gustavo Campos Araujo
Re: Supporting Large Number of Web Application Instances
John Shilling wrote: I am looking at having to support tens or even hundres of instances of our web application in an ASP Model. We basically do this now using a single Tomcat instance with multiple webapps (https://host.com/App1/, https//host.com/App2/ etc) and don't use virtual servers because we use SSL, and to make that work, you'd need multiple IP addresses, multiple keystores and multiple SSL certs. In our model, that's not a requirement. We're only doing about 50 webapps per Tomcat now, so whether it could do hundreds, is hard to say. Also, obviously, it depends on the networking, memory, processor and disk capabilities to support all of those. I mean, if one webapp is doing millions of transactions per day, you may find few servers that could handle lots of those together, and if one is transferring lots of data in and out, it could hog up bandwidth, etc. And of course one webapps usage will impact the performance of others, so you'll probably need to balance webapps as you scale up. Each of our webapps can run different versions of our base software, but as mentioned before, they all must run on the same version of Tomcat and Java -- and in and our case, the same version of the backend PostgreSQL database which hosts a database per webapp. It's worked well for us so far. David - 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: CometProcessor questions
hi Franck, Franck Wolff wrote: Hi Filip, Ok, my (partly) mistake. I've missread this comment: ///GET method or application/x-www-form-urlencoded/ in BayeuxServlet.checkBayeux... Anyway, I can't change everything now and I need to read the request input stream (I'm getting AMF3 binary data), not to get a request parameter as in: if you need to stream up data, no need to do that using Bayeux, just use a regular servlet for that. String message = cometEvent.getHttpServletRequest().getParameter(Bayeux.MESSAGE_PARAMETER); When you speak about patches in the trunk, does it apply to comet support in general or the Bayeux impl, and what issue is it intented to fix? Will it be available in 6.0.19 and (approximatively) when? both, some fixes are for the Comet behavior and Bayeux will exist as an independent module. There are a few fixes already applied in the 6.0.x branch, and a couple of more are pending, waiting for review Filip Thanks for your reply, Franck. it only does POST, no GET messages, there is a patch pending (and one already applied) for 6.0 when it comes to comet, so testing with trunk would be best Filpi Franck Wolff wrote: Hi again, I just checked the Bayeux in Tomcat and it cannot work for me: it seems to only support GET request (am I wrong?)... Regards, Franck. Hi, Thanks for your reply! I didn't know about this Bayeux impl in Tomcat, so I developed my own implementation (that is not strictly conforming to the spec, just very close). I'm going to check this module and see if I can get some hints. What about the CLIENT_DISCONNECT event sub type? Any hints? Regards, Franck. hi Franck, are you using this Bayeux impl? http://svn.apache.org/viewvc/tomcat/trunk/modules/bayeux/ or do you have your own? Filip Franck Wolff wrote: Hi, I'm developing Tomcat/Comet support for Granite Data Service http://www.graniteds.org (Flex clients) and I've got few questions about CometEvents processing. Basically, my implementation is based on the Bayeux protocol (long-polling only) and two connections (command/tunnel) are opened for each clients (producer/consumer). I use a thread pool in order to dispatch received messages to each consumer subscribed to the relevant topic. Here are my questions: 1. What should happen exactly if Tomcat send a timeout event when the current event (ie: a previous BEGIN event whose request input stream was fully read when it was received) is used for writing a response? Is this previous BEGIN still valid and may be used to write the response? If not, should it be close right away and may I use the timeout event instead or should I wait for a next BEGIN event? Is it the same event instance whose type/subtype has changed? 2. Tomcat send me sometime (rather rare but it happens) invalid END events (getHttpServletRequest() issues a NullPointerException). I'm just trying by now to close them and it don't affect my application behavior but I'm wondering why those invalid event aren't thrown away by Tomcat from the beginning and what should be done exactly with them? 3. I'm never receiving any ERROR event except for TIMEOUTs. I would be of course very interested in CLIENT_DISCONNECT events but I couldn't find any case where Tomcat would send me this handful event... I was expecting this event to be raised when the client app is closed or the net connection broken but Tomcat just stops sending me TIMEOUT events. It may be useful to say that I'm using APR and not NIO... 3. Would it be possible to use the Tomcat pool thread for sending the responses instead of creating and managing my own thread pool (I'm using standard Runnable objects submitted to my own pool but I could submit them to any other thread pool as well)? 4. Under stress tests (12 clients sending 10 messages/sec. while listening for the same topic, ie: they may get 12*10 messages/sec., but some of them (~5-10) are generally packaged in the same response), asynchronous read doesn't work anymore: a full read of the input stream must be done on the BEGIN event, otherwise, it seems that most incomming requests are lost... I didn't try to figure out what's going on but, as a matter of fact, asynchronous read seems to be broken on heavy load (just informative, I can use full read on the begin event). Regards, thanks in advance for any reply, Franck. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL
Re: cluster configuration
just to make sure 1. you are using 6.0.18 and 2. the IP you are trying to bind to is valid and 3. could you be using linux? this is the code that is telling you about the failure 186 : fhanik 586228 if (mcastBindAddress != null) { 187 : try { 188 : log.info(Attempting to bind the multicast socket to +address+:+port); 189 : socket = new MulticastSocket(new InetSocketAddress(address,port)); 190 : } catch (BindException e) { 191 : /* 192 : * On some plattforms (e.g. Linux) it is not possible to bind 193 : * to the multicast address. In this case only bind to the 194 : * port. 195 : */ 196 : log.info(Binding to multicast address, failed. Binding to port only.); 197 : socket = new MulticastSocket(port); 198 : } Mike Wannamaker wrote: I'm having an issue with clustering in tomcat and tribes. I get this output, I'm not sure why Tribes can't bind to the multicast address? It then binds to localhost which doesn't allow machines to see each other. Any help is appreciated. 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.transport.ReceiverBase bind INFO: Receiver Server Socket bound to:/10.6.2.89:4000 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Attempting to bind the multicast socket to /239.176.50.121:45566 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Binding to multicast address, failed. Binding to port only. 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting multihome multicast interface to:localhost/127.0.0.1 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting cluster mcast soTimeout to 500 19-Nov-2008 3:30:23 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:4 19-Nov-2008 3:30:24 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:4 19-Nov-2008 3:30:24 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:8 19-Nov-2008 3:30:25 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:8 Initializing 3rdParty Loggers - 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: Using Tomcat with ISAPI Redirector
Hi, I finally found an answer to my problem, thanks to a few posts on the interenet. Here they mention the fact that NETWORK SERVICE needs WRITE access to the directory defined by the log_file key under HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0 in the registry: http://forums.iis.net/p/1150483/1874510.aspx With that, I was finally able to see the behavior of redirecting to /jakarta/isapi_redirect.dll. Thanks to an old mail post by Larry Isaacs back in 2002. My problem was that I had the isapi_redirect.dll defined in both the Default Website AND the Web Sites folder in IIS. As Larry explains here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg55430.html So the moral is: When you see something like ' Default redirection of /jakarta/isapi_redirect.dll ' or ' [/jakarta/isapi_redirect.dll] is not a servlet url ' in the redirect log as if it is searching tomcat for that resource, then you have at least 2 redirect filters defined in IIS. Patrick -Original Message- From: Patrick Markiewicz [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2008 2:28 PM To: Tomcat Users List Subject: Using Tomcat with ISAPI Redirector Hi, I'm using Apache Tomcat/5.5.4 with Plesk 8.2 on a Windows Server 2003 machine. The isapi redirector program is supposed to allow me to connect to my server, and redirect my request to Tomcat, if the url matches a certain pattern. I have multiple sites configured in IIS, including: PleskControlPanel and Default Web Site. Default Web Site was previously configured with a jakarta virtual directory that allows the isapi redirector to work properly. When I try to access http://www.example.com/examples, I find the tomcat error: HTTP Status 404 - /examples/ I configured PleskControlPanel (port 8880, ssl port 8443) to use a second jakarta virtual directory. However, when I try to access http://www.example.com:8880/examples, I find the tomcat error: HTTP Status 404 - /jakarta/isapi_redirect.dll Does anyone know why IIS would be passing the URI: /jakarta/isapi_redirect.dll to Tomcat at that point? Is there a way to configure IIS so that /jakarta/isapi_redirect.dll is resolved properly (as the filter, not the URI) and so that the next URI delivered to Tomcat is /examples/ ? Patrick - 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 to tell Tomcat not to log certain requests?
Hi All, There are certain requests that I don't want written to the AccessLog. In Apache (httpd.conf) I can achieve this by: SetEnvif Remote_Addr [regex] dontlog CustomLog logs/access_log combined env=!dontlog How do I achieve the same in Tomcat? Thanks! Jason -- View this message in context: http://www.nabble.com/How-to-tell-Tomcat-not-to-log-certain-requests--tp20591961p20591961.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]
Re: [Http]ServletResponseWrapper.getOutputStream()
Hi Christopher, thanks for a long and detailed response. Christopher Schultz schrieb am 18.11.2008 um 16:26:23 (-0500): Michael Ludwig wrote: I thought it helpful to have a trace of the methods getting called One way to do it is to use a proxy object. If you haven't used proxies before, basically Java allows you to create a magic object at runtime That's an interesting technique. I've written a small standalone test program to understand it, and it works nicely. I'm going to give this a try in the Tomcat context and report back. So, when this code is called from an include call to the request dispatcher, it doesn't appear in your filter's captured output? Or, it doesn't appear in the final response sent to the browser (or both)? Both. PrintWriter out = res.getWriter(); // include doesn't appear in output // ServletOutputStream out = res.getOutputStream(); // works [...] out.close(); You might want to flush() before close() but that shouldn't matter too much. Closing the stream would flush it, wouldn't it? String s = !-- Huhu -- + wrapper.toString(); ( (HttpServletResponse) res).setHeader( Zeichen, Integer.toString( s.length())); Note that this may not be correct: other filters could be adding content, and Content-Length is in bytes, not characters. If you are using anything other than ASCII, then this will not be correct. Very true. [filter code] Note that there's nothing specific to HTTP at this point (except for the headers), so you might want to consider making this a bit more generic -- so you can capture the output of /any/ response, not just HTTP responses. I'll try and take this into consideration. You could even add a method to your wrapper that will tell you which style of output is being used on the response: output stream versus writer. Then, you could avoid the try/catch which will make your code run a bit faster. Faster filters are always better than slow ones ;) Try/catch can't be that much of a problem, can it? Isn't it just a fancy way of conditional branching with information attached? As a language feature, I assume it doesn't entail a performance hit? public class HttpResponseCatcher extends HttpServletResponseWrapper { [...] public ServletOutputStream getOutputStream() throws IOException { [...] this.getResponse().getOutputStream(); return new CapturedServletOutputStream( this.buffer); } You might not want to call this.getResponse().getOutputStream(). There's no need to do it, actually. If everything worked, all output would be written to my unified buffer. But it doesn't. I'm calling this method so the real object registers the call and on subsequent calls to getWriter() an exception is triggered, which is then caught to invoke getOutputStream(). Or vice versa. So this is basically for debugging purposes. public PrintWriter getWriter() throws IOException { [...] return new PrintWriter( new OutputStreamWriter( new CapturedServletOutputStream( this.buffer))); } You might actually want to use a single CapturedServletOutputStream or OutputStreamWriter for all calls, rather than constructing a new one each time. Otherwise, you might get strange behavior and weird output ordering. Sounds reasonable. // http://marc.info/?l=tomcat-userm=109913615025298 public void flushBuffer() throws IOException { this.buffer.flush(); } Flushing a ByteArrayOutputStream doesn't do anything. What you really want to do is flush all the OutputStream and Writer objects you've created when calls to getOutputStream and getWriter come in. Okay. public String toString() { return this.buffer.toString(); } Although this will work, it might be surprising to users of your class. I would like a method such as getCapturedOutput instead. True, that's much better. public class CapturedServletOutputStream extends ServletOutputStream { ByteArrayOutputStream buffer; // Puffern, was geschrieben wird. I would base this on an OutputStream, not a ByteArrayOutputStream specifically. This will make your class more generic and more useful. Better style, at least. public void write( byte[] b) throws IOException { new Throwable().printStackTrace(); this.buffer.write( b); } Do you get stack traces printing from this method? No. public void write( byte[] b, int off, int len) throws IOException { new Throwable().printStackTrace(); this.buffer.write( b, off, len); } How about this one? Yes. If your intent is to capture a copy of the outgoing response, perhaps some of this work has already been done for you. Check out Jakarta commons-io's TeeOutputStream, which allows you to split an OutputStream into two OutputStreams. I think this would save you some code writing for yourself. Then again, having to subclass ServletOutputStream would basically mean duplicating TeeOutputStream in the first place. Hmm. Just a
RE: [Http]ServletResponseWrapper.getOutputStream()
From: Michael Ludwig [mailto:[EMAIL PROTECTED] Subject: Re: [Http]ServletResponseWrapper.getOutputStream() Try/catch can't be that much of a problem, can it? Isn't it just a fancy way of conditional branching with information attached? Sorry, but no. The throwing of an exception causes the current block to terminate abruptly and transfer control to JVM-generated code that searches a catch block table for the address of the failure, and then does further searches looking for a matching exception type. If no match is found, the current stack frame is popped off, and the process repeats with the calling method's catch block table. Although modern JITs are better at doing this than pre-HotSpot ones, it's still a lot more expensive than a simple test. - 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: Servlets / JSP can't connect to MySQL in Ubuntu Server
On Nov 19, 2008, at 14:53 , Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ambrose, Ambrose Krapacs wrote: catch( Exception e ) { retVal = e.toString(); } And this gives you CommunicationLinkFailure for every URL you are trying? A few things about the URLs: 1. Don't bother testing 127.0.0.1 /and/ localhost. If your machine hasn't been misconfigured, localhost should point to 127.0.0.1. 2. You must specify the name of a database, so URLs like jdbc:mysql://localhost?foo=bar are malformed. 3. Consider picking a single username/password and sticking with it. If you can't open a connection, the use of multiple sets of credentials is just complicating your script and gathering excess (useless) data. 4. The default port is 3306, so you don't need to specify it in your URLs. Are you running Tomcat under a security manager? That would certainly prevent you from communicating. Can you use 'ps' to show us the command line that is being used to start Tomcat? That would help. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkbtMACgkQ9CaO5/Lv0PAYHgCePuPp3zaFS5DzTWPZkWztE0f5 sx8An3YE1nwEsX3Sadmq4qBwsSPFS2Q1 =EI1G -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] Well I thought that I had tried turning off the security manager but I couldn't remember how I did it. I tried again by modifying /etc/init.d/ tomcat and set TOMCAT_SECURITY to no. I executed the JSP again and EVERY TEST SUCCESSFULLY CONNECTED! Wow, finally! So now I guess I need to determine the proper way to do this because I'm guessing that disabling the security mangager is not smart. I really do not know anything about the tomcat security manager so I'm not sure how to properly allow this in security manager without disabling it completely. Thanks Christopher! - 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 6 getRemoteUser() returns null
HI , The auth method is form based. Regards, Thangavel Sankaranarayanan [EMAIL PROTECTED] l.com To 17/11/08 04:45 PM users@tomcat.apache.org cc Please respond to Subject Tomcat Users Re: Tomcat 6 getRemoteUser() List returns null [EMAIL PROTECTED] che.org What is auth type? e.g. Form / Basic??? -Original Message- From: Thangavel Sankaranarayanan [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Mon, 17 Nov 2008 2:24 pm Subject: Tomcat 6 getRemoteUser() returns null Hi, We have to retrieve the userid of the remote user when the user logs on. But request.getRemoteUser() or the requet.getPrinciple.getName() is returning null in Tomcat 6. Authentication is done. through LDAP. Any suggestion? Thanks, Thangavel.S - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - 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: Tomcat 6 getRemoteUser() returns null
Hi , The Auth method is form based . Regards, Thangavel Sankaranarayanan [EMAIL PROTECTED] l.com To 17/11/08 04:45 PM users@tomcat.apache.org cc Please respond to Subject Tomcat Users Re: Tomcat 6 getRemoteUser() List returns null [EMAIL PROTECTED] che.org What is auth type? e.g. Form / Basic??? -Original Message- From: Thangavel Sankaranarayanan [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Mon, 17 Nov 2008 2:24 pm Subject: Tomcat 6 getRemoteUser() returns null Hi, We have to retrieve the userid of the remote user when the user logs on. But request.getRemoteUser() or the requet.getPrinciple.getName() is returning null in Tomcat 6. Authentication is done. through LDAP. Any suggestion? Thanks, Thangavel.S - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - 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 to add multiple SSL Certificates to Tomcat Server
All- I am facing one problem, i.e. I have to configure two SSL certificates to JBoss server, I know they are internally using Tomcat for web container. Is it possible to add multiple Certificates to one server instance itself? If so, then how? Please help on this... any help is appreciated. Thanks in advance... Thanks Regards, - Suneel Saguturu.