tomcat6 status results into dead state

2011-02-16 Thread rahul vatsa
Hi,

When i start tomcat6 two times without a stop in between, rctomcat6 status
results into dead state.

I checked the rctomcat6 start script, in this case when the tomcat6 is
already running and a rctomcat6 start is done, it display a msg that  
process already running, but it continues in the start function further
down  executes the
TOMCAT_SCRIPT(dtomcat6) script with the start argument. And after that pid
in the tomcat6.pid file gets changed but the process keeps running with the
old pid, and hence when we do a rctomcat6 status, it results into dead
state(bcoz it doesn't find any process running with that pid).

I think it shouldn't execute the TOMCAT_SCRIPT in this case,  so in case
when checkpid is success(in start function), i put an exit after the echo
msg   process already running, this solves the problem, but is this the
correct solution ?
If you think its not the right solution, plz suggest me something
appropriate.




function start() {
echo -n Starting Tomcat ($CATALINA_BASE)
if [ -f /var/lock/subsys/${NAME} ] ; then
if [ -f /var/run/${NAME}.pid ]; then
read kpid  /var/run/${NAME}.pid
if checkpid $kpid 21; then
echo $NAME process already running
rc_failed 0

#The below exit i have added
exit
else
echo -n lock file found but no process running for
pid $kpid, continuing
rc_failed 7
fi
fi
fi
.
.


regards
rahul


Re: tomcat6 status results into dead state

2011-02-16 Thread André Warnier

Hi.

This startup script is not part of the standard Tomcat distribution from 
http://tomcat.apache.org


It was created by whoever created the distribution-specific tomcat package on your brand 
of system (we don't know which, because you do not say).

(e.g. : apt-get install tomcat6 on a Debian linux system, or similar)

In other words, you should communicate this problem to these people, not to this 
tomcat-users list.




rahul vatsa wrote:

Hi,

When i start tomcat6 two times without a stop in between, rctomcat6 status
results into dead state.

I checked the rctomcat6 start script, in this case when the tomcat6 is
already running and a rctomcat6 start is done, it display a msg that  
process already running, but it continues in the start function further
down  executes the
TOMCAT_SCRIPT(dtomcat6) script with the start argument. And after that pid
in the tomcat6.pid file gets changed but the process keeps running with the
old pid, and hence when we do a rctomcat6 status, it results into dead
state(bcoz it doesn't find any process running with that pid).

I think it shouldn't execute the TOMCAT_SCRIPT in this case,  so in case
when checkpid is success(in start function), i put an exit after the echo
msg   process already running, this solves the problem, but is this the
correct solution ?
If you think its not the right solution, plz suggest me something
appropriate.




function start() {
echo -n Starting Tomcat ($CATALINA_BASE)
if [ -f /var/lock/subsys/${NAME} ] ; then
if [ -f /var/run/${NAME}.pid ]; then
read kpid  /var/run/${NAME}.pid
if checkpid $kpid 21; then
echo $NAME process already running
rc_failed 0

#The below exit i have added
exit
else
echo -n lock file found but no process running for
pid $kpid, continuing
rc_failed 7
fi
fi
fi
.
.


regards
rahul




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 - does unpackWars=false work

2011-02-16 Thread Mark Thomas
On 15/02/2011 21:47, Caldarale, Charles R wrote:
 From: afk...@gmail.com [mailto:afk...@gmail.com] On Behalf Of Afkham Azeez
 Subject: Tomcat 7 - does unpackWars=false work
 
 In my server.xml file, I have set unpackWars to false as follows:
 Host name=localhost  appBase=webapps
 unpackWARs=false autoDeploy=true
 However, my WAR files are still being unpacked into the work 
 directory. Am I missing something?
 
 Just the fact that the .war files have to be unpacked somewhere;

No they don't. Tomcat will run an application quite happily directly
from a WAR.

 all the config tag does is prevent them from being unpacked into the Host 
 appBase directory.

Unpacking into the work directory is a side-effect of enabling either
antiJARLocking or antiResourceLocking.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 6 - Multiple JMX Remote Lifecycle Listeners

2011-02-16 Thread Brett Delle Grazie
Hi,

I'm running Tomcat 6.0.23 and Sun Java 1.6.0.22 on RHEL 5.6 x86_64.

I've currently got one JMX Remote Lifecycle listener configured in server.xml:
Listener 
className=org.apache.catalina.mbeans.JmxRemoteLifecycleListener
rmiRegistryPortPlatform=X
rmiServerPortPlatform=X+1
useLocalPorts=true / !-- For SSH Tunnelling --

We use this to connect JConsole to the system via an SSH tunnel.

However I have a local system on the same lan that I would now like to use.

Can I add another listener with different ports (and no useLocalPorts=true) or
should I use rmiRegistryPort as the same or should I avoid having two of these
listeners at all.

Thanks,

-- 
Best Regards,

Brett Delle Grazie

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 - does unpackWars=false work

2011-02-16 Thread Afkham Azeez
I explicitly set antiJARLocking and antiResourceLocking to false and now it
is is working as expected. I;m using Embedded Tomcat. Thanks guys.

Azeez

On Wed, Feb 16, 2011 at 4:05 PM, Mark Thomas ma...@apache.org wrote:

 On 15/02/2011 21:47, Caldarale, Charles R wrote:
  From: afk...@gmail.com [mailto:afk...@gmail.com] On Behalf Of Afkham
 Azeez
  Subject: Tomcat 7 - does unpackWars=false work
 
  In my server.xml file, I have set unpackWars to false as follows:
  Host name=localhost  appBase=webapps
  unpackWARs=false autoDeploy=true
  However, my WAR files are still being unpacked into the work
  directory. Am I missing something?
 
  Just the fact that the .war files have to be unpacked somewhere;

 No they don't. Tomcat will run an application quite happily directly
 from a WAR.

  all the config tag does is prevent them from being unpacked into the
 Host appBase directory.

 Unpacking into the work directory is a side-effect of enabling either
 antiJARLocking or antiResourceLocking.

 Mark

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
*Afkham Azeez*
Senior Software Architect  Senior Manager; WSO2, Inc.; http://wso2.com,
*
*
*Member; Apache Software Foundation;
**http://www.apache.org/*http://www.apache.org/
*
email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
blog: **http://blog.afkham.org* http://blog.afkham.org*
twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
*
*


Automated installer for war files

2011-02-16 Thread chris derham
All,

I have been reading Continuous Integration: Improving Software Quality and
Reducing Risk. It recommends having an automated installer for all
deployments, so that the everything is the same on all environments. We
typically have multiple instances of tomcat, allowing us to segregate
applications and start|stop instances in isolation. We currently set this up
manually, but I am trying to work out if we could create an automated
deployment tool such that at deployment it would

   - Check for existing installation - if one found
   - shutdown existing service
  - remove existing service
  - remove existing tomcat instance
   - deploy new war, along with appropriate configuration files
   - register service
   - startup service

To be clear, the script could assume that tomcat was already installed - say
drop out if no CATALINA_HOME env variable set. I planned to feed it a
property file with username/password/db connection string, so we could take
the same installer and run on multiple environments without compromising the
security of passwords etc.

I can't seem to find anything included in tomcat to do this. So is the
expected method of deployment to manually configure multiple tomcat
instances, and then just deploy the war by hand/script? Am I missing some
key piece of software/knowledge?

I was looking at writing a script in say NSIS or something similar. Anybody
have any experience of this, or suggest a better way of doing it?

Thanks for any help

Chris


Re: Automated installer for war files

2011-02-16 Thread André Warnier

chris derham wrote:
..


   - Check for existing installation - if one found
   - shutdown existing service
  - remove existing service
  - remove existing tomcat instance
   - deploy new war, along with appropriate configuration files
   - register service
   - startup service

I do not presume to understand exactly what your requirements are, but if you are talking 
about deploying/redeploying /tomcat applications/, it seems a bit drastic to remove the 
whole tomcat instance just for deploying a new war.
The Tomcat Manager interface provides a programmatic way to stop an application within a 
running Tomcat instance, replace the application, and restart it, all of that without need 
to even stop the Tomcat instance.
At one level above, you can also stop a Tomcat instance (under Windows, probably a 
Service), without having to de-register and re-register the Service.
And so on : you can also update the Tomcat software without necessarily updating the Java 
JVM, and you can update the Java JVM without necessarily having to reboot the system, etc..
Maybe you should be more precise as to what exactly you want to be able to update 
mechanically.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Automated installer for war files

2011-02-16 Thread chris derham
 Maybe you should be more precise as to what exactly you want to be able to
update mechanically.

Fair question. We have different environments - test, uat and prod. We want
the environments to be the same. We install multiple tomcat instances, so we
don't typically customize the tomcat install much - just add the jdbc jars
to lib folder. Then each environment has a tomcat instance containing the
war, and a context file. The context file we change a little - typically we
replace the start with this (currently using tomcat 6.0.32)

Context disableURLRewriting=true useHttpOnly=true
privileged=false allowLinking=false crossContext=false

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource

!-- Uncomment this to disable session persistence across Tomcat
restarts --
Manager pathname= randomClass=java.security.SecureRandom /

Then we would add entries for resources, such as smtp and jdbc and some
entries to configure the app, e.g. so extra logging on test server, and
turning off access to test urls on production.

So our intention was to automate this all, except the initial installation
of tomcat. So when we have a new war ready to deploy, our automated build
process makes the war and makes an installer. We could then take that
installer, invoke it on the target environment. If first install, then it
would setup the service etc. If just an update, then I figured it would be
safer to remove service. That way if we make any tweaks to the service
configuration, they would be propagated to all environments. (currently we
update the windows service to add a variable to tell the app which
environment it is running under)

Apologies if nobody else is doing this - I truly assumed that this would be
a common need. I was aware of the manager app, and knew that you could call
ant tasks to deploy new apps to it. However I didn't think that the tasks
that it has would cover the whole range of installing a service etc

I also agree with your comment about reinstalling the whole service seems
overkill to just deploy an updated war file. However without the ability to
deploy all the settings automatically via a script, I can't see how we can
guarantee that all environments are the same. Working on multiple projects,
it is just hard to keep all envs in sync all the time manually IMHO

Thanks for your suggestion

Chris


Re: Automated installer for war files

2011-02-16 Thread André Warnier

chris derham wrote:
...

safer to remove service. That way if we make any tweaks to the service
configuration, they would be propagated to all environments. (currently we
update the windows service to add a variable to tell the app which
environment it is running under)


Can you expand a bit on the above ?
(That seems to be the only part which is really Windows-specific).
Such as, what variable are you talking about, defined where ?

One other thing : it seems that when you talk about tomcat instances, you are really 
talking about nn separate installations of Tomcat, each with its own top installation 
directory, and each with its /bin, /lib, etc.. sub-directories.

Is that how your setup is ?
Or do you have one single Tomcat software directory (%CATALINA_HOME%), shared by multiple 
running Tomcat processes (each with its separate %CATALINA_BASE%) ?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 - Multiple JMX Remote Lifecycle Listeners

2011-02-16 Thread Brett Delle Grazie
Hi,

On 16 February 2011 11:18, Brett Delle Grazie
brett.dellegra...@gmail.com wrote:
 Hi,

 I'm running Tomcat 6.0.23 and Sun Java 1.6.0.22 on RHEL 5.6 x86_64.

 I've currently got one JMX Remote Lifecycle listener configured in server.xml:
        Listener 
 className=org.apache.catalina.mbeans.JmxRemoteLifecycleListener
                rmiRegistryPortPlatform=X
                rmiServerPortPlatform=X+1
                useLocalPorts=true / !-- For SSH Tunnelling --

 We use this to connect JConsole to the system via an SSH tunnel.

 However I have a local system on the same lan that I would now like to use.

 Can I add another listener with different ports (and no useLocalPorts=true) 
 or
 should I use rmiRegistryPort as the same or should I avoid having two of these
 listeners at all.

Experimentation says 'yes' it does work with different ports. I
haven't tried it using the same
RMI registry port.


 Thanks,

 --
 Best Regards,

 Brett Delle Grazie




-- 
Best Regards,

Brett Delle Grazie

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/15/2011 5:57 PM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: [OT] OutOfMemoryError: GC overhead limit exceeded
 
 This error occurred /once/ at 16:39 EDT and it's 17:39 EDT now
 
 Is it likely that this was something acute and that my server is okay?
 
 PS Old Generation
capacity = 134217728 (128.0MB)
used = 129355080 (123.36261749267578MB)
free = 4862648 (4.637382507324219MB)
96.37704491615295% used
 
 The above shows that the problem persists, even though at least some
 work is getting done.  With multiple cores available, you may be able
 to get away with a saturated heap for a while, but a server restart
 is in order at your earliest convenience.  But before doing that, try
 running jhat or equivalent to find out what's eating up the space.

It seems that jmap won't do anything (like -histo) besides the heap map
without using the -F switch. When I use the -F switch, the whole JVM
pauses while it does the heap walk. I killed the jmap process and
everything continued. I'll have to wait until off-hours to take it's
temperature and bounce the server.

On the other hand, I've invoked System.gc which ran quickly and freed up
a lot of memory. Here's what jmap reports this morning:

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize  = 201326592 (192.0MB)
   NewSize  = 1048576 (1.0MB)
   MaxNewSize   = 4294901760 (4095.9375MB)
   OldSize  = 4194304 (4.0MB)
   NewRatio = 2
   SurvivorRatio= 8
   PermSize = 16777216 (16.0MB)
   MaxPermSize  = 67108864 (64.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 54263808 (51.75MB)
   used = 35766400 (34.1094970703125MB)
   free = 18497408 (17.6405029296875MB)
   65.9120716334541% used
- From Space:
   capacity = 6094848 (5.8125MB)
   used = 5233120 (4.990692138671875MB)
   free = 861728 (0.821807861328125MB)
   85.86137012768818% used
To Space:
   capacity = 6422528 (6.125MB)
   used = 0 (0.0MB)
   free = 6422528 (6.125MB)
   0.0% used
PS Old Generation
   capacity = 134217728 (128.0MB)
   used = 61911720 (59.043617248535156MB)
   free = 72306008 (68.95638275146484MB)
   46.12782597541809% used
PS Perm Generation
   capacity = 20578304 (19.625MB)
   used = 20152712 (19.21912384033203MB)
   free = 425592 (0.40587615966796875MB)
   97.93184122462182% used

Looks like I've got a lot more wiggle room, now, in the Old generation.
Does this look healthy enough to continue, or should I schedule a
restart ASAP? I'd prefer to wait until off hours.

We do have a couple of operations that foolishly load way too much
information into memory all at once and cache it in the session (oops),
so I suspect one (or more) of those operations was performed and the
objects were reachable for a while (lived in the session, probably) but
then eventually became collectible and GC recovered.

Quick question: does anyone know if it's safe to truncate catalina.out
while Tomcat is running? Something like this:

cp catalina.out catalina.out.old   catalina.out

??

I'd like to stop getting my the sky is falling emails that are
triggered by the presence of the string OutOfMemoryError in
catalina.out :)

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1b9BcACgkQ9CaO5/Lv0PAFAACbB0afje/4WLCjgE49UnkbpWG6
OmMAoIMei7iQFVZTzZhIDcnb80W0HI8K
=yPoC
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Automated installer for war files

2011-02-16 Thread chris derham


  Can you expand a bit on the above ?
 (That seems to be the only part which is really Windows-specific).
 Such as, what variable are you talking about, defined where ?

 So currently we set catalina_home and catalina_base, cd into
catalina_home\bin and run

service install myApp

then manually run

tomcat6w //ES//myApp

And under the java tab, manually append to the java options

-Denv=uat

for example. I think that this can be scripted using tomcat6w, e.g.
something like

tomcat6w //IS//myApp --JvmOptions -Denv=uat --Startup=auto

I wrote the email to just try to ascertain which way is the most
popular/best way to perform this


 One other thing : it seems that when you talk about tomcat instances, you
 are really talking about nn separate installations of Tomcat, each with its
 own top installation directory, and each with its /bin, /lib, etc..
 sub-directories.
 Is that how your setup is ?
 Or do you have one single Tomcat software directory (%CATALINA_HOME%),
 shared by multiple running Tomcat processes (each with its separate
 %CATALINA_BASE%) ?

 When I said tomcat instances, I meant single catalina_home with multiple
catalina_bases. I can see that this is ambiguous - I don't know if there is
a better term that you guys use for this, as opposed to multiple
catalina_homes?

Thanks

Chris


Re: Replicate session-object after values in object has been changed

2011-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 2/15/2011 3:46 PM, Martin Grotzke wrote:
 This is how it's implemented for memcached-session-manager (msm): when
 loading the session from memcached (either due to a tomcat failover or
 when loading a non-sticky session) the hash of the byte-array is
 stored. At the end of the request the session is serialized again and
 the new hash is compared with the previous one. Serialization is
 pluggable, default is java/jvm serialization, alternatives are e.g.
 kryo, which shares the same serialization semantics like java
 serialization (ignoring transient fields etc.).

Okay, so you *do* take data fingerprints. How well does that perform? I
suppose the balance of being able to replicate the objects with very
little in the way of /coding/ overhead has its advantaged, but that
seems like a lot of work to do after every request just to see if
replication is necessary.

 For msm by default a session would get replicated if at least one
 attribute was accessed (via getAttribute), so I see this change
 detection (or detection that state has not changed) as some kind of
 optimization to reduce I/O and network traffic.

Do you re-replicate the entire session or just the object that was
accessed? Or, are you saying that you only re-fingerprint the objects
that are accessed during a particular request?

 It would be really easy to disable this automatic change detection via
 configuration btw.
 
 

 All of these techniques will kill performance. :(

 Well, what does this mean? IMHO such statements are not really useful.

Serializing objects after a request is complete delays the return of the
request processing thread to the thread pool. More threads will be
required to handle a particular user load and performance across the
webapp will suffer. Is that more specific and useful? My assertion is
that object changes are more easily detectable (or, better yet,
/knowable/) by the webapp itself and it's trivial to notify the
replication manager that an object needs to be re-replicated using
HttpSession.setAttribute.

 I can share some facts + numbers (out of my head):
 - for one of the largest german ecommerce sites we use msm for session
 replication/failover
 - wicket is used as web framework, wicket stores entire pagemap
 (pages/component trees) in the session (for stateful pages)
 - kryo is used as serialization mechanism (see
 http://code.google.com/p/kryo/ and
 https://github.com/eishay/jvm-serializers/wiki).
 - average (serialized) session size is between 10kB and 100kB
 - session serialization/replication is done asynchronously (not in the
 request thread)

That's interesting. Is there one thread that manages all replication?
Under load, does it ever fall behind? I can imagine a work queue getting
longer with each request...

 - overhead for msm in the request thread is ~1msec
 - average session serialization time is s.th. between 1msec and 10msec
 - ~20 requests per second are served by each tomcat instance
 
 In conclusion there's not a real impact on user experience. Most of
 the cpu time is used by the application, the overhead for
 serialization/replication is very low.

I would think this would be very application-specific: of course a light
session or trivially-serialized session-stored objects will not incur
much of a penalty.

 Although, it has an impact on your application, as either you'll
 always trigger replication, or in several places in your software you
 need to know if you change session state and you have to decide if you
 need to set the appropriate session attribute. Even more, you need to
 know which session attribute you need to set again.

My argument is that the webapp knows it's own business :)

 Some modern web frameworks try to provide a higher level of
 abstraction so that you don't get in touch with servlet stuff. If you
 need to trigger session replication via setAttribute in your
 application you need to know about internals of the web framework,
 which also might change. That was also my motivation to provide a
 transparent session change detection.

That's a fair point.

 I am very interested in how the memcache folks accomplish this. Martin:
 is this done via careful configuration of what changed means or is
 everything automatic?

 I hope I could clarify how it's done for msm.

Thanks for the details.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1b9oIACgkQ9CaO5/Lv0PD+jQCfSeKNoJGNNhS7mk/tuUOXNHEf
YR4AoKy2jygC/u/wB1oGdUQZzbpSBre6
=Yrru
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Struts application used as a web service (large number of sessions)

2011-02-16 Thread Denis . Laroche
Ok thanks, your explanations were very useful. I'll do what you suggested, 
i.e. not create a session for the Struts actions matching the web service 
clients.

--
DL





André Warnier a...@ice-sa.com 
2011-02-15 06:02 PM
Please respond to
Tomcat Users List users@tomcat.apache.org


To
Tomcat Users List users@tomcat.apache.org
cc

Subject
Re: Struts application used as a web service (large number of sessions)






denis.laro...@pwc.ca wrote:
 Hello everybody,
 
 I wrote a Struts application deployed on a Tomcat server that is used as 
a 
 web service. What I see is that for every request sent by the client 
 applications a new session is created; I guess this is because there's 
no 
 JSESSIONID cookie sent with the request. Could someone tell me if it's 
 terribly inefficient for the server to have to create a new session for 
 every request? I could reduce the session timeout to the minimum, but 
the 
 application is also used by interactive users so the session timeout 
needs 
 to have a reasonable value.
 
HttpSession (HttpRequest.)getSession() :
  Returns the current session associated with this request, or if the 
request does not 
have a session, creates one.

HttpSession : 
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpSession.html


A session is created when there is a call to getSession().
No call to getSession(), no session.

In the big scheme of things, from the above descriptions, I would tend to 
think that a 
session object is not something trivial, so creating one when you don't 
need it is 
probably indeed quite inefficient.
(And then the session has to be stored somewhere, which will involve 
serialization, I/O 
etc..; and then some background task still has to periodically go clean up 
these useless 
sessions).

 From your description, it seems as if there are two types of usage of the 
same application :
- a usage by real users, which does require a session
- a usage as a web service, which does not require a session
   (because these are one-off calls, probably)

I don't know Struts at all, but is it possible to distinguish the two 
types of usage, and 
bypass the getSession() call when the application is used as a web service 
?

Otherwise, would it be possible to set up two instances of your 
application ?
Such as :
/webapp1 : used by interactive users
/webapp2 : used by web service clients
and remove the getSession() call in the one used as a web service ?

Now again, inefficiency is a relative concept.
If your server is 50% idle anyway, you do not really want to spend a lot 
of time bringing 
it to 60% idle.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




RE: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: [OT] OutOfMemoryError: GC overhead limit exceeded

 Here's what jmap reports this morning:

 PS Old Generation
capacity = 134217728 (128.0MB)
used = 61911720 (59.043617248535156MB)
free = 72306008 (68.95638275146484MB)
46.12782597541809% used

Interesting.  Something must have broken loose overnight.

 Does this look healthy enough to continue, or should I 
 schedule a restart ASAP?

I'd let it run, and see what happens.
 
 I suspect one (or more) of those operations was performed 
 and the objects were reachable for a while (lived in the 
 session, probably) but then eventually became collectible
 and GC recovered.

Sounds highly plausible.

 - 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.



Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Leon Rosenberg
On Wed, Feb 16, 2011 at 5:37 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] OutOfMemoryError: GC overhead limit exceeded

 Here's what jmap reports this morning:

 PS Old Generation
    capacity = 134217728 (128.0MB)
    used     = 61911720 (59.043617248535156MB)
    free     = 72306008 (68.95638275146484MB)
    46.12782597541809% used

 Interesting.  Something must have broken loose overnight.

 Does this look healthy enough to continue, or should I
 schedule a restart ASAP?

 I'd let it run, and see what happens.

 I suspect one (or more) of those operations was performed
 and the objects were reachable for a while (lived in the
 session, probably) but then eventually became collectible
 and GC recovered.

 Sounds highly plausible.

Do you log number of users/sessions? Would probably be interesting to
see this in correlation.
Leon

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Leon,

On 2/16/2011 11:53 AM, Leon Rosenberg wrote:
 On Wed, Feb 16, 2011 at 5:37 PM, Caldarale, Charles R
 chuck.caldar...@unisys.com wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] OutOfMemoryError: GC overhead limit exceeded

 Here's what jmap reports this morning:

 PS Old Generation
capacity = 134217728 (128.0MB)
used = 61911720 (59.043617248535156MB)
free = 72306008 (68.95638275146484MB)
46.12782597541809% used

 Interesting.  Something must have broken loose overnight.

 Does this look healthy enough to continue, or should I
 schedule a restart ASAP?

 I'd let it run, and see what happens.

 I suspect one (or more) of those operations was performed
 and the objects were reachable for a while (lived in the
 session, probably) but then eventually became collectible
 and GC recovered.

 Sounds highly plausible.
 
 Do you log number of users/sessions? Would probably be interesting to
 see this in correlation.

Not currently. We're working on some decent instrumentation tools to
basically log all kinds of stuff like this on a regular interval... say
every minute or five minutes. I could connect to the JVM using JConsole
and ask Tomcat for the session count (all users have a session) but the
event is long gone so any information I get now would not be directly
relevant.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1cBnUACgkQ9CaO5/Lv0PCJRwCgo+ssFInOJ53tJQrO1ZdNhFPk
UW0An1sKMuCkckA8Rjwzu23xM0CmxOAY
=jBKF
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/16/2011 11:37 AM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: [OT] OutOfMemoryError: GC overhead limit exceeded
 
 Here's what jmap reports this morning:
 
 PS Old Generation
capacity = 134217728 (128.0MB)
used = 61911720 (59.043617248535156MB)
free = 72306008 (68.95638275146484MB)
46.12782597541809% used
 
 Interesting.  Something must have broken loose overnight.

Definitely. It may have broken loose much earlier... I just didn't
observe it again after my initial post last night.

 Does this look healthy enough to continue, or should I 
 schedule a restart ASAP?
 
 I'd let it run, and see what happens.

:)

Should I be concerned that neither jstack not jmap will run against the
JVM unless I specify the -F switch?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1cBq8ACgkQ9CaO5/Lv0PAxYQCfTQdvZfmMjdewR51Ma8G99mk2
Y34AoJ1RLeEXytG/3zxC2IVH+GXqcWq/
=JXzi
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Performance Tuning Tomcat 7...

2011-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pid,

On 2/15/2011 2:43 PM, Pid wrote:
 On 2/15/11 2:34 PM, Christopher Schultz wrote:
 Pid,

 On 2/14/2011 5:39 AM, Pid wrote:
 On 2/13/11 8:15 PM, Tony Anecito wrote:
 Hi Mark,

 Here is the link to the screenshot I tried to send as an attachement.

 http://www.myuniportal.com/tomcatjerseyservletprofile.jpg

 What are we looking for here?

 I don't know if there's any optimisation possible in the
 SocketProcessor.run() method in Tomcat.

 If I were to consider what Jersey is doing, I'd look at why there's an
 expensive ContainerResponse.write() call (costing 0.6ms) while it still
 seems to be processing the request.


 ... and a recursive call to _handleRequest. Or am I reading that
 incorrectly
 
 Could be, or there could be more than one _handleRequest method with
 different args. /guessing

Duh. Didn't think of that.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1cCJEACgkQ9CaO5/Lv0PCTQQCePKndmJbVkBsW7O17DFrlbbXU
A/AAn0+iP1nxUqL3evB9r8cY/vY9zw61
=tlpV
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 7.0.8 JARs in Maven repos

2011-02-16 Thread Afkham Azeez
Hi folks,
Can I know from which Maven repo I can fetch the JARs of the latest Tomcat
release? repo1 seems to be having only upto the 7.0.6 JARs.

Thanks
Azeez


Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Ronald Klop



Op woensdag, 16 februari 2011 18:17 schreef Christopher Schultz 
ch...@christopherschultz.net:


 


Chuck,

On 2/16/2011 11:37 AM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] OutOfMemoryError: GC overhead limit exceeded

 Here's what jmap reports this morning:

 PS Old Generation
capacity = 134217728 (128.0MB)
used = 61911720 (59.043617248535156MB)
free = 72306008 (68.95638275146484MB)
46.12782597541809% used

 Interesting.  Something must have broken loose overnight.

Definitely. It may have broken loose much earlier... I just didn't
observe it again after my initial post last night.

 Does this look healthy enough to continue, or should I
 schedule a restart ASAP?

 I'd let it run, and see what happens.

:)

Should I be concerned that neither jstack not jmap will run against the
JVM unless I specify the -F switch?

Thanks,
- -chris
 






I see the same problem with jstack and friends if a process is gc'ing a lot.

Ronald.

Re: Tomcat 7.0.8 JARs in Maven repos

2011-02-16 Thread Mark Thomas
On 16/02/2011 17:46, Afkham Azeez wrote:
 Hi folks,
 Can I know from which Maven repo I can fetch the JARs of the latest Tomcat
 release? repo1 seems to be having only upto the 7.0.6 JARs.

Search the archives. That question was asked and answered a couple of
days ago.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ronald,

On 2/16/2011 12:48 PM, Ronald Klop wrote:
 I see the same problem with jstack and friends if a process is gc'ing a
 lot.

Interesting.

I don't have verbose GC enabled (can you enable that after JVM launch
using JConsole or something like that?), but the process doesn't seem to
be using a ton of CPU time which I would expect from a very active GC.

Do you observe this only when GC is /currently/ active or after there
has been a lot of GC activity. I'm wondering if the JVM is in a state
where everything is working properly except that one small things has
broken and prevents these tools from working without sprinkling the
force magic onto them.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1cFPkACgkQ9CaO5/Lv0PB9fACfblGqULi4gJNnOD+PdvWAKlz+
2hkAn2kWKXb+FZiVatOM/TaL3BCOGam2
=rECB
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Replicate session-object after values in object has been changed

2011-02-16 Thread Filip Hanik - Dev Lists

On 2/15/2011 1:04 PM, Thomas Andraschko wrote:

Hmm not really but the tcp cluster with BackupManager would be enough (if it 
would check for modification).

That can be easy, or hard :)
If you know how to check for modification, then you can implement a simple 
filter that adds the attribute again

