<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>users@tomcat.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/tomcat-users/"/>
<id>http://mail-archives.apache.org/mod_mbox/tomcat-users/</id>
<updated>2013-06-18T23:33:05Z</updated>
<entry>
<title>Re: http request (no only session) replication in cluster</title>
<author><name>Ja kub &lt;jjakub83@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cCAJqdOe_uemU0H2UHNgPY+qci3ezfQj3P2=3U0-=jB+gxGYL5rQ@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCAJqdOe_uemU0H2UHNgPY+qci3ezfQj3P2=3U0-=jB+gxGYL5rQ@mail-gmail-com%3e</id>
<updated>2013-06-18T19:25:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
yes, most of time is waiting,&#010;&#010;I use tomcat NIO connector, with async cxf webservice server (exposed as&#010;async servlet) and async cxf client,&#010;I use no my own threaded-queue&#010;&#010;regards&#010;Jakub&#010;&#010;ps&#010;possibly camel could do it more elegantly and with less programming effort&#010;&#010;&#010;On Tue, Jun 18, 2013 at 5:21 PM, Christopher Schultz &lt;&#010;chris@christopherschultz.net&gt; wrote:&#010;&#010;&gt; -----BEGIN PGP SIGNED MESSAGE-----&#010;&gt; Hash: SHA256&#010;&gt;&#010;&gt; Jakub,&#010;&gt;&#010;&gt; On 6/18/13 3:27 AM, Ja kub wrote:&#010;&gt; &gt; Ravindra,&#010;&gt; &gt;&#010;&gt; &gt; Thx for idea, I will read about it, but at first glance it looks&#010;&gt; &gt; like with 5000 pending servlet requests I will have 5000 threads&#010;&gt; &gt; awaiting response from cxf client, with async servlet and async cxf&#010;&gt; &gt; webservice server, connected with async cxf client, all 5000&#010;&gt; &gt; pending threads can be served by one thread,&#010;&gt;&#010;&gt; Sounds like async + your own threaded-queue is the way to go, assuming&#010;&gt; that you really have to wait-around a while for CXF responses.&#010;&gt;&#010;&gt; &gt; I have to deal not only with faults, but also with long running&#010;&gt; &gt; webservice client requests - up to two client requests, 20 second&#010;&gt; &gt; each&#010;&gt;&#010;&gt; Most of that time is just sitting there waiting, right?&#010;&gt;&#010;&gt; - -chris&#010;&gt; -----BEGIN PGP SIGNATURE-----&#010;&gt; Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;&gt; Comment: GPGTools - http://gpgtools.org&#010;&gt; Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&gt;&#010;&gt; iQIcBAEBCAAGBQJRwHrzAAoJEBzwKT+lPKRYqu0P/iMUOAqDZ0sSI2evQhz7xJh/&#010;&gt; tPaOeF6bISOqfCfbyFKesZrDEDoc/wZrdBmzfkT+72M8jKfbY4MBGCtvkol0ffcl&#010;&gt; SWEphu5wW2TRxcaoG6r7DWrCtE87AJaofgvd+VtN9lE0fPtdXJqf0s8bnE/+I2TN&#010;&gt; hnoyNXfhC/3lMNGG16d6/1Vi16qWV4d+H5Fo9fz3ohunBBHFq6L10OxXRu7alL//&#010;&gt; KKpyenMn2KFZeGsokty2dmMr9bNW2PYgHTXrjZCK8DU8iTGtCRRPoZtF2ZJWcchP&#010;&gt; qSZxm1ZqFFLsWbRd54ixdmivvk2OEleoDhgjYGRSuPt36vYcfhGP4svuMvcWA+bR&#010;&gt; juipkA0kKxZjRQ0kFfjqoowQIL+iLsUeBmfeL8YchxvFkzt0bTskfUnEd60kzTCo&#010;&gt; dfGJkBCuPR5qjXwffYHJd3mDlPjL9hd2npcns8KQgad0WJA5rZZdmEl7K2vKpOw7&#010;&gt; fBy4r3gJR2T+g0974+UoqBcTU+wdIebIe6XPF7GweNS6fbCTekTjM1iS/JFj3Qrc&#010;&gt; mtGj85i5QEmgTpLRQqZG+N4lY/4Rpvk+i9JsmP4KvQAT1Dkgcs95IAPrettDWqNs&#010;&gt; ZKPtZJBeW+tnsi5ZXET4M3fnFoxdCK1+7igrYHjbvs4sXlmWyc1gz9lrTnO/nmHY&#010;&gt; 6vaOUf6Nfw6M5EFcG9Or&#010;&gt; =UZ+y&#010;&gt; -----END PGP SIGNATURE-----&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; For additional commands, e-mail: users-help@tomcat.apache.org&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: TCNative with FIPS OpenSSL throws fingerprint error in FIPS mode</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51C097AD.2040708@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51C097AD-2040708@christopherschultz-net%3e</id>
<updated>2013-06-18T17:23:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Steve,&#010;&#010;On 6/18/13 12:58 PM, Steve Nickels wrote:&#010;&gt; Christopher Schultz wrote:&#010;&gt;&gt;&gt;&gt; Do you think there are ways it could be improved? Better&#010;&gt;&gt;&gt;&gt; error checking, etc.? I implemented it as simply as I&#010;&gt;&gt;&gt;&gt; possibly could.&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; The biggest problem seems to be that something in Tomcat on&#010;&gt;&gt;&gt; Windows is interfering with OpenSSL's normal base address&#010;&gt;&gt;&gt; request (0xFB00000). Normally this doesn't matter, but with the&#010;&gt;&gt;&gt; FIPS build, if the base address of the library is moved from&#010;&gt;&gt;&gt; what it expects, the result is a fingerprint error when FIPS&#010;&gt;&gt;&gt; mode is enabled.&#010;&gt;&gt; &#010;&gt;&gt; This could be a problem on *NIX as well -- any library may be&#010;&gt;&gt; re-located by the loader for any reason.&#010;&gt; &#010;&gt; It's possible this could be a problem on *NIX, but it's my &#010;&gt; understanding that this error is pretty specific to Windows. The &#010;&gt; documentation for OpenSSL FIPS says that the &#010;&gt; FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED error code is a &#010;&gt; "Microsoft Windows specific error".&#010;&#010;Interesting. I'll have to read a bit more about that.&#010;&#010;&gt;&gt;&gt; I ran the openssl utility on the same system as Tomcat, and&#010;&gt;&gt;&gt; Process Explorer shows that its copy of libeay32.dll stays at&#010;&gt;&gt;&gt; the correct address. Additionally, I tested the FIPS-compatible&#010;&gt;&gt;&gt; libeay32.dll on a different server with Tomcat, and had the&#010;&gt;&gt;&gt; same problem. This seems to indicate that the memory address&#010;&gt;&gt;&gt; issue is specific to Tomcat, not the server.&#010;&gt;&gt; &#010;&gt;&gt; Or running within a JVM which has a significant amount of native&#010;&gt;&gt; code that gets loaded first, which may cause the loader to&#010;&gt;&gt; re-locate the library when it finally gets loaded.&#010;&gt;&gt; &#010;&gt;&gt; Any interest in trying some Java-based testing using&#010;&gt;&gt; libtcnative?&#010;&gt; &#010;&gt; I'm game, if you let me know what you'd like me to do. : )&#010;&#010;All you should have to do is write a small Java program that calls&#010;AprLifecycleListener.lifecycleEvent with an event of type&#010;BEFORE_INIT_EVENT.&#010;&#010;You'll of course have to call things like setFIPSMode(true), etc.&#010;&#010;I wonder if you did that without the rest of Tomcat loaded if anything&#010;would change. I would bet that it's more likely that the bulk of the&#010;JVM is causing the re-location of the library than anything else.&#010;&#010;Interesting thread:&#010;http://comments.gmane.org/gmane.comp.encryption.openssl.devel/18309&#010;&#010;Look at Andy Polyakov's comment from 18 Oct 2010 23:25 where he says:&#010;&#010;"&#010;In order for this to work it is implied that compiler&#010;moves relocatable data from .rdata segment. Unix compiler actually do&#010;that, but apparently not Windows :-(.&#010;"&#010;&#010;It also looks like OpenSSL has updated their build scripts for Visual&#010;Studio, but it's possible that the FIPS version predates that patch.&#010;&#010;&gt;&gt;&gt; I can't tell from Process Explorer why libeay32.dll is being&#010;&gt;&gt;&gt; rebased (I didn't see any other libraries under tomcat7.exe&#010;&gt;&gt;&gt; that were obviously taking up the same address space). I think&#010;&gt;&gt;&gt; it's going to take someone with more experience with both&#010;&gt;&gt;&gt; Windows and Tomcat than&#010;&gt;&gt; I&#010;&gt;&gt;&gt; to figure that one out. I suppose it might be worthy of a bug&#010;&gt;&gt;&gt; report, at least.&#010;&gt;&gt; &#010;&gt;&gt; That would be good -- bug reports have more visibility than&#010;&gt;&gt; mailing list posts, and it's a good place to collect information&#010;&gt;&gt; all in one place.&#010;&gt; &#010;&gt; I submitted bug 55113 for this.&#010;&gt; (https://issues.apache.org/bugzilla/show_bug.cgi?id=55113)&#010;&#010;I saw that, thanks.&#010;&#010;&gt;&gt; I'm curious: what base address did you use when you changed it?&#010;&gt; &#010;&gt; The one that worked for me was 0x6FB00000.&#010;&#010;Did you just choose one randomly?&#010;&#010;I wonder if you follow the suggestions from the aforementioned thread&#010;for re-building everything with the /FIXED switch. That seems to have&#010;fixed everyone's issues, but you have to be sure to build everything&#010;very carefully or one component can still be relocatable. tcnative of&#010;course does not care.&#010;&#010;&gt;&gt; That's a good point. Could you log that in Bugzilla as well?&#010;&gt;&gt; There are (brief) building instructions on&#010;&gt;&gt; http://tomcat.apache.org/native-doc/ but they should probably&#010;&gt;&gt; also be in the BUILDING file.&#010;&gt; &#010;&gt; Submitted bug 55114 for this.&#010;&gt; (https://issues.apache.org/bugzilla/show_bug.cgi?id=55114)&#010;&#010;Cool. It's likely to be fixed in a different way (by including both&#010;*NIX and Windows building instructions instead of including only the&#010;Windows build instructions) but at least you won't have to go to the&#010;web site when you have a perfectly good file already downloaded.&#010;&#010;&gt;&gt;&gt; If there's a good place to put a wiki page about this, let me&#010;&gt;&gt;&gt; know, and I can try to add something.&#010;&gt;&gt; &#010;&gt;&gt; Really anywhere under http://wiki.apache.org/tomcat/FAQ would be&#010;&gt;&gt; great. If I were looking for information about this, I'm not sure&#010;&gt;&gt; where I'd look first. Perhaps under "Security"?&#010;&gt; &#010;&gt; If I get a chance, I'll try and add something here.&#010;&#010;Cool, thanks.&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRwJesAAoJEBzwKT+lPKRY8FgP/3R7y0R0xTHEkbnQmyYfSPXP&#010;3ClMJFJQPh+Co/FE+uw3su/c1+0/ajf3t5Fvv3XIEKKbgMxu8wOLSM9oVzQ6ITEP&#010;QeHqy9+MPCAezcxZnysg2q/O5Bcuc+S/xEYpg3PH7qo/CGYVSPj25MvZxUM+murS&#010;L86kosspQLmq6mxgWqsHZVZ7AL5o6eO/cI4ThntGdBTRT4ErM4Lc6fuC2n/h//Js&#010;VzHa49OywAnpM8/Pyfh18ewlVtvJ+BEETs+LnsAk3Ifz9WnhlvgDlIjAj8S2fPUL&#010;ukrPET3zhVVWMtKc2iHBKAaI97U89Wk1M3bGyEoO6YIyVUVQyt7Ajy05J0Bze3Dz&#010;2ncbdtKExZONqR/xe9QP9fBX5R2tyh9qSBDG31hRpy3FbA3YLelpm8/Rlnm2Ou/x&#010;AZ3u1DIfmJjkEBt/QpQcGu4nlyxHz9LmGH0kzzQYUgU1XAB/p3wWBjYpQXQ/C/gh&#010;H+Qc4QgaZEJ6GAvfFgrvGENwRI+AqSqeZBWK199fNsJORmmusyDlg8xOpvSDwcmE&#010;OP/02qm4CPtTinH2oJC6Vt/c3rPGNWWmnZ/q07hD+KDURcD7K2O/gN7jOdb642A/&#010;fvt+eY5mvVa51isLsGzM2hRyHK/WXCHxq12ipqxLqN+u096VWJMRkUAJHYDFazrw&#010;O2Bu+Wz78O04p5XZiZYL&#010;=qMI+&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: TCNative with FIPS OpenSSL throws fingerprint error in FIPS mode</title>
<author><name>Steve Nickels &lt;snickels@ipswitch.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cAE7E5B664DA29A47B8ED63BFDA6A9625166FA01B@BN1PRD0512MB651.namprd05.prod.outlook.com%3e"/>
<id>urn:uuid:%3cAE7E5B664DA29A47B8ED63BFDA6A9625166FA01B@BN1PRD0512MB651-namprd05-prod-outlook-com%3e</id>
<updated>2013-06-18T16:58:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; &gt;&gt; Do you think there are ways it could be improved? Better error&#013;&#010;&gt; &gt;&gt; checking, etc.? I implemented it as simply as I possibly could.&#013;&#010;&gt; &gt;&#013;&#010;&gt; &gt; The biggest problem seems to be that something in Tomcat on Windows&#013;&#010;&gt; &gt; is interfering with OpenSSL's normal base address request (0xFB00000).&#013;&#010;&gt; &gt; Normally this doesn't matter, but with the FIPS build, if the base&#013;&#010;&gt; &gt; address of the library is moved from what it expects, the result is a&#013;&#010;&gt; &gt; fingerprint error when FIPS mode is enabled.&#013;&#010;&gt; &#013;&#010;&gt; This could be a problem on *NIX as well -- any library may be re-located by&#013;&#010;&gt; the loader for any reason.&#013;&#010;&#013;&#010;It's possible this could be a problem on *NIX, but it's my understanding that this error is&#010;pretty specific to Windows. The documentation for OpenSSL FIPS says that the FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED&#010;error code is a "Microsoft Windows specific error".&#013;&#010;&#013;&#010;&#013;&#010;&gt; &gt; I ran the openssl utility on the same system as Tomcat, and Process&#013;&#010;&gt; &gt; Explorer shows that its copy of libeay32.dll stays at the correct&#013;&#010;&gt; &gt; address. Additionally, I tested the FIPS-compatible libeay32.dll on a&#013;&#010;&gt; &gt; different server with Tomcat, and had the same problem. This seems to&#013;&#010;&gt; &gt; indicate that the memory address issue is specific to Tomcat, not the&#013;&#010;&gt; &gt; server.&#013;&#010;&gt; &#013;&#010;&gt; Or running within a JVM which has a significant amount of native code that&#013;&#010;&gt; gets loaded first, which may cause the loader to re-locate the library when it&#013;&#010;&gt; finally gets loaded.&#013;&#010;&gt; &#013;&#010;&gt; Any interest in trying some Java-based testing using libtcnative?&#013;&#010;&#013;&#010;I'm game, if you let me know what you'd like me to do. : )&#013;&#010;&#013;&#010;&#013;&#010;&gt; &gt; I can't tell from Process Explorer why libeay32.dll is being rebased&#013;&#010;&gt; &gt; (I didn't see any other libraries under tomcat7.exe that were&#013;&#010;&gt; &gt; obviously taking up the same address space). I think it's going to&#013;&#010;&gt; &gt; take someone with more experience with both Windows and Tomcat than&#013;&#010;&gt; I&#013;&#010;&gt; &gt; to figure that one out. I suppose it might be worthy of a bug report,&#013;&#010;&gt; &gt; at least.&#013;&#010;&gt; &#013;&#010;&gt; That would be good -- bug reports have more visibility than mailing list posts,&#013;&#010;&gt; and it's a good place to collect information all in one place.&#013;&#010;&#013;&#010;I submitted bug 55113 for this. (https://issues.apache.org/bugzilla/show_bug.cgi?id=55113)&#013;&#010;&#013;&#010;&#013;&#010;&gt; I'm curious: what base address did you use when you changed it?&#013;&#010;&#013;&#010;The one that worked for me was 0x6FB00000.&#013;&#010;&#013;&#010;&#013;&#010;&gt; &gt; If the fix for the memory rebasing issue ends up being that OpenSSL&#013;&#010;&gt; &gt; needs to be configured with a different base address, that would be&#013;&#010;&gt; &gt; good to include in the build documentation for tcnative.&#013;&#010;&gt; &gt; The file \jni\native\srclib\BUILDING would be a good place for such a&#013;&#010;&gt; &gt; note. But, if the interfering Tomcat piece were to be found and&#013;&#010;&gt; &gt; resolved, you wouldn't need it.&#013;&#010;&gt; &#013;&#010;&gt; I suspect this is an OS-related thing that Tomcat can't really affect.&#013;&#010;&gt; Note that (other than tcnative and the win32 service-launcher), Tomcat&#013;&#010;&gt; doesn't have any native code at all, so it can't really affect this kind of stuff.&#013;&#010;&gt; Tomcat just issues a System.loadLibrary() call and lets the JVM and OS take&#013;&#010;&gt; over.&#013;&#010;&gt; &#013;&#010;&gt; &gt;&gt;&gt; With my test application, the original base address was not being&#013;&#010;&gt; &gt;&gt;&gt; changed by the OS, according to process explorer, which is why it&#013;&#010;&gt; &gt;&gt;&gt; worked with the original build.&#013;&#010;&gt; &gt;&gt;&gt;&#013;&#010;&gt; &gt;&gt;&gt; Thanks for your help!&#013;&#010;&gt; &gt;&gt;&#013;&#010;&gt; &gt;&gt; No problem. If there were any other gotchas you found when building&#013;&#010;&gt; &gt;&gt; tcnative/FIPS/win32 could you let us know? Actually, creating a Wiki&#013;&#010;&gt; &gt;&gt; page is easy to do and you could help others who are trying to do the&#013;&#010;&gt; &gt;&gt; same thing.&#013;&#010;&gt; &gt;&#013;&#010;&gt; &gt; One minor issue I found when building tcnative on Windows was that&#013;&#010;&gt; &gt; the BUILDING file in the \jni\native directory in&#013;&#010;&gt; &gt; tomcat-native-1.1.27-win32-src.zip appears to contain UNIX build&#013;&#010;&gt; &gt; instructions. This probably isn't appropriate, since the zip file is&#013;&#010;&gt; &gt; specific to win32.&#013;&#010;&gt; &#013;&#010;&gt; That's a good point. Could you log that in Bugzilla as well? There are&#013;&#010;&gt; (brief) building instructions on http://tomcat.apache.org/native-doc/&#013;&#010;&gt; but they should probably also be in the BUILDING file.&#013;&#010;&#013;&#010;Submitted bug 55114 for this. (https://issues.apache.org/bugzilla/show_bug.cgi?id=55114)&#013;&#010;&#013;&#010;&#013;&#010;&gt; &gt; If there's a good place to put a wiki page about this, let me know,&#013;&#010;&gt; &gt; and I can try to add something.&#013;&#010;&gt; &#013;&#010;&gt; Really anywhere under http://wiki.apache.org/tomcat/FAQ would be great.&#013;&#010;&gt; If I were looking for information about this, I'm not sure where I'd look first.&#013;&#010;&gt; Perhaps under "Security"?&#013;&#010;&#013;&#010;If I get a chance, I'll try and add something here.&#013;&#010;&#013;&#010;&#013;&#010;--Steve Nickels&#013;&#010;Ipswitch, Inc.&#013;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Running RMI client in Tomcat 7 got ClassNotFoundException</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51C07C31.1050407@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51C07C31-1050407@christopherschultz-net%3e</id>
<updated>2013-06-18T15:26:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;William,&#010;&#010;On 6/17/13 11:10 PM, William Kang wrote:&#010;&gt; I got the following error by submitting the code from RMI client to&#010;&gt; RMI server: java.rmi.ServerException: RemoteException occurred in&#010;&gt; server thread; nested exception is: java.rmi.UnmarshalException:&#010;&gt; error unmarshalling arguments; nested exception is: &#010;&gt; java.lang.ClassNotFoundException: mypackage.SomeClass&#010;&#010;I assume mypackage.SomeClass is one of your internal classes?&#010;&#010;Typically, you need to provide the .class files for the objects you&#010;expect to receive via RMI on the client as well as the server. If you&#010;want to to dynamic .class file downloading from the server, you'll&#010;need to do something like this:&#010;&#010;http://stackoverflow.com/questions/4762430/rmi-question-where-do-clients-get-a-definition-for-remote-classes-that-have-no&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRwHwxAAoJEBzwKT+lPKRY2dcQAJdjP+7A9PjTjzNNdxFisFbE&#010;H5r48HwEe5Nn87FNqDAsPAQTnERdAJfU089n6QuYh88uXuru/+Kqd9fXfLhq4Ver&#010;0RClHNzUp41BsnJGQOO0yTeqn+FoZIH4qbKJbnhQjDYZG0fO/bsknnbUUi0II+SB&#010;7EpXPdEtw8dhGlgkoQNmS7Q4lM3pnFOfm6Tuao/qwuIAZwIcYrAlCxzZWWAHvpBJ&#010;K9nYAY632AKBd7XXpPvCeYahyoKCDRy1UxDqHITh1/qN9UgLIakVzSmWNgV58wae&#010;CYutgDHXCeTDwU6P+cEoK4JZ/nE+FMgIQAc2SQOts6Y+xuflR16+/Ijh+Zejgbc1&#010;x+3bdVVWPp6kb59of/yYmpHrhvsr1dAvjRXl486VU/WzYOs7B46SXIPeYtp6jljP&#010;Le9P7JjDdzknXBfImB7QWkQmGBZ5tBplGCTAr8qdAQ7w7/Eflsc3MXWqyrsDlqZe&#010;wlRBF+thftWN14YGvvg++Zu0S0I+hKyxZu4cDy3CsogmGBfurMIyjodtb7x8Ikqf&#010;wQjSwFXpmn8GwaWuUr1i7kJ/blyipmCEh8hbWtqQRjFcpteFpTkx98NkJwGjrTXe&#010;TVQVrEjV/UDcqdsqNZ90mzqrIJ8bTIpn1c7RM9XCz0KrMAZ6I81CtjtqFd+faAh+&#010;V4zpLRTRn4nLHB7aUUUE&#010;=nk0/&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: http request (no only session) replication in cluster</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51C07AF3.9080700@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51C07AF3-9080700@christopherschultz-net%3e</id>
<updated>2013-06-18T15:21:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Jakub,&#010;&#010;On 6/18/13 3:27 AM, Ja kub wrote:&#010;&gt; Ravindra,&#010;&gt; &#010;&gt; Thx for idea, I will read about it, but at first glance it looks&#010;&gt; like with 5000 pending servlet requests I will have 5000 threads&#010;&gt; awaiting response from cxf client, with async servlet and async cxf&#010;&gt; webservice server, connected with async cxf client, all 5000&#010;&gt; pending threads can be served by one thread,&#010;&#010;Sounds like async + your own threaded-queue is the way to go, assuming&#010;that you really have to wait-around a while for CXF responses.&#010;&#010;&gt; I have to deal not only with faults, but also with long running&#010;&gt; webservice client requests - up to two client requests, 20 second&#010;&gt; each&#010;&#010;Most of that time is just sitting there waiting, right?&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRwHrzAAoJEBzwKT+lPKRYqu0P/iMUOAqDZ0sSI2evQhz7xJh/&#010;tPaOeF6bISOqfCfbyFKesZrDEDoc/wZrdBmzfkT+72M8jKfbY4MBGCtvkol0ffcl&#010;SWEphu5wW2TRxcaoG6r7DWrCtE87AJaofgvd+VtN9lE0fPtdXJqf0s8bnE/+I2TN&#010;hnoyNXfhC/3lMNGG16d6/1Vi16qWV4d+H5Fo9fz3ohunBBHFq6L10OxXRu7alL//&#010;KKpyenMn2KFZeGsokty2dmMr9bNW2PYgHTXrjZCK8DU8iTGtCRRPoZtF2ZJWcchP&#010;qSZxm1ZqFFLsWbRd54ixdmivvk2OEleoDhgjYGRSuPt36vYcfhGP4svuMvcWA+bR&#010;juipkA0kKxZjRQ0kFfjqoowQIL+iLsUeBmfeL8YchxvFkzt0bTskfUnEd60kzTCo&#010;dfGJkBCuPR5qjXwffYHJd3mDlPjL9hd2npcns8KQgad0WJA5rZZdmEl7K2vKpOw7&#010;fBy4r3gJR2T+g0974+UoqBcTU+wdIebIe6XPF7GweNS6fbCTekTjM1iS/JFj3Qrc&#010;mtGj85i5QEmgTpLRQqZG+N4lY/4Rpvk+i9JsmP4KvQAT1Dkgcs95IAPrettDWqNs&#010;ZKPtZJBeW+tnsi5ZXET4M3fnFoxdCK1+7igrYHjbvs4sXlmWyc1gz9lrTnO/nmHY&#010;6vaOUf6Nfw6M5EFcG9Or&#010;=UZ+y&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Running RMI client in Tomcat 7 got ClassNotFoundException</title>
<author><name>Mark Thomas &lt;markt@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51C01159.9000504@apache.org%3e"/>
<id>urn:uuid:%3c51C01159-9000504@apache-org%3e</id>
<updated>2013-06-18T07:50:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 18/06/2013 04:10, William Kang wrote:&#010;&#010;&gt; I DID NOT set up the security manager in the code, I assume that Tomcat&#010;&gt; will use its own.&#010;&gt;  //if (System.getSecurityManager() == null) {&#010;&gt;  //   System.setSecurityManager(new SecurityManager());&#010;&gt;  //}&#010;&#010;Only if you start Tomcat with a security manager.&#010;&#010;Mark&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Precompiled tag compatibility issue between 5.5 and 7.0</title>
<author><name>Mark Thomas &lt;markt@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51C01134.7060203@apache.org%3e"/>
<id>urn:uuid:%3c51C01134-7060203@apache-org%3e</id>
<updated>2013-06-18T07:50:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 17/06/2013 23:08, Jeff_Shanholtz@McAfee.com wrote:&#010;&gt; We have precompiled tags which were compiled under 5.5.35 and don't&#010;&gt; work under 7.0.34. From my investigation, it appears it's due to an&#010;&gt; interface change in JspSourceDependent. The return type of&#010;&gt; getDependants() changed. For us the solution isn't as simple as&#010;&gt; recompiling for two reasons: we have shipping products which plug&#010;&gt; into our tomcat based platform and some such products target multiple&#010;&gt; versions of our platform, some of which are 5.5 based and some are&#010;&gt; 7.0 based.&#010;&gt; &#010;&gt; Is this a bug?&#010;&#010;No.&#010;&#010;&gt; Shouldn't there be backward compatibility for&#010;&gt; precompiled tags?&#010;&#010;No. While we don't break compatibility very often, there is no guarantee&#010;of compatibility for pre-compiled tags (or JSPs) even between point&#010;releases let alone between releases two major versions apart.&#010;&#010;Pre-compilation is only supported when performed against the release&#010;that that pre-compiled artefacts will be running on.&#010;&#010;&gt; Is there anything that can be done to get such&#010;&gt; existing tags working?&#010;&#010;&gt; I'm looking for any guidance on how to move&#010;&gt; forward in addressing this issue.&#010;&#010;5.5.x is no longer supported so that short answer is move all your&#010;products to 7.0.x. Over 12 months notice was given for 5.5.x end-of-life&#010;so there really is no excuse for not having moved to 7.0.x already.&#010;&#010;Other options that come to mind:&#010;- don't pre-compile the tag files&#010;- pre-compile as part of the install procedure rather than at build time&#010;- patch Tomcat 5 (that will break any existing pre-compiled tags)&#010;- re-write your tag files as tags&#010;&#010;Mark&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: http request (no only session) replication in cluster</title>
<author><name>Ja kub &lt;jjakub83@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cCAJqdOe8QWSSzDSrNnbkBTzoXL+pGz-O4Lz-kn+Cz4UYFzuPFxw@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCAJqdOe8QWSSzDSrNnbkBTzoXL+pGz-O4Lz-kn+Cz4UYFzuPFxw@mail-gmail-com%3e</id>
<updated>2013-06-18T07:27:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ravindra,&#010;&#010;Thx for idea, I will read about it,&#010;but at first glance it looks like with 5000 pending servlet requests I will&#010;have 5000 threads awaiting response from cxf client,&#010;with async servlet and async cxf webservice server, connected with async&#010;cxf client, all 5000 pending threads can be served by one thread,&#010;&#010;I have to deal not only with faults,&#010;but also with long running webservice client requests - up to two client&#010;requests, 20 second each&#010;&#010;&#010;regards&#010;Jakub&#010;&#010;ps&#010;possibly apache camel can do with it, I have to check in spare time.&#010;&#010;&#010;&#010;On Mon, Jun 17, 2013 at 5:51 AM, Vanga Palli, Ravindra Kumar &lt;&#010;ravindra.vangapalli@hp.com&gt; wrote:&#010;&#010;&gt; Ja kub,&#010;&gt;&#010;&gt; Looks like you are re-inventing wheel here. All you are looking for is a&#010;&gt; fault tolerance system, you should consider exploring  hystrix - latency&#010;&gt; and fault tolerance for distributed systems library.&#010;&gt;&#010;&gt; https://github.com/Netflix/Hystrix&#010;&gt;&#010;&gt; -Ravi&#010;&gt;&#010;&gt; ________________________________________&#010;&gt; From: Ja kub [jjakub83@gmail.com]&#010;&gt; Sent: Thursday, June 13, 2013 1:11 AM&#010;&gt; To: Tomcat Users List&#010;&gt; Subject: Re: http request (no only session) replication in cluster&#010;&gt;&#010;&gt; Christopher&#010;&gt; Thx for response, I will inform guys from business about what You have&#010;&gt; written, and let them consider it&#010;&gt;&#010;&gt; Regards&#010;&gt; Jakub&#010;&gt;&#010;&gt;&#010;&gt; On Wed, Jun 12, 2013 at 4:10 PM, Christopher Schultz &lt;&#010;&gt; chris@christopherschultz.net&gt; wrote:&#010;&gt;&#010;&gt; &gt; -----BEGIN PGP SIGNED MESSAGE-----&#010;&gt; &gt; Hash: SHA256&#010;&gt; &gt;&#010;&gt; &gt; Jakob,&#010;&gt; &gt;&#010;&gt; &gt; On 6/11/13 5:04 PM, Ja kub wrote:&#010;&gt; &gt; &gt; requirement is system should be possible to process 160 req/sec&#010;&gt; &gt; &gt; (200 is better to multiply) and system is kind of failover proxy&#010;&gt; &gt; &gt; itself&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; there are 2 backing webservices, each can answer max 20s, it there&#010;&gt; &gt; &gt; is timeout on first, I must call the second, if there is timeout on&#010;&gt; &gt; &gt; second I send soap fault to client, so usually it shouldn't be more&#010;&gt; &gt; &gt; than 20s per req, guys say that normally it is 7-10&#010;&gt; &gt; &gt; seconds/request, but in worst case it is 2*20s*160 requests/s ~=&#010;&gt; &gt; &gt; 6400 pending requests (and according to deal we must fulfill worst&#010;&gt; &gt; &gt; case)&#010;&gt; &gt;&#010;&gt; &gt; If you have 2 member nodes and one of them starts to slow down, then&#010;&gt; &gt; you'll see pretty much all requests re-tried on the second node, which&#010;&gt; &gt; will slow down that one. I think you'll end up seeing a storm of&#010;&gt; &gt; requests bouncing back and forth.&#010;&gt; &gt;&#010;&gt; &gt; Worse, the initial request will continue processing on the 1st node,&#010;&gt; &gt; ignorant of the fact that the lb has given up and tried the other&#010;&gt; &gt; node. It's just going to fall apart from there.&#010;&gt; &gt;&#010;&gt; &gt; Honestly, this should be able to be handled at your lb -- can't you&#010;&gt; &gt; set a time-out there?&#010;&gt; &gt;&#010;&gt; &gt; &gt; even if there are so many requests they are pending on sockets, I&#010;&gt; &gt; &gt; try to do it with NIO, asynchronous servlets and async cxf - both&#010;&gt; &gt; &gt; async cxf webservice is exposed by me, and I also call backing ws&#010;&gt; &gt; &gt; with async cxf I think even one tomcat on one server should be able&#010;&gt; &gt; &gt; to serve such 6400 pending requests with 160req/s, apart from proxy&#010;&gt; &gt; &gt; there are also 4-6 inserts into database (cli req, resp; 1st ws&#010;&gt; &gt; &gt; call, resp; 2nd ws call, resp&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; how do You assess such architecture/attitude ? do You expect&#010;&gt; &gt; &gt; problems with async exposed webservice based on async servlet and&#010;&gt; &gt; &gt; NIO, and async cxf ws client ? afaik cxf use thread locals, are&#010;&gt; &gt; &gt; they all right with tomcat async servlets ? (I don't define&#010;&gt; &gt; &gt; threadlocals by myself, only cxf possibly does)&#010;&gt; &gt;&#010;&gt; &gt; It's not a socket-resource issue, it's a raw work-load issue: you have&#010;&gt; &gt; a large amount of load and it looks like you can't handle it very&#010;&gt; &gt; well. I would recommend more nodes, first, and then seriously consider&#010;&gt; &gt; whether re-trying on a second node is appropriate if the first node&#010;&gt; &gt; takes too long.&#010;&gt; &gt;&#010;&gt; &gt; What you should probably do is actually profile your code to find out&#010;&gt; &gt; what is taking so long. Using tricks like ThreadLocals can shed&#010;&gt; &gt; microseconds off of a request, not whole seconds.&#010;&gt; &gt;&#010;&gt; &gt; You might want to consider whether you can do less work during a&#010;&gt; &gt; request -- perhaps split a single transaction into more than one. Or,&#010;&gt; &gt; just acknowledge that sometimes a transaction can take 10-20 seconds&#010;&gt; &gt; (or 50?) and manage the clients' expectations.&#010;&gt; &gt;&#010;&gt; &gt; You also need to find out where your bottleneck is: RDBMSs, slow&#010;&gt; &gt; disks, slow network links, etc. can all be much more significant than&#010;&gt; &gt; things like software stack and exact implementation of your code. If&#010;&gt; &gt; you are missing an index on a relational table, transactions that&#010;&gt; &gt; should take a second or two can take tens of seconds.&#010;&gt; &gt;&#010;&gt; &gt; Start there: profile your application, find out what is slow, and fix&#010;&gt; &gt; that. Don't try to work-around the problem with surprising&#010;&gt; &gt; transactional re-tries, because they likely won't work the way you&#010;&gt; &gt; hoped. Hey, once you fix your performance problem, perhaps you won't&#010;&gt; &gt; need additional hardware. Also, your users will be very happy to see a&#010;&gt; &gt; speed improvement.&#010;&gt; &gt;&#010;&gt; &gt; - -chris&#010;&gt; &gt; -----BEGIN PGP SIGNATURE-----&#010;&gt; &gt; Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;&gt; &gt; Comment: GPGTools - http://gpgtools.org&#010;&gt; &gt; Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&gt; &gt;&#010;&gt; &gt; iQIcBAEBCAAGBQJRuIFyAAoJEBzwKT+lPKRYr+4QAL7UCQvZ/CBIueIqhFDLkZ57&#010;&gt; &gt; v0uWcuukEtT8/8dNUBW2SGSE4OwDyH41Nsx7ZVo4W+lTnzduVbjXSvU4lXNDiY19&#010;&gt; &gt; 9MgpwuxZWlUxHAgOQ5NODIFwrHQK2GYMe8+Qo8OBVf6lOhVdB4PS/7XM7lrsnWBn&#010;&gt; &gt; rpojl4rPm7+esciZPB1q15+PxCbgh4uGsI4KCXyZiW/gz/dLC2v8u6QiYfqoXgov&#010;&gt; &gt; iutYtII+7f1E6I+Ag3LjmQwrzY7pRpHrotcJ4aCpyOs9EHTavKf3mapwY2HiOP+t&#010;&gt; &gt; G9qwGuq5tUJhkBzF5Vdvqf+lCbdJHkQtLW3Z4vL4/XTK7SVSvjipFhsttZF4TII6&#010;&gt; &gt; 6QVQmjCJZRYdPDegzB+NVaCxPkdZLLdwHNFFfsZGabdTQDkAKOEXQiYjBqJ9n5nX&#010;&gt; &gt; WRHvYLQtyGEj1e+0zqwCihRHie2TbfwdggtCoVaOF+8Zpguv3K9VRHwvFA/miA1i&#010;&gt; &gt; JkYCfxKjyF/RoCyB4wZqCi5VsJjztQpq6uDQiUG0CACY1491sB35M+Vkqm3jqRbh&#010;&gt; &gt; 0HXs1ckqZsw+2Y013kpCVs0eipOst5GD6XqXr6LTT/fQwEYWa3uVTk3/h2xDd9BT&#010;&gt; &gt; DlTZrs1CNhqMBjNqUDUFkiiempf9kFkQhrao50CAilix95/VhdWkDjFcFSKKQ0/J&#010;&gt; &gt; EkcONNIioMTN7cWzKNHf&#010;&gt; &gt; =miI6&#010;&gt; &gt; -----END PGP SIGNATURE-----&#010;&gt; &gt;&#010;&gt; &gt; ---------------------------------------------------------------------&#010;&gt; &gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; &gt; For additional commands, e-mail: users-help@tomcat.apache.org&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; For additional commands, e-mail: users-help@tomcat.apache.org&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Running RMI client in Tomcat 7 got ClassNotFoundException</title>
<author><name>William Kang &lt;weliam.cloud@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cCAA9ouV7f+daAo-uA_OhDFr8ovWm=LJsqugbXbrAoi24C3dSFtQ@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCAA9ouV7f+daAo-uA_OhDFr8ovWm=LJsqugbXbrAoi24C3dSFtQ@mail-gmail-com%3e</id>
<updated>2013-06-18T03:10:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,&#010;I posted a question on stackoverflow but got no answer, can anybody help me&#010;here?&#010;&#010;I am having some difficulties with RMI and Tomcat. This is the big picture&#010;of this project I am working on: the RMI client is called by a Java servlet&#010;that runs in Tomcat, the servlet accept user input and pass the parameters&#010;to the RMI client. Then the RMI client then calls the RMI server to run the&#010;heavy compuation part. The problem is that although everything works fine&#010;without hosting the RMI client in the Tomcat server, it doesn't run once I&#010;put it in Tomcat.&#010;&#010;Here are some configurations:&#010;&#010;I DID NOT set up the security manager in the code, I assume that Tomcat&#010;will use its own.&#010; //if (System.getSecurityManager() == null) {&#010; //   System.setSecurityManager(new SecurityManager());&#010; //}&#010;&#010;I also set the permission as following:&#010;&gt; $CATALINA_HOME/conf/catalina.policy&#010;    grant codeBase "file:${catalina.home}/webapps/MyAPP/WEB-INF/classes/-"&#010;{&#010;        permission java.security.AllPermission "", ""; };&#010;    grant codeBase "file:${catalina.home}/webapps/MyAPP/WEB-INF/lib/-" {&#010;        permission java.security.AllPermission "", "";&#010;    };&#010;    grant codeBase&#010;"file:${catalina.home}/webapps/MyAPP/WEB-INF/lib/some-common-3.0.jar" {&#010;        permission java.io.FilePermission "*", "read, write";&#010;    };&#010;&#010;Other than these two configurations, I didn't set any&#010;java.rmi.server.codebase or java.security.policy.&#010;&#010;I got the following error by submitting the code from RMI client to RMI&#010;server:&#010; java.rmi.ServerException: RemoteException occurred in server thread;&#010;nested exception is:&#010; java.rmi.UnmarshalException: error unmarshalling arguments; nested&#010;exception is:&#010; java.lang.ClassNotFoundException: mypackage.SomeClass&#010; at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:334)&#010; at sun.rmi.transport.Transport$1.run(Transport.java:159)&#010; at java.security.AccessController.doPrivileged(Native Method)&#010; at sun.rmi.transport.Transport.serviceCall(Transport.java:155)&#010; at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)&#010; at&#010;sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)&#010; at&#010;sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)&#010; at&#010;java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)&#010; at&#010;java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)&#010; at java.lang.Thread.run(Thread.java:662)&#010; at&#010;sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)&#010; at&#010;sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)&#010; at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)&#010; at&#010;java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)&#010; at&#010;java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)&#010; at com.sun.proxy.$Proxy19.executeTask(Unknown Source)&#010; at&#010;cluster.server.centralservice.CentralManagementServer.submitJob(CentralManagementServer.java:232)&#010; at cluster.server.centralservice.JobSubmitter.runJob(JobSubmitter.java:226)&#010; at cluster.server.centralservice.JobSubmitter.doPost(JobSubmitter.java:144)&#010; at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)&#010; at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)&#010; at&#010;org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)&#010; at&#010;org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&#010; at&#010;org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)&#010; at&#010;org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)&#010; at&#010;org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)&#010; at&#010;org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)&#010; at&#010;org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)&#010; at&#010;org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)&#010; at&#010;org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)&#010; at&#010;org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)&#010; at&#010;org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)&#010; at&#010;org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)&#010; at&#010;org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)&#010; at&#010;java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)&#010; at&#010;java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)&#010; at java.lang.Thread.run(Thread.java:662)&#010; Caused by: java.rmi.UnmarshalException: error unmarshalling arguments;&#010;nested exception is:&#010; java.lang.ClassNotFoundException: mypackage.SomeClass&#010;&#010;I have been stuck here for a few days. Most examples I searched online is&#010;outdated and do not cover the RMI with Tomcat set up.&#010;How can I set "java.rmi.server.codebase" in Tomcat 7 or how RMI server can&#010;find the codebase? Everything works fine before puting in Tomcat. Can&#010;anybody help?&#010;&#010;The post is listed here:&#010;http://stackoverflow.com/questions/17114804/running-rmi-client-in-tomcat-7-got-classnotfoundexception&#010;&#010;Many thanks.&#010;&#010;&#010;William&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat session mixing</title>
<author><name>joel &lt;joel@physics.tamu.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c2d97629b82d161bb3660c3ee8bef7a72@physics.tamu.edu%3e"/>
<id>urn:uuid:%3c2d97629b82d161bb3660c3ee8bef7a72@physics-tamu-edu%3e</id>
<updated>2013-06-17T22:14:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 &#010;&#010;Hi Chris, &#010;&#010;First, my apologies. Much of the terminology is&#010;unfamiliar to me here. I hope that I've managed to fully answer your&#010;questions. &#010;&#010;The "server calls" are all rmi calls on java-based servers&#010;on the same machine. There are no separate threads directly in the .jsp&#010;pages. &#010;&#010;The userToken has a few variables (userID, userName, etc) and a&#010;bunch of rmi interface methods. It doesn't directly use a tomcat&#010;request,response, etc. Another way of putting it is that all of these&#010;methods could be called equally well from the command line. Here's a&#010;typical method: &#010;&#010; public UserToken getUserToken(String userName) &#010;&#010;I&#010;think a few of the server calls do have&#010;System.out.println/System.err.println commands that do end up in the&#010;catalina.out file. &#010;&#010;Joel &#010;&#010;On 2013-06-17 16:59, Christopher Schultz&#010;wrote: &#010;&#010;&gt; -----BEGIN PGP SIGNED MESSAGE-----&#010;&gt; Hash: SHA256&#010;&gt; &#010;&gt;&#010;Joel,&#010;&gt; &#010;&gt; On 6/17/13 5:12 PM, joel wrote:&#010;&gt; &#010;&gt;&gt; Thanks for the help.&#010;I'm not an expert with tomcat management, There are no servlets. I don't&#010;know what Threadlocal, doGet/doPost/etc are, so presumably haven't used&#010;them.&#010;&gt; &#010;&gt; Eventually, everything is a servlet (or maybe a Filter in&#010;certain&#010;&gt; cases). Even if your code does not include doGet/doPost, they&#010;are&#010;&gt; likely being used under the covers.&#010;&gt; &#010;&gt;&gt; No references are kept&#010;to request,response, session, or stream objects. At login, a user&#010;session token is stored: session.setAttribute("userToken", userToken);&#010;This token also contains wrapper methods to make server calls.&#010;&gt; &#010;&gt; What&#010;does that mean "make server calls"? Do you make those calls in&#010;&gt;&#010;separate threads or anything like that?&#010;&#010; &#010;&#010;Links:&#010;------&#010;[1]&#010;http://gpgtools.org&#010;[2] http://www.enigmail.net/&#010;[3]&#010;mailto:users-unsubscribe@tomcat.apache.org&#010;[4]&#010;mailto:users-help@tomcat.apache.org&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Precompiled tag compatibility issue between 5.5 and 7.0</title>
<author><name>&lt;Jeff_Shanholtz@McAfee.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c79FF2FA32E38D142A6EC2C3AF958A4880BE3C0@DNVEXAMER2N1.corp.nai.org%3e"/>
<id>urn:uuid:%3c79FF2FA32E38D142A6EC2C3AF958A4880BE3C0@DNVEXAMER2N1-corp-nai-org%3e</id>
<updated>2013-06-17T22:08:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
We have precompiled tags which were compiled under 5.5.35 and don't work under 7.0.34. From&#010;my investigation, it appears it's due to an interface change in JspSourceDependent. The return&#010;type of getDependants() changed. For us the solution isn't as simple as recompiling for two&#010;reasons: we have shipping products which plug into our tomcat based platform and some such&#010;products target multiple versions of our platform, some of which are 5.5 based and some are&#010;7.0 based.&#010;&#010;Is this a bug? Shouldn't there be backward compatibility for precompiled tags? Is there anything&#010;that can be done to get such existing tags working? I'm looking for any guidance on how to&#010;move forward in addressing this issue.&#010;&#010;Here is an example tag that exhibits the problem:&#010;&#010;&lt;%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %&gt;&#010;&lt;%@tag dynamic-attributes="dynamicAttributes" %&gt;&#010;&lt;%@attribute name="id" required="true" rtexprvalue="true" %&gt;&#010;&#010;&lt;div id="${id}"&gt;&#010;    &lt;table&gt;&#010;    &lt;c:forEach var="attribute" items="${dynamicAttributes}"&gt;&#010;    &lt;tr&gt;&lt;th&gt;${attribute.key}&lt;/th&gt;&lt;td&gt;${attribute.value}&lt;/td&gt;&lt;/tr&gt;&#010;    &lt;/c:forEach&gt;&#010;    &lt;/table&gt;&#010;&lt;/div&gt;&#010;&#010;When referenced in a precompiled jsp like this...&#010;&#010;                &lt;sample:javafree id="javafree.tag" randomkey="randomvalue"&#010;                                 anotherkey="anothervalue" /&gt;&#010;&#010;...and all compiled against 7.0 but used in 7.0 (or 5.5/5.5), the resulting html looks like&#010;this:&#010;&#010;&lt;div id="javafree.tag"&gt;&#010;    &lt;table&gt;&#010;&#010;    &lt;tbody&gt;&lt;tr&gt;&lt;th&gt;randomkey&lt;/th&gt;&lt;td&gt;randomvalue&lt;/td&gt;&lt;/tr&gt;&#010;&#010;    &lt;tr&gt;&lt;th&gt;anotherkey&lt;/th&gt;&lt;td&gt;anothervalue&lt;/td&gt;&lt;/tr&gt;&#010;&#010;    &lt;/tbody&gt;&lt;/table&gt;&#010;&lt;/div&gt;&#010;&#010;However when compiled against 5.5 and used in 7.0, the resulting html looks like this:&#010;&#010;&lt;div id=""&gt;&#010;    &lt;table&gt;&#010;&#010;    &lt;/table&gt;&#010;&lt;/div&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat session mixing</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BF86D3.5080402@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BF86D3-5080402@christopherschultz-net%3e</id>
<updated>2013-06-17T21:59:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Joel,&#010;&#010;On 6/17/13 5:12 PM, joel wrote:&#010;&gt; Thanks for the help. I'm not an expert with tomcat management,&#010;&gt; There are no servlets. I don't know what Threadlocal, &#010;&gt; doGet/doPost/etc are, so presumably haven't used them.&#010;&#010;Eventually, everything is a servlet (or maybe a Filter in certain&#010;cases). Even if your code does not include doGet/doPost, they are&#010;likely being used under the covers.&#010;&#010;&gt; No references are kept to request,response, session, or stream &#010;&gt; objects. At login, a user session token is stored:&#010;&gt; &#010;&gt; session.setAttribute("userToken", userToken);&#010;&gt; &#010;&gt; This token also contains wrapper methods to make server calls.&#010;&#010;What does that mean "make server calls"? Do you make those calls in&#010;separate threads or anything like that?&#010;&#010;&gt; When tomcat starts mixing sessions, it at least some of the time &#010;&gt; incorrectly maps the userToken with the user.&#010;&#010;If you set the userToken a single time in a session and you always&#010;pull it out of the session instead of getting it anywhere else, then&#010;you should be okay with respect to that particular object.&#010;&#010;Does the userToken have any request-oriented object references in it&#010;(e.g. request, response, or streams of any kind)?&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRv4bSAAoJEBzwKT+lPKRYYIAQAJM4LLlcJUaXXxV1l3YeVzlY&#010;CVAZ1d/q2C6JnydmWlj3Byhidq5tnKRaKjLfoXfUbG+hkrf8+xgPwKSlwKCjE+KS&#010;9lhDgpUNLMd0f4kXQr5cLknDtsliCvAaV1FnpDZeLPsDXIRUDLAYiuYvGGEZt+EO&#010;KGo4oIFuuoKdwbV8XAmG2yumOkf+pMiXO7ZI7tfOz9EjX65Zxm/rADGzCF9aESAx&#010;pH9XY2OMUT5sgOYMlRjgF4/d12ByaVFM5Kbw9TQMMKeawokBDNsz/A83idkvlLw9&#010;WNLkKKx7zRMO634J85WKLQEv6NbbNNF5Xg1a+KMDNotGwGYfFsYh0NTWZfpu+UMf&#010;t/ShPpb6Yw6/YPOgF5GoWXKfl4uG2m7XgkOEry2dVga9XJVJe/CqnKI607UMfOA3&#010;SGdpuE+BDZxomIbP+8CJl7NskpisIcgTy/W2GOvUFE+S3w/R3H5CIOUtRSD366kV&#010;mjbAoCVv8y5hwxOXUOD6wDa+1Cy16Lvmdg0vqjB89ggidtq+GtDdxbx7QM+eK4tQ&#010;2wVZDBpw/Uc32qW3qgVaB+oN5KHpsiOdu1j/JVMcCI5Aq7EUWeskZcY62BJ0bhpF&#010;UkgSx8oyK707x7YbPesupE99OoXpyMJVXEQH4C/3f0iEep2BJQSQVyuJK0XIl6f+&#010;JndKzLPsVVtMSwzLBBse&#010;=F83I&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat session mixing</title>
<author><name>joel &lt;joel@physics.tamu.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c276d92f2ccc9c0aae5edb93c45a00f62@physics.tamu.edu%3e"/>
<id>urn:uuid:%3c276d92f2ccc9c0aae5edb93c45a00f62@physics-tamu-edu%3e</id>
<updated>2013-06-17T21:12:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 &#010;&#010;Hi Chris, &#010;&#010;Thanks for the help. I'm not an expert with tomcat&#010;management, There are no servlets. I don't know what Threadlocal,&#010;doGet/doPost/etc are, so presumably haven't used them. No references are&#010;kept to request,response, session, or stream objects. At login, a user&#010;session token is stored: &#010;&#010; session.setAttribute("userToken",&#010;userToken);&#010;&#010;This token also contains wrapper methods to make server&#010;calls. When tomcat starts mixing sessions, it at least some of the time&#010;incorrectly maps the userToken with the user.&#010;&#010;I'll start the process of&#010;upgrading tomcat and hopefully that is all it takes (and hopefully it&#010;doesn't introduce new problems).&#010;&#010;Joel&#010;&#010;On 2013-06-17 12:47, Christopher&#010;Schultz wrote: &#010;&#010;&gt; -----BEGIN PGP SIGNED MESSAGE-----&#010;&gt; Hash: SHA256&#010;&gt;&#010;&#010;&gt; Joel,&#010;&gt; &#010;&gt; On 6/17/13 12:01 PM, joel wrote:&#010;&gt; &#010;&gt;&gt; Thanks for the&#010;info! I'll look into making the upgrade. Can you advise how an&#010;application bug can cause this when restarting tomcat will fix it? That&#010;would help me wrap my mind around something that isn't imaginable,&#010;yet.&#010;&gt; &#010;&gt; If you store a request object in a session, for example.&#010;Another one&#010;&gt; is having a servlet-scoped variable that gets set in the&#010;&gt;&#010;doGet/doPost/etc. method.&#010;&gt; &#010;&gt; There are other ways to shoot yourself in&#010;the foot, but these are two&#010;&gt; of the most obvious (and common).&#010;&gt; &#010;&gt;&#010;Other ways to leak information include, but are not limited to:&#010;&gt; &#010;&gt; - -&#010;Sloppy ThreadLocal management&#010;&gt; - - Retaining a reference a request or&#010;response object&#010;&gt; - - Retaining a reference to a servlet&#010;Input/OutputStream&#010;&gt; - - Retaining a reference to a session&#010;&gt; &#010;&gt; Hope&#010;that helps,&#010;&gt; - -chris&#010;&gt; -----BEGIN PGP SIGNATURE-----&#010;&gt; Version:&#010;GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;&gt; Comment: GPGTools -&#010;http://gpgtools.org&#010;&gt; Comment: Using GnuPG with Thunderbird -&#010;http://www.enigmail.net/&#010;&gt; &#010;&gt;&#010;iQIcBAEBCAAGBQJRv0vAAAoJEBzwKT+lPKRY01IQAIDwohve5xSpLBN+IqVCUJDQ&#010;&gt;&#010;fW8Iyqch5B6h0nNNQh+A5uxAtWDNnCRUb0PTVwuk3mSYiiDXq9XwhW0Z1zQmmV/Y&#010;&gt;&#010;1J4WyiEJfksjDq4NQa0bH4rUh9wbvHu8beTihz73zN4ydHe/kyOTIiC9K0SBs1Dh&#010;&gt;&#010;HvsjRrf/+jXkg8SNvTZGxHZ9wCMv2wuRA2SFYy5PJIOgjBEDrVzctxwSidcBlta6&#010;&gt;&#010;FhQmTV2DJELBjbc9QPl5DXrsnGntb0T9gzvOuxhl4hWVkt2oIO2MUdYkPGV9APIi&#010;&gt;&#010;rAH4/dJtXzhMs4laMFIsiLBt2eNx8zMJUUfW0wnj1zjfxWqg6chIdidlkqc/M6Bn&#010;&gt;&#010;A3oC3V5QGLrdeONHmvelOqX+9st3OorrKBvk+JoIVzvxN2zeXQacYJGiOOI484Vc&#010;&gt;&#010;HdbWdBrcAgk3PVwtOnR8NF+jCP0quDuiS5O9C3UpXjAr/F/azeVswJZImWVTElJO&#010;&gt;&#010;LmhfRFBq/CaopNJGRRm3MWbbgTeTrPUxCw/S6SbUASHcQAh3eRboq04UvPm+BqWb&#010;&gt;&#010;HRX65PLzio92rboIMKbPpVTc8sqDKRtoQ0k59vH8zsGQmF6WkpRi2MFoHkhdo2JQ&#010;&gt;&#010;IrUSSrbYoJP5KF6GmjEqVfPVWXiKc5aWyWBG1O8ffcqZGqghCwK4/r6OEx9jFz6S&#010;&gt;&#010;mW18XO3jD02az0rTZRGo&#010;&gt; =L4yS&#010;&gt; -----END PGP SIGNATURE-----&#010;&gt; &#010;&gt;&#010;---------------------------------------------------------------------&#010;&gt;&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; For&#010;additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010; &#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Init params picked up before SCI?</title>
<author><name>Mark Thomas &lt;markt@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BF667A.6040508@apache.org%3e"/>
<id>urn:uuid:%3c51BF667A-6040508@apache-org%3e</id>
<updated>2013-06-17T19:41:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 17/06/2013 20:35, Nick Williams wrote:&#010;&gt;&#010;&gt; On Jun 17, 2013, at 2:33 PM, Mark Thomas wrote:&#010;&gt;&#010;&gt;&gt; On 17/06/2013 14:26, Nicholas Williams wrote:&#010;&gt;&gt;&gt; On Jun 17, 2013, at 8:15, Nick Williams &lt;nicholas@nicholaswilliams.net&gt;&#010;wrote:&#010;&gt;&gt;&gt;&#010;&gt;&gt;&gt;&gt; It seems obvious, but I couldn't find it mentioned in the spec, which concerns&#010;me. Hopefully I'm overlooking something.&#010;&gt;&gt;&gt;&gt;&#010;&gt;&gt;&gt;&gt; All &lt;init-param&gt;s in the (merged?) deployment descriptor are guaranteed&#010;to be picked up and placed in the ServletContext before any ServletContainerInitializers are&#010;triggered, right?&#010;&gt;&gt;&gt;&gt;&#010;&gt;&gt;&gt;&gt; Nick&#010;&gt;&gt;&gt;&#010;&gt;&gt;&gt; Sorry, I meant &lt;context-param&gt;s, not &lt;init-param&gt;s. Methinks I'm&#010;&gt;&gt;&gt; operating on too little sleep.&#010;&gt;&gt;&#010;&gt;&gt; It is the logical way of doing things but I don't see any explicit language either.&#010;The best I could find was section 8.3 which implies in paragraph 3 that that the combined&#010;web.xml needs to have been processed before the SCIs are called.&#010;&gt;&gt;&#010;&gt;&gt; Mark&#010;&gt;&#010;&gt; Well at least I'm not going blind.&#010;&gt;&#010;&gt; So how does Tomcat do it? It adds all the context-params to the context before triggering&#010;the SCIs?&#010;&#010;org.apache.catalina.startup.ContextConfig&#010;&#010;The method of interest is left as an exercise for the reader.&#010;&#010;Mark&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Init params picked up before SCI?</title>
<author><name>Nick Williams &lt;nicholas@nicholaswilliams.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c8F005637-E600-49B9-ADF8-A61592E44B60@nicholaswilliams.net%3e"/>
<id>urn:uuid:%3c8F005637-E600-49B9-ADF8-A61592E44B60@nicholaswilliams-net%3e</id>
<updated>2013-06-17T19:35:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&#010;On Jun 17, 2013, at 2:33 PM, Mark Thomas wrote:&#010;&#010;&gt; On 17/06/2013 14:26, Nicholas Williams wrote:&#010;&gt;&gt; On Jun 17, 2013, at 8:15, Nick Williams &lt;nicholas@nicholaswilliams.net&gt; wrote:&#010;&gt;&gt; &#010;&gt;&gt;&gt; It seems obvious, but I couldn't find it mentioned in the spec, which concerns&#010;me. Hopefully I'm overlooking something.&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; All &lt;init-param&gt;s in the (merged?) deployment descriptor are guaranteed&#010;to be picked up and placed in the ServletContext before any ServletContainerInitializers are&#010;triggered, right?&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; Nick&#010;&gt;&gt; &#010;&gt;&gt; Sorry, I meant &lt;context-param&gt;s, not &lt;init-param&gt;s. Methinks I'm&#010;&gt;&gt; operating on too little sleep.&#010;&gt; &#010;&gt; It is the logical way of doing things but I don't see any explicit language either. The&#010;best I could find was section 8.3 which implies in paragraph 3 that that the combined web.xml&#010;needs to have been processed before the SCIs are called.&#010;&gt; &#010;&gt; Mark&#010;&#010;Well at least I'm not going blind.&#010;&#010;So how does Tomcat do it? It adds all the context-params to the context before triggering&#010;the SCIs?&#010;&#010;Nick&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Init params picked up before SCI?</title>
<author><name>Mark Thomas &lt;markt@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BF647F.9090509@apache.org%3e"/>
<id>urn:uuid:%3c51BF647F-9090509@apache-org%3e</id>
<updated>2013-06-17T19:33:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 17/06/2013 14:26, Nicholas Williams wrote:&#010;&gt; On Jun 17, 2013, at 8:15, Nick Williams &lt;nicholas@nicholaswilliams.net&gt; wrote:&#010;&gt;&#010;&gt;&gt; It seems obvious, but I couldn't find it mentioned in the spec, which concerns me.&#010;Hopefully I'm overlooking something.&#010;&gt;&gt;&#010;&gt;&gt; All &lt;init-param&gt;s in the (merged?) deployment descriptor are guaranteed to&#010;be picked up and placed in the ServletContext before any ServletContainerInitializers are&#010;triggered, right?&#010;&gt;&gt;&#010;&gt;&gt; Nick&#010;&gt;&#010;&gt; Sorry, I meant &lt;context-param&gt;s, not &lt;init-param&gt;s. Methinks I'm&#010;&gt; operating on too little sleep.&#010;&#010;It is the logical way of doing things but I don't see any explicit &#010;language either. The best I could find was section 8.3 which implies in &#010;paragraph 3 that that the combined web.xml needs to have been processed &#010;before the SCIs are called.&#010;&#010;Mark&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat session mixing</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BF4BC0.50907@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BF4BC0-50907@christopherschultz-net%3e</id>
<updated>2013-06-17T17:47:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Joel,&#010;&#010;On 6/17/13 12:01 PM, joel wrote:&#010;&gt; Thanks for the info! I'll look into making the upgrade.&#010;&gt; &#010;&gt; Can you advise how an application bug can cause this when&#010;&gt; restarting tomcat will fix it? That would help me wrap my mind&#010;&gt; around something that isn't imaginable, yet.&#010;&#010;If you store a request object in a session, for example. Another one&#010;is having a servlet-scoped variable that gets set in the&#010;doGet/doPost/etc. method.&#010;&#010;There are other ways to shoot yourself in the foot, but these are two&#010;of the most obvious (and common).&#010;&#010;Other ways to leak information include, but are not limited to:&#010;&#010;- - Sloppy ThreadLocal management&#010;- - Retaining a reference a request or response object&#010;- - Retaining a reference to a servlet Input/OutputStream&#010;- - Retaining a reference to a session&#010;&#010;Hope that helps,&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRv0vAAAoJEBzwKT+lPKRY01IQAIDwohve5xSpLBN+IqVCUJDQ&#010;fW8Iyqch5B6h0nNNQh+A5uxAtWDNnCRUb0PTVwuk3mSYiiDXq9XwhW0Z1zQmmV/Y&#010;1J4WyiEJfksjDq4NQa0bH4rUh9wbvHu8beTihz73zN4ydHe/kyOTIiC9K0SBs1Dh&#010;HvsjRrf/+jXkg8SNvTZGxHZ9wCMv2wuRA2SFYy5PJIOgjBEDrVzctxwSidcBlta6&#010;FhQmTV2DJELBjbc9QPl5DXrsnGntb0T9gzvOuxhl4hWVkt2oIO2MUdYkPGV9APIi&#010;rAH4/dJtXzhMs4laMFIsiLBt2eNx8zMJUUfW0wnj1zjfxWqg6chIdidlkqc/M6Bn&#010;A3oC3V5QGLrdeONHmvelOqX+9st3OorrKBvk+JoIVzvxN2zeXQacYJGiOOI484Vc&#010;HdbWdBrcAgk3PVwtOnR8NF+jCP0quDuiS5O9C3UpXjAr/F/azeVswJZImWVTElJO&#010;LmhfRFBq/CaopNJGRRm3MWbbgTeTrPUxCw/S6SbUASHcQAh3eRboq04UvPm+BqWb&#010;HRX65PLzio92rboIMKbPpVTc8sqDKRtoQ0k59vH8zsGQmF6WkpRi2MFoHkhdo2JQ&#010;IrUSSrbYoJP5KF6GmjEqVfPVWXiKc5aWyWBG1O8ffcqZGqghCwK4/r6OEx9jFz6S&#010;mW18XO3jD02az0rTZRGo&#010;=L4yS&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat session mixing</title>
<author><name>joel &lt;joel@physics.tamu.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cdd90d3d9ba9925a797440867b32930cc@physics.tamu.edu%3e"/>
<id>urn:uuid:%3cdd90d3d9ba9925a797440867b32930cc@physics-tamu-edu%3e</id>
<updated>2013-06-17T16:01:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 &#010;&#010;Hi Mark, &#010;&#010;Thanks for the info! I'll look into making the upgrade.&#010;&#010;&#010;Can you advise how an application bug can cause this when restarting&#010;tomcat will fix it? That would help me wrap my mind around something&#010;that isn't imaginable, yet. &#010;&#010;Thanks! &#010;&#010;Joel &#010;&#010;On 2013-06-17 10:46, Mark&#010;Thomas wrote: &#010;&#010;&gt; On 17/06/2013 16:32, joel wrote:&#010;&gt; &#010;&gt;&gt; Hi, I'm using&#010;Apache Tomcat/6.0.24 running on centos and have several times observed a&#010;rare issue in which user sessions are "mixed". When this occurs, userA&#010;clicks on a link and is provided with userB specific content, content&#010;that should only be accessible to userB. When this "mixing" occurs, it&#010;seems to affect multiple sessions at the same time, ie userA and userB&#010;are not the only ones affected. Restarting tomcat fixed the problem.&#010;Does anyone know what causes this or how to prevent it?&#010;&gt; &#010;&gt; This is&#010;caused by an application bug in 99.9% of cases.&#010;&gt; &#010;&gt; There are known&#010;issues in 6.0.24 that could cause this. In any case, &#010;&gt; given the number&#010;of security fixes since 6.0.24, an upgrade to 6.0.37 is &#010;&gt; in order.&#010;&gt;&#010;&#010;&gt; Mark&#010;&gt; &#010;&gt;&#010;---------------------------------------------------------------------&#010;&gt;&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; For&#010;additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010; &#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat session mixing</title>
<author><name>Mark Thomas &lt;markt@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BF2F63.3030705@apache.org%3e"/>
<id>urn:uuid:%3c51BF2F63-3030705@apache-org%3e</id>
<updated>2013-06-17T15:46:43Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 17/06/2013 16:32, joel wrote:&#010;&gt;&#010;&gt;&#010;&gt; Hi,&#010;&gt;&#010;&gt; I'm using Apache Tomcat/6.0.24 running on centos and have&#010;&gt; several times observed a rare issue in which user sessions are "mixed".&#010;&gt; When this occurs, userA clicks on a link and is provided with userB&#010;&gt; specific content, content that should only be accessible to userB. When&#010;&gt; this "mixing" occurs, it seems to affect multiple sessions at the same&#010;&gt; time, ie userA and userB are not the only ones affected. Restarting&#010;&gt; tomcat fixed the problem.&#010;&gt;&#010;&gt; Does anyone know what causes this or how to&#010;&gt; prevent it?&#010;&#010;This is caused by an application bug in 99.9% of cases.&#010;&#010;There are known issues in 6.0.24 that could cause this. In any case, &#010;given the number of security fixes since 6.0.24, an upgrade to 6.0.37 is &#010;in order.&#010;&#010;Mark&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>tomcat session mixing</title>
<author><name>joel &lt;joel@physics.tamu.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c086f320d41ea9936d2d90ef463e88e01@physics.tamu.edu%3e"/>
<id>urn:uuid:%3c086f320d41ea9936d2d90ef463e88e01@physics-tamu-edu%3e</id>
<updated>2013-06-17T15:32:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 &#010;&#010;Hi, &#010;&#010;I'm using Apache Tomcat/6.0.24 running on centos and have&#010;several times observed a rare issue in which user sessions are "mixed".&#010;When this occurs, userA clicks on a link and is provided with userB&#010;specific content, content that should only be accessible to userB. When&#010;this "mixing" occurs, it seems to affect multiple sessions at the same&#010;time, ie userA and userB are not the only ones affected. Restarting&#010;tomcat fixed the problem. &#010;&#010;Does anyone know what causes this or how to&#010;prevent it? &#010;&#010;Thanks, &#010;&#010;Joel &#010;&#010; &#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Init params picked up before SCI?</title>
<author><name>Nicholas Williams &lt;nicholas@nicholaswilliams.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c-349385251543101542@unknownmsgid%3e"/>
<id>urn:uuid:%3c-349385251543101542@unknownmsgid%3e</id>
<updated>2013-06-17T13:26:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Jun 17, 2013, at 8:15, Nick Williams &lt;nicholas@nicholaswilliams.net&gt; wrote:&#010;&#010;&gt; It seems obvious, but I couldn't find it mentioned in the spec, which concerns me. Hopefully&#010;I'm overlooking something.&#010;&gt;&#010;&gt; All &lt;init-param&gt;s in the (merged?) deployment descriptor are guaranteed to be picked&#010;up and placed in the ServletContext before any ServletContainerInitializers are triggered,&#010;right?&#010;&gt;&#010;&gt; Nick&#010;&#010;Sorry, I meant &lt;context-param&gt;s, not &lt;init-param&gt;s. Methinks I'm&#010;operating on too little sleep.&#010;&#010;Nick&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Init params picked up before SCI?</title>
<author><name>Nick Williams &lt;nicholas@nicholaswilliams.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c774BEF74-0A7C-4FA8-834F-B73A93E8D696@nicholaswilliams.net%3e"/>
<id>urn:uuid:%3c774BEF74-0A7C-4FA8-834F-B73A93E8D696@nicholaswilliams-net%3e</id>
<updated>2013-06-17T13:15:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
It seems obvious, but I couldn't find it mentioned in the spec, which concerns me. Hopefully&#010;I'm overlooking something.&#010;&#010;All &lt;init-param&gt;s in the (merged?) deployment descriptor are guaranteed to be picked&#010;up and placed in the ServletContext before any ServletContainerInitializers are triggered,&#010;right?&#010;&#010;Nick&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: http request (no only session) replication in cluster</title>
<author><name>&quot;Vanga Palli, Ravindra Kumar&quot; &lt;ravindra.vangapalli@hp.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c29DB21EC048BF449B74A60DD9AC95929424CAB8A@G4W3202.americas.hpqcorp.net%3e"/>
<id>urn:uuid:%3c29DB21EC048BF449B74A60DD9AC95929424CAB8A@G4W3202-americas-hpqcorp-net%3e</id>
<updated>2013-06-17T03:51:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ja kub,&#010;&#010;Looks like you are re-inventing wheel here. All you are looking for is a fault tolerance system,&#010;you should consider exploring  hystrix - latency and fault tolerance for distributed systems&#010;library.&#010;&#010;https://github.com/Netflix/Hystrix&#010;&#010;-Ravi&#010;&#010;________________________________________&#010;From: Ja kub [jjakub83@gmail.com]&#010;Sent: Thursday, June 13, 2013 1:11 AM&#010;To: Tomcat Users List&#010;Subject: Re: http request (no only session) replication in cluster&#010;&#010;Christopher&#010;Thx for response, I will inform guys from business about what You have&#010;written, and let them consider it&#010;&#010;Regards&#010;Jakub&#010;&#010;&#010;On Wed, Jun 12, 2013 at 4:10 PM, Christopher Schultz &lt;&#010;chris@christopherschultz.net&gt; wrote:&#010;&#010;&gt; -----BEGIN PGP SIGNED MESSAGE-----&#010;&gt; Hash: SHA256&#010;&gt;&#010;&gt; Jakob,&#010;&gt;&#010;&gt; On 6/11/13 5:04 PM, Ja kub wrote:&#010;&gt; &gt; requirement is system should be possible to process 160 req/sec&#010;&gt; &gt; (200 is better to multiply) and system is kind of failover proxy&#010;&gt; &gt; itself&#010;&gt; &gt;&#010;&gt; &gt; there are 2 backing webservices, each can answer max 20s, it there&#010;&gt; &gt; is timeout on first, I must call the second, if there is timeout on&#010;&gt; &gt; second I send soap fault to client, so usually it shouldn't be more&#010;&gt; &gt; than 20s per req, guys say that normally it is 7-10&#010;&gt; &gt; seconds/request, but in worst case it is 2*20s*160 requests/s ~=&#010;&gt; &gt; 6400 pending requests (and according to deal we must fulfill worst&#010;&gt; &gt; case)&#010;&gt;&#010;&gt; If you have 2 member nodes and one of them starts to slow down, then&#010;&gt; you'll see pretty much all requests re-tried on the second node, which&#010;&gt; will slow down that one. I think you'll end up seeing a storm of&#010;&gt; requests bouncing back and forth.&#010;&gt;&#010;&gt; Worse, the initial request will continue processing on the 1st node,&#010;&gt; ignorant of the fact that the lb has given up and tried the other&#010;&gt; node. It's just going to fall apart from there.&#010;&gt;&#010;&gt; Honestly, this should be able to be handled at your lb -- can't you&#010;&gt; set a time-out there?&#010;&gt;&#010;&gt; &gt; even if there are so many requests they are pending on sockets, I&#010;&gt; &gt; try to do it with NIO, asynchronous servlets and async cxf - both&#010;&gt; &gt; async cxf webservice is exposed by me, and I also call backing ws&#010;&gt; &gt; with async cxf I think even one tomcat on one server should be able&#010;&gt; &gt; to serve such 6400 pending requests with 160req/s, apart from proxy&#010;&gt; &gt; there are also 4-6 inserts into database (cli req, resp; 1st ws&#010;&gt; &gt; call, resp; 2nd ws call, resp&#010;&gt; &gt;&#010;&gt; &gt; how do You assess such architecture/attitude ? do You expect&#010;&gt; &gt; problems with async exposed webservice based on async servlet and&#010;&gt; &gt; NIO, and async cxf ws client ? afaik cxf use thread locals, are&#010;&gt; &gt; they all right with tomcat async servlets ? (I don't define&#010;&gt; &gt; threadlocals by myself, only cxf possibly does)&#010;&gt;&#010;&gt; It's not a socket-resource issue, it's a raw work-load issue: you have&#010;&gt; a large amount of load and it looks like you can't handle it very&#010;&gt; well. I would recommend more nodes, first, and then seriously consider&#010;&gt; whether re-trying on a second node is appropriate if the first node&#010;&gt; takes too long.&#010;&gt;&#010;&gt; What you should probably do is actually profile your code to find out&#010;&gt; what is taking so long. Using tricks like ThreadLocals can shed&#010;&gt; microseconds off of a request, not whole seconds.&#010;&gt;&#010;&gt; You might want to consider whether you can do less work during a&#010;&gt; request -- perhaps split a single transaction into more than one. Or,&#010;&gt; just acknowledge that sometimes a transaction can take 10-20 seconds&#010;&gt; (or 50?) and manage the clients' expectations.&#010;&gt;&#010;&gt; You also need to find out where your bottleneck is: RDBMSs, slow&#010;&gt; disks, slow network links, etc. can all be much more significant than&#010;&gt; things like software stack and exact implementation of your code. If&#010;&gt; you are missing an index on a relational table, transactions that&#010;&gt; should take a second or two can take tens of seconds.&#010;&gt;&#010;&gt; Start there: profile your application, find out what is slow, and fix&#010;&gt; that. Don't try to work-around the problem with surprising&#010;&gt; transactional re-tries, because they likely won't work the way you&#010;&gt; hoped. Hey, once you fix your performance problem, perhaps you won't&#010;&gt; need additional hardware. Also, your users will be very happy to see a&#010;&gt; speed improvement.&#010;&gt;&#010;&gt; - -chris&#010;&gt; -----BEGIN PGP SIGNATURE-----&#010;&gt; Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;&gt; Comment: GPGTools - http://gpgtools.org&#010;&gt; Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&gt;&#010;&gt; iQIcBAEBCAAGBQJRuIFyAAoJEBzwKT+lPKRYr+4QAL7UCQvZ/CBIueIqhFDLkZ57&#010;&gt; v0uWcuukEtT8/8dNUBW2SGSE4OwDyH41Nsx7ZVo4W+lTnzduVbjXSvU4lXNDiY19&#010;&gt; 9MgpwuxZWlUxHAgOQ5NODIFwrHQK2GYMe8+Qo8OBVf6lOhVdB4PS/7XM7lrsnWBn&#010;&gt; rpojl4rPm7+esciZPB1q15+PxCbgh4uGsI4KCXyZiW/gz/dLC2v8u6QiYfqoXgov&#010;&gt; iutYtII+7f1E6I+Ag3LjmQwrzY7pRpHrotcJ4aCpyOs9EHTavKf3mapwY2HiOP+t&#010;&gt; G9qwGuq5tUJhkBzF5Vdvqf+lCbdJHkQtLW3Z4vL4/XTK7SVSvjipFhsttZF4TII6&#010;&gt; 6QVQmjCJZRYdPDegzB+NVaCxPkdZLLdwHNFFfsZGabdTQDkAKOEXQiYjBqJ9n5nX&#010;&gt; WRHvYLQtyGEj1e+0zqwCihRHie2TbfwdggtCoVaOF+8Zpguv3K9VRHwvFA/miA1i&#010;&gt; JkYCfxKjyF/RoCyB4wZqCi5VsJjztQpq6uDQiUG0CACY1491sB35M+Vkqm3jqRbh&#010;&gt; 0HXs1ckqZsw+2Y013kpCVs0eipOst5GD6XqXr6LTT/fQwEYWa3uVTk3/h2xDd9BT&#010;&gt; DlTZrs1CNhqMBjNqUDUFkiiempf9kFkQhrao50CAilix95/VhdWkDjFcFSKKQ0/J&#010;&gt; EkcONNIioMTN7cWzKNHf&#010;&gt; =miI6&#010;&gt; -----END PGP SIGNATURE-----&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; For additional commands, e-mail: users-help@tomcat.apache.org&#010;&gt;&#010;&gt;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Handling LDAP flakiness</title>
<author><name>patrick conant &lt;patrick.conant@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cCA+uXM7mfWZ7U76v8zAx3LpoMoEBS34GB3ruGvrUAkqvr0KuqEQ@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCA+uXM7mfWZ7U76v8zAx3LpoMoEBS34GB3ruGvrUAkqvr0KuqEQ@mail-gmail-com%3e</id>
<updated>2013-06-14T21:24:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ah!  It's not set.  I'll give that a shot and see how it works.  Thanks for&#010;the pointer!&#010;&#010;--p.&#010;&#010;&#010;&#010;On Fri, Jun 14, 2013 at 3:18 PM, Christopher Schultz &lt;&#010;chris@christopherschultz.net&gt; wrote:&#010;&#010;&gt; -----BEGIN PGP SIGNED MESSAGE-----&#010;&gt; Hash: SHA256&#010;&gt;&#010;&gt; Patrick,&#010;&gt;&#010;&gt; On 6/14/13 4:55 PM, patrick conant wrote:&#010;&gt; &gt; I’ve got Tomcat configured with a JNDI Realm talking to Microsoft&#010;&gt; &gt; Active Directory over LDAP.  It works perfectly when&#010;&gt; &gt; ActiveDirectory works; but when ActiveDirectory gets flaky (which&#010;&gt; &gt; it sometimes does), Tomcat doesn’t handle it well.  In one&#010;&gt; &gt; particular case, I’ve got one thread stuck trying to talk to&#010;&gt; &gt; ActiveDirectory and 199 additional threads waiting for the first&#010;&gt; &gt; thread to release its lock on the JNDIRealm.  Relevant bits of the&#010;&gt; &gt; stack dump are below.&#010;&gt; &gt;&#010;&gt; &gt; My first question is: is there a way to configure the JNDIRealm to&#010;&gt; &gt; be more fault-tolerant?  It looks like I could add an alternateURL&#010;&gt; &gt; attribute -- but in this case, it seems like the connection is hung&#010;&gt; &gt; and the JNDIRealm doesn't recognize a failure, so it wouldn't fail&#010;&gt; &gt; over to the alternateURL. Is there anything else I can do to allow&#010;&gt; &gt; the JNDIRealm to recover from this situation?&#010;&gt; &gt;&#010;&gt; &gt; My second question is: really -- authentication is serialized?&#010;&gt; &gt; Then I realized that the big bold TODO in the docs would address&#010;&gt; &gt; this problem. (&#010;&gt; &gt;&#010;&gt; http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/realm/JNDIRealm.html&#010;&gt; ).&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; Bummer.  I ought to get coding on that...&#010;&gt;&#010;&gt; What is your "timeLimit" attribute set to on this &lt;Realm&gt;? The default&#010;&gt; timeout is infinite...&#010;&gt;&#010;&gt; - -chris&#010;&gt; -----BEGIN PGP SIGNATURE-----&#010;&gt; Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;&gt; Comment: GPGTools - http://gpgtools.org&#010;&gt; Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&gt;&#010;&gt; iQIcBAEBCAAGBQJRu4ipAAoJEBzwKT+lPKRYKjAP+wY9DQmicgVl7wYJ+ZwJd9Dp&#010;&gt; JVZHaxS1zaG4mAARyRcfH6Zgq47hYoroIoWEajV0VP3FVzux4M6zhFRtqu8LDthm&#010;&gt; jq7OlrmlQufUfgqqGIAUqg6BaDscl67VohRAS/odJpyItAQ11KKoxCd+A6kr1Slm&#010;&gt; RJHBirpyURX3u9p/SbB4G9Jz2cMELwckzT9OQsidZ7ylmb1Y+CXbAntzDmMEuf7/&#010;&gt; p4dDHOKkc4FipagO4dJOpDw+WUYgSoqhCVDaP5wf6/gpZU5oPU/u0MY3drnI0lhE&#010;&gt; ofAdnGGntgORp9JpvtnZeyTm8PWLfbRmWqRVH6kDczzgoUoRRcoMJqdg9g4f7Z9A&#010;&gt; k9a+WDazPbapMXKK+tJ0gG4KDD7x1jy6hzOjAI8iz59kRrDoRS/ESJzsIg0IaWMh&#010;&gt; qewLMthnjPoo7P+CRCSxKBTbPb2sbYEquWQ0M9y+0BEdgTqOpO7fDG6RVMLJFnhP&#010;&gt; Mmf0HWKN0JLBgIT5DU7wpCwFONyGOmHF6poSIOPRtjYprXv4EP9Q7trS7BrLPg2h&#010;&gt; a4vXAUz5ihQJ6tyz7aSPS7P+e/sd2Ha1x/er+kGou49dtdX8MxPhh3ZB+ATpYJBP&#010;&gt; /ZPqf3ERo+8AnCv4ZHhuJBn2uhyFNc2XacoNS1LUGIfrJR4AVYli5ZVJP8cqA8E3&#010;&gt; i+C6pIQobmKzBtT9Uumd&#010;&gt; =4AXj&#010;&gt; -----END PGP SIGNATURE-----&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;&gt; For additional commands, e-mail: users-help@tomcat.apache.org&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Handling LDAP flakiness</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BB88A9.6010406@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BB88A9-6010406@christopherschultz-net%3e</id>
<updated>2013-06-14T21:18:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Patrick,&#010;&#010;On 6/14/13 4:55 PM, patrick conant wrote:&#010;&gt; I’ve got Tomcat configured with a JNDI Realm talking to Microsoft&#010;&gt; Active Directory over LDAP.  It works perfectly when&#010;&gt; ActiveDirectory works; but when ActiveDirectory gets flaky (which&#010;&gt; it sometimes does), Tomcat doesn’t handle it well.  In one&#010;&gt; particular case, I’ve got one thread stuck trying to talk to&#010;&gt; ActiveDirectory and 199 additional threads waiting for the first &#010;&gt; thread to release its lock on the JNDIRealm.  Relevant bits of the&#010;&gt; stack dump are below.&#010;&gt; &#010;&gt; My first question is: is there a way to configure the JNDIRealm to&#010;&gt; be more fault-tolerant?  It looks like I could add an alternateURL&#010;&gt; attribute -- but in this case, it seems like the connection is hung&#010;&gt; and the JNDIRealm doesn't recognize a failure, so it wouldn't fail&#010;&gt; over to the alternateURL. Is there anything else I can do to allow&#010;&gt; the JNDIRealm to recover from this situation?&#010;&gt; &#010;&gt; My second question is: really -- authentication is serialized?&#010;&gt; Then I realized that the big bold TODO in the docs would address&#010;&gt; this problem. ( &#010;&gt; http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/realm/JNDIRealm.html).&#010;&gt;&#010;&gt; &#010;Bummer.  I ought to get coding on that...&#010;&#010;What is your "timeLimit" attribute set to on this &lt;Realm&gt;? The default&#010;timeout is infinite...&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRu4ipAAoJEBzwKT+lPKRYKjAP+wY9DQmicgVl7wYJ+ZwJd9Dp&#010;JVZHaxS1zaG4mAARyRcfH6Zgq47hYoroIoWEajV0VP3FVzux4M6zhFRtqu8LDthm&#010;jq7OlrmlQufUfgqqGIAUqg6BaDscl67VohRAS/odJpyItAQ11KKoxCd+A6kr1Slm&#010;RJHBirpyURX3u9p/SbB4G9Jz2cMELwckzT9OQsidZ7ylmb1Y+CXbAntzDmMEuf7/&#010;p4dDHOKkc4FipagO4dJOpDw+WUYgSoqhCVDaP5wf6/gpZU5oPU/u0MY3drnI0lhE&#010;ofAdnGGntgORp9JpvtnZeyTm8PWLfbRmWqRVH6kDczzgoUoRRcoMJqdg9g4f7Z9A&#010;k9a+WDazPbapMXKK+tJ0gG4KDD7x1jy6hzOjAI8iz59kRrDoRS/ESJzsIg0IaWMh&#010;qewLMthnjPoo7P+CRCSxKBTbPb2sbYEquWQ0M9y+0BEdgTqOpO7fDG6RVMLJFnhP&#010;Mmf0HWKN0JLBgIT5DU7wpCwFONyGOmHF6poSIOPRtjYprXv4EP9Q7trS7BrLPg2h&#010;a4vXAUz5ihQJ6tyz7aSPS7P+e/sd2Ha1x/er+kGou49dtdX8MxPhh3ZB+ATpYJBP&#010;/ZPqf3ERo+8AnCv4ZHhuJBn2uhyFNc2XacoNS1LUGIfrJR4AVYli5ZVJP8cqA8E3&#010;i+C6pIQobmKzBtT9Uumd&#010;=4AXj&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Handling LDAP flakiness</title>
<author><name>patrick conant &lt;patrick.conant@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cCA+uXM7=CAG4+NRazoE2DY6k7AXT15rkMCe2KTjJuUAB8PU8NMw@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCA+uXM7=CAG4+NRazoE2DY6k7AXT15rkMCe2KTjJuUAB8PU8NMw@mail-gmail-com%3e</id>
<updated>2013-06-14T20:55:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I’ve got Tomcat configured with a JNDI Realm talking to Microsoft Active&#010;Directory over LDAP.  It works perfectly when ActiveDirectory works; but&#010;when ActiveDirectory gets flaky (which it sometimes does), Tomcat doesn’t&#010;handle it well.  In one particular case, I’ve got one thread stuck trying&#010;to talk to ActiveDirectory and 199 additional threads waiting for the first&#010;thread to release its lock on the JNDIRealm.  Relevant bits of the stack&#010;dump are below.&#010;&#010;My first question is: is there a way to configure the JNDIRealm to be more&#010;fault-tolerant?  It looks like I could add an alternateURL attribute -- but&#010;in this case, it seems like the connection is hung and the JNDIRealm&#010;doesn't recognize a failure, so it wouldn't fail over to the alternateURL.&#010; Is there anything else I can do to allow the JNDIRealm to recover from&#010;this situation?&#010;&#010;My second question is: really -- authentication is serialized?  Then I&#010;realized that the big bold TODO in the docs would address this problem. (&#010;http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/realm/JNDIRealm.html).&#010;Bummer.  I ought to get coding on that...&#010;&#010;Any thoughts appreciated!&#010;&#010;&#010;Thanks,&#010;Pat.&#010;&#010;&#010;&#010;&#010;&#010;&#010;Here’s one of the 199 blocked threads:&#010;&#010;"http-8080-200" daemon prio=10 tid=0x00007f1de0073800 nid=0x7f1e waiting&#010;for monitor entry [0x00007f1dbcd8c000]&#010;&#010;   java.lang.Thread.State: BLOCKED (on object monitor)&#010;&#010;      at&#010;org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:1044)&#010;&#010;       - waiting to lock &lt;0x0000000780053fe0&gt; (a&#010;org.apache.catalina.realm.JNDIRealm)&#010;&#010;       at&#010;org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:945)&#010;&#010;       at&#010;org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)&#010;&#010;       at&#010;org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:523)&#010;&#010;       at&#010;org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)&#010;&#010;       at&#010;org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)&#010;&#010;       at&#010;org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)&#010;&#010;       at&#010;org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)&#010;&#010;       at&#010;org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)&#010;&#010;       at&#010;org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)&#010;&#010;       at&#010;org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)&#010;&#010;       at java.lang.Thread.run(Thread.java:679)&#010;&#010;&#010;&#010;Here’s the blocking thread:&#010;&#010;"http-8080-4" daemon prio=10 tid=0x00007f1de000d800 nid=0x2332 in&#010;Object.wait() [0x00007f1e1c2d9000]&#010;&#010;   java.lang.Thread.State: TIMED_WAITING (on object monitor)&#010;&#010;       at java.lang.Object.wait(Native Method)&#010;&#010;       - waiting on &lt;0x00000007843fdc38&gt; (a com.sun.jndi.ldap.LdapRequest)&#010;&#010;       at com.sun.jndi.ldap.Connection.readReply(Connection.java:447)&#010;&#010;       - locked &lt;0x00000007843fdc38&gt; (a com.sun.jndi.ldap.LdapRequest)&#010;&#010;       at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:358)&#010;&#010;       - locked &lt;0x00000007843fdbd8&gt; (a com.sun.jndi.ldap.LdapClient)&#010;&#010;       at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:210)&#010;&#010;       - locked &lt;0x00000007843fdbd8&gt; (a com.sun.jndi.ldap.LdapClient)&#010;&#010;       at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2685)&#010;&#010;       at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2593)&#010;&#010;       at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2567)&#010;&#010;       at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1932)&#010;&#010;       at com.sun.jndi.ldap.LdapCtx.doSearchOnce(LdapCtx.java:1924)&#010;&#010;       at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1317)&#010;&#010;       at&#010;com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231)&#010;&#010;       at&#010;com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139)&#010;&#010;       at&#010;com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:127)&#010;&#010;       at&#010;javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:140)&#010;&#010;       at&#010;org.apache.catalina.realm.JNDIRealm.bindAsUser(JNDIRealm.java:1562)&#010;&#010;       at&#010;org.apache.catalina.realm.JNDIRealm.checkCredentials(JNDIRealm.java:1416)&#010;&#010;       at&#010;org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:1092)&#010;&#010;       - locked &lt;0x0000000780053fe0&gt; (a org.apache.catalina.realm.JNDIRealm)&#010;&#010;       at&#010;org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:977)&#010;&#010;       at&#010;org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)&#010;&#010;       at&#010;org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:523)&#010;&#010;       at&#010;org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)&#010;&#010;       at&#010;org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)&#010;&#010;       at&#010;org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)&#010;&#010;       at&#010;org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)&#010;&#010;       at&#010;org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)&#010;&#010;       at&#010;org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)&#010;&#010;       at&#010;org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)&#010;&#010;       at java.lang.Thread.run(Thread.java:679)&#010;&#010;* *&#010;&#010;* *&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: lost session in Tomcat 7.040 and IE8</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BB3BFD.5090604@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BB3BFD-5090604@christopherschultz-net%3e</id>
<updated>2013-06-14T15:51:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;André,&#010;&#010;On 6/14/13 3:17 AM, André Warnier wrote:&#010;&gt; Carl Dreher wrote:&#010;&gt;&gt; I have Tomcat 7.0.26 running on Window7 Pro.  I also have Tomcat&#010;&gt;&gt;  7.0.40 running on a Windows 7 Home Premium.  Both have the same&#010;&gt;&gt;  website.  (Obviously, I'm doing some testing.)&#010;&gt;&gt; &#010;&gt;&gt; In the website, a user logs on and the user ID is kept in the &#010;&gt;&gt; session.   In one of the JSP pages I have some JavaScript &#010;&gt;&gt; attached to an html button &lt;input type="button" name="" &#010;&gt;&gt; value="blah blah blah" &#010;&gt;&gt; onclick="window.location='/MySite/MyAction.do'"&gt; (I'm using &#010;&gt;&gt; Struts.)  Now, here is were it gets strange...&#010;&gt;&gt; &#010;&gt;&gt; During testing, I found that IE8 and IE9 both run fine against &#010;&gt;&gt; Tomcat 7.0.26.  By that I mean, after the user logs on, the user &#010;&gt;&gt; ID is kept in the session.  After navigating around the site, if &#010;&gt;&gt; the user then clicks on the above button, the Struts Action&#010;&gt;&gt; class "MyAction.do" is able to find the user ID in the session.&#010;&gt;&gt; The same is true of IE9 against Tomcat 7.0.40.&#010;&gt;&gt; &#010;&gt;&gt; But if I do the above with IE8 against the site on Tomcat&#010;&gt;&gt; 7.0.40, the user ID in the session is empty.&#010;&gt;&gt; &#010;&gt;&gt; To summarize, |     IE8             |   IE9 &#010;&gt;&gt; ----------------------------------------------------------- &#010;&gt;&gt; Tomcat 7.0.26  |     ok               |     ok &#010;&gt;&gt; ----------------------------------------------------------- &#010;&gt;&gt; Tomcat 7.0.40   |    fail              |      ok &#010;&gt;&gt; -----------------------------------------------------------&#010;&gt;&gt; &#010;&gt;&gt; Any ideas where to start looking?&#010;&gt;&gt; &#010;&gt; &#010;&gt; Yes. I would recommend, first of all, that you install some add-on &#010;&gt; on the IE side, which can display the conversation between IE and &#010;&gt; server (HTTP headers etc.). (I know of Fiddler2, but there might&#010;&gt; be others). Then run your check once on each, and compare &#010;&gt; requests/responses/headers.&#010;&#010;+1&#010;&#010;My first reaction is that the session id cookie is being lost, and the&#010;URL being used for window.location=... has not been run through&#010;response.encodeURL().&#010;&#010;Carl, you can use one of any number of fine JSP tag libraries (JSTL,&#010;Struts own taglibs, etc.) to do the equivalent of this (example uses&#010;JSTL):&#010;&#010;&lt;input type="button" name="" value="..."&#010;onclick="window.location='&lt;c:url value="/MyAction.do" /&gt;'" /&gt;&#010;&#010;Note that I assumed /MySite was your context path and so I removed it&#010;from the &lt;c:url&gt; call: &lt;c:url&gt; knows the context path and will insert&#010;it into the URL automatically. If you are running as ROOT context and&#010;the /MySite is actually part of the local URI, you'll obviously need&#010;to add that back in.&#010;&#010;Whether this fixes your problem or not, you should be doing it all the&#010;time for two reasons:&#010;&#010;1. Sessions will continue to work when users have disabled&#010;cookie-based session tracking&#010;&#010;2. Your webapp will continue to work if you change its name (say, from&#010;/MySite to /MyOtherSite)&#010;&#010;Hope that helps,&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRuzv9AAoJEBzwKT+lPKRYPtUP/RKSTtMsu9fDJ4IIdxQ1lczF&#010;RuMR0yWFS2NJ+9bFOp+JBguj2mPGDXIXsh5ylZC0BxuUr7nc/XmBqQHDrvhu+7/q&#010;U9NWqJh5CucSmNqioszEQ61tCaRqK39z9NpQpw3VPf14ShPAxb4Rlre9hba2oCR4&#010;eohVo40hmGjmH4Gn5qm7AR3GTxX71Rs/Lwb/VItUurUpixCv8kNk5a4xNL0uzkcC&#010;YCDnzEXU5P1S4Ec2qqqQDT1wbCEfYDWtSh70/WxRN3GZgXT6RUUX59YeeQYJueUs&#010;9vFAVBXRhouMm/qpWlYIYVch1ynHINAB3srgcUA7u3ViGgYTM3x+7PLM5zA2UpJ7&#010;Vs7iSAf8uodLw+kmWj1fWeeKRHVrAmqW4V5wD/FMD+PSqTR95elzsEvw8oxSAsak&#010;HEZXpgSo+UXrbk0zU8pQ7yct4AAm23ijOzTNVdIi8V9vw08ALHAs0iAvUyxWkvuf&#010;zOBNEP38esHMpgTOH4/ul8B8L7mnL3+6T4m6YFz6lUnD2SbZOjYpU4Y4lgBcoYZd&#010;gnn53Xu6eN3U9jMSgNNpR2YP/G9j/FUYPW+Up4Pe97bFHYgD07AJ15zxxCX47htb&#010;jlfcqXa85z+L0BxWw5TGUepFFpNXgWQEcgoKhEsn+CWVJZLh72czKFZRyr8UxiF0&#010;0Oboz8dhXnas66JdIiXo&#010;=oaRx&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: ssl port always print as 443 in tomcat access logs</title>
<author><name>Konstantin Kolinko &lt;knst.kolinko@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cCABzHfVma-xWTeFc4JLofyZ90N8uCywawbqoPh1+dwbFMVJvyVw@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCABzHfVma-xWTeFc4JLofyZ90N8uCywawbqoPh1+dwbFMVJvyVw@mail-gmail-com%3e</id>
<updated>2013-06-14T12:03:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
2013/6/14 Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)&#010;&lt;anigoyal@cisco.com&gt;:&#010;&gt; Hi&#010;&gt; I have two service running in tomcat.&#010;&gt; First service 'catalina' is having connector port 80, 443, 8080 and 8444.&#010;&gt; Second service 'catalina_advance' have connector port 8081 and 8444.&#010;&gt;&#010;&gt; For catalina_advance, I entered a new tomcat access log file with configuration&#010;&gt; &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%t&#010;%a %h %u %l %p %m %U %H %s %b %D" prefix="localhost_access_log" rotatable="false" suffix=".txt"/&gt;&#010;&gt;&#010;&gt; Now whe I hit the url http://ip-address:8081/context&#010;&gt; The port print in access log file is 8081&#010;&gt;&#010;&gt; When when I hit the url https://ip-address:8444/context&#010;&gt; The port always print as 443.&#010;&#010;This is not what you were writing in your e-mails earlier.&#010;&#010;&#010;&gt;&#010;&gt; Why this is happening&#010;&gt;&#010;&#010;When is this happening?&#010;Is it reproducible with simple example web application on a clean&#010;Tomcat installation?&#010;&#010;It is not your first e-mail here, but again you lack the details.&#010;&#010;I am sure there are a number of "bug reporting guidelines" on the net,&#010;but at least please read these:&#010;https://issues.apache.org/bugzilla/page.cgi?id=bug-writing.html&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>ssl port always print as 443 in tomcat access logs</title>
<author><name>&quot;Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)&quot;&#009;&lt;anigoyal@cisco.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c5032F5DAD1369F48BD8A3348125CBB981287A6AE@xmb-aln-x13.cisco.com%3e"/>
<id>urn:uuid:%3c5032F5DAD1369F48BD8A3348125CBB981287A6AE@xmb-aln-x13-cisco-com%3e</id>
<updated>2013-06-14T09:34:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi&#010;I have two service running in tomcat.&#010;First service 'catalina' is having connector port 80, 443, 8080 and 8444.&#010;Second service 'catalina_advance' have connector port 8081 and 8444.&#010;&#010;For catalina_advance, I entered a new tomcat access log file with configuration&#010;&lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%t&#010;%a %h %u %l %p %m %U %H %s %b %D" prefix="localhost_access_log" rotatable="false" suffix=".txt"/&gt;&#010;&#010;Now whe I hit the url http://ip-address:8081/context&#010;The port print in access log file is 8081&#010;&#010;When when I hit the url https://ip-address:8444/context&#010;The port always print as 443.&#010;&#010;Why this is happening&#010;&#010;-Anil&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: lost session in Tomcat 7.040 and IE8</title>
<author><name>André Warnier &lt;aw@ice-sa.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BAC395.4050604@ice-sa.com%3e"/>
<id>urn:uuid:%3c51BAC395-4050604@ice-sa-com%3e</id>
<updated>2013-06-14T07:17:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Carl Dreher wrote:&#010;&gt; I have Tomcat 7.0.26 running on Window7 Pro.  I also have Tomcat 7.0.40 &#010;&gt; running on a Windows 7 Home Premium.  Both have the same website.  &#010;&gt; (Obviously, I'm doing some testing.)&#010;&gt; &#010;&gt; In the website, a user logs on and the user ID is kept in the session.   &#010;&gt; In one of the JSP pages I have some JavaScript attached to an html button&#010;&gt; &lt;input type="button" name="" value="blah blah blah" &#010;&gt; onclick="window.location='/MySite/MyAction.do'"&gt;&#010;&gt; (I'm using Struts.)  Now, here is were it gets strange...&#010;&gt; &#010;&gt; During testing, I found that IE8 and IE9 both run fine against Tomcat &#010;&gt; 7.0.26.  By that I mean, after the user logs on, the user ID is kept in &#010;&gt; the session.  After navigating around the site, if the user then clicks &#010;&gt; on the above button, the Struts Action class "MyAction.do" is able to &#010;&gt; find the user ID in the session.&#010;&gt; The same is true of IE9 against Tomcat 7.0.40.&#010;&gt; &#010;&gt; But if I do the above with IE8 against the site on Tomcat 7.0.40, the &#010;&gt; user ID in the session is empty.&#010;&gt; &#010;&gt; To summarize,&#010;&gt;                            |     IE8             |   IE9&#010;&gt; -----------------------------------------------------------&#010;&gt; Tomcat 7.0.26  |     ok               |     ok&#010;&gt; -----------------------------------------------------------&#010;&gt; Tomcat 7.0.40   |    fail              |      ok&#010;&gt; -----------------------------------------------------------&#010;&gt; &#010;&gt; Any ideas where to start looking?&#010;&gt; &#010;&#010;Yes. I would recommend, first of all, that you install some add-on on the IE side, which &#010;can display the conversation between IE and server (HTTP headers etc.).&#010;(I know of Fiddler2, but there might be others).&#010;Then run your check once on each, and compare requests/responses/headers.&#010;&#010;There have been over the years (and there still are) so many quirks/bugs/inconsistencies &#010;between IE versions (and patch levels within versions), that I would start there with any&#010;&#010;issue of this nature.&#010;&#010;I'm not saying that this /is/ the problem here, but first things first.&#010;It would not be too surprising if for some reason at some point, IE8 stops sending back &#010;the session cookie, causing Tomcat to create a new session, without user-id.&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>lost session in Tomcat 7.040 and IE8</title>
<author><name>Carl Dreher &lt;focusrsh@arn.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BA9B86.5050105@arn.net%3e"/>
<id>urn:uuid:%3c51BA9B86-5050105@arn-net%3e</id>
<updated>2013-06-14T04:26:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I have Tomcat 7.0.26 running on Window7 Pro.  I also have Tomcat 7.0.40 &#010;running on a Windows 7 Home Premium.  Both have the same website.  &#010;(Obviously, I'm doing some testing.)&#010;&#010;In the website, a user logs on and the user ID is kept in the session.   &#010;In one of the JSP pages I have some JavaScript attached to an html button&#010;&lt;input type="button" name="" value="blah blah blah" &#010;onclick="window.location='/MySite/MyAction.do'"&gt;&#010;(I'm using Struts.)  Now, here is were it gets strange...&#010;&#010;During testing, I found that IE8 and IE9 both run fine against Tomcat &#010;7.0.26.  By that I mean, after the user logs on, the user ID is kept in &#010;the session.  After navigating around the site, if the user then clicks &#010;on the above button, the Struts Action class "MyAction.do" is able to &#010;find the user ID in the session.&#010;The same is true of IE9 against Tomcat 7.0.40.&#010;&#010;But if I do the above with IE8 against the site on Tomcat 7.0.40, the &#010;user ID in the session is empty.&#010;&#010;To summarize,&#010;                            |     IE8             |   IE9&#010;-----------------------------------------------------------&#010;Tomcat 7.0.26  |     ok               |     ok&#010;-----------------------------------------------------------&#010;Tomcat 7.0.40   |    fail              |      ok&#010;-----------------------------------------------------------&#010;&#010;Any ideas where to start looking?&#010;&#010;- Carl Dreher&#010;&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Class cast exception when starting tomcat 7.0.1</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BA819D.6030107@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BA819D-6030107@christopherschultz-net%3e</id>
<updated>2013-06-14T02:36:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Jane,&#010;&#010;On 6/13/13 6:44 PM, Jane Muse wrote:&#010;&gt; I'm using the standard implementation of Realm. Here's the code&#010;&gt; &#010;&gt; //Validate passwords try { if (oldTomcatPassword != null &amp;&amp;&#010;&gt; !"".equals(oldTomcatPassword.trim())) { TomcatConfig tconf =&#010;&gt; TomcatConfig.getInstance(); String digestAlg =&#010;&gt; tconf.getTomcatPwdEncryptionType(); String encryptedOldPwd =&#010;&gt; oldTomcatPassword; if (digestAlg != null) encryptedOldPwd =&#010;&gt; RealmBase.Digest(oldTomcatPassword, digestAlg); if&#010;&gt; (!encryptedOldPwd.equals(tconf.getEncryptedTomcatPwd(tomcatUserName)))&#010;&gt; { errors.add("incorrectPwd", new&#010;&gt; ActionError("error.password.incorrect")); } }&#010;&#010;I'm not sure this is any different than the built-in Tomcat&#010;digest-based realms. Why not just use the available ones and discard&#010;your own realm?&#010;&#010;&gt; As I said, it no longer compiles with catalina.jar from Tomcat &#010;&gt; 7.0.41. This is not a surprise, that the signature would change,&#010;&gt; and I changed the code accordingly. Now it is:&#010;&gt; &#010;&gt; encryptedOldPwd = RealmBase.Digest(oldTomcatPassword, digestAlg,&#010;&gt; encodedType);&#010;&gt; &#010;&gt; Compiles fine now.&#010;&gt; &#010;&gt; . However, when I build with ant, it says actual and formal&#010;&gt; argument lists differ in length. I don't know why there's an actual&#010;&gt; and a formal argument list. I swapped out catalina.jar.&#010;&#010;So, it complies "fine" except not when you build with ant? In what&#010;situation does it compile "fine", then?&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRuoGcAAoJEBzwKT+lPKRYeiYP+gI32KTIuZ5KO2B6GSthwTHl&#010;+C30U4F16Wy1TGRuE5x876hlD/DKQP0DCzfk8D2rUsdQ/GqujQpt28hgtKHdBzij&#010;ffHjs90S4lawDjiAxZyU6ZeiHT6g/r66gtCoQXMbN/s8Geur433XqLDWHDHIzloi&#010;HpZDbLbbeDr+X06UYir037Xt34fMRAyahDCrCW25nJIOaPE/7ckAeiOsDjbBYWx1&#010;G1/KJ5iE3WfysiERnmh7sFH0wt1g5b2B6BmmbNUGKP8lZNdpbmT8GeCcKfS3SR7e&#010;J+onHNVcxEihwdZ1+5121npQlL9F4rxenO3u6StcLqYowL+++ysYt+wb2J9pI69E&#010;Mw2Cpt83Ig1FtDnXSDd4g5jvj98yaZlqxAkT0JEDY6sHW70CpATJrFLoUwIHzAtE&#010;VmRjVBDI5oVCOaGbz6pY53ZnM3eSrG/CiU4OVyzSAH9geKc093poRoE0pOiwGFIx&#010;v1iG4Nj+LAsOPQjHyBPqtmd10htSxoScvy6tcVleava1uonSazsWKJbz4HDRv4ht&#010;H+f+CC6KAfraMVWkCegB9PPxiWcfUnzeo49EfKWcNPspsIUCWYaXR90yvxYlssjb&#010;jqlPp1sc1K7js6aTxeddTtmFPXXhpkFfs0UNmKJ0jZkd0IMQCVQt7dal26/JhbTY&#010;I/sOTgQ+9mYooxZk9YkO&#010;=S8rU&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: forward request by changing the port in request url</title>
<author><name>&quot;Ilya Kazakevich&quot; &lt;Ilya.Kazakevich@JetBrains.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c00e801ce688c$d3f9b2b0$7bed1810$@JetBrains.com%3e"/>
<id>urn:uuid:%3c00e801ce688c$d3f9b2b0$7bed1810$@JetBrains-com%3e</id>
<updated>2013-06-13T23:22:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,&#010;&#010;I do not think destination NAT is good solution because it works on TCP&#010;layer and knows nothing about domain names and URLs (both are application&#010;level (http) knowledge). So you would need to use separate  IP/port  for&#010;that and in case you have it you can bind tomcat there directly) So&#010;application-layer forwarding proxy (nginx, squid, apache) is way to go.&#010;&#010;Hardware cisco solutions could handle it too but I they are too big  for&#010;such a simple task (unless you have really many users)&#010;&#010;Ilya&#010;&#010;&gt;-----Original Message-----&#010;&gt;From: Martin Gainty [mailto:mgainty@hotmail.com]&#010;&gt;Sent: Friday, June 14, 2013 2:28 AM&#010;&gt;To: Tomcat Users List&#010;&gt;Subject: RE: forward request by changing the port in request url&#010;&gt;&#010;&gt;for IP Redirecting and or automatic Network Address Translations (e.g. Port&#010;&gt;80 redirects to Port 81)&#010;&gt;&#010;&gt;you will need a proxy server&#010;&gt;&#010;&gt;please contact support@cisco.com&#010;&gt;&#010;&gt;&#010;&gt;for product and service options&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt;Viel Gluck&#010;&gt;Martin&#010;&gt;&#010;&gt;&#010;&gt;&gt; i have two service running under tomcat. One service is default i.e.&#010;&gt;&gt; catalina on port 8080 and 8443 second service is catalina_new on port&#010;8081&#010;&gt;and 8444.&#010;&gt;&gt;&#010;&gt;&gt; i have application abc.war deployed in webapps_new service which is&#010;&gt;running on port 8081. This application is not there in webapps.&#010;&gt;&gt; i want if any request coming on port 8080 for application abc, it is&#010;&gt;&gt; forwarded to port 8081.(same for ssl port 8443-&gt;8444) Is there any way to&#010;do&#010;&gt;the same.&#010;&gt;&gt;&#010;&gt;&gt; Thanks&#010;&gt;&gt; Anil&#010;&gt;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Class cast exception when starting tomcat 7.0.1</title>
<author><name>Jane Muse &lt;JMuse@rocketsoftware.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cecdc3974e6774d9a980ea5524f4120ce@den-s-mbx4.rocketsoftware.com%3e"/>
<id>urn:uuid:%3cecdc3974e6774d9a980ea5524f4120ce@den-s-mbx4-rocketsoftware-com%3e</id>
<updated>2013-06-13T22:44:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm using the standard implementation of Realm. Here's the code&#010;&#010;//Validate passwords&#010;&#009;&#009;try {&#010;&#009;&#009;&#009;if (oldTomcatPassword != null &amp;&amp; !"".equals(oldTomcatPassword.trim()))&#010;&#009;&#009;&#009;{&#010;&#009;&#009;&#009;&#009;TomcatConfig tconf = TomcatConfig.getInstance();&#010;&#009;&#009;&#009;&#009;String digestAlg = tconf.getTomcatPwdEncryptionType();&#010;&#009;&#009;&#009;&#009;String encryptedOldPwd = oldTomcatPassword;&#010;&#009;&#009;&#009;&#009;if (digestAlg != null)&#010;&#009;&#009;&#009;&#009;&#009;encryptedOldPwd = RealmBase.Digest(oldTomcatPassword, digestAlg);&#010;&#009;&#009;&#009;&#009;if (!encryptedOldPwd.equals(tconf.getEncryptedTomcatPwd(tomcatUserName))) {&#010;&#009;&#009;&#009;&#009;&#009;errors.add("incorrectPwd", new ActionError("error.password.incorrect"));&#010;&#009;&#009;&#009;&#009;}&#010;&#009;&#009;&#009;}&#010;&#010;As I said, it no longer compiles with catalina.jar from Tomcat 7.0.41. This is not a surprise,&#010;that the signature would change, and I changed the code accordingly. Now it is:&#010;&#010;encryptedOldPwd = RealmBase.Digest(oldTomcatPassword, digestAlg, encodedType);&#010;&#010;Compiles fine now.&#010;&#010;. However, when I build with ant, it says actual and formal argument lists differ in length.&#010;I don't know why there's an actual and a formal argument list. I swapped out catalina.jar.&#010;&#010;188: error: method Digest in class RealmBase cannot be applied to given types;&#010;    [javac] &#009;&#009;&#009;&#009;encryptedOldPwd = RealmBase.Digest(oldTomcatPassword, digestAlg, encodedType&#010;);&#010;    [javac] &#009;&#009;&#009;&#009;                           ^&#010;    [javac]   required: String,String&#010;    [javac]   found: String,String,String&#010;    [javac]   reason: actual and formal argument lists differ in length&#010;    [javac] 2 errors&#010;    [javac] 1 warning&#010;&#010;-----Original Message-----&#010;From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] &#010;Sent: Thursday, June 13, 2013 1:41 PM&#010;To: Tomcat Users List&#010;Subject: RE: Class cast exception when starting tomcat 7.0.1&#010;&#010;&gt; From: Jane Muse [mailto:JMuse@rocketsoftware.com]&#010;&gt; Subject: RE: Class cast exception when starting tomcat 7.0.1&#010;&#010;&gt; I had catalina.jar in WEB-INF/lib.&#010;&#010;Very, very bad move.&#010;&#010;&gt; It's needed because we have an implementation of Realm to store an &#010;&gt; encrypted tomcat password users enter in the webapp.&#010;&#010;Your custom implementation of Realm should be in Tomcat's lib directory, not the webapp's.&#010; See:&#010;http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#What_is_a_Realm?&#010;&#010;Such a Realm should not be tied into the operation of any webapp, other than configuring the&#010;webapp to use it.&#010;&#010;&gt; If I remove it and add the catalina.jar from tomcat_home/lib to the &#010;&gt; classpath&#010;&#010;Not sure what you mean by adding it to the classpath; please explain.&#010;&#010;&gt; I have to change the signature from&#010;&gt; org.apache.catalina.realm.RealmBase.Digest(String, String) to &#010;&gt; org.apache.catalina.realm.RealmBase.Digest(String, String, String).&#010;&#010;That's because internal Tomcat APIs often change between levels.  You certainly cannot count&#010;on using an older version of Realm with a newer Tomcat (or vice versa).&#010;&#010;&gt; Should I not be writing code that needs classes from catalina.jar?&#010;&#010;It would certainly be desirable not to be dependent on internal Tomcat classes.  Why do you&#010;think a Realm should be storing a password (encrypted or not) anywhere?  A Realm would normally&#010;be reading a password from some controlled storage, not writing to it.&#010; &#010; - Chuck&#010;&#010;&#010;THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus&#010;for use only by the intended recipient. If you received this in error, please contact the&#010;sender and delete the e-mail and its attachments from all computers.&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: forward request by changing the port in request url</title>
<author><name>&quot;Ilya Kazakevich&quot; &lt;Ilya.Kazakevich@JetBrains.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c00da01ce6886$a9dafad0$fd90f070$@JetBrains.com%3e"/>
<id>urn:uuid:%3c00da01ce6886$a9dafad0$fd90f070$@JetBrains-com%3e</id>
<updated>2013-06-13T22:38:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,&#010;What is "request for application"? How would any software know this request&#010;is for abc app?&#010;You should use different URLs (servlet contexts) or different domain names. &#010;&#010;Then you may install nginx or apache or squid or something else that would&#010;forward your requests to the following tomcats. But you need to configure&#010;tomcat valve to store remote_addr.&#010;I will give you an example for nginx and domain names.&#010;&#010;Say, your DNS zone is "example.com." You create 2 subdomains&#010;"abc.example.com" and "def.example.com" both with same IP (A record).&#010;You install nginx on it listening port 80. You configure it to pass requests&#010;for abc.example.com to localhost:8080 and requests for def.example.com to&#010;8081.&#010;&#010;You open browser and navigate to abc.example.com. Nginx accepts your request&#010;and makes request to localhost:8080 where tomcat with app abc sits. Tomcat&#010;answers to nginx and it forwards it to you.&#010;&#010;That is pretty common solution.&#010;&#010;Ilya Kazakevich,&#010;Developer&#010;JetBrains Inc&#010;http://www.jetbrains.com&#010;"Develop with pleasure!"&#010;&#010;&gt;-----Original Message-----&#010;&gt;From: Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)&#010;&gt;[mailto:anigoyal@cisco.com]&#010;&gt;Sent: Thursday, June 13, 2013 10:00 PM&#010;&gt;To: Tomcat Users List&#010;&gt;Subject: forward request by changing the port in request url&#010;&gt;&#010;&gt;i have two service running under tomcat. One service is default i.e.&#010;catalina&#010;&gt;on port 8080 and 8443 second service is catalina_new on port 8081 and 8444.&#010;&gt;&#010;&gt;i have application abc.war deployed in webapps_new service which is&#010;&gt;running on port 8081. This application is not there in webapps.&#010;&gt;i want if any request coming on port 8080 for application abc, it is&#010;forwarded&#010;&gt;to port 8081.(same for ssl port 8443-&gt;8444) Is there any way to do the&#010;same.&#010;&gt;&#010;&gt;Thanks&#010;&gt;Anil&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Class cast exception when starting tomcat 7.0.1</title>
<author><name>Martin Gainty &lt;mgainty@hotmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cBLU172-W24C8E63B35048B6966A0DBAE870@phx.gbl%3e"/>
<id>urn:uuid:%3cBLU172-W24C8E63B35048B6966A0DBAE870@phx-gbl%3e</id>
<updated>2013-06-13T22:31:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
you can swap out one jar for another&#013;&#010;&#013;&#010;Ant has no idea which container it is communicating with unless you tell it&#013;&#010;&#013;&#010;catalina.jar is tied to the Servlet Spec so &#013;&#010;you cannot change catalina unless you change the accompanying Servlet Spec&#013;&#010;&#013;&#010;so you've already done that why not write a Quick and Dirty ant taskdef&#013;&#010;&#013;&#010;I'll pick this up on users@ant.apache.org&#013;&#010;&#013;&#010; &#013;&#010;&#013;&#010;Viel Gluck&#013;&#010;&#013;&#010;Martin Gainty &#013;&#010;______________________________________________ &#013;&#010;Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni&#010;et de confidentialité&#013;&#010;&#013;&#010;&#013;&#010; &#013;&#010;Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse&#010;azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett.&#010; Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs.&#010; Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség&#010;nem terhelhet ezen üzenet tartalma miatt.&#013;&#010;&#013;&#010;Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten&#010;wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist&#010;unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet&#010;keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen&#010;wir keine Haftung fuer den Inhalt uebernehmen.&#013;&#010;Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire&#010;prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe&#010;quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information&#010;seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les&#010;email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune&#010;responsabilité pour le contenu fourni.&#013;&#010;&#013;&#010;  &#013;&#010;&#013;&#010;&#013;&#010;&gt; From: JMuse@rocketsoftware.com&#013;&#010;&gt; To: users@tomcat.apache.org&#013;&#010;&gt; Subject: RE: Class cast exception when starting tomcat 7.0.1&#013;&#010;&gt; Date: Thu, 13 Jun 2013 20:19:07 +0000&#013;&#010;&gt; &#013;&#010;&gt; I had catalina.jar in WEB-INF/lib. It's needed because we have an implementation of Realm&#010;to store an encrypted tomcat password users enter in the webapp. If I remove it and add the&#010;catalina.jar from tomcat_home/lib to the classpath, I have to change the signature from org.apache.catalina.realm.RealmBase.Digest(String,&#010;String) to org.apache.catalina.realm.RealmBase.Digest(String, String, String). Then the code&#010;compiles ok, but I get this error when building with ant to make a war file:&#013;&#010;&gt; &#013;&#010;&gt; error: method Digest in class RealmBase cannot be applied to given types;&#013;&#010;&gt; [javac] encryptedOldPwd = RealmBase.Digest(oldTomcatPassword, digestAlg,null);&#013;&#010;&gt; &#013;&#010;&gt; Should I not be writing code that needs classes from catalina.jar?&#013;&#010;&gt; &#013;&#010;&gt; Thanks,&#013;&#010;&gt; &#013;&#010;&gt; Jane&#013;&#010;&gt; &#013;&#010;&gt; -----Original Message-----&#013;&#010;&gt; From: Christopher Schultz [mailto:chris@christopherschultz.net] &#013;&#010;&gt; Sent: Thursday, June 13, 2013 11:09 AM&#013;&#010;&gt; To: Tomcat Users List&#013;&#010;&gt; Subject: Re: Class cast exception when starting tomcat 7.0.1&#013;&#010;&gt; &#013;&#010;&gt; -----BEGIN PGP SIGNED MESSAGE-----&#013;&#010;&gt; Hash: SHA256&#013;&#010;&gt; &#013;&#010;&gt; Jane,&#013;&#010;&gt; &#013;&#010;&gt; On 6/13/13 12:38 PM, Jane Muse wrote:&#013;&#010;&gt; &gt; In the archives I thought the only unreleased versions would be &#013;&#010;&gt; &gt; specified "beta". Please let me know if this is not the case.&#013;&#010;&gt; &#013;&#010;&gt; I'll admit it's not clear from the version number which versions are beta, released,&#010;etc. You have to look at the ChangeLog:&#013;&#010;&gt; &#013;&#010;&gt; http://tomcat.apache.org/tomcat-7.0-doc/changelog.html&#013;&#010;&gt; &#013;&#010;&gt; Each release contains a release date and (optionally) a comment on the quality of the&#010;build. The first non-beta version of Tomcat 7.0.x was 7.0.6. Tomcat 7.0.1 (distinct from 7.0.10)&#010;was actually "not released"&#013;&#010;&gt; probably because it was broken for some reason.&#013;&#010;&gt; &#013;&#010;&gt; When the Tomcat team rolls a release, there is a vote. If there aren't enough "yes" votes&#010;(or any "no" votes), the release is abandoned but the number isn't re-used.&#013;&#010;&gt; &#013;&#010;&gt; Anyhow, there's no reason to attempt to migrate from Tomcat 6.0.x to Tomcat 7.0.x by&#010;shooting for an "early" version of Tomcat 7.0.x: you should go for the latest.&#013;&#010;&gt; &#013;&#010;&gt; Also, if you mistype and say "Tomcat 7.0.1" instead of "Tomcat 7.0.10"&#013;&#010;&gt; or "Tomcat 7.0.4" instead of "Tomcat 7.0.40" (or "Tomcat 7.0.41"), don't get an offended&#010;when people tell you you are doing it wrong.&#013;&#010;&gt; Just say "whoops, I meant 7.0.40" and move on.&#013;&#010;&gt; &#013;&#010;&gt; Back to your original problem... have you modified the Tomcat 7 installation in any way&#010;-- other than dropping your WAR file/exploded WAR into the webapps/ directory)?&#013;&#010;&gt; &#013;&#010;&gt; Also, do you have any Tomcat-related JAR files in your webapp's WEB-INF/lib directory?&#013;&#010;&gt; &#013;&#010;&gt; - -chris&#013;&#010;&gt; -----BEGIN PGP SIGNATURE-----&#013;&#010;&gt; Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#013;&#010;&gt; Comment: GPGTools - http://gpgtools.org&#013;&#010;&gt; Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#013;&#010;&gt; &#013;&#010;&gt; iQIcBAEBCAAGBQJRugqsAAoJEBzwKT+lPKRYkwcQALdDoGGk6ZNHg82Ow8vTjjrY&#013;&#010;&gt; dO/70UaIg69t4TsgIJApzd+ReSMbzrThby4Ok+EkYOEXLC1tZgbbQpTQdx0sjqXc&#013;&#010;&gt; k7fJl9oRQ/O9UP4lj+PR1iWL0zTX/Ze+eTQLIHiJ6rpNnyqgSOnZujsev1lbbaUZ&#013;&#010;&gt; A2w8GwiWOPvA17MIQUio1Rr/OKd6s7/02EKJQwbxIRoBh4jdaTalgJXCBKb5+60p&#013;&#010;&gt; EnNMautisYXQXrdE2hUhMgFX5EIyqPP4PZYxe2EKRRHlGuXnzybYJnuyxDLtGLY7&#013;&#010;&gt; nTpOfy5LA5xuFLHEruHm7ARUo6Hb8AH2Qvi5saXDsp+6ddh6Fy4Id4JaWODk16Zl&#013;&#010;&gt; KbPQXk1QjZayw8/nmFkr2gWJc8pGYQMzmeCqSxiJ8FqcrXo/bTq4GJwFazqK4cvE&#013;&#010;&gt; xfQDLyCNXaNdbskJ3rM336173+j7spUhrVlS8LyZ7B7bRPPOzxt5CmOZ2b3Y5Ti+&#013;&#010;&gt; uBTc1YUXQ74/gjoZCRet4xtaGwRfKXARVSebP6+33AtneOsAlbXejmz545ccmUWl&#013;&#010;&gt; T/9c31jchDw+JlpX04KPu5hJzAb+/Jk3HdVG6LGDrB4oKyxcJcmzvREDXzVt+L5q&#013;&#010;&gt; aPHhnAm8pAHYn1nSAR8k15NL61zDr16CC4ffzWu26c9DfSt9xq3XTg0ESPFv0U4J&#013;&#010;&gt; kxt8hkkwFdx5ZbXxnFgb&#013;&#010;&gt; =nulS&#013;&#010;&gt; -----END PGP SIGNATURE-----&#013;&#010;&gt; &#013;&#010;&gt; ---------------------------------------------------------------------&#013;&#010;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#013;&#010;&gt; For additional commands, e-mail: users-help@tomcat.apache.org&#013;&#010;&gt; &#013;&#010;&gt; &#003;B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB�&#027;�&#029;[��X��ܚX�K&#008;&#025;K[XZ[&#014;�&#029;\�\��][��X��ܚX�P&#029;&#027;�X�]&#010;�\&#024;X�&#025;K�ܙ�B��܈&#024;Y&#025;&#026;]&#026;[ۘ[&#008;&#024;��[X[�&#028;�&#008;&#025;K[XZ[&#014;�&#029;\�\��Z&#025;[&#028;&#016;&#029;&#027;�X�]&#010;�\&#024;X�&#025;K�ܙ�B�&#013;&#010; &#009;&#009; &#009;   &#009;&#009;  
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: forward request by changing the port in request url</title>
<author><name>Martin Gainty &lt;mgainty@hotmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cBLU172-W31AF1F631E958746FCFC30AE870@phx.gbl%3e"/>
<id>urn:uuid:%3cBLU172-W31AF1F631E958746FCFC30AE870@phx-gbl%3e</id>
<updated>2013-06-13T22:28:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
for IP Redirecting and or automatic Network Address Translations (e.g. Port 80 redirects to&#010;Port 81)&#010;&#010;you will need a proxy server &#010;&#010;please contact support@cisco.com&#010;&#010;&#010;for product and service options&#010;&#010; &#010;&#010;Viel Gluck&#010;Martin &#010;&#010;______________________________________________ &#010;Verzicht und Vertraulichkeitanmerkung&#010;&#010; &#010;&#010; Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten&#010;wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist&#010;unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet&#010;keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen&#010;wir keine Haftung fuer den Inhalt uebernehmen.&#010;&#010;&#010;  &#010;&#010;&#010;&gt; From: anigoyal@cisco.com&#010;&gt; To: users@tomcat.apache.org&#010;&gt; Subject: forward request by changing the port in request url&#010;&gt; Date: Thu, 13 Jun 2013 18:00:12 +0000&#010;&gt; &#010;&gt; i have two service running under tomcat. One service is default i.e. catalina on port&#010;8080 and 8443&#010;&gt; second service is catalina_new on port 8081 and 8444.&#010;&gt; &#010;&gt; i have application abc.war deployed in webapps_new service which is running on port 8081.&#010;This application is not there in webapps.&#010;&gt; i want if any request coming on port 8080 for application abc, it is forwarded to port&#010;8081.(same for ssl port 8443-&gt;8444)&#010;&gt; Is there any way to do the same.&#010;&gt; &#010;&gt; Thanks&#010;&gt; Anil&#010; &#009;&#009; &#009;   &#009;&#009;  &#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: TCNative with FIPS OpenSSL throws fingerprint error in FIPS mode</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BA3DA9.2050703@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BA3DA9-2050703@christopherschultz-net%3e</id>
<updated>2013-06-13T21:46:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Steve,&#010;&#010;On 6/13/13 5:27 PM, Steve Nickels wrote:&#010;&gt;&gt;&gt; I figured out the problem. The error was due to my system&#010;&gt;&gt;&gt; rebasing the libeay32.dll library from its desired base address&#010;&gt;&gt;&gt; of 0xFB00000. According to OpenSSL documents, this is supposed&#010;&gt;&gt;&gt; to generate a specific error message of &#010;&gt;&gt;&gt; FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELATED, but&#010;&gt;&gt; because I wasn't&#010;&gt;&gt;&gt; seeing that, I didn't think that was the problem.&#010;&gt;&gt; &#010;&gt;&gt; Interesting. Do you think it was being swallowed-up somewhere?&#010;&gt;&gt; Like I said, tcnative/FIPS hasn't gotten a huge amount of&#010;&gt;&gt; exposure.&#010;&gt; &#010;&gt; I think the error message issue might be a problem with OpenSSL &#010;&gt; itself. As far as I can tell, tcnative is simply parroting back&#010;&gt; the error message that OpenSSL gives it.&#010;&#010;It is, but the function we are using says it gets the "first" error&#010;from the error queue. I suppose we could drain the entire error queue&#010;looking for all messages and concatenate them together or something.&#010;We aren't inspecting the entire error queue.&#010;&#010;&gt;&gt; Do you think there are ways it could be improved? Better error&#010;&gt;&gt; checking, etc.? I implemented it as simply as I possibly could.&#010;&gt; &#010;&gt; The biggest problem seems to be that something in Tomcat on Windows&#010;&gt;  is interfering with OpenSSL's normal base address request &#010;&gt; (0xFB00000). Normally this doesn't matter, but with the FIPS&#010;&gt; build, if the base address of the library is moved from what it&#010;&gt; expects, the result is a fingerprint error when FIPS mode is&#010;&gt; enabled.&#010;&#010;This could be a problem on *NIX as well -- any library may be&#010;re-located by the loader for any reason.&#010;&#010;&gt; I ran the openssl utility on the same system as Tomcat, and&#010;&gt; Process Explorer shows that its copy of libeay32.dll stays at the&#010;&gt; correct address. Additionally, I tested the FIPS-compatible&#010;&gt; libeay32.dll on a different server with Tomcat, and had the same&#010;&gt; problem. This seems to indicate that the memory address issue is&#010;&gt; specific to Tomcat, not the server.&#010;&#010;Or running within a JVM which has a significant amount of native code&#010;that gets loaded first, which may cause the loader to re-locate the&#010;library when it finally gets loaded.&#010;&#010;Any interest in trying some Java-based testing using libtcnative?&#010;&#010;&gt; I can't tell from Process Explorer why libeay32.dll is being&#010;&gt; rebased (I didn't see any other libraries under tomcat7.exe that&#010;&gt; were obviously taking up the same address space). I think it's&#010;&gt; going to take someone with more experience with both Windows and&#010;&gt; Tomcat than I to figure that one out. I suppose it might be worthy&#010;&gt; of a bug report, at least.&#010;&#010;That would be good -- bug reports have more visibility than mailing&#010;list posts, and it's a good place to collect information all in one place.&#010;&#010;I'm curious: what base address did you use when you changed it?&#010;&#010;&gt; If the fix for the memory rebasing issue ends up being that&#010;&gt; OpenSSL needs to be configured with a different base address, that&#010;&gt; would be good to include in the build documentation for tcnative.&#010;&gt; The file \jni\native\srclib\BUILDING would be a good place for such&#010;&gt; a note. But, if the interfering Tomcat piece were to be found and&#010;&gt; resolved, you wouldn't need it.&#010;&#010;I suspect this is an OS-related thing that Tomcat can't really affect.&#010;Note that (other than tcnative and the win32 service-launcher), Tomcat&#010;doesn't have any native code at all, so it can't really affect this&#010;kind of stuff. Tomcat just issues a System.loadLibrary() call and lets&#010;the JVM and OS take over.&#010;&#010;&gt;&gt;&gt; With my test application, the original base address was not&#010;&gt;&gt;&gt; being changed by the OS, according to process explorer, which&#010;&gt;&gt;&gt; is why it worked with the original build.&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; Thanks for your help!&#010;&gt;&gt; &#010;&gt;&gt; No problem. If there were any other gotchas you found when&#010;&gt;&gt; building tcnative/FIPS/win32 could you let us know? Actually,&#010;&gt;&gt; creating a Wiki page is easy to do and you could help others who&#010;&gt;&gt; are trying to do the same thing.&#010;&gt; &#010;&gt; One minor issue I found when building tcnative on Windows was that&#010;&gt;  the BUILDING file in the \jni\native directory in &#010;&gt; tomcat-native-1.1.27-win32-src.zip appears to contain UNIX build &#010;&gt; instructions. This probably isn't appropriate, since the zip file&#010;&gt; is specific to win32.&#010;&#010;That's a good point. Could you log that in Bugzilla as well? There are&#010;(brief) building instructions on http://tomcat.apache.org/native-doc/&#010;but they should probably also be in the BUILDING file.&#010;&#010;&gt; If there's a good place to put a wiki page about this, let me&#010;&gt; know, and I can try to add something.&#010;&#010;Really anywhere under http://wiki.apache.org/tomcat/FAQ would be&#010;great. If I were looking for information about this, I'm not sure&#010;where I'd look first. Perhaps under "Security"?&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRuj2oAAoJEBzwKT+lPKRY2rYQAKbgmjzUDFF3FeoJRZ72yhFf&#010;ibtmO/7E5KFk9OOIVoDrFrIslCmfquHTeQZQHD2UrJ00OOL9tgSqbd5pyapfXjK9&#010;LjV7BgyWu0YhiVbjDhXYpZQgzYPsUUHb1KyNhzVjqhwOJYaqhnnw6Bx5M1jc6FJb&#010;oA0WZC8ODxgMpqnBG7qrB/mDIcRr9UViv/k7ChDn4mZeHmVfTNsB9NUkNWXCXZlc&#010;HOzxA9imc7EcManaesIMqHbwTwbggR+nnsvxGn2k3aNmS1Wp5W+Svjjco1E7xK8b&#010;T44AGEyGAmywFvOF24Cm89rfMkCouat2fAdOH29myEtbHm0B27umjXaddifEvjE9&#010;Rxf2oyW5Nb/N2ZQwBgdFMHXKdtMVGiKinqJhqVlLVr1NBarfaU8m85Kfv7tq+eIu&#010;tVezTMDzRyM3tMkhYDxRzNQ1/vlgbIFcapR+uiJSbQJVnnOl6IStYznhWja4f7t7&#010;WF7xjPTGGlRgFy7MUwI97U/bnCD8S5PnJIjENuanoa1ebTkRfDGRgZNx6/v0Cm8H&#010;kpATMBRNEeznxdLVpC4hONjOLa/6AVvvmiA+kvfuKnDomcEKdU/ZAx88EoZt7HQv&#010;HeFWDNp8sJIB8wXq/Srn48kgfAuPOVpwHBIlS8nnNGUwjasxZtvyOkMn5oS7klEF&#010;11YGFTZAd8SAuf8Xy8bl&#010;=SPZh&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: TCNative with FIPS OpenSSL throws fingerprint error in FIPS mode</title>
<author><name>Steve Nickels &lt;snickels@ipswitch.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3cAE7E5B664DA29A47B8ED63BFDA6A9625166EF4F8@BN1PRD0512MB651.namprd05.prod.outlook.com%3e"/>
<id>urn:uuid:%3cAE7E5B664DA29A47B8ED63BFDA6A9625166EF4F8@BN1PRD0512MB651-namprd05-prod-outlook-com%3e</id>
<updated>2013-06-13T21:27:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; &gt; I figured out the problem. The error was due to my system rebasing the&#013;&#010;&gt; &gt; libeay32.dll library from its desired base address of 0xFB00000.&#013;&#010;&gt; &gt; According to OpenSSL documents, this is supposed to generate a&#013;&#010;&gt; &gt; specific error message of&#013;&#010;&gt; &gt; FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELATED, but&#013;&#010;&gt; because I wasn't&#013;&#010;&gt; &gt; seeing that, I didn't think that was the problem.&#013;&#010;&gt; &#013;&#010;&gt; Interesting. Do you think it was being swallowed-up somewhere? Like I said,&#013;&#010;&gt; tcnative/FIPS hasn't gotten a huge amount of exposure.&#013;&#010;&#013;&#010;I think the error message issue might be a problem with OpenSSL itself. As far as I can tell,&#010;tcnative is simply parroting back the error message that OpenSSL gives it.&#013;&#010;&#013;&#010;&#013;&#010;&gt; Do you think there are ways it could be improved? Better error checking,&#013;&#010;&gt; etc.? I implemented it as simply as I possibly could.&#013;&#010;&#013;&#010;The biggest problem seems to be that something in Tomcat on Windows is interfering with OpenSSL's&#010;normal base address request (0xFB00000). Normally this doesn't matter, but with the FIPS build,&#010;if the base address of the library is moved from what it expects, the result is a fingerprint&#010;error when FIPS mode is enabled.&#013;&#010;&#013;&#010;I ran the openssl utility on the same system as Tomcat, and Process Explorer shows that its&#010;copy of libeay32.dll stays at the correct address. Additionally, I tested the FIPS-compatible&#010;libeay32.dll on a different server with Tomcat, and had the same problem. This seems to indicate&#010;that the memory address issue is specific to Tomcat, not the server.&#013;&#010;&#013;&#010;I can't tell from Process Explorer why libeay32.dll is being rebased (I didn't see any other&#010;libraries under tomcat7.exe that were obviously taking up the same address space). I think&#010;it's going to take someone with more experience with both Windows and Tomcat than I to figure&#010;that one out. I suppose it might be worthy of a bug report, at least.&#013;&#010;&#013;&#010;&#013;&#010;&gt; (I also noticed a small bug when checking the code around FIPS_mode_set in&#013;&#010;&gt; tcnative: the OpenSSL docs say that if&#013;&#010;&gt; FIPS_mode_set(x) is successful and x != 0, then the function returns x. The&#013;&#010;&gt; check in there is against 1 and not x. So that could afford to be fixed.)&#013;&#010;&gt; &#013;&#010;&gt; &gt; However, process explorer showed that the base address of libeay32.dll&#013;&#010;&gt; &gt; in the tomcat7.exe process was not at its correct base address. I&#013;&#010;&gt; &gt; recompiled OpenSSL with a new base address, verified that the new dll&#013;&#010;&gt; &gt; wasn't being rebased, and then turned on FIPS mode, and it worked.&#013;&#010;&gt; &#013;&#010;&gt; Wow, that could certainly confuse things.&#013;&#010;&gt; &#013;&#010;&gt; Again, I don't know anything about building on win32, but is that the kind of&#013;&#010;&gt; thing that we could better-document (or document /at all/) somewhere in&#013;&#010;&gt; the source bundle? Is there a project file that could contain such a hint that a&#013;&#010;&gt; casual DIY user like you would have consulted?&#013;&#010;&#013;&#010;If the fix for the memory rebasing issue ends up being that OpenSSL needs to be configured&#010;with a different base address, that would be good to include in the build documentation for&#010;tcnative. The file \jni\native\srclib\BUILDING would be a good place for such a note. But,&#010;if the interfering Tomcat piece were to be found and resolved, you wouldn't need it.&#013;&#010;&#013;&#010;&#013;&#010;&gt; &gt; With my test application, the original base address was not being&#013;&#010;&gt; &gt; changed by the OS, according to process explorer, which is why it&#013;&#010;&gt; &gt; worked with the original build.&#013;&#010;&gt; &gt;&#013;&#010;&gt; &gt; Thanks for your help!&#013;&#010;&gt; &#013;&#010;&gt; No problem. If there were any other gotchas you found when building&#013;&#010;&gt; tcnative/FIPS/win32 could you let us know? Actually, creating a Wiki page is&#013;&#010;&gt; easy to do and you could help others who are trying to do the same thing.&#013;&#010;&#013;&#010;One minor issue I found when building tcnative on Windows was that the BUILDING file in the&#010;\jni\native directory in tomcat-native-1.1.27-win32-src.zip appears to contain UNIX build&#010;instructions. This probably isn't appropriate, since the zip file is specific to win32.&#013;&#010;&#013;&#010;If there's a good place to put a wiki page about this, let me know, and I can try to add something.&#013;&#010;&#013;&#010;--Steve Nickels&#013;&#010;Ipswitch, Inc. &#013;&#010;&#013;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Class cast exception when starting tomcat 7.0.1</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/201306.mbox/%3c51BA3414.5080605@christopherschultz.net%3e"/>
<id>urn:uuid:%3c51BA3414-5080605@christopherschultz-net%3e</id>
<updated>2013-06-13T21:05:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----&#010;Hash: SHA256&#010;&#010;Chuck,&#010;&#010;On 6/13/13 4:40 PM, Caldarale, Charles R wrote:&#010;&gt;&gt; From: Jane Muse [mailto:JMuse@rocketsoftware.com] Subject: RE:&#010;&gt;&gt; Class cast exception when starting tomcat 7.0.1&#010;&gt; &#010;&gt;&gt; I had catalina.jar in WEB-INF/lib.&#010;&gt; &#010;&gt; Very, very bad move.&#010;&gt; &#010;&gt;&gt; It's needed because we have an implementation of Realm to store&#010;&gt;&gt; an encrypted tomcat password users enter in the webapp.&#010;&gt; &#010;&gt; Your custom implementation of Realm should be in Tomcat's lib&#010;&gt; directory, not the webapp's.  See: &#010;&gt; http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#What_is_a_Realm?&#010;&gt;&#010;&gt;  Such a Realm should not be tied into the operation of any webapp,&#010;&gt; other than configuring the webapp to use it.&#010;&gt; &#010;&gt;&gt; If I remove it and add the catalina.jar from tomcat_home/lib to&#010;&gt;&gt; the classpath&#010;&gt; &#010;&gt; Not sure what you mean by adding it to the classpath; please&#010;&gt; explain.&#010;&gt; &#010;&gt;&gt; I have to change the signature from &#010;&gt;&gt; org.apache.catalina.realm.RealmBase.Digest(String, String) to &#010;&gt;&gt; org.apache.catalina.realm.RealmBase.Digest(String, String,&#010;&gt;&gt; String).&#010;&gt; &#010;&gt; That's because internal Tomcat APIs often change between levels.&#010;&gt; You certainly cannot count on using an older version of Realm with&#010;&gt; a newer Tomcat (or vice versa).&#010;&gt; &#010;&gt;&gt; Should I not be writing code that needs classes from&#010;&gt;&gt; catalina.jar?&#010;&gt; &#010;&gt; It would certainly be desirable not to be dependent on internal&#010;&gt; Tomcat classes.  Why do you think a Realm should be storing a&#010;&gt; password (encrypted or not) anywhere?  A Realm would normally be&#010;&gt; reading a password from some controlled storage, not writing to&#010;&gt; it.&#010;&#010;+1&#010;&#010;I'm interested in what the custom realm does. Tomcat's realms all&#010;support simple hashing via MessageDigest (i.e. no salting, iteration,&#010;password-hashing algorithms, etc.) which is often enough for most&#010;people (yet I'm not one of them).&#010;&#010;If you are symmetrically-encrypting your passwords, you are setting&#010;yourself up for security problems.&#010;&#010;If you want to implement something more elaborate (say, you want to&#010;implement bcrypt password-hashing instead of MD5), then you'll have to&#010;do it yourself. I've been threatening to write-up some patches to&#010;allow pluggable password-mangling algorithms into Tomcat Realms, but I&#010;have not bothered to do so, yet. If there was more interest in such&#010;things, I might be persuaded to be a little more diligent.&#010;&#010;- -chris&#010;-----BEGIN PGP SIGNATURE-----&#010;Version: GnuPG/MacGPG2 v2.0.17 (Darwin)&#010;Comment: GPGTools - http://gpgtools.org&#010;Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/&#010;&#010;iQIcBAEBCAAGBQJRujQTAAoJEBzwKT+lPKRYwcMP/1u6A4gaWA+NpKs1UgpA8Gr/&#010;qvYqcMt2sjRMPsHEd0uGcxa/SThGJHU351myfMNW4VLfvxV2/++nbnJUlILV3vNS&#010;3h7N6LZrBjAc4CC4u5Xx3MMH4cIY1/jSK0Apnp0inN/zQXTOIT12IRQAT/TNRppS&#010;xxjxcIseZiiIkcsrDx4RS57EjXPNS0abEknCCWfpdldu3KTiZemXu0Loq4jZYXNv&#010;WGit1orL4MFNPEP1CYl5bxaEMfHd4QpSDLY7DG+OQn/AD+xsNuhNwuTc7QI40aLu&#010;9xAN+ebZL1Qo/WmvVQYyMEdPvP8Xc8xSi9uuaaBSnI05I5+tCkSHaZUJZ/JxJrNk&#010;wpAxaIxVHC3YQS/PDsLowY2+MIMXCDnZWi/QOg1TiDypLn5bEGNnJWDUa9L8suYc&#010;hyMCGAh93eFIbkb/wB4hHNHp2Lzqbg31YVWvY53wEGUL1WRkvVzVTlQjQ8pR1cUz&#010;8UyVOD1nG21KnwgelCgJKf4FWNtyxvah+52lTSP+HDieAt/+mLY4Z6PH5AUEte+2&#010;QvaO6wfcfSfERA8vIy43XWRQXuciWmRtQypdmHeZQ4KI5ajRteyUKLIu2P1wahmT&#010;W+6VyVvDm+k7DW9p7l0XodX/ivw+XChmCm5EXZbDqrhkyelX22lv5jSxn4ROzkUg&#010;HePguW0/PF6NNBb5BFg0&#010;=Jhko&#010;-----END PGP SIGNATURE-----&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org&#010;For additional commands, e-mail: users-help@tomcat.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
</feed>
