Re: Want to customise the tomcat's session logic
is it possible to provide costume sessionid while creating session.? so that different time when session needs to be created i can create new sessionid and store it in cookie. "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison On Sun, Nov 8, 2009 at 5:15 AM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: S Arvind [mailto:arvindw...@gmail.com] > > Subject: Re: Want to customise the tomcat's session logic > > > > deploy one app in tomcat by having context xml in > > catalina>>domain>>xxx.xml . When you access this > > app check the session u will find the path attribute > > with xxx in it. > > You're confusing the session with the cookie. The session is a > spec-defined object in the JVM heap, whereas the cookie is the standard > means of passing an id associated with the session to the client. The path > information in the cookie normally reflects the URI used when the cookie was > generated by the server, but it doesn't have to. > > > Wat i need is two different session for same webapp > > running under single tomcat??? > > I don't think either the servlet spec or any browsers will support that. > You'll need to generate your own set of cookies, separate from session > handling. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: errno 110 in mod_jk
Could someone please help me understand this? On Sat, Nov 7, 2009 at 8:50 AM, Mohit Anchlia wrote: > I am also seeing that in Jboss (Back End) that there are lot of keep > alive sessions and I think that's the reason I am seeing the timeout. > As I add new web server it hits the 250 MaxThreads limit and then it > start to timeout. Those threads are there even though not doing any > work. I tried disabling keepalive in worker.properties but still those > threads are not being freed up. > > Could someone please tell me why that might be happening? > > On Sat, Nov 7, 2009 at 7:25 AM, Mohit Anchlia wrote: >> To narrow down I just left one node running and started test. When I >> look at JkStatus worker I see even though all other nodes are down >> it's still showing "OK" in the status. I am not sure why it would do >> that. Could this be the reason why I am seeing slow response times in >> mod-jk? >> >> On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia wrote: >>> I am looking at the tcpdump but I don't see packet retransmits. What >>> should I expect to see in tcpdump? thanks for your help. >>> >>> On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung wrote: $ grep 110 /usr/include/*/errno.h #define ETIMEDOUT 110 /* Connection timed out */ On 07.11.2009 00:56, Mohit Anchlia wrote: > I turned on mod_jk debug and see: > [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] > ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong So your backend doesn't send the required cpong answer during the timeout ou configured. > [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] > jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 > [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] > jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 > lingering bytes > [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] > ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) > cping/cpong after connecting to the backend server failed (errno=110) > [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] > ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to > backend failed. Tomcat is probably not started or is listening on the > wrong port (errno=110) > [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] > ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to > tomcat failed (recoverable), because of error during request sending > (attempt=1) > [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] > ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms > before retrying > [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug] > jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 > lingering bytes > [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] > ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) > cping/cpong after connecting to the backend server failed (errno=110) > [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] > ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to > backend failed. Tomcat is probably not started or is listening on the > wrong port (errno=110) > > -- > All nodes are up and have plenty of threads configured and free. Yet they are still not responding in time. You can verify using a apcket sniff. > On Fri, Nov 6, 2009 at 3:47 PM, Mohit Anchlia > wrote: >> I am continously seeing the following even though all these nodes are >> up and running and receving requests. >> >> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >> ajp_send_request::jk_ajp_common.c (1467): (eitappfe3) connecting to >> backend failed. Tomcat is probably not started or is listening on the >> wrong port (errno=110) >> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >> ajp_service::jk_ajp_common.c (2426): (eitappfe3) connecting to tomcat >> failed. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Want to customise the tomcat's session logic
> From: S Arvind [mailto:arvindw...@gmail.com] > Subject: Re: Want to customise the tomcat's session logic > > deploy one app in tomcat by having context xml in > catalina>>domain>>xxx.xml . When you access this > app check the session u will find the path attribute > with xxx in it. You're confusing the session with the cookie. The session is a spec-defined object in the JVM heap, whereas the cookie is the standard means of passing an id associated with the session to the client. The path information in the cookie normally reflects the URI used when the cookie was generated by the server, but it doesn't have to. > Wat i need is two different session for same webapp > running under single tomcat??? I don't think either the servlet spec or any browsers will support that. You'll need to generate your own set of cookies, separate from session handling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Want to customise the tomcat's session logic
To my knowledge, there is no "path" attribute in the session. Are you proposing that you add one? >> deploy one app in tomcat by having context xml in catalina>>domain>>xxx.xml . When you access this app check the session u will find the path attribute with xxx in it. So... do you mean that you want to deploy one web application (into a single context), but you want to separate certain parts of the session into different "areas" of the webapp? >> yes I don't believe that deploying the same webapp multiple times into different contexts has any effect on session sharing: Tomcat will treat them as different webapps and no session sharing will occur unless you have taken other steps to share sessions between contexts. >> Session sharing will not occur for different context. But i need to have single context still session should not be shared. Is it possible in single context.?? Consider i have one login app, after login i track the state by session. First i login that website in single tab in browser and session was created with details in it. And in another tab or window i need to login with different username without sharing the session. But if i did this first created session was overwrite by second session. Wat i need is two different session for same webapp running under single tomcat??? IS it possible?? Arvind S "Many of lifes failure are people who did not realize how close they were to success when they gave up." -Thomas Edison On Sat, Nov 7, 2009 at 7:14 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Arvind, > > On 11/2/2009 5:06 AM, S Arvind wrote: > > Basically my requirement is ability to control the session > > sharing in browser. Till now we maintained each application as different > > context but pointing to same doc-base. So different web application will > be > > running on a same code to control the session sharing between different > > application. > > I don't believe that deploying the same webapp multiple times into > different contexts has any effect on session sharing: Tomcat will treat > them as different webapps and no session sharing will occur unless you > have taken other steps to share sessions between contexts. > > > But now we want to run in same context as one application but > > control the session sharing. > > So... do you mean that you want to deploy one web application (into a > single context), but you want to separate certain parts of the session > into different "areas" of the webapp? > > > So i planned to customise session creation n > > management of the tomcat to our requirements to add some value to > > *path* attribute in session. Is this possible? > > To my knowledge, there is no "path" attribute in the session. Are you > proposing that you add one? > > Modifying Tomcat's session management code is probably going to lead you > down a path that leads to insanity: the APIs are not (officially) > stable, there is no standard, etc. > > I suspect there is a better way to accomplish what you want to do... I > just don't really understand what you want to do. Instead of speaking in > generalities, why not give us a use case? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkr00RcACgkQ9CaO5/Lv0PBeqwCfQK7r/8a0jn2jiHxyLkU0ypyA > uXUAn19ms08C6ydU6DvZTdg6Ep6za6at > =kDId > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
RE: How to configure App for static files
> From: Maxim Kazitov [mailto:mvka...@gmail.com] > Subject: How to configure App for static files > > Is it any way to configure Tomcat to serve static files from particular > folder on the disk ? Assuming you're using a supported version of Tomcat (you didn't tell us), create a file named conf/Catalina/[host]/[appName].xml that contains a element with a docBase attribute pointing to the directory of interest. The value of [host] depends on what you have in server.xml; the default is localhost. The value of [appName] is the URI path to use to access the static information. For the current Tomcat version, the doc is here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: errno 110 in mod_jk
I am also seeing that in Jboss (Back End) that there are lot of keep alive sessions and I think that's the reason I am seeing the timeout. As I add new web server it hits the 250 MaxThreads limit and then it start to timeout. Those threads are there even though not doing any work. I tried disabling keepalive in worker.properties but still those threads are not being freed up. Could someone please tell me why that might be happening? On Sat, Nov 7, 2009 at 7:25 AM, Mohit Anchlia wrote: > To narrow down I just left one node running and started test. When I > look at JkStatus worker I see even though all other nodes are down > it's still showing "OK" in the status. I am not sure why it would do > that. Could this be the reason why I am seeing slow response times in > mod-jk? > > On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia wrote: >> I am looking at the tcpdump but I don't see packet retransmits. What >> should I expect to see in tcpdump? thanks for your help. >> >> On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung wrote: >>> $ grep 110 /usr/include/*/errno.h >>> >>> #define ETIMEDOUT 110 /* Connection timed out */ >>> >>> On 07.11.2009 00:56, Mohit Anchlia wrote: I turned on mod_jk debug and see: >>> [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong >>> >>> So your backend doesn't send the required cpong answer during the >>> timeout ou configured. >>> [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 lingering bytes [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) cping/cpong after connecting to the backend server failed (errno=110) [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110) [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms before retrying [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug] jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 lingering bytes [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) cping/cpong after connecting to the backend server failed (errno=110) [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110) -- All nodes are up and have plenty of threads configured and free. >>> >>> Yet they are still not responding in time. >>> >>> You can verify using a apcket sniff. >>> On Fri, Nov 6, 2009 at 3:47 PM, Mohit Anchlia wrote: > I am continously seeing the following even though all these nodes are > up and running and receving requests. > > [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] > ajp_send_request::jk_ajp_common.c (1467): (eitappfe3) connecting to > backend failed. Tomcat is probably not started or is listening on the > wrong port (errno=110) > [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] > ajp_service::jk_ajp_common.c (2426): (eitappfe3) connecting to tomcat > failed. >>> >>> Regards, >>> >>> Rainer >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to configure App for static files
On Sat, Nov 7, 2009 at 7:51 AM, Maxim Kazitov wrote: > Is it any way to configure Tomcat to serve static files from particular > folder on the disk ? I suspect It should be some kind of simple application, > but have no idea how to configure it. You can create a separate Context with an docBase anywhere; see the documentation for your version. -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to configure App for static files
Is it any way to configure Tomcat to serve static files from particular folder on the disk ? I suspect It should be some kind of simple application, but have no idea how to configure it. Any help/hints are welcome.
Re: errno 110 in mod_jk
To narrow down I just left one node running and started test. When I look at JkStatus worker I see even though all other nodes are down it's still showing "OK" in the status. I am not sure why it would do that. Could this be the reason why I am seeing slow response times in mod-jk? On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia wrote: > I am looking at the tcpdump but I don't see packet retransmits. What > should I expect to see in tcpdump? thanks for your help. > > On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung wrote: >> $ grep 110 /usr/include/*/errno.h >> >> #define ETIMEDOUT 110 /* Connection timed out */ >> >> On 07.11.2009 00:56, Mohit Anchlia wrote: >>> I turned on mod_jk debug and see: >> >>> [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] >>> ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong >> >> So your backend doesn't send the required cpong answer during the >> timeout ou configured. >> >>> [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] >>> jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 >>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] >>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>> lingering bytes >>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] >>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>> cping/cpong after connecting to the backend server failed (errno=110) >>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] >>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>> backend failed. Tomcat is probably not started or is listening on the >>> wrong port (errno=110) >>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] >>> ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to >>> tomcat failed (recoverable), because of error during request sending >>> (attempt=1) >>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] >>> ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms >>> before retrying >>> [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug] >>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>> lingering bytes >>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>> cping/cpong after connecting to the backend server failed (errno=110) >>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>> backend failed. Tomcat is probably not started or is listening on the >>> wrong port (errno=110) >>> >>> -- >>> All nodes are up and have plenty of threads configured and free. >> >> Yet they are still not responding in time. >> >> You can verify using a apcket sniff. >> >>> On Fri, Nov 6, 2009 at 3:47 PM, Mohit Anchlia >>> wrote: I am continously seeing the following even though all these nodes are up and running and receving requests. [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] ajp_send_request::jk_ajp_common.c (1467): (eitappfe3) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110) [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] ajp_service::jk_ajp_common.c (2426): (eitappfe3) connecting to tomcat failed. >> >> Regards, >> >> Rainer >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: errno 110 in mod_jk
Mohit Anchlia wrote: I am looking at the tcpdump but I don't see packet retransmits. What should I expect to see in tcpdump? thanks for your help. Mohit, have you checked that *all* the workers which your configure in workers.properties really have a corresponding back-end Tomcat ? Maybe you have one more in workers.properties than in reality ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Trying to set up tomcat
What exactly is the problem? On 11/7/09, paul8 wrote: > > Hi I am trying to set up Tomcat on ubuntu, I have unziped and changed the > classpath(i think) i go in to the bin folder of tomcat and run catalina.sh > using terminal and get the following > > p...@paul-laptop:~/apache-tomcat-6.0.20/bin$ ./startup.sh run > Using CATALINA_BASE: /home/paul/apache-tomcat-6.0.20 > Using CATALINA_HOME: /home/paul/apache-tomcat-6.0.20 > Using CATALINA_TMPDIR: /home/paul/apache-tomcat-6.0.20/temp > Using JRE_HOME: /usr/lib/java/ > > -- > View this message in context: > http://old.nabble.com/Trying-to-set-up-tomcat-tp26235460p26235460.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > -- Sent from my mobile device - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] ConnectionPool question
Chris, as long as we are having fun its all good. I think this question is something many developers ask. I have seen it here and in other forums. You are correct, everything is wrapped. The connection wrapper spawns statment wrappers which spawn result set wrappers, and everything is tracked in parent child relationships. E On Fri, Nov 6, 2009 at 5:54 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Elli, > > Okay, I think we've hijacked Josh's thread enough to at least mark it as > off topic. :) > > On 11/5/2009 10:37 PM, Elli Albek wrote: >> Christopher Schultz wrote: >>> Pooled connections are almost certainly not behaving this way. This has >>> been discussed at least twice in the last week or two, and, I believe, >>> already once in this thread. >> >> This is certainly not the case for my DBCP library (1.2.2). I just >> stepped through the source code: Calling connection.close() is closing >> result sets and statements. > > I'm not sure how calling Connection.close (where the Connection object > is one from DBCP) would possibly be able to close ResultSet and > Statement objects created by the underlying connection. > > Unless, I suppose, they decided to wrap /everything/ and register all > the ResultSet and Statement objects handed-out by the underlying > Connection for the purposes of (possibly) closing them later. I should > really read the source :) > >> Below is the DBCP code that keeps track of open statements/result sets >> and closes them when the connection is closed (BDCP 1.2.2). > > Yup: it looks like they do wrap/register everything and then close it > for you. It's nice that they followed the spec, here :) > > - -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org