best
Filip


The memcached manager is really a great idea and works great! I have only one 
issue. If you shutdown a memcached node, JSF pages can not be accessed anymore 
(a blank page will appear) and connection refused exceptions will be printed by 
tomcat.

--- Martin Grotzkemartin.grot...@googlemail.com  schrieb am Di, 15.2.2011:


Von: Martin Grotzkemartin.grot...@googlemail.com
Betreff: Re: Replicate session-object after values in object has been changed
An: Tomcat Users Listusers@tomcat.apache.org
Datum: Dienstag, 15. Februar, 2011 20:49 Uhr
On Tue, Feb 15, 2011 at 11:08 AM,
Thomas Andraschko
tommygrass...@yahoo.de
wrote:

Thanks! i will give it a try!
Is there also another manager available without using

memcached?
None that I'm aware of, but perhaps google will know more
;-)

What do you have in mind btw? Is it especially memcached
that you
would like to have replaced by another backend?

Cheers,
Martin





--- Martin Grotzkemartin.grot...@googlemail.com

schrieb am Di, 15.2.2011:

Von: Martin Grotzkemartin.grot...@googlemail.com
Betreff: Re: Replicate session-object after values

in object has been changed

An: us...@tomcat.apache..org
Datum: Dienstag, 15. Februar, 2011 01:27 Uhr

