Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 771D8DA09 for ; Mon, 8 Oct 2012 00:47:25 +0000 (UTC) Received: (qmail 64402 invoked by uid 500); 8 Oct 2012 00:47:21 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 64352 invoked by uid 500); 8 Oct 2012 00:47:21 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 64339 invoked by uid 99); 8 Oct 2012 00:47:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 00:47:21 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_IMAGE_ONLY_32,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kirill@instagrok.com designates 173.254.64.10 as permitted sender) Received: from [173.254.64.10] (HELO oproxy11-pub.bluehost.com) (173.254.64.10) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 08 Oct 2012 00:47:12 +0000 Received: (qmail 10583 invoked by uid 0); 8 Oct 2012 00:46:49 -0000 Received: from unknown (HELO box522.bluehost.com) (74.220.219.122) by oproxy11.bluehost.com with SMTP; 8 Oct 2012 00:46:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=instagrok.com; s=default; h=Content-Type:Subject:To:MIME-Version:From:Date:Message-ID; bh=a1cLTn7p9cLupkOhwMe1n9P0CmWgvol4c1GdqduPanE=; b=dvF6wvqgttxzCmYdwsOxiw3jEZk0MBEYpz7RMo3YEPfeWWlwM6+kxdURe+2J21C/WE/m0hU/nb1vf+4AqzwwRkQqwJ7BpNoW8QAvknZyNDDN3O+9ZFlv9ydadogJZpLF; Received: from [184.167.5.172] (port=40653 helo=Kirill-Kireyevs-MacBook-Pro.local) by box522.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1TL1Uf-00037i-6n for users@tomcat.apache.org; Sun, 07 Oct 2012 18:46:49 -0600 Message-ID: <50722278.3020604@instagrok.com> Date: Sun, 07 Oct 2012 18:46:48 -0600 From: Kirill Kireyev User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: users@tomcat.apache.org Subject: how to programmatically expire inactive sessions? Content-Type: multipart/alternative; boundary="------------020501050700010309090106" X-Identified-User: {36444:box522.bluehost.com:thoughts:instagrok.com} {sentby:smtp auth 184.167.5.172 authed with kirill@instagrok.com} --------------020501050700010309090106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I'm trying to force expirations of inactive sessions in Tomcat. (For some reason, sessions that are inactive longer than timeout don't expire automatically - not sure why?) I can do it just fine, from the Tomcat Manager web app, by clicking the "Expire Sessions" button. I've tried doing it programmatically by using "http://localhost:8080/manager/text/expire?path=/zzz" from a script running on the server: wget -O /dev/stdout --http-user=xxx --http-password=yyy "http://localhost:8080/manager/text/expire?path=/zzz" (I made sure that Tomcat user xxx has manager-script permissions). I get the following output: K - Session information for application at context path /grok Default maximum session inactive interval 20 minutes <1 minutes: 9 sessions 1 - <2 minutes: 8 sessions 2 - <3 minutes: 11 sessions 3 - <4 minutes: 4 sessions 4 - <5 minutes: 6 sessions 5 - <6 minutes: 5 sessions 6 - <7 minutes: 9 sessions 7 - <8 minutes: 5 sessions 8 - <9 minutes: 11 sessions 9 - <10 minutes: 7 sessions 10 - <11 minutes: 10 sessions 11 - <12 minutes: 7 sessions 12 - <13 minutes: 6 sessions 13 - <14 minutes: 5 sessions 14 - <15 minutes: 9 sessions 15 - <16 minutes: 7 sessions 16 - <17 minutes: 9 sessions 17 - <18 minutes: 6 sessions 18 - <19 minutes: 9 sessions >=20 minutes: 666 sessions but when I check with the Tomcat Web manager app in my web browser, I still see a lot of unexpired sessions (older than inactive interval) - which I can then manually expire, by clicking "Expire Sessions" button in the web app! How can i do this automatically? (And/or why don't they expire automatically anyway)? Thanks, Kirill -- *Kirill Kireyev, PhD* Founder/CTO instaGrok.com kirill@instagrok.com Twitter: @instaGrok FB: facebook.com/instagrok --------------020501050700010309090106 Content-Type: multipart/related; boundary="------------080703070808000100000307" --------------080703070808000100000307 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,

