How to log thread-pool of tomcat-5.5.25
Hi, after some hours we detect that tomcat uses lot of threads. How can I get logging information about threads being created/destroyed etc. Zsolt - 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: JSESSIONID doesn't contain the port
Thank you everybody making comments to my original post. Our customer has two tomcats because one instance is the production version of our application and the second one is a test instance of the new version of the same application. Because of that the context-pathes are the same. I understand, that context-path can be changed but means more hacking for the customer. The other problem is that the customer stored in our wiki pages URL-s with context path (but without port). It could be discussed whether or not this is lucky but this is the case. Zsolt -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 10:08 PM To: Tomcat Users List Subject: Re: JSESSIONID doesn't contain the port -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zsolt, Zsolt Koppany wrote: | How can we make tomcat-5.5.25 to store also port into JSESSIONID? You can't really do that, unless you want to hack-up TC's source. What you could do is deploy your applications under different context names, instead of deploying them both as ROOT. In that case, the JSESSIONID cookie will have a unique path associated with it, and they won't clobber each other. Another option would be to turn off cookies on the server, and use only URL-encoded session ids. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhavLsACgkQ9CaO5/Lv0PBvBgCcDpc3S6mQSZUlH39692/cRM5C yXkAoKlTmd0vkg1kRpMF0ivzEvE8KzR7 =Ymjf -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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSESSIONID doesn't contain the port
Hi, we have two web applications running on the same host (with the same tomcat) but on DIFFERENT ports. Buf, if one tomcat application refers on URL of the second application the browser (FF-2.0.0.14 IE-6) get a NEW a new JSESSIONID thus the browser looses its session-id to the first application. How can we make tomcat-5.5.25 to store also port into JSESSIONID? Zsolt - 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: JSESSIONID doesn't contain the port
No, they (must) use the same IP address. Zsolt -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 2:45 PM To: Tomcat Users List Subject: Re: JSESSIONID doesn't contain the port Zsolt Koppany wrote: Hi, we have two web applications running on the same host (with the same tomcat) but on DIFFERENT ports. Buf, if one tomcat application refers on URL of the second application the browser (FF-2.0.0.14 IE-6) get a NEW a new JSESSIONID thus the browser looses its session-id to the first application. How can we make tomcat-5.5.25 to store also port into JSESSIONID? are the apps on different IPs too? if not, what's the reason behind running two Tomcat instances? are you clustering them? p - 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]
How to store mod_jk warnings into a file?
Hi, I start tomcat with nohup and get lot of mod_jk warnings in nohup.out. What do I have to do to redirect mod_jk related warnings into a separate file? I use tomcat-5.5.25. Zsolt WARNING: Error sending end packet java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127) at org.apache.jk.core.MsgContext.action(MsgContext.java:302) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.finish(Response.java:305) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java :895) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:689) at java.lang.Thread.run(Thread.java:595) Feb 12, 2008 6:25:33 PM org.apache.jk.common.ChannelSocket processConnection - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to store mod_jk warnings into a file?
Aleksandar, I also have: JkLogFile /var/log/mod_jk.log But these are other messages. Zsolt -Original Message- From: Aleksandar Matijaca [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 12, 2008 7:38 PM To: Tomcat Users List Subject: Re: How to store mod_jk warnings into a file? I don't know if this is what you are looking for, but for my Apache (which uses mod_jk) in the config file I have this line: JkLogFile /var/log/jklog.log a.m. On Feb 12, 2008 1:09 PM, Zsolt Koppany [EMAIL PROTECTED] wrote: Hi, I start tomcat with nohup and get lot of mod_jk warnings in nohup.out. What do I have to do to redirect mod_jk related warnings into a separate file? I use tomcat-5.5.25. Zsolt WARNING: Error sending end packet java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java :127) at org.apache.jk.core.MsgContext.action(MsgContext.java:302) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.finish(Response.java:305) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java :205) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java :703) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt( ChannelSocket.java :895) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:689) at java.lang.Thread.run(Thread.java:595) Feb 12, 2008 6:25:33 PM org.apache.jk.common.ChannelSocketprocessConnection - 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 get the context path during servlet load?
Hi, I want to make the application contextPath independent. Normally this is not a problem because I can use request.getContextPath() however I need to know the contextPath during startup: servlet servlet-namestartup/servlet-name servlet-class.../servlet-class load-on-startup1/load-on-startup /servlet /servlet How can I do that? Zsolt - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems wits Tomcat security manager when connecting to Firebird using Jaybird
Hello! I am using Tomcat 4.1 on Debian. With SecurityManager turned off, my app works perfectly. However, if I turn it on, I get some errors. I already corrected some of them by adding permissions, but this one is unclear to me: java.lang.ExceptionInInitializerError at org.firebirdsql.jdbc.FBDriverPropertyManager.clinit(FBDriverPropertyManager.java:124) at org.firebirdsql.jdbc.FBConnectionProperties.getCanonicalName(FBConnectionProperties.java:60) at org.firebirdsql.jdbc.FBConnectionProperties.setStringProperty(FBConnectionProperties.java:93) at org.firebirdsql.jdbc.FBConnectionProperties.setUserName(FBConnectionProperties.java:286) at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.setUserName(AbstractFBConnectionPoolDataSource.java:711) at org.firebirdsql.pool.FBWrappingDataSource.setUserName(FBWrappingDataSource.java:639) at mcsl.domka.HouseEditor.start(HouseEditor.java:55) at org.webmacro.servlet.WMServlet.init(WMServlet.java:144) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.webmacro.servlet.WMServlet.init(WMServlet.java:93) Any ideas what to add to security config? Best regards, Zsolt Balanyi - 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 randomly hangs
Did you try: export LD_ASSUME_KERNEL=2.2.5 or export LD_ASSUME_KERNEL=2.4.1 tomcat start Zsolt -Original Message- From: Brian Cross [mailto:[EMAIL PROTECTED] Sent: Thursday, January 25, 2007 7:23 PM To: users@tomcat.apache.org Subject: Tomcat randomly hangs Hello and thanks in advance for any advice. We have Tomcat 5.5.20 running standalone on the following system: Dual AMD Opteron 4 gig of memory Debian Linux 2.6.8 amd64 smp kernel latest sun java 1.5, 1.6, ibm 1.5 (happens on all 3 VM's) Tomcat 5.5.20 (originally happened on 5.5.16, upgrade didn't help) Randomly it will hang and stop accepting connections on port 80, sometimes even late at night when there is not much traffic. When the hang occurs: * Can't access any web app on tomcat including the tomcat manager * Telnet to port 80 hangs(Coyote running on port 80) * load goes up, but only slightly (from 1 to maybe 3 or 4) * sometimes after a couple of minutes it starts responding again, sometimes it doesn't. * when I run shutdown.sh the java process continues to run and I have to kill -9 to stop it * I try to do a kill -3 or kill -QUIT on the java process to get a thread dump, but it does not work I have tried many different jvm settings and tomcat connector settings, here is what I have currently: Connector port=80 maxHttpHeaderSize=8192 maxThreads=1000 minSpareThreads=50 maxSpareThreads=100 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 strategy=ms disableUploadTimeout=false / CATALINA_OPTS=-server -XX:MaxPermSize=256m -ms512m -mx1280m -Xss96k -Djava.awt.headless=true I would really appreciate any advice, I really don't know where to go from here to try and figure it out. If I can't figure it out soon my plan is to use apache2 as the webserver and connect to tomcat via JK. Thanks so much for your expert advice! --Brian. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: JNDI Realm and Active Directory root search
Matt, what do you mean with 'referrals=follow' ? Is that a jndi configuration option ? Zsolt -Original Message- From: Matt Warren [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 01, 2006 6:24 PM To: Tomcat Users List Subject: Re: JNDI Realm and Active Directory root search With that lead, I figured out what was going on. Two issues: - referrals=follow is required if you search from the top of an ldap tree instead of a specific OU. That property is not documented in Tomcat docs as it might be: http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JNDIRealm Without it, you'll get a javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=company,dc=com' - The referral URL returned by AD is not why one might expect. If your Tomcat server is NOT using DNS provided by the AD server you will likely run into a problem. When searching LDAP from the root, you will get a referral reply from AD that has a server DNS name of JUST the domain name (ie company.com). NOT the initial server name you used in your connectionURL. If your DNS or your local hosts files does not resolve that root domain name to an AD server, it will throw a javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: company.com:389 [Root exception is java.net.UnknownHostException: company.com]] I've tried to update this integration guide. Hopefully The Google will help others in the future: http://www.jspwiki.org/wiki/ActiveDirectoryIntegration http://www.mail-archive.com/cas@tp.its.yale.edu/msg00797.html In this case I suggest adjusting the local hosts file to fool DNS (c:\windows\system32\drivers\etc\hosts). Find out the wrong DNS name in the referral and point that name to your real AD. -- Velpi I'm trying to get a JNDI Realm working as one might expect with Active Directory. Tomcat 5.5.20 Java 1.5.06 Windows 2000 Server The basic issue is that searching from a domain root dc=company,dc=com and using userSubtree=true results in: Oct 31, 2006 3:18:20 PM org.apache.catalina.realm.JNDIRealm authenticate SEVERE: Exception performing authentication javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=company,dc=com' If I use a more specific search base of ou=Employees,dc=company,dc=com and then the userSubtree is irrelevant, it works fine. Problem is our AD structure demands that users be in two different OU's and thus the search must be done from the root. I understand that AD does not handle referrals as expected and that could be contributing. - 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-5.5.20 tld listeners from jars only from .../tomcat/common/lib?
David, it is very simple. If the jar file (ditchnet-tabs-taglib.jar http://ditchnet.org/tabs/) is under /install_dir/tomcat/webapps/APPLICATION/WEB-INF/lib the ServletContextListener is not called I need the following lines in my web.xml: listener listener-classorg.ditchnet.jsp.taglib.tabs.listener.TabServletContextListe ner/listener-class /listener If the jar file is under /install_dir/tomcat/common/lib/ the TabServletContextListener is called and I don't need the lines above in web.xml. I use jdk1.5.0_08, Windows-XP. Zsolt -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 01, 2006 4:24 PM To: Tomcat Users List Subject: Re: tomcat-5.5.20 tld listeners from jars only from .../tomcat/common/lib? While this relevant to a more generic question of classloaders, it doesn't address the OP's issue. Zsolt -- can we get a bit more context for this? My experience with taglibs is they work just find under tc 5.5.x. --David Martin Gainty wrote: Hi Zsolt- Straight from the doc http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html If you're using webappX classloader the search order is a.. Bootstrap classes of your JVM b.. System class loader classses (described above) a.. $CATALINA_HOME/bin/bootstrap.jar - Contains the main() method that is used to initialize the Tomcat 5 server, and the class loader implementation classes it depends on. b.. $JAVA_HOME/lib/tools.jar - Contains the javac compiler used to convert JSP pages into servlet classes. c.. $CATALINA_HOME/bin/commons-logging-api.jar - Jakarta commons logging API. d.. $CATALINA_HOME/bin/commons-daemon.jar - Jakarta commons daemon API. e.. jmx.jar - The JMX 1.2 implementation. c.. /WEB-INF/classes of your web application d.. /WEB-INF/lib/*.jar of your web application e.. $CATALINA_HOME/common/classes f.. $CATALINA_HOME/common/endorsed/*.jar g.. $CATALINA_HOME/common/i18n/*.jar h.. $CATALINA_HOME/common/lib/*.jar i.. $CATALINA_BASE/shared/classes j.. $CATALINA_BASE/shared/lib/*.jar Martin-- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: Zsolt [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Tuesday, October 24, 2006 10:13 AM Subject: tomcat-5.5.20 tld listeners from jars only from .../tomcat/common/lib? Hi, After some debuging I have the impressions that tomcat-5.5.20 searches for tld listeners only in jars files under /tomcat/common/lib. Am I right? Is that a bug or a (new) feature? Zsolt - 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]
tomcat-5.5.20 tld listeners from jars only from .../tomcat/common/lib?
Hi, After some debuging I have the impressions that tomcat-5.5.20 searches for tld listeners only in jars files under /tomcat/common/lib. Am I right? Is that a bug or a (new) feature? Zsolt - 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 disable search machines?
Hi, I see that google and msn searches on our pages (tomcat-5.5.17). How can I disable that? Zsolt - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What does this log message mean?
When I shutdown tomcat-5.5.17 I see this message. Why are 24 instances? Jul 18, 2006 5:23:14 AM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 24 instance(s) to be deallocated Zsolt - 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 configure my Realm class from context.xml?
Does anybody know how to configure Realm from .../META-INF/context.xml? Realm className=my.realm.JNDIRealm resourceName=my/RealmFactory/ I always get a ClassNotFoundException but the class does exist (under ../WEB-INF. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to configure my Realm class from context.xml?
Thank you Jon, That's what I'm also trying but I always get a NPE because JNDIRealm.containerLog is null. Do you know how I can figure out the Container from for example a Filter? In the case I could call realm.setContainer(container) no NPE would happen. Zsolt -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, February 23, 2006 5:05 PM To: Tomcat Users List Subject: Re: How to configure my Realm class from context.xml? Your Realm implementation needs to sit in the server classloader as the Realm interface is only defined there (in catalina.jar). This is a PITA so when we did this we made the Realm implementation just lookup the real implementation via JNDI. That way all the authentication logic stayed in the webapp and only a couple of simple wrapper classes and interfaces went into the server and common classloaders. HTH, Jon Zsolt wrote: Does anybody know how to configure Realm from .../META-INF/context.xml? Realm className=my.realm.JNDIRealm resourceName=my/RealmFactory/ I always get a ClassNotFoundException but the class does exist (under ../WEB-INF. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to start ant to use the webapps classpath?
Hi, I have tomcat-5.5.12 and I copied all ant libraries (with my ones) into /webapps/APPLICATION-NAME/WEB-INF/lib. When I start ant using project.executeTargets(execTargets) I get class not found exceptions and I think because ant uses the bootstrap classpath of tomcat and not the classpath of my webapps. How can I get ant to use the correct path? Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to start ant to use the webapps classpath?
Yes I tried it but it didn't help. -Original Message- From: Balint Domokos [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 28, 2005 9:41 PM To: Tomcat Users List Subject: Re: How to start ant to use the webapps classpath? Hi, did you try project.setCoreLoader(YourServletClass.class.getClassLoader()); ? Regards, Balint On Wed, 2005-12-28 at 14:01 +0100, Zsolt wrote: Hi, I have tomcat-5.5.12 and I copied all ant libraries (with my ones) into /webapps/APPLICATION-NAME/WEB-INF/lib. When I start ant using project.executeTargets(execTargets) I get class not found exceptions and I think because ant uses the bootstrap classpath of tomcat and not the classpath of my webapps. How can I get ant to use the correct path? Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Balint Domokos [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]