memcached-session-manager detects session

modification as

you describe it.
It's a custom session manager that keeps sessions
(additionally) in
memcached:
http://

code.google.com/p/memcached-session-manager

Cheers,
Martin



Thomas Andraschko wrote:

Thanks for your answer.
Yep that works but it isn't really nice if

you are

working with managed

beans from JSF or other DI containers.
Does other Servlet containers support this

kind of

replication or is it

really the only way to put/remove the object

to/from

the session map?

It is possible to develop a valve or

interceptor to

check specified

entries in the session map and replicate them

again?

(sorry, i don't know

the architecture very well)


--- Mark Thomasma...@apache..org

schrieb am Mo, 14.2.2011:

Von: Mark Thomasma...@apache.org
Betreff: Re: Replicate session-object

after values

in object has been

changed
An: Tomcat Users Listusers@tomcat.apache.org
Datum: Montag, 14. Februar, 2011 19:09

Uhr

On 14/02/2011 15:57, Thomas
Andraschko wrote:

Is it possible that Tomcat will

automatically

check

the SessionMap entries after each request

if any

value in a

entry has been changed?
No.

Tomcat adding or removing an object from

the

session will

trigger
replication. Modifying the object

directly will

not trigger

replication.

You can try re-adding the object to the

session.

That

should trigger
replication.