I'm trying to force expirations of inactive sessions in Tomcat. (For some reason, sessions that are inactive longer than timeout don't expire automatically - not sure why?)

I can do it just fine, from the Tomcat Manager web app, by clicking the "Expire Sessions" button.

I've tried doing it programmatically by using "http://localhost:8080/manager/text/expire?path=/zzz" from a script running on the server:
    wget -O /dev/stdout --http-user=xxx --http-password=yyy "http://localhost:8080/manager/text/expire?path=/zzz"

(I made sure that Tomcat user xxx has manager-script permissions). I get the following output:

K - Session information for application at context path /grok
Default maximum session inactive interval 20 minutes
<1 minutes: 9 sessions
1 - <2 minutes: 8 sessions
2 - <3 minutes: 11 sessions
3 - <4 minutes: 4 sessions
4 - <5 minutes: 6 sessions
5 - <6 minutes: 5 sessions
6 - <7 minutes: 9 sessions
7 - <8 minutes: 5 sessions
8 - <9 minutes: 11 sessions
9 - <10 minutes: 7 sessions
10 - <11 minutes: 10 sessions
11 - <12 minutes: 7 sessions
12 - <13 minutes: 6 sessions
13 - <14 minutes: 5 sessions
14 - <15 minutes: 9 sessions
15 - <16 minutes: 7 sessions
16 - <17 minutes: 9 sessions
17 - <18 minutes: 6 sessions
18 - <19 minutes: 9 sessions
>=20 minutes: 666 sessions

but when I check with the Tomcat Web manager app in my web browser, I still see a lot of unexpired sessions (older than inactive interval) - which I can then manually expire, by clicking "Expire Sessions" button in the web app!

How can i do this automatically? (And/or why don't they expire automatically anyway)?

Thanks,
Kirill



--
Kirill Kireyev, PhD
Founder/CTO instaGrok.com
kirill@instagrok.com
Twitter: @instaGrok
FB: facebook.com/instagrok
--------------080703070808000100000307 Content-Type: image/png; name="instaGrok_sml.png" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="instaGrok_sml.png" iVBORw0KGgoAAAANSUhEUgAAAHUAAAApCAYAAAALSGYwAAAAGXRFWHRTb2Z0d2FyZQBBZG9i ZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tl dCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1l dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUu MC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpS REYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgt bnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8v bnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNv bS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEu MC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9w IENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NjU2NkJBRjNGMEY1 MTFFMDg0OENDRTEzOUU2MDk1M0QiIHhtcE1NOkRvY3VtZ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YkQm5 9hLGsXTk4v+f2CcBW71PUEPPHDBosdhNMmnISeOG/lOwTmnHJWGK0ncUQvg6rBzjx/IhZSzM bQMlf6BF3VUPQKS0iz7YbKLn+wR1qZoPO0dAL5xWL4UcuMnyU1iEglElr52mZPFi4tuxshQK AVbiGWhxgB/UZm+1dkTfsXpZiJ8J1FuS5ysGrPnkIgZwaQwwdhUftpEpTGYtWEgA1rASSmoV TCYleSdOaC3QaAzXB2pTX+3BfTnzQajFJqHHDe0FA5rKTQtA0YJqwR2gpdNCBG6OzFl0Oybj /e4IumZCQEdjAHO4O0dQK8bZRYv8judlCVy7hpc+QVtBCC8tWAXXQ1ZMGEJfmPc+wSSuYbGw yD8muSxq+JWSd5FckXqi2h93QfAKxjI4z4zMF88njRhQmSUIuneki1xmtE7f+eQfHSNDDASa rbbInbd5PwZiPKqVyoXIckZZvvLOzEfHsO3Whfk8QsnwhRF2TuxLclywQ31EjCDlYHl5Awti oFRJYzx/SW6n2UMKDYCw9Pe1gc53Phx3/t8DvJ3QUwuF2pQ731wuzmv/pv6cRsWhOtABv7Ol vp3gBj9G0z8O9eIzqG8nJYlSD/oZZKvo9ywfQ/4TYACBDkT841PXwwAAAABJRU5ErkJggg== --------------080703070808000100000307-- --------------020501050700010309090106--