AW: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed
Hi Chris my comment+++ -Ursprüngliche Nachricht- Von: Christopher Schultz [mailto:ch...@christopherschultz.net] Gesendet: Mittwoch, 27. März 2013 19:35 An: Tomcat Users List Betreff: Re: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Josef, On 3/27/13 9:51 AM, Stadelmann Josef wrote: -Ursprüngliche Nachricht- Von: Christopher Schultz [mailto:ch...@christopherschultz.net] I highly suspect that you have log4j.jar in either common/lib or shared/lib. In that case, your log4j will initialize only once, probably incorrectly. +++ this is interessting. IA64-2dir [.shared] Directory DKA3:[APACHE.JAKARTA.TOMCAT.shared] classes.DIR;1 lib.DIR;1 Total of 2 files. IA64-2dir [.shared.classes] %DIRECT-W-NOFILES, no files found IA64-2dir [.shared.lib] %DIRECT-W-NOFILES, no files found IA64-2dir Directory DKA3:[APACHE.JAKARTA.TOMCAT.common] classes.DIR;1 endorsed.DIR;1 endorsed^.tar.gz;1 i18n.DIR;1 lib.DIR;1 Total of 5 files. IA64-2 Oh, crap: you're using VMS. I'm sure VMS is great, but directory listings are just incomprehensible garbage. Versioned files and directories... *eyeroll*... +++ if you use unix shell gnv/gnu bash it's not so hard to work with ... :-) we use this lib and classes directory in tomcat. it's here in lib where log4j.jar is IA64-2dir [.lib]*log4j* Directory DKA3:[APACHE.JAKARTA.TOMCAT.common.lib] log4j-1^.2^.16.jar;1 Total of 1 file. IA64-2 + Yeah, that'll do it: log4j is probably only being initialized once because you have it in a shared location. +++ may I have to ask HAP - the one who did the OpenVMS port of Tomcat +++ the thing is that I've downloaded from a apache archive TOMCAT_5_5_26 but it's awfull to build it even on a PC with NetBeans. If you want to use log4j in each web application, you should put a separate log4j.jar file in each webapp's WEB-INF/lib directory. +++ we have done that ! there is a minor mismatch as tomcat - the oldest dir - has log4j-1.2.15.jarwhile the apps are all at log4j.1.2.16.jar It's not likely to matter. +++ that is what I think too. +++ note the observed behavior in parsing and later in logging is different if we use log4j.configuration=/path/to/tomcats/log4j.properties as JVM argument from within NetBeans when we start tomcat. Right: if you specify that, then log4j.properties will be loaded from a specific place. If you don't then log4j.properties will likely be loaded from an arbitrary webapps WEB-INF/classes directory. +++ but your saying that each webapps needs a log4j for logging and tomcat needs one as well ! So for tomcat I put it into /lib on PC and into /common/lib on OpenVMS For each apps I put it into /WEB-INF/appsx/classes But what I am interested most - where in tomcat code during startup are the log4j property files triggered to read Are you also trying to use log4j for /Tomcat/ logging? If so, you have to do that differently as well. I'm not sure how well it works (or if at all) with Tomcat 5.5. +++ yes - we really would like to do that in example I really need now HostCongig.java's log.debug to print out when tomcat lifecycle event does a Reloading Context /axis2 ... causing us tremendous troubles at the moment. Maybe we'r hacked internally by some security folk. ??! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRUzvKAAoJEBzwKT+lPKRY/WgQALcyZlbQzixsClMwD7ppyigI 4A1jMfRQGqRI99l7v6qbYfMXjGkI17OMY/TO42avSungIYDxJ0t+VBDgd3DO5WHK 1pPO4XMxhcCdHGGGLwNasB+Z9bbsDsMUam3Sb81z3wVIMV7T+Ag96LEEseVZxJne TjSE+kmR2d5wQEtk+jHkcB/PZtuY3yt2HZVWSDgW2D08Z0N6eK0wrengFbYzRzwa pF62hYHWBRlUKGZ0ZrZdsrIkvrtmpjg1espw2G7CqL7dn1vRR5AVLeo2gVuBb8OD ryMxzY891e1sXWCMerFmpgIXEmeFOruYIAVF3C8IfSEgZZ29PCTQ7kv7VjAvRLhz gsTkdu1ZbWf4Y/gTqYmjCxZsnl7askjf6vhY8AHkncomqDXdHLjjslW2roGkFvn7 4U7t38iMonKNTgj6iOtotdIwBImdfc+AYTaXStot6V2d5mef/k758VyidCIMNJnA Xo5SFbt/uAXeG3azTe5llaVKGNdrBt2r0H9D4AbG2lpSyqINU165XCsnbNHjvt79 U+KYOmO9Cu76t1iTnGKTHa4bEemvS7KH2d/8IZCGMaWy0MbvlbLVuhCtTqoOXJZZ EXDNYLGGm0FR7K4O3M2LZzVdUr2uB85cnaCqjlzbcd6M8g2Oof2YGWbvg73KOz4q ckv//4/e9bRQLjwYcAEu =Njwq -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat JDBC Connection Pool - Deadlock
Hello, I am using the tomcat jdbc connection pool independently in my web application which is deployed on glassfish web server. While performing a database operation, our application goes into a deadlock state. The two threads involved in the deadlock have the below traces (from a thread dump) thread1 Id=534 WAITING on java.util.concurrent.locks.ReentrantReadWriteLock$FairSync@184ffd83 owned by thread2 Id=529 at sun.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.locks.ReentrantReadWriteLock$FairSync@184ffd83 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) at com.sun.ejb.containers.CMCSingletonContainer._getContext(CMCSingletonContainer.java:142) at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2528) ... Number of locked synchronizers = 1 - java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@3f88774b , thread2 Id=529 WAITING on java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@3f88774bowned by thread1 Id=534 at sun.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@3f88774b at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) at org.apache.tomcat.jdbc.pool.PooledConnection.lock(PooledConnection.java:609) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:752) ... Number of locked synchronizers = 1 - java.util.concurrent.locks.ReentrantReadWriteLock$FairSync@184ffd83 Having a look at the source code for both http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_34/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.javaof these http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.ejb/ejb-container/3.1.1/com/sun/ejb/containers/CMCSingletonContainer.java?av=f I see different lock instances but still the dump indicates that they are the same. Any idea on how can the java.util.lock instances be the same? Thanks, Amit.
RE: Tomcat JDBC Connection Pool - Deadlock
From: amit shah [mailto:amits...@gmail.com] To: Tomcat Users List; d...@tomcat.apache.org Do not cross-post. This belongs only on the users list. Read (and follow) the mailing list usage rules. Subject: Tomcat JDBC Connection Pool - Deadlock The two threads involved in the deadlock have the below traces (from a thread dump) You'll need to show the complete traces for both threads, not just the tail ends. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Josef, On 3/28/13 5:54 AM, Stadelmann Josef wrote: -Ursprüngliche Nachricht- Von: Christopher Schultz [mailto:ch...@christopherschultz.net] Yeah, that'll do it: log4j is probably only being initialized once because you have it in a shared location. may I have to ask HAP - the one who did the OpenVMS port of Tomcat the thing is that I've downloaded from a apache archive TOMCAT_5_5_26 but it's awfull to build it even on a PC with NetBeans. Three things: 1. Stop using Tomcat 5.5.x -- it's no longer supported. 2. Tomcat shouldn't need to be ported ... if you've got a JVM, it should run without modification. 3. You should not need to build Tomcat: just download the binaries and run them -- they are all cross-platform. Right: if you specify [-Dlog4j.configuration], then log4j.properties will be loaded from a specific place. If you don't then log4j.properties will likely be loaded from an arbitrary webapps WEB-INF/classes directory. but your saying that each webapps needs a log4j for logging and tomcat needs one as well ! That is true. So for tomcat I put it into /lib on PC and into /common/lib on OpenVMS For each apps I put it into /WEB-INF/appsx/classes But what I am interested most - where in tomcat code during startup are the log4j property files triggered to read Upgrade, then read: https://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRVEFIAAoJEBzwKT+lPKRYLGAQAK9fnIvecO9lyj5r8y9hpwao qVqdKl7JMqMe31Vrw/WcFC6fwZdo6ZT3nTD5vf3GRJiViCYoqmOCr+snBQBa0iD3 I0jk4Iy7dnAIpziqStj9c4lonMHmD64djCml1YeCNQt5t3ApGuw2cZERbcI1VeoX NpycnOygc2sToJ1C4uQJ17SEjYK4n2Hf2wl55W1VOAopEYrzadgYyOl1iAYZh6k4 Cydrg8hZgo/TVmAa6tG6IDozQDXvYVORwzXFi9wxgZgvKwV8cO5HGC1LpaiXQ9yZ TQtDncC0dShoJFxfFO9zJ89gPMl9l77Hfqf/R+g0+HbNVYqMPWB5EUYtaJA8YGDz pOA5dMb2uE/bj28VsRQ3zPiLsx3nxRjUYuu3fdjs/tE1Ka68yMmCdfT653K6y5DO GlDA+P17CvNwCwhEpq7FXh2TxsCCSzdiYUuqZg4UgGoMjjfifVVlK2HQJ80lRhfJ ABgvHMksKIGVHB0oqk8X2Jg42LF96sOd09VXbPPFCtBzB4Nmr/w4ShD4BrEi9PY5 SjoLei6bhMZ0s2Q70Vi6e/AWx+qawALuZPw+aN5XTPxcLTtLZhd3O4xwq6nWBf2R m0T+1eHuBdrvZRh0Wt9ET07fzwy13xyFbp2xVxc03u8MmwLhCIBqoLjgv4ejQ/ne XCVasrkl0vphIKFW58v6 =hjv+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat JDBC Connection Pool - Deadlock
I copied the dev group too since it involved technical details (thread dumps, source code etc). Sorry if that sounds incorrect. The traces I added are not incomplete. They are the ones we generated through the jmx api - ManagementFactory.getThreadMXBean().dumpAllThreads(true, true); On Thu, Mar 28, 2013 at 6:21 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: amit shah [mailto:amits...@gmail.com] To: Tomcat Users List; d...@tomcat.apache.org Do not cross-post. This belongs only on the users list. Read (and follow) the mailing list usage rules. Subject: Tomcat JDBC Connection Pool - Deadlock The two threads involved in the deadlock have the below traces (from a thread dump) You'll need to show the complete traces for both threads, not just the tail ends. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 7.0.035 and IPv6 environment
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Geet, On 3/28/13 1:32 AM, Geett Chanddra Singha wrote: Thanks Konstantin Kolinko! It will be great help for me if you could provide steps to configure the same or documents, where in I could get configuration steps. Well, you could search the archives... that's what they are there for. Or, you could read the online documentation: https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Standard_Implementation Look at the address attribute. On many systems, a single interface has both IPv4 and IPv6 addresses, so you may or may not be able to do this: Connector address=0.0.0.0 port=8080 / Connector address=:: port=8080 / I'm not sure if Tomcat interprets the address value prior to handing it off to APR... if so, you may have to use 0:0:0:0:0:0:0:0 for your IPv6 address because IIRC Tomcat/JVM does not understand IPv6 shorthand. Anyhow, if the above doesn't work (because port 8080 can only be bound once per interface), you'll need to do something like this: Connector address=0.0.0.0 port=8080 / Connector address=:: port=8081 /!-- note the different port -- - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRVEMCAAoJEBzwKT+lPKRYJDUQAJ+cHan9+A0geZFCgnBLQwkO WisvbujMEgerX5D8dRLciTgeUaiMPDYFi9fMVRRMkNKIgZ1TGlzKI6YcpO4swmRL p0NeyD6AdvmnhsJSGSo/3BwnN0TR6mih1vFHElVXY2ffDZFldvUcwvS9Fb+b+U4O oBYuGki2xr+IwLE6+WBdmdq4cSQECfVGeJ5t5aSqwgcfs55LsrhMap5dmhp/FUFs 9jcXaNeAQ19MM1yZ7fD8UQLZg0j8KexmEYzhQq4oTJg0DqS42KgNMRi5St0z4aly JWj16//VvSbbCAqYy733jxc6l/T74KRKzrqUcUS142TdjdmVTUEQ2M+qRmORcwhW 2Dlx0sl/5008LC9tEI4GHrCImjBMh98grbDnQ+J+n5YnAEImk84MK1JUm0z7kWYJ fhlofW1fWW7ofgRmlPK0qTl8FNWmQ0ngK36mrlwR9inHDZ2ss5CgEB/xezmskWBp L9E9vJSmWwrd9bCowpnR4Q49XFJybxA7s6d1NjR5ko/I3cuYpkdvSnh5Y4np7eOA k4l2IYS5IBsYoNJw3zwSh9gyXwK7FJEP2lk1zSH/fMjn/VGz0MtSyXAtjUcjQPDQ 2JArjThILt3E3Z0ddJfrKshFglXkUfnuT7UsMUjMwaZoFy24R6RKtsEqxjW59Fay Aa97kkFAYQZV1LAZ4Qeq =/thP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat JDBC Connection Pool - Deadlock
From: amit shah [mailto:amits...@gmail.com] Subject: Re: Tomcat JDBC Connection Pool - Deadlock I copied the dev group too since it involved technical details (thread dumps, source code etc). Sorry if that sounds incorrect. It was incorrect, as is your top-posting. Don't do either. The traces I added are not incomplete. Clearly they are incomplete, as evidenced by the ellipses after both fragments. Use a more appropriate mechanism: http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat JDBC Connection Pool - Deadlock
On Mar 28, 2013, at 8:27 AM, amit shah wrote: Hello, I am using the tomcat jdbc connection pool independently in my web Because you are using this independently you are going to need to tell us the version of the connection pool that you have included with your application. Also, a code snippet that shows how you setup the connection pool, we need to see what options that you have used. application which is deployed on glassfish web server. While performing a database operation, What specifically are you doing in the application? Can you include a code snippet? In particular, we'd want to see how you are getting a connection, how its being used and how you are returning it to the pool. our application goes into a deadlock state. How are you determining this? What is the behavior that you see with your application? Dan The two threads involved in the deadlock have the below traces (from a thread dump) thread1 Id=534 WAITING on java.util.concurrent.locks.ReentrantReadWriteLock$FairSync@184ffd83 owned by thread2 Id=529 at sun.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.locks.ReentrantReadWriteLock$FairSync@184ffd83 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) at com.sun.ejb.containers.CMCSingletonContainer._getContext(CMCSingletonContainer.java:142) at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2528) ... Number of locked synchronizers = 1 - java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@3f88774b , thread2 Id=529 WAITING on java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@3f88774bowned by thread1 Id=534 at sun.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync@3f88774b at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) at org.apache.tomcat.jdbc.pool.PooledConnection.lock(PooledConnection.java:609) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:752) ... Number of locked synchronizers = 1 - java.util.concurrent.locks.ReentrantReadWriteLock$FairSync@184ffd83 Having a look at the source code for both http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_34/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.javaof these http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.ejb/ejb-container/3.1.1/com/sun/ejb/containers/CMCSingletonContainer.java?av=f I see different lock instances but still the dump indicates that they are the same. Any idea on how can the java.util.lock instances be the same? Thanks, Amit. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat support for JNDIRealm LDAPS connections
Hi Jon, first of all, it seems that you have hijacked a thread by replying to a mail from this mailing list and changing the subject of the thread. That might be a reason, why you have not got any answers to your question yet. Am 27.03.2013 17:03, schrieb Wilmoth, Jon: After searching through the Tomcat user forums and bug list it appears there are only two options to enable ldaps connections, without modification to the Tomcat JNDI Realm itself: 1) Start Tomcat using system properties that specify the default trust keystore password (e.g. -Djavax.net.ssl.trustStore=path to truststore -Djavax.net.ssl.trustStorePassword=password). The problem with this is it requires the password to the trust keystore be provided on the command line. I don't think that you need to give a trustStorePassword, when all you need is a secure connection to a tls/ssl based service. You only need the password, if you want to access private keys in the truststore, for example when you want to use client certificates. HTH Felix 2) Add the CA cert to the java-home/lib/security/cacerts file (or java-home/lib/security/jssecacerts which has higher precedence) which is used as the default trust store. This has the downside of tying the CA cert maintenance lifecycle to the JVM maintenance lifecycle (e.g. upgrades). It also limits the reuse of a JDK installation across applications/Tomcat instances. Are there any plans for org.apache.catalina.realm.JNDIRealm to address these items via support for configuring the trust store path/password like org.apache.tomcat.util.net.AbstractEndpoint? Thanks, Jon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: AW: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed
Hi Chris are you in fact saying that we can use the latest Tomcat on OpenVMS Itanium 8.4 given this OpenVMS has yet a oracle/hp java jdk 1.6.0-04 installed? any references for that Josef -Ursprüngliche Nachricht- Von: Christopher Schultz [mailto:ch...@christopherschultz.net] Gesendet: Donnerstag, 28. März 2013 14:11 An: Tomcat Users List Betreff: Re: AW: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Josef, On 3/28/13 5:54 AM, Stadelmann Josef wrote: -Ursprüngliche Nachricht- Von: Christopher Schultz [mailto:ch...@christopherschultz.net] Yeah, that'll do it: log4j is probably only being initialized once because you have it in a shared location. may I have to ask HAP - the one who did the OpenVMS port of Tomcat the thing is that I've downloaded from a apache archive TOMCAT_5_5_26 but it's awfull to build it even on a PC with NetBeans. Three things: 1. Stop using Tomcat 5.5.x -- it's no longer supported. 2. Tomcat shouldn't need to be ported ... if you've got a JVM, it should run without modification. 3. You should not need to build Tomcat: just download the binaries and run them -- they are all cross-platform. Right: if you specify [-Dlog4j.configuration], then log4j.properties will be loaded from a specific place. If you don't then log4j.properties will likely be loaded from an arbitrary webapps WEB-INF/classes directory. but your saying that each webapps needs a log4j for logging and tomcat needs one as well ! That is true. So for tomcat I put it into /lib on PC and into /common/lib on OpenVMS For each apps I put it into /WEB-INF/appsx/classes But what I am interested most - where in tomcat code during startup are the log4j property files triggered to read Upgrade, then read: https://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRVEFIAAoJEBzwKT+lPKRYLGAQAK9fnIvecO9lyj5r8y9hpwao qVqdKl7JMqMe31Vrw/WcFC6fwZdo6ZT3nTD5vf3GRJiViCYoqmOCr+snBQBa0iD3 I0jk4Iy7dnAIpziqStj9c4lonMHmD64djCml1YeCNQt5t3ApGuw2cZERbcI1VeoX NpycnOygc2sToJ1C4uQJ17SEjYK4n2Hf2wl55W1VOAopEYrzadgYyOl1iAYZh6k4 Cydrg8hZgo/TVmAa6tG6IDozQDXvYVORwzXFi9wxgZgvKwV8cO5HGC1LpaiXQ9yZ TQtDncC0dShoJFxfFO9zJ89gPMl9l77Hfqf/R+g0+HbNVYqMPWB5EUYtaJA8YGDz pOA5dMb2uE/bj28VsRQ3zPiLsx3nxRjUYuu3fdjs/tE1Ka68yMmCdfT653K6y5DO GlDA+P17CvNwCwhEpq7FXh2TxsCCSzdiYUuqZg4UgGoMjjfifVVlK2HQJ80lRhfJ ABgvHMksKIGVHB0oqk8X2Jg42LF96sOd09VXbPPFCtBzB4Nmr/w4ShD4BrEi9PY5 SjoLei6bhMZ0s2Q70Vi6e/AWx+qawALuZPw+aN5XTPxcLTtLZhd3O4xwq6nWBf2R m0T+1eHuBdrvZRh0Wt9ET07fzwy13xyFbp2xVxc03u8MmwLhCIBqoLjgv4ejQ/ne XCVasrkl0vphIKFW58v6 =hjv+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Adding Content-Length response header
-Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Adding Content-Length response header -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, Here's the situation I have: I've got a response that I'm fairly sure fits into the response's buffer size, and I'd like to send a Content-Length header in that case. I could probably put a wrapper around the response's ServletOutputStream that counts bytes and then looks for done conditions (OutputStream.close, etc.), then adds a Content-Length header if the response hasn't yet been committed. What about using a ByteArrayOutputStream? It has a size method and you could use that in the response.setContentLength() and write out the ByteArrayOutputStream to your ServletOutputStream? Maybe? Thanks, - -chris
RE: Velocity Logging
Since we are not using velocity we were able to remove the velocity libraries, and this issue was resolved. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, March 27, 2013 2:38 PM To: Tomcat Users List Subject: Re: Velocity Logging -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bruce, On 3/27/13 10:16 AM, Bruce Pease wrote: I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33. The recent upgrade to Tomcat created an issue where the cannot be undeployed unless the app is shut down due to the Wicket dependency velocity logging in use (1.4). We are running a web application under tomcat using the wicket framework. A requirement for Wicket is the velocity libraries. The velocity framework is auto loading and writing to a log in the conf directory. Since it is in use I am unable to undeploy the web application. So, I am looking for a way to turn off the velocity logging. Previous version of tomcat does not have this issue (7.0.26). 1. Wrong mailing list? (This is for Tomcat, maybe you want Velocity?) 2. Sounds like you are putting your Velocity and/or logging libraries in a shared location.. is that the case? If so, stop doing that. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRUzyIAAoJEBzwKT+lPKRYVSUQAKVhSnphqObwNZ1ZIJ1hXYOq t3obA4/yWgKsOjBNlih8bye4bszVLvw3ETXeD5znTax5Pl3R/h9Gv5t84xTQ468d eyzXvde5G7JfAURk3Lh47smaEdAuNSg4dVlDO+1SzIzkxsKrOOOFvvf69LDUpouY EWAt27OYfP5UdGqn+TN8TYok87qWhdzMwELvHhWIBq84zUYp4iIrla2CYwpzCje+ yUfi9Qysb/U9dcqSnfmTM2GYZw+KaP0NXZXjfUdNk5B6C1I5YuNoWtOrFZhtwKru S2OWocAhzEG02JEW+qdcEu4QaPA3KmrvGPNjJ9KTZHOVfDAonMS6Zk6XCFsBdwWi rP2wIvaPwVYMrkrQBBPaLBttpNPRVI+DRxcheNqWT5r3kiPOP8f8nY1dR7OwTq/x bsTxej0B0beMz9yIMVmw3gIELMOceFz2ufyBOYWpXWH/hTNw7yWnfSvmLyLJyzp0 0DMBK3svg3ZOqoJq/VVe9e8yHyq1PaSA76k+vqUmcFhoo0gX+4YzQ3fKyTe+XYME YKpuTxeagxmmx+nPe10QIaOxhxGL8iDfs7GCHAxsDQbiRgae0ViRSHbLBpRDLI40 Vhc2KDf0OItvKRsf2+tZMy0LUHKdfy33ZUHKOkXEMlaXbK6AcX3GS8jJ4JA7x5aq hD4PWviP7S6ZVO6/7sYL =cE0X -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: AW: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed
From: Stadelmann Josef [mailto:josef.stadelm...@axa-winterthur.ch] Subject: AW: AW: AW: [tomcat 5.5.26] why are not all log4j.properties files parsed are you in fact saying that we can use the latest Tomcat on OpenVMS Itanium 8.4 given this OpenVMS has yet a oracle/hp java jdk 1.6.0-04 installed? Yes. I think we would all be extremely surprised (and dismayed) if HP made any changes to Tomcat. They did put a lot of work into the JVM, back in the day. any references for that Direct link from the Tomcat home page: http://tomcat.apache.org/whichversion.html Download the .tar or .zip binary distribution and try it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can ClientAbortException be circumvented?
On Wed, Mar 27, 2013 at 6:09 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Thad, On 3/27/13 5:20 PM, Thad Humphries wrote: On Tue, Mar 26, 2013 at 3:56 PM, Christopher Schultz ch...@christopherschultz.net wrote: Thad, Coming a little late to the party... On 3/24/13 4:30 PM, Thad Humphries wrote: I have a web-app that uses a servlet for downloading files from a repository--PDF, Office, images, zip, etc. It works with desktop browsers--IE, Firefox, Chrome, and Safari--on their various platforms. It also works fine with Firefox from Android (2.3 and 4.x tested). However when I try with Android's default WebKit browser, the servlet fails immediately with org.apache.catalina.connector.ClientAbortException (so says the stderr log). This smells like it might be a Range request issue. Is the client sending a Range header along with the request? Are you respecting it? I don't see a Range header from my servlet. Here's the request; GET /myapp/webclient/copyObjectServlet?tag=0oATVXQD1B_l4Vzpw9n1X1EeKIXTKk6dname=grilled_romaine.doc HTTP/1.1 Host: 10.1.2.1:8080 Accept-Encoding: gzip Accept-Language: en-US x-wap-profile: http://www.htcmms.com.tw/Android/Common/Ace/A9192-1.0.xml Cookie: JSESSIONID=0AACB4E188B2B68605FE0189C007F7BB Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7 Referer: http://10.1.2.1:8080/myapp/?id=ipadref=267 Keep-Alive: 115 User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC-A9192/1.0 Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 x-att-deviceid: HTC-A9192/1.0 Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Here's the response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Expires: 0 Cache-Control: private Pragma: cache Content-Disposition: attachment; filename=grilled_romaine.doc Content-Type: application/msword Content-Length: 12288 Date: Wed, 27 Mar 2013 20:46:02 GMT Hmm... and this particular request/response pair resulted in a ClientAbortException? Any idea how many bytes were sent before the exception? - -chris Yes, that's what I'm seeing, at least when I use a *mobile* WebKit browser. Desktop Chrome and Safari are fine. So I don't think the problem is Tomcat. However I raised the issue here in case someone had seen this and had a Tomcat work around (I dunno any of our customers who are using something other than Tomcat). As for how many bytes are sent, in the Wireshark capture I have up now for a file of 72,704 byte, I see the servlet request, the TCP response with HTTP header, another TCP, an ACK, two more TCP, a FIN ACK, ACK, and four RSTs from my Android phone, well before the file is finished. I'm running Tomcat 7.0.32 with Java 1.7.0_15 on both Windows 7 (64-bit) and openSUSE 12.3 Linux (32-bit). I'm using straight Tomcat, port 8080, on both (though I see the same behavior on Linux if I go through Apache 2.4.2 and mod_jk 1.2.37). Both fail in the same fashion--same sequence when I watch the wire--but I can see the servlet fail with ClientAbortException in the Windows tocat7-stderr.*.log (from Commons Daemon procrun since I run Tomcat as a service). I've cleared the log directory immediately before starting Tomcat, so I believe the resets I see in Wireshark and the ClientAbortException are related. It seems pretty definite that the problem is *not* with Tomcat, but with mobile WebKit. Guess I'll look into Howard's suggestion about a mail-to option. Thanks for y'all's interest. And thanks to Mark for the tip on Wireshark. It sure beats tcpdump. -- Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be --Christopher Marlowe, *Doctor Faustus* (v, 121-24)
Apache Accessing Tomcat Issue
Apache Tomcat/7.0.30 on SLES11 SP2. I am trying to configure access to a webapp using http://share.domain.com. This webapp uses port 8080 and works fine from inside the LAN. However, we have an apache2 server acting as a proxy and we want users to not have to type in a port number. Now when accessing http://share.domain.com, the result is directories and files are listed, the jsp files are not running. Here is my complete setup: jk.conf- # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c JkWorkersFile /opt/alfresco/tomcat/workers.properties JkLogFile /var/log/alfresco/mod_jk.log JkShmFile /var/log/alfresco/shm # Log level to be used by mod_jk JkLogLevel error # The following line mounts all JSP files and the /servlet/ uri to tomcat #JkMount /servlets-examples/servlet/* ajp13 JkMount /share/*.jsp ajp13 /IfModule virtualhost- VirtualHost *:80 ServerName share.domain.com #RewriteEngine On #RewriteCond %{REQUEST_URI} !^/share/ #RewriteCond %{HTTPS} on #RewriteRule ^/. http://share.paradixent.com/share/ [P] #JkMount /share/* worker1 IfModule mod_jk.c # The following line makes apache aware of the location of # the /jsp-examples context Alias /share /opt/alfresco/tomcat/webapps/share Directory /opt/alfresco/tomcat/webapps/share Options Indexes FollowSymLinks allow from all /Directory # The following line mounts all JSP files and the /servlet/ uri to tomcat #JkMount /servlets-examples/servlet/* ajp13 JkMount /share/*.jsp ajp13 # The following line prohibits users from directly accessing WEB-INF Location /share/WEB-INF/ #AllowOverride None deny from all /Location # if not specified, the global error log is used ErrorLog /var/log/apache2domain.com-error_log CustomLog /var/log/apache2/domain.com-access_log combined /IfModule /VirtualHost httpd.conf- # mod_jk Include /opt/alfresco/tomcat/conf/jk.conf Mod_jk is loaded: web:~ # /usr/sbin/httpd2 -M Loaded Modules: ... jk_module (shared) perl_module (shared) php5_module (shared) Syntax OK Here is the log from apache: [Thu Mar 28 18:40:14 2013] [error] [client pub ip] proxy: Error reading from remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var [Thu Mar 28 18:40:28 2013] [error] [client pub ip] (70007)The timeout specified has expired: proxy: error reading status line from remote server share.paradixent.com [Thu Mar 28 18:40:28 2013] [error] [client pub ip] proxy: Error reading from remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var Any ideas why the folder and files are being listed instead of running? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat support for JNDIRealm LDAPS connections
Thanks Felix. You're correct for a single auth SSL connection the password was not required (I assume a mutual auth connection would work as well if the keystore for the client cert was physically different). I assumed that since it was provided in the connector config (http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support) it would be required, but not the case! Thanks again, Jon -Original Message- From: Felix Schumacher [mailto:felix.schumac...@internetallee.de] Sent: Thursday, March 28, 2013 6:52 AM To: Tomcat Users List Subject: Re: Tomcat support for JNDIRealm LDAPS connections Hi Jon, first of all, it seems that you have hijacked a thread by replying to a mail from this mailing list and changing the subject of the thread. That might be a reason, why you have not got any answers to your question yet. Am 27.03.2013 17:03, schrieb Wilmoth, Jon: After searching through the Tomcat user forums and bug list it appears there are only two options to enable ldaps connections, without modification to the Tomcat JNDI Realm itself: 1)Start Tomcat using system properties that specify the default trust keystore password (e.g. -Djavax.net.ssl.trustStore=path to truststore -Djavax.net.ssl.trustStorePassword=password). The problem with this is it requires the password to the trust keystore be provided on the command line. I don't think that you need to give a trustStorePassword, when all you need is a secure connection to a tls/ssl based service. You only need the password, if you want to access private keys in the truststore, for example when you want to use client certificates. HTH Felix 2)Add the CA cert to the java-home/lib/security/cacerts file (or java-home/lib/security/jssecacerts which has higher precedence) which is used as the default trust store. This has the downside of tying the CA cert maintenance lifecycle to the JVM maintenance lifecycle (e.g. upgrades). It also limits the reuse of a JDK installation across applications/Tomcat instances. Are there any plans for org.apache.catalina.realm.JNDIRealm to address these items via support for configuring the trust store path/password like org.apache.tomcat.util.net.AbstractEndpoint? Thanks, Jon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Adding Content-Length response header
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Konstantin, On 3/26/13 11:08 AM, Konstantin Kolinko wrote: 2. Are you interested in GET/POST requests, or HEAD requests? HEAD requests were fixed by this commit, from 5 days ago http://svn.apache.org/r1459087 I am dealing almost entirely with POST requests. 3. Tomcat is already able to provide Content-Length header when all response fits into a buffer. But, if an explicit flush() is called, Tomcat has to start sending data (usually using chunked encoding) and thus content length is not known at the time when response headers are being sent. It seems I am flushing the buffer twice: once after emitting the XML header (processing instruction and document element) and then once again just before the end of the doPost method. I'll try removing those to see if I can get a Content-Length in the response. If that works, I'll do a bunch of testing to see if the lack of flush presents a problem: I want my servlet to handle all interaction with the client -- that is, the container shouldn't respond with text/plain or text/html or anything like that. I should be handling all exceptions except for IOExceptions writing to the OutputStream, so that probably isn't a problem. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRVNi5AAoJEBzwKT+lPKRYc0wP/2S57Ac0RvBSDxUb8UAYUUom mE5Y3q/JsyKMBeoM4n6KXfyuIwbYFsCeBPbi+d5WolqV8C9LvHD6rDpIEAMd+TUX ZWoA2uivNvDoG9o6Kw53OfNaWwxjWnUVsRLnekp5QbnbABxo+3TeGPii2ErU0Btf e5RAkkRtyotzuVFmGKn+/HpbMUhq0z4WZD0sHH/nFbQRNZjK+E7u8UrW/m/zTufm YJJcKV7hF8VcndYT35qsicA7djxQ+KXXpDHr92nCZ5BVWNygxtzTwFO34+7Hed52 8qq0IjO2tdmOMc48EBVxckTFJiEWzZkLrU5dem62Xcf1wmQTrsMLIeKdGxR03e3h ZWSD7NO5lTA4keX2EbTWJMxdgnf6R7R7HJ5r3QrdUaffgPFesY9u05YJMYivoHvS LqTB7l3kw3BR4xhoF1tWQNUxS5i04ApeX1ShmSH+81/cwmAz0OIEpzMPl/2Mic5i z8zpQQ5oEx8GBSRru4cZHtZHPJzzIRwQU5XKzEFECZ8sNgKxUALKyJI3+9hKO3X7 maCQJ0q1E9maETPWFgQQBJli/waRJ5KBXLZp072V26z7uWRuxDeXptiLY+MRuzLu e2lcK70V/n7MYUPVnbXi5B30QymGLkdB9MemfyEc4qdYD1UhrgeyIcOcnm2D/mT1 oleOI/I98f+lOCZAF+P+ =wx+V -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org