Mark





-

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




--
View this message in context: 
http://old.nabble.com/Replicate-session-object-after-values-in-object-has-been-changed-tp30923039p30927143.html
Sent from the Tomcat - User mailing list archive

at

Nabble.com.




-

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





--
Martin Grotzke
http://www.javakaffee.de/blog/

-
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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3445 - Release Date: 02/15/11






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



hi

2011-02-16 Thread Anup Niroula
Hi,

How can i configure my localhost:8080 tomcat so that the site could be
accessible through ip address by other computers in the network.


Sincerely,
Anup


Re: hi

2011-02-16 Thread Ozgur Ozdemircili
Well,

Actually tomcat comes configured on port 8080. You just need to start it and
make sure you dont have any firewall in your server blocking this port.
Thats it.


Best!
Özgür Özdemircili
http://www.acikkod.org
Code so clean you could eat off it


On Wed, Feb 16, 2011 at 7:42 PM, Anup Niroula anup.niro...@gmail.comwrote:

 Hi,

 How can i configure my localhost:8080 tomcat so that the site could be
 accessible through ip address by other computers in the network.


 Sincerely,
 Anup



RE: hi

2011-02-16 Thread Caldarale, Charles R
 From: Anup Niroula [mailto:anup.niro...@gmail.com] 
 Subject: hi

 How can i configure my localhost:8080 tomcat so that the site could be
 accessible through ip address by other computers in the network.

Assuming there are no firewalls in the way, you already have.  The other 
computers would access your site via:

http://your_ip_address:8080

Nothing else is needed.

 - 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: Automated installer for war files

2011-02-16 Thread André Warnier

chris derham wrote:


 Can you expand a bit on the above ?
(That seems to be the only part which is really Windows-specific).
Such as, what variable are you talking about, defined where ?


 So currently we set catalina_home and catalina_base, cd into
catalina_home\bin and run

service install myApp

then manually run

tomcat6w //ES//myApp

And under the java tab, manually append to the java options

-Denv=uat

for example. I think that this can be scripted using tomcat6w, e.g.
something like

tomcat6w //IS//myApp --JvmOptions -Denv=uat --Startup=auto

I wrote the email to just try to ascertain which way is the most
popular/best way to perform this


One other thing : it seems that when you talk about tomcat instances, you
are really talking about nn separate installations of Tomcat, each with its
own top installation directory, and each with its /bin, /lib, etc..
sub-directories.
Is that how your setup is ?
Or do you have one single Tomcat software directory (%CATALINA_HOME%),
shared by multiple running Tomcat processes (each with its separate
%CATALINA_BASE%) ?

When I said tomcat instances, I meant single catalina_home with multiple

catalina_bases. I can see that this is ambiguous - I don't know if there is
a better term that you guys use for this, as opposed to multiple
catalina_homes?



No, you are right, that was the right term.  I just had a doubt, but you are doing this 
correctly.

One more question:
Above, you mention myApp as the name of the Service.
I guess that you mean also myApp1, myApp2, ... (as many different services as you have 
Tomcat instances), right ?


I don't think that there is a commonly accepted or used way of doing this kind 
of thing.
Personally, it looks to me like you are doing this in a sensible way, 
considering.
Others may have a better idea.

The only thing for me is : it looks as if the only Service setup value which is 
different from one Tomcat to the other, is this -Denv=uat flag.

I presume that this is something picked up later by the application.
If you could move this somewhere else (such as in the application's context.xml, or an 
init-param in the webapp's web.xml), and have the application picking it up from there, 
then it seems to me that this would alleviate the need of manipulating the Service's 
Registry parameters altogether, no ?

(and consequently also the need for stopping, re-registering and restarting the 
Service)



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hi

2011-02-16 Thread Anup Niroula
Hi,

Thanx for the reply.
Is there any way i can provide domain namewww.abc.cominstead of ip address
to be accessed with in network. ?

Sincerely,
Anup



On Wed, Feb 16, 2011 at 12:48 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Anup Niroula [mailto:anup.niro...@gmail.com]
  Subject: hi

  How can i configure my localhost:8080 tomcat so that the site could be
  accessible through ip address by other computers in the network.

 Assuming there are no firewalls in the way, you already have.  The other
 computers would access your site via:

 http://your_ip_address:8080

 Nothing else is needed.

  - 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: hi

2011-02-16 Thread David kerber

On 2/16/2011 2:04 PM, Anup Niroula wrote:

Hi,

Thanx for the reply.
Is there any way i can provide domain namewww.abc.cominstead of ip address
to be accessed with in network. ?


If your internal dns server will resolve it to the correct ip address, 
it will work.






Sincerely,
Anup



On Wed, Feb 16, 2011 at 12:48 PM, Caldarale, Charles R
chuck.caldar...@unisys.com  wrote:


From: Anup Niroula [mailto:anup.niro...@gmail.com]
Subject: hi



How can i configure my localhost:8080 tomcat so that the site could be
accessible through ip address by other computers in the network.


Assuming there are no firewalls in the way, you already have.  The other
computers would access your site via:

http://your_ip_address:8080

Nothing else is needed.

  - 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







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.8 maven repository

2011-02-16 Thread Mark Thomas
On 14/02/2011 21:47, George Vagenas wrote:
 Thanks Mark

My bad. There was an incorrect version in a config file.

7.0.8 files have been uploaded and should sync shortly.

Mark

 
 On Sun, Feb 13, 2011 at 12:32 PM, George Vagenas gvage...@gmail.com wrote:
 
 Hi guys,

 I am trying to locate the tomcat 7.0.8 artifacts with no success. I tried
 http://repo2.maven.org/maven2/org/apache/tomcat/ but no luck there.

 Can you please shed some light here?

 Regards

 --
 George Vagenas


 
 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Ronald Klop



Op woensdag, 16 februari 2011 19:18 schreef Christopher Schultz 
ch...@christopherschultz.net:


 


Ronald,

On 2/16/2011 12:48 PM, Ronald Klop wrote:
 I see the same problem with jstack and friends if a process is gc'ing a
 lot.

Interesting.

I don't have verbose GC enabled (can you enable that after JVM launch
using JConsole or something like that?), but the process doesn't seem to
be using a ton of CPU time which I would expect from a very active GC.

Do you observe this only when GC is /currently/ active or after there
has been a lot of GC activity. I'm wondering if the JVM is in a state
where everything is working properly except that one small things has
broken and prevents these tools from working without sprinkling the
force magic onto them.

Thanks,
- -chris
 






Where it is /currently/ active. I don't do much jstack/jmap if there is no 
problem, so can't really say something about it.

Ronald.

Re: hi

2011-02-16 Thread Anup Niroula
Hi, could you please explain me in detail. How can i provide a domain name
for my website like www.lsctesting.com using tomcat 7 to be accessed  in
the network.

Sincerely,
Anup

On Wed, Feb 16, 2011 at 1:07 PM, David kerber dcker...@verizon.net wrote:

 On 2/16/2011 2:04 PM, Anup Niroula wrote:

 Hi,

 Thanx for the reply.
 Is there any way i can provide domain namewww.abc.cominstead of ip
 address
 to be accessed with in network. ?


 If your internal dns server will resolve it to the correct ip address, it
 will work.





 Sincerely,
 Anup



 On Wed, Feb 16, 2011 at 12:48 PM, Caldarale, Charles R
 chuck.caldar...@unisys.com  wrote:

  From: Anup Niroula [mailto:anup.niro...@gmail.com]
 Subject: hi


  How can i configure my localhost:8080 tomcat so that the site could be
 accessible through ip address by other computers in the network.


 Assuming there are no firewalls in the way, you already have.  The other
 computers would access your site via:

 http://your_ip_address:8080

 Nothing else is needed.

  - 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





 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




RE: hi

2011-02-16 Thread Caldarale, Charles R
 From: Anup Niroula [mailto:anup.niro...@gmail.com] 
 Subject: Re: hi

 Hi, could you please explain me in detail. How can i provide a 
 domain name for my website like www.lsctesting.com using tomcat
 7 to be accessed in the network.

This has nothing to do with Tomcat.  Contact your network administrator.

 - 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: Replicate session-object after values in object has been changed

2011-02-16 Thread Martin Grotzke
On Wed, Feb 16, 2011 at 5:08 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 On 2/15/2011 3:46 PM, Martin Grotzke wrote:
 This is how it's implemented for memcached-session-manager (msm): when
 loading the session from memcached (either due to a tomcat failover or
 when loading a non-sticky session) the hash of the byte-array is
 stored. At the end of the request the session is serialized again and
 the new hash is compared with the previous one. Serialization is
 pluggable, default is java/jvm serialization, alternatives are e.g.
 kryo, which shares the same serialization semantics like java
 serialization (ignoring transient fields etc.).

 Okay, so you *do* take data fingerprints. How well does that perform?
Serializing the session at the end of the request takes 1 to 10
millis. Actual hashing of some 10kB session data is in the order of 1
micro second. Storing the hash (int) - does not count.


 I suppose the balance of being able to replicate the objects with very
 little in the way of /coding/ overhead has its advantaged, but that
 seems like a lot of work to do after every request just to see if
 replication is necessary.
A lot of work is relative. In our case more work is done for each
request by the application (even without any I/O), so that
serialization does not add anything that would be reflected by a
higher load.



 For msm by default a session would get replicated if at least one
 attribute was accessed (via getAttribute), so I see this change
 detection (or detection that state has not changed) as some kind of
 optimization to reduce I/O and network traffic.

 Do you re-replicate the entire session or just the object that was
 accessed? Or, are you saying that you only re-fingerprint the objects
 that are accessed during a particular request?
As msm was started from a wicket app that has exactly one session
attribute the entire session is replicated.
But it would also be possible to break it up into separately stored
session attributes.
Only one thing has to be considered with this: objects shared by
different session attributes would be deserialized as different
objects (not references to the same object), which might break
behaviour if this is not considered. Serializing the entire session
ensures that references to shared objects are also deserialized
correctly.



 All of these techniques will kill performance. :(

 Well, what does this mean? IMHO such statements are not really useful.

 Serializing objects after a request is complete delays the return of the
 request processing thread to the thread pool. More threads will be
 required to handle a particular user load and performance across the
 webapp will suffer. Is that more specific and useful?
Request processing is delayed in the order of 1 milli second, I'd say
it's not that much - unless an application handles around 1000
requests per second with an avg. request processing time in the order
of 1 milli second. But this would be an interesting example for
optimization ;-)


 My assertion is
 that object changes are more easily detectable (or, better yet,
 /knowable/) by the webapp itself and it's trivial to notify the
 replication manager that an object needs to be re-replicated using
 HttpSession.setAttribute.
Of course there are applications working directly with session
attributes, but there are also others where it's not clear which
session attibute is responsible for a currently modified object (or
even if it's bound to the session). It depends on the application
architecture.


 I can share some facts + numbers (out of my head):
 - for one of the largest german ecommerce sites we use msm for session
 replication/failover
 - wicket is used as web framework, wicket stores entire pagemap
 (pages/component trees) in the session (for stateful pages)
 - kryo is used as serialization mechanism (see
 http://code.google.com/p/kryo/ and
 https://github.com/eishay/jvm-serializers/wiki).
 - average (serialized) session size is between 10kB and 100kB
 - session serialization/replication is done asynchronously (not in the
 request thread)

 That's interesting. Is there one thread that manages all replication?
The number of available processors is used by default
(Runtime.availableProcessors()), but you can override this via
configuration.


 Under load, does it ever fall behind? I can imagine a work queue getting
 longer with each request...
We didn't experience such a behaviour in the last 6 months, also not
during peak load.


 - overhead for msm in the request thread is ~1msec
 - average session serialization time is s.th. between 1msec and 10msec
 - ~20 requests per second are served by each tomcat instance

 In conclusion there's not a real impact on user experience. Most of
 the cpu time is used by the application, the overhead for
 serialization/replication is very low.

 I would think this would be very application-specific: of course a light
 session or trivially-serialized session-stored objects will not incur
 

Tomcat 6.0.20/AJP connector issues - errors in apache log

2011-02-16 Thread Shaun Qualheim
*Basics:*
Tomcat 6.0.20 (5 instances)
Apache 2.2.13 using mod_proxy_ajp to connect to the tomcat instances
Dell Poweredge 1950 running Fedora Core

We're noticing that we frequently have a buildup in the morning of AJP
errors in our apache error_log along the following lines:

*[Wed Feb 16 04:43:35 2011] [error] ajp_read_header: ajp_ilink_receive
failed
[Wed Feb 16 04:43:35 2011] [error] (120006)APR does not understand this
error code: proxy: read response failed from (null) (127.0.0.1)
[Wed Feb 16 04:45:23 2011] [error] (70007)The timeout specified has expired:
ajp_ilink_receive() can't receive header
[Wed Feb 16 04:45:23 2011] [error] ajp_read_header: ajp_ilink_receive failed
[Wed Feb 16 04:45:23 2011] [error] (120006)APR does not understand this
error code: proxy: read response failed from (null) (127.0.0.1)
[Wed Feb 16 04:45:23 2011] [error] [client hidden] proxy: error processing
end
[Wed Feb 16 04:47:44 2011] [error] (70007)The timeout specified has expired:
ajp_ilink_receive() can't receive header
[Wed Feb 16 04:47:44 2011] [error] ajp_read_header: ajp_ilink_receive failed
[Wed Feb 16 04:47:44 2011] [error] (120006)APR does not understand this
error code: proxy: read response failed from (null) (127.0.0.1)
[Wed Feb 16 04:52:06 2011] [error] (70007)The timeout specified has expired:
ajp_ilink_receive() can't receive header
[Wed Feb 16 04:52:06 2011] [error] ajp_read_header: ajp_ilink_receive failed
[Wed Feb 16 04:52:06 2011] [error] (120006)APR does not understand this
error code: proxy: read response failed from (null) (127.0.0.1)
[Wed Feb 16 04:54:34 2011] [error] (70007)The timeout specified has expired:
ajp_ilink_receive() can't receive header*

I'm trying to get a handle on what's going on here and how to fix it.  I've
not yet found anything in the tomcat logs of concern.

Can anyone give me some idea of what's going on or how to remedy it?  Not
really sure what the next step in troubleshooting is at this point.

Thanks all for your help,
Shaun


Re: huge info messages about mod_jk

2011-02-16 Thread Yu Kikuchi

Mr.Schultz

Here's my Apache, mod_jk and JBoss(Tomcat) configurations.
I think it seems the same setting between MaxClients and maxThreads,
and they have no problems about the Timeout settings.
Would you find any mistakes in these files?

[httpd.conf](preforkMPM)

MaxClients 81

Listen 8008
Listen 8010
Listen 8011

NameVirtualHost XXX.XXX.XXX.162:8008
NameVirtualHost XXX.XXX.XXX.162:8010
NameVirtualHost XXX.XXX.XXX.162:8011
:

VirtualHost XXX.XXX.XXX.162:8008
 CustomLog /opt/httpd/logs/access_8008_log common
 ErrorLog /opt/httpd/logs/error_8008_log
 JkMount /sample/* worker01
/VirtualHost

VirtualHost XXX.XXX.XXX.162:8010
 CustomLog /opt/httpd/logs/access_8010_log common
 ErrorLog /opt/httpd/logs/error_8010_log
 JkMount /sample/* worker01
/VirtualHost

VirtualHost 138.101.249.162:8011
 RewriteEngine On
 RewriteRule !^(/sample/limit\.do|/sample/alive3\.jsp|/index\.html)$ - [F]
 CustomLog /opt/httpd/logs/access_8011_log common
 ErrorLog /opt/httpd/logs/error_8011_log
 JkMount /sample/* worker01
/VirtualHost


[workers.properties]
:
worker.worker01.type=ajp13
worker.worker01.host=XXX.XXX.XXX.162
worker.worker01.port=8009
worker.worker01.retries=2
worker.worker01.retry_interval=200
worker.worker01.recovery_options=0
worker.worker01.connection_pool_timeout=20


[server.xml]
Connector protocol=HTTP/1.1 port=8080 address=${jboss.bind.address}
   maxThreads=81 connectionTimeout=2 redirectPort=8443 
allowTrace=false /

Connector protocol=AJP/1.3 port=8009 address=${jboss.bind.address}
   maxThreads=81 connectionTimeout=2 redirectPort=8443 
allowTrace=false /

Best regards,


(2011/02/16 1:38), Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mladen,

On 2/15/2011 8:51 AM, Mladen Turk wrote:

On 02/15/2011 01:08 PM, Yu Kikuchi wrote:

Mr.Warnier

Thank you for your advice.

But I want to know not the way to inhibit these logs but the reason
why these logs output.



Because Tomcat closes its part of the connection.


This could also be a mismatch between Apache httpd's MaxClients setting
and Tomcat's maxActive (or similar).

Kikuchi, Would you care to post yourConnector  setting from Tomcat and
your MPM configuration from httpd?


When I restarted Apache, huge info messages were put out to the
mod_jk's log like following (over 200 lines!)


10 lines per day of info logging is huge? What must you think of your
access log?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1aq+oACgkQ9CaO5/Lv0PBH4gCfTJh1P4XSZ9hOr+vkCkrgT0F/
jU0AoMA3sieFeUCVsIjOlTFZK4izSOX3
=rR2D
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Secuirty Problem

2011-02-16 Thread jamana ramesh

 Hi,

 I am new to Tomcat server. I have installed Tomcat 6 and deployed a web
 application. This application has to decrypt some files and store in a temp
 folder. I have created a folder with name temp' in WEB-INF folder of my
 applciation. But When I am running my application, at the time of
 decryption, I am getting Access Denied exception. Through Tomcat security
 features, I came to know that we need to grant the permission in
 catalina.policy in conf folder. Below is the line I have added in it. But
 still I am getting the same exception.

 grant codeBase http://localhost:8080/lanwan/-; {
   permission java.io.FilePermission C:\\Program Files\\Apache Software
 Foundation\\Tomcat 6.0\\webapps\\lanwan\\WEB-INF\\docs\\temp\\-,
 read,write,delete;
 }

 Please help me how to configure this security settings.

 Thanks in advance,
 Ramesh




Tomcat Security Problem

2011-02-16 Thread jamana ramesh
Hi,

I am new to Tomcat server. I have installed Tomcat 6 and deployed a web
application. This application has to decrypt some files and store in a temp
folder. I have created a folder with name temp' in WEB-INF folder of my
applciation. But When I am running my application, at the time of
decryption, I am getting Access Denied exception. Through Tomcat security
features, I came to know that we need to grant the permission in
catalina.policy in conf folder. Below is the line I have added in it. But
still I am getting the same exception.

grant codeBase http://localhost:8080/lanwan/-; {
  permission java.io.FilePermission C:\\Program Files\\Apache Software
Foundation\\Tomcat 6.0\\webapps\\lanwan\\WEB-INF\\docs\\temp\\-,
read,write,delete;
}

Please help me how to configure this security settings.

Thanks in advance,
Ramesh


RE: Tomcat Secuirty Problem

2011-02-16 Thread Caldarale, Charles R
 From: jamana ramesh [mailto:ramesh.jam...@gmail.com] 
 Subject: Re: Tomcat Secuirty Problem

 I am new to Tomcat server.

And unaware of basic etiquette:

1) Don't cross-post.

2) Always provide the exact Tomcat version, JVM level, and OS you're running on.

 This application has to decrypt some files and store 
 in a temp folder. I have created a folder with name 
 temp' in WEB-INF folder of my applciation.

That's a really, really bad idea - you should never try to write into the 
webapp's deployment directory.  You have no guarantee that there even is a 
deployment directory, or even a file system.  The servlet specification 
requires that the container (Tomcat, in this case) provide a scratch area for 
just this purpose.  Read section 4.7.1 of the servlet spec, which states, in 
part:

A temporary storage directory is required for each servlet context.  Servlet 
containers must provide a private temporary directory for each servlet context, 
and make it available via the javax.servlet.context.tempdir context attribute.  
The objects associated with the attribute must be of type java.io.File.

 - 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: [OT] OutOfMemoryError: GC overhead limit exceeded

2011-02-16 Thread Leon Rosenberg
On Wed, Feb 16, 2011 at 6:16 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Leon,

 On 2/16/2011 11:53 AM, Leon Rosenberg wrote:
 On Wed, Feb 16, 2011 at 5:37 PM, Caldarale, Charles R
 chuck.caldar...@unisys.com wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] OutOfMemoryError: GC overhead limit exceeded

 Here's what jmap reports this morning:

 PS Old Generation
    capacity = 134217728 (128.0MB)
    used     = 61911720 (59.043617248535156MB)
    free     = 72306008 (68.95638275146484MB)
    46.12782597541809% used

 Interesting.  Something must have broken loose overnight.

 Does this look healthy enough to continue, or should I
 schedule a restart ASAP?

 I'd let it run, and see what happens.

 I suspect one (or more) of those operations was performed
 and the objects were reachable for a while (lived in the
 session, probably) but then eventually became collectible
 and GC recovered.

 Sounds highly plausible.

 Do you log number of users/sessions? Would probably be interesting to
 see this in correlation.

 Not currently. We're working on some decent instrumentation tools to
 basically log all kinds of stuff like this on a regular interval... say
 every minute or five minutes. I could connect to the JVM using JConsole
 and ask Tomcat for the session count (all users have a session) but the
 event is long gone so any information I get now would not be directly
 relevant.

reinventing the wheel? :-)
http://moskito.anotheria.net among others...

best regards
Leon


 Thanks,
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk1cBnUACgkQ9CaO5/Lv0PCJRwCgo+ssFInOJ53tJQrO1ZdNhFPk
 UW0An1sKMuCkckA8Rjwzu23xM0CmxOAY
 =jBKF
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



error when tomcat is shutting down

2011-02-16 Thread James Godrej
/opt/apache-tomcat-5.5.31/bin/bootstrap.jar
2011-02-17 12:50:38,919 ERROR main org.apache.catalina.startup.Catalina - 
Catalina.stop: 

java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.init(Socket.java:375)
at java.net.Socket.init(Socket.java:189)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

 I am getting above error.
What does it mean?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org