[OT] multipart/form-data solutions

2009-08-21 Thread Tommy Pham

Hi,

I need some to process some multipart/form-data.  Are the any other solutions 
other 
than:

Solution A:

1. download http://www.servlets.com/cos/index.html
2. invoke getParameters() on com.oreilly.servlet.MultipartRequest

Solution B:

1. download http://jakarta.apache.org/commons/sandbox/fileupload/
2. invoke readHeaders() in 
org.apache.commons.fileupload.MultipartStream

Solution C:

1. download http://users.boone.net/wbrameld/multipartformdata/
2. invoke getParameter on 
com.bigfoot.bugar.servlet.http.MultipartFormData

Solution D:

frameworks like struts, jsf, etc..


TIA,
Tommy


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



Re: confused about beans

2009-08-21 Thread Pid

On 21/08/2009 23:50, Tena Sakai wrote:

Hi folks,

I am confused about beans.


And apparently about how a servlet based web application ought to be 
built.  You should start by reading the Servlet Specification and 
gaining an understanding of what you're trying to build.



I think it has to do with the CLASSPATH and my lack of understanding
for sure.


Definitely the former, probably the latter.
Never set the CLASSPATH when using Tomcat.


My platform is a linux machine with
tomcat 6.0.14.  Here's the lay of the land.


Why not use 6.0.20?  It's the most recent version.


Under $CATALINA_HOME/webapps/ I have created
a directory called my-jsp, in which there are
three files:
   GetName.html
   SaveName.jsp
   UserData.java


The correct procedure is to place an application in the webapps dir.

 $CATALINA_HOME/webapps/mywebapp

which will be available under

 http://host:8080/mywebapp/

The proper structure for a web application is like this:

 mywebapp/index.jsp
 mywebapp/page.jsp
 mywebapp/WEB-INF/web.xml
 mywebapp/WEB-INF/lib
 mywebapp/WEB-INF/classes
 mywebapp/META-INF/context.xml


I suspect you've probably configured the context in server.xml, this is 
discouraged, put it in the META-INF as above, instead.  Don't set the 
path or docBase attributes.



GetName.html looks like:



SaveName.jsp looks like:




And UserData.java looks like:




UserData.java compiles fine.  I moved UserData.class file
into $CATALINA_HOME/common/lib/user directory.


Put it in the webapp classes dir instead, it's no use there.
Only put .jar files in a lib directory.


My CLASSPATH variable says:
CLASSPATH=/usr/local/src/apache-tomcat-6.0.14/common/lib:and-on-and-on


Again: don't set this for web applications.


When I point my browser to http://myhost:8080/my-jsp/GenName.html,
I get a form, which I fill and press the submit button.  Here's what
happens:

   HTTP Status 500 -


It's a miracle that anything happened at all.


I have stared at this for a long, long minutes, but I see nothing wrong.
Can somebody please clue me in as to what I am doing wrong?


I strongly recommend a thorough reading of the documents on the Tomcat 
website, and thorough examination of each of the example applications 
that comes with the standard Tomcat download, before you proceed further.


 http://tomcat.apache.org/

p


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



Re: Running multiple tomcats

2009-08-21 Thread Ron McNulty
It's not uncommon for firewalls to only allow access to particular ports on 
a machine.


Try logging into the Solaris box and telnet localhost 8008  If that 
connects, then something (hopefully Tomcat) is running on port 8008. Repeat 
from your desktop. If that fails, the firewall is the problem.


Regards

Ron

- Original Message - 
From: "Malladi, Sasikanth " 

To: "Tomcat Users List" 
Sent: Saturday, August 22, 2009 3:18 AM
Subject: RE: Running multiple tomcats


No, no forwarding problems, as I can access the original instance at 
http://myhost:8080

It's just that my instance at http://myhost:8008 is not responding.
It's not the localhost, but a remote Solaris box.


Regards,
Sashi



-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 11:16 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats



Le 21/08/09 17:06, Malladi, Sasikanth a écrit :
Thank you for the reply. I've used netstat to ensure none of my ports are 
being currently used.

I updated the AJP connector to 8090 (from the original 8009).
As I said before, the startup seems smooth, with no errors/exceptions 
being reported.
However, I can't access my instance via the web (the other instance is 
accessible).



Did you try on local (localhost:8008) ?

Is your box behind firewall or routers (forwarding problems) ?

Laurent


Any other tips/hints?

Thanks,
Sashi


-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 10:37 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats

Hi,

perhaps you forgot the AJP Connector (8009).

You can see all listened ports with command :
netstat -laputen | grep java


Laurent

Le 21/08/09 16:31, Malladi, Sasikanth a écrit :


Hi all, I'm a relative newbie to this particular request.

I'm working on a Solaris 10 box which has an old (2003!) version of 
Tomcat running on the default 8080 port.


I've downloaded the latest Tomcat to my home directory and changed the 
server.xml to port 8008 instead of 8080.
I've also changed the shutdown port to 8001 (from 8005) so as not to 
clash with the existing instance.


I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right 
locations.


Then I ran startup.sh. Everything seemed to be good. I tailed the log 
file and it looks ok.

However, I can't access the default homepage at http://myhost:8008.
I've shutdown the server for now. Neither the startup nor the shutdown 
commands gave me any error.


#:>   ./shutdown.sh
Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
Using JRE_HOME:   /opt/SDK/jdk

What could I be missing?

Thanks a lot for your help!

Sashi

P.S. Here's the catalina.out from my logs dir:

Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener 
init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path: 
/opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib

Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1196 ms
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/52  config=null
Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2142 ms
Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8008

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

confused about beans

2009-08-21 Thread Tena Sakai
Hi folks,

I am confused about beans.  I think it has to
do with the CLASSPATH and my lack of understanding
for sure.  My platform is a linux machine with
tomcat 6.0.14.  Here's the lay of the land.

Under $CATALINA_HOME/webapps/ I have created
a directory called my-jsp, in which there are
three files:
  GetName.html
  SaveName.jsp
  UserData.java

GetName.html looks like:

  
  
  
  What's your name?
   
  What's your e-mail address?

  
  
  
  

SaveName.jsp looks like:

  
   

  
  
  You entered 
  Name:  <%= user.getUsername() %> 
  Email: <%= user.getEmail() %>
  
  

And UserData.java looks like:

  package user;

  public class UserData {

  String username;
  String email;

  public void setUsername( String value ) {
  username = value;
  }

  public void setEmail( String value ) {
  email = value;
  }

  public String getUsername() {
  return username;
  }

  public String getEmail() {
  return email;
  }

  }

UserData.java compiles fine.  I moved UserData.class file
into $CATALINA_HOME/common/lib/user directory.  My CLASSPATH
variable says:
CLASSPATH=/usr/local/src/apache-tomcat-6.0.14/common/lib:and-on-and-on

When I point my browser to http://myhost:8080/my-jsp/GenName.html,
I get a form, which I fill and press the submit button.  Here's what
happens:

  HTTP Status 500 -

  type Exception report

  message

  description The server encountered an internal error () that prevented it 
from fulfilling this request.

  exception

  org.apache.jasper.JasperException: /SaveName.jsp(1,1) The value for the 
useBean class attribute user.UserData is invalid.
  
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
  (and a few more lines I am omitting)

I think the complaint is about the first line of SaveName.jsp:
  

I have stared at this for a long, long minutes, but I see nothing wrong.

Can somebody please clue me in as to what I am doing wrong?

Many thanks in advance.

Regards,

Tena Sakai



Re: ConcurrentModificationException when starting Tomcat with Velocity Engine configured

2009-08-21 Thread Pradnya Gawade
It threw IllegalStateException for some code of tomcat. Also the error
message said that the web application is already stopped, meaning it
could not deploy the web application. I do not have that exception log
with me presently as I am trying out some thing different with it. But
I will post the same if I find it. Because of IllegalStateException ,
I thought that disabling CLEAR_REFERENCES options is not ok with
Tomcat to deploy the web app.


thanks,
Pradnya

On Fri, Aug 21, 2009 at 3:17 PM, Christopher
Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Pradnya,
>
> On 8/21/2009 2:57 PM, Pradnya Gawade wrote:
>> I have no clue what is causing this problem.
>
> You mentioned that disabling the CLEAR_REFERENCES caused more problems.
> What were those problems?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkqO8twACgkQ9CaO5/Lv0PBQmgCfdrTexlMYBCDDjf68Wb1hYozx
> focAoLCROuwokkxmgoA2quhr1wWONgmq
> =Jvo+
> -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: ConcurrentModificationException when starting Tomcat with Velocity Engine configured

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pradnya,

On 8/21/2009 2:57 PM, Pradnya Gawade wrote:
> I have no clue what is causing this problem.

You mentioned that disabling the CLEAR_REFERENCES caused more problems.
What were those problems?

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

iEYEARECAAYFAkqO8twACgkQ9CaO5/Lv0PBQmgCfdrTexlMYBCDDjf68Wb1hYozx
focAoLCROuwokkxmgoA2quhr1wWONgmq
=Jvo+
-END PGP SIGNATURE-

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



Re: Flag to avoid starting a webapp defined in server.xml???

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

On 8/21/2009 2:30 PM, Christopher Schultz wrote:
> In addition to Chuck's comments

s/Chuck/Mark/

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

iEYEARECAAYFAkqO8pEACgkQ9CaO5/Lv0PAonQCfdjxnByhqvh72Stq3p3jGDZML
G8MAniAECSKPdEBC5m15VhKz+ky8bEpc
=GKdV
-END PGP SIGNATURE-

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



RE: tomcat 6.0.20 - default servlet

2009-08-21 Thread Leo Donahue - PLANDEVX
Ugh.

Sorry about that, wrong url.

Should be:  http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html

 

-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] 
Sent: Friday, August 21, 2009 11:53 AM
To: users@tomcat.apache.org
Subject: tomcat 6.0.20 - default servlet

I'm making an argument in another forum regarding the directory listings being 
disabled by default in Tomcat 6.0.20 zip

I downloaded the tomcat 6.0.20 zip and checked web.xml and listings are set to 
false.

The online docs indicate otherwise.

http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html#secure

Leo Donahue

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



Re: IIS isapi_redirect.dll chunked encoding option

2009-08-21 Thread Andy Wang
Sorry, forgot to mention that.  We're at the latest and greatest 
tomcat-connector version: 1.2.28.


Thanks,
Andy

Peter Crowther wrote:

2009/8/21 Andy Wang :
  

What are the general thoughts on the stability of the
enable_chunked_encoding option for the IIS isapi redirector for tomcat and
IIS?



I suspect it depends on the version ;-).  What are you using?

- Peter

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


  




Re: ConcurrentModificationException when starting Tomcat with Velocity Engine configured

2009-08-21 Thread Pradnya Gawade
Hi Christopher,

Thanks for the reply.
I am using Tomcat6 and Velocity 1.6
As I mentioned I know this problem is due to the mapping I added to
Spring context xml for Velocity engine bean,  SimpleMailMessage,
JavaMailSender because if I take it out from the xml, web application
gets initialized in the expected manner.
I did one more exercise for this problem. My web application being a
larger and complicated web application, Spring context xml has mapping
for lot of beans. So I creates an independent sample web application
with Spring MVC and tried to implement the email sending with velocity
template. It worked fine but when I merged it with my web original
application, it started throwing the same
ConcurrentModificationException exception.
I have no clue what is causing this problem.

Thanks,
- Pradnya




On Fri, Aug 21, 2009 at 1:49 PM, Christopher Schultz
 wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Pradnya,
>
> On 8/21/2009 9:23 AM, Pradnya Gawade wrote:
> > MailManagerImpl is a class I have written sendEmail code to.
> > When I deploy the war file of for web application to Tomcat 6 and try to
> > start the tomcat from command prompt, I get  ConcurrentModificationException
> > during the tomcat method call
> > org.apache.catalina.loader.WebappClassLoader.clearReferences(). I have
> > pasted the exception stack trace at the end.
>
> What is the exact version of Tomcat you are using?
>
> > After searching on web, I found that the system property
> > "org.apache.catalina.loader. WebappClassLoader.ENABLE_CLEAR_REFERENCES" for
> > tomcat is set to true by default and which is why  Tomcat attempts to null
> > out any static or final fields from loaded classes when a web application is
> > stopped
>
> Note that this occurs when the application is /stopping/, so if you're
> experiencing it on startup, it's probably because there is an error in
> your configuration somewhere causing Tomcat to fail to load your webapp
> in the first place.
>
> This problem definitely shouldn't be happening, but I think it's clear
> something is (separately) wrong with your application, too.
>
> I run Velocity 1.4 on Tomcat 5.5 with no problems whatsoever.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkqO3g0ACgkQ9CaO5/Lv0PBMVgCeKr4DHP02YNiDTlGihYNOezWe
> DHEAn37tZKFY4CM12gK3yejIEz36lTOk
> =bME1
> -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: IIS isapi_redirect.dll chunked encoding option

2009-08-21 Thread Peter Crowther
2009/8/21 Andy Wang :
> What are the general thoughts on the stability of the
> enable_chunked_encoding option for the IIS isapi redirector for tomcat and
> IIS?

I suspect it depends on the version ;-).  What are you using?

- Peter

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



tomcat 6.0.20 - default servlet

2009-08-21 Thread Leo Donahue - PLANDEVX
I'm making an argument in another forum regarding the directory listings being 
disabled by default in Tomcat 6.0.20 zip

I downloaded the tomcat 6.0.20 zip and checked web.xml and listings are set to 
false.

The online docs indicate otherwise.

http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html#secure

Leo Donahue


IIS isapi_redirect.dll chunked encoding option

2009-08-21 Thread Andy Wang
What are the general thoughts on the stability of the 
enable_chunked_encoding option for the IIS isapi redirector for tomcat 
and IIS?


We're running into a scenario where something is causing IIS to not send 
down the complete response.  Haven't figured out exactly the cause yet, 
but the symptoms are the browser never acknowledges a response was 
complete even though tomcat has fully written the response out through 
to the web server.  Wireshark captures show the last few packets not 
being sent so the response is just a little short of what's to be expected.


One thing we noticed was setting enable_chunked_encoding (with a 
redirectory built for chunked encoding of course) made everything work 
fine so I wanted to get a feel for just how experimental this really is 
and what the general consensus is on it's stability.


Thanks,
Andy

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



Re: R: tomcat service public key

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gagan,

On 8/18/2009 3:29 PM, Gagan Malik wrote:
> Thanks.. although just creation of the .ssh directory didn't help much, I
> copied the contents of the .shh of the current user to
> /usr/share/tomcat5/.ssh and it worked.
> 
> Although its not the ideal solution, but works well..

Can you modify the code that actually invokes the 'ssh' process? If so,
you could just add the "-i" option and point ssh to the correct private
key file (which you'd need read access to, also).

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

iEYEARECAAYFAkqO6QgACgkQ9CaO5/Lv0PB3DACeMRYIERTHy2OSDItKpc6iMeL+
wm0An04YO0htX0dNzB/xWLvT3ciFqD64
=Bej1
-END PGP SIGNATURE-

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



Updating Roles for a logged-in user while using SingleSignOn

2009-08-21 Thread nkrasnov

Hi,

I have several Tomcat webapps which use SSO and the same Realm for
authentication. All is working as expected, except that I now need to update
roles for the user that's already been authenticated in the past. I seem to
be able to do it successfully for a given request (by calling
LoginContect.login and switching the principals in the subject), but for all
subsequent requests isUserInRole returns false for new roles. The way I
understand it, this is happening because a GenericPrincipal object, which
JAASRealm created in the initial authenticate call, holds a copy of the
original role list, and so on all subsequent calls SSO valve puts that
GenericPrincipal into request and its getRoles, which is called by
isUserInRole, accordingly, always returns the original list of roles. Is
there any way for me to get around this? I don't seem to have any ability to
update the roles in this GenericPrincipal object once it's put into SSO
cache... Or, if there is no way to update the roles, can I force
re-authentication without making the user re-enter userid/password (we do
have those stored in SSO cache, I believe)?

Any help would be greatly appreciated.

Thank you very much for your time,
Natasha
-- 
View this message in context: 
http://www.nabble.com/Updating-Roles-for-a-logged-in-user-while-using-SingleSignOn-tp25085139p25085139.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



Re: Flag to avoid starting a webapp defined in server.xml???

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Javier,

On 8/18/2009 6:21 AM, javier.rivas wrote:
> I want to reduce the startup time for these applications that only use a
> couple of webapps, so I was wondering if there is any way to set a flag to
> tell tomcat not to start a web applications that is present in server.xml

In addition to Chuck's comments, you might consider running each webapp
in a separate Tomcat instance. Tomcat will start up much faster that way.

Another option is to change your "startup" procedure to check to see if
Tomcat is running first (and start if necessary) and then use the
manager app to deploy just one web application at a time. If you use
'ant' for anything, there are already tasks that know how to deploy web
applications into Tomcat if the manager app is running.

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

iEYEARECAAYFAkqO57wACgkQ9CaO5/Lv0PCMQwCgocnPyEoJI52hmMR0/wA2J8Uj
YtMAn0iinvRnJYAZddwLIXi7VCBQHDA0
=bU9f
-END PGP SIGNATURE-

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



Mass-translation of property bundles

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I only speak 3 languages, and I speak them all poorly. Also, I don't
always have a professional translator available to properly translate
not just the words but also the connotation of all the various strings
in a particular application.

I also sometimes need to translate a /lot/ of stuff all at once.

I often use Google's language translator to translate strings
one-at-a-time, but all that copy-paste can get very tedious, especially
because I use emacs for editing which keeps a private clipboard, etc.,
etc., etc.

The other day, I finally scratched that itch and created a relatively
simple web page that can translate the whole shebang for you:

http://www.christopherschultz.net/projects/java/translate.html

Just copy your entire properties file and paste it into the textarea on
the left. Then, click "translate" and it will do all its magic. There's
currently a limit of 10 seconds or so on the time it takes to do the
translation before it gives up, so if you have a ton of strings, it
might time-out.

Also, I have hard-coded English and Spanish as the only languages for
the time being. Don't worry: I'll fix that.

Enjoy, and let me know if you can think of anything that might be nice
to add to this.

Yes, I know, someone has already written a component so you can call the
translation tools from Java code, but that's not what I wanted right
now. At some point, I'll probably use that tool to write a completely
automated translate-and-encode tool. But not yet.

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

iEYEARECAAYFAkqO5rgACgkQ9CaO5/Lv0PB/GQCfeXUq5wcDJru2PmjJKa3mddgB
xkAAn345HSpKtUNKOZbuaQRLpxLKfJZ2
=oenJ
-END PGP SIGNATURE-

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



Re: Tracking down a Tomcat slowdown

2009-08-21 Thread neilgoldsmith

Thanks for the advice.  The LOG stmt is just a method that filters all our
logging then calls into log4j.  There is nothing complex about it, it just
filters out some of our logging based on system settings.

I will look into some of your suggestions, thanks for the tips.



Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Neil,
> 
> On 8/21/2009 11:10 AM, neilgoldsmith wrote:
>> periodically they will experience a big slowdown on the app server
>> which does eventually recover (slows down for maybe an hour). We had
>> them increase their maxThreads from 150 to 300 and increase the heap
>> size
> 
> If the heap size were a problem, you would be getting OutOfMemoryErrors.
> I wouldn't bother increasing the heap size.
> 
> If periodic slowdowns are occurring on one box, and you can observe them
> using code like this:
> 
>> LOG("ICConnectorManager.doGet: Wait time to return response:" +
>> (System.currentTimeMillis() - waitStart) + "ms for request ID:" + reqID);
>> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
>> response back to caller:" + sResponse);
> 
> ...then I would guess that increasing the number of worker threads would
> exacerbate the problem rather than resolving it: your webapp is more
> likely to be thrashing than anything else, and adding more threads isn't
> likely to help.
> 
> You didn't say anything that would lead me down another path, so I'll
> tell you what my gut tells me: you have a bad hard disk or NFS link
> where your log files are being written. If that's the case, you'll see
> multi-second hiccups and stuff like that while the log statements
> attempt to flush to the disk (which may be masked at times by OS-level
> buffering, etc.).
> 
> Thrashing and disk problems are the only things I can think of, and you
> say that the box recovers (correlated to a drop in traffic?) and that
> nothing else is running on the box, so I'd bet on #2.
> 
> Peter's suggestion that GC could be interfering is a good one, except
> that you'd only expect to see several hiccups in performance maybe over
> a 5-to-10 second period, depending on your heap settings (and 1GiB isn't
> a very big heap). It shouldn't take very long to recover from a heap
> shuffle. Knowing your JVM version and GC settings would be good, too.
> 
> Peter's question about app-level synchro locks is a good one, too. What
> does the LOG method actually do? That's not a log4j method, so you've
> probably wired log4j into your application using a log-agnostic API. Is
> it possible you've synchronized that and created a problem for yourself?
> 
> Finally, what else can you tell us about these slowdowns? Do they always
> occur at the same time of day? With the same amount of (high) volume? If
> it happens at exactly the same time every day, consider blaming a backup
> or similar process as has been suggested.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkqO258ACgkQ9CaO5/Lv0PDY4wCdGK5ioG0gGP+dOAmtriEKnp2T
> coMAoKLSfFV2IpriuRwpUkUlLRWxoAmG
> =PbvQ
> -END PGP SIGNATURE-
> 
> -
> 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://www.nabble.com/Tracking-down-a-Tomcat-slowdown-tp25081707p25085023.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



Re: Tracking down a Tomcat slowdown

2009-08-21 Thread neilgoldsmith

Ok, alot of good suggestions, thanks!  I will see if I can get customer
feedback and analyze some of the things you mentioned.


Peter Crowther wrote:
> 
> 2009/8/21 neilgoldsmith 
> 
>> My first question, what is the best tool to monitor this so we can get an
>> accurate description of when the problems occur and what might be at
>> fault?
>> They just started running perfmon (on a Windows system), but as of yet I
>> have not seen any data from it.  Is there a better monitoring tool?
> 
> 
> For a first cut, there probably isn't.  Perfmon will show you whether the
> issue is CPU, RAM, disk or (theoretically) network; that then shows where
> to
> focus effort.  If it's none of those... does your app use a database? 
> Might
> there be contention to that database?  Does the app use any internal
> locking?  Might there be contention for those locks?
> 
> I would use some of the extra options in Perfmon after that first cut,
> though.  If you determine it's a CPU issue, for example, then gather CPU
> statistics by process (it's under the Process object) and make sure it's
> really Tomcat that's eating CPU.
> 
> If you find that it's Tomcat eating CPU, or you find that there's no
> obvious
> bottleneck, then somebody needs to be standing by when the slowdown occurs
> ready to take a thread dump on Tomcat.  Try to get several: some under
> normal operation, and as many as you can get, in sequence, when it's
> running
> slowly.  Now look for differences!
> 
> Also, you might want to enable garbage collection logging.  Do the
> slowdowns
> correspond to periods when large objects (or large numbers of objects) are
> allocated, and you're thus more likely to trigger a GC?  If so, what JVM
> are
> you using, and what GC options?  If it's a realtime application, you might
> find one of the more realtime-optimised GCs helps - and you may find that
> increasing thread counts and RAM make things no better and may actually
> makes things worse, as GCs may take a little longer when they occur.
> 
> 
>> Second question, what might we do to improve Tomcat performance?  Should
>> we
>> continue to tweak the max threads and heap size?  Any other Tomcat
>> settings
>> that we should look at that might directly relate to this server
>> slowdown?
>>
> It's very hard to give more advice without the customer performing some of
> the above steps, so that you've narrowed down the possible areas of
> slowdown.  It's a little too easy to tune something expecting it to make a
> difference... and it does, the wrong way!
> 
> Good luck!
> 
> - Peter
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tracking-down-a-Tomcat-slowdown-tp25081707p25084966.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



Re: Keep having to login with container based authentaction.

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dean,

On 8/20/2009 8:14 AM, Dean Chester wrote:
> Ok ive discovered that they are not staying the same between clicks. I'm now
> going to look at encoding urls now.

You should always encode your URLs.

To test that your webapp is working in general, you should enable
cookies on your web browser (which is probably why everything stopped
working in the first place). It's also possible that an HTTP proxy is
removing cookies on your behalf (to enforce a site policy, perhaps).

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

iEYEARECAAYFAkqO4f8ACgkQ9CaO5/Lv0PA+6ACfW0DVRfzmCaxK8goUUOTuNQzg
AXoAoIrBkelTxnQewFEsVO9J2efOCSjc
=gI4K
-END PGP SIGNATURE-

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



Re: Tomcat 4 start up as (/sbin/service)

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sunil,

On 8/20/2009 5:15 AM, sunil chandran wrote:
> As per everyone suggestion, I went ahead and installed
> tomcat 4.1.40It is successful Now i want to set as /sbin/service.

How was the old version of Tomcat 4.1.x being started? Or, is this
something new you want to do?

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

iEYEARECAAYFAkqO4TsACgkQ9CaO5/Lv0PDQ5QCfaaTtm/NvDloUN5OjfwWYLEl3
LEIAoJ08qrv5JWWuTZqkSEfwCL4A659c
=4poc
-END PGP SIGNATURE-

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



Re: Problem closing datasource when used as JNDI resource

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hop,

On 8/20/2009 11:17 AM, Pham, Hop wrote:
> I'm new to this users list.  I think that JNDI resource management
> (i.e., datasource) is JEE app server domain, and remains available
> while Tomcat up by design so that it can be shared across multiple
> applications.

The original thread referenced in the OP (see the archives, Mohammed
gave a link to the original thread) was talking about JNDI DataSources
defined in the webapp's context.xml, so they are webapp-specific. In
this case, it's appropriate for the webapp to close them down since
Tomcat doesn't bother to do it.

> Your DBAs may complain about the
> number of open connections to the databases, but they are shared
> resources, and does not take up much CPU utilization on both database
> servers and application servers to keep connections open.

Actually, many databases have significant resources allocated on the
server side for a connection, even when it's not really being used by
the client. Your DBA probably has a reason to complain about wasted
resources :)

Fortunately, production webapps are rarely restarted right?

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

iEYEARECAAYFAkqO4B0ACgkQ9CaO5/Lv0PAWPQCeLU1BPxwiOLR+GoDBHm1Qgn+U
Ez4Anjr9Un0wwdUGoPVk4VxOUkFwSfU2
=5/eE
-END PGP SIGNATURE-

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



Re: Problem closing datasource when used as JNDI resource

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohammed,

On 8/20/2009 9:44 AM, Mohammed Bin Mahmood wrote:
> But I still do not get my answer yet.

Yes, you do:

1. This is a problem with Tomcat. Patches are welcome.

2. No, there is no Tomcat configuration to fix this. You will have
   to work around it unless Tomcat is fixed.

3. There is a published filter that can close the DataSource for you.

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

iEYEARECAAYFAkqO34gACgkQ9CaO5/Lv0PCj2QCfZWNx8vS8vlLBD/8qfAUG+4LU
wyQAoJZQxCSrUZqb9qutP6u5OfT5TNl4
=JgOZ
-END PGP SIGNATURE-

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



Re: ConcurrentModificationException when starting Tomcat with Velocity Engine configured

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pradnya,

On 8/21/2009 9:23 AM, Pradnya Gawade wrote:
> MailManagerImpl is a class I have written sendEmail code to.
> When I deploy the war file of for web application to Tomcat 6 and try to
> start the tomcat from command prompt, I get  ConcurrentModificationException
> during the tomcat method call
> org.apache.catalina.loader.WebappClassLoader.clearReferences(). I have
> pasted the exception stack trace at the end.

What is the exact version of Tomcat you are using?

> After searching on web, I found that the system property
> "org.apache.catalina.loader. WebappClassLoader.ENABLE_CLEAR_REFERENCES" for
> tomcat is set to true by default and which is why  Tomcat attempts to null
> out any static or final fields from loaded classes when a web application is
> stopped

Note that this occurs when the application is /stopping/, so if you're
experiencing it on startup, it's probably because there is an error in
your configuration somewhere causing Tomcat to fail to load your webapp
in the first place.

This problem definitely shouldn't be happening, but I think it's clear
something is (separately) wrong with your application, too.

I run Velocity 1.4 on Tomcat 5.5 with no problems whatsoever.

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

iEYEARECAAYFAkqO3g0ACgkQ9CaO5/Lv0PBMVgCeKr4DHP02YNiDTlGihYNOezWe
DHEAn37tZKFY4CM12gK3yejIEz36lTOk
=bME1
-END PGP SIGNATURE-

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



RE: Tracking down a Tomcat slowdown

2009-08-21 Thread neilgoldsmith

No worries, thanks for the response.  



George Sexton wrote:
> 
> You know, it looks like I owe you an apology.
> 
> I answered your question without reading the whole thing. I know how
> aggravated that makes me feel. 
> 
> I'm sorry.
> 
> George Sexton
> MH Software, Inc.
> http://www.mhsoftware.com/
> Voice: 303 438 9585
>  
> 
>> -Original Message-
>> From: neilgoldsmith [mailto:ne...@avaya.com]
>> Sent: Friday, August 21, 2009 9:11 AM
>> To: users@tomcat.apache.org
>> Subject: Tracking down a Tomcat slowdown
>> 
>> 
>> We have a servlet that handles incoming voice calls at customer
>> locations, so
>> you can have bursts of busy time (much like web traffic).  A customer
>> of
>> ours has been running this servlet (24/7) for a few months and can go
>> weeks
>> at a time with no problems, but periodically they will experience a big
>> slowdown on the app server which does eventually recover (slows down
>> for
>> maybe an hour).   We had them increase their maxThreads from 150 to 300
>> and
>> increase the heap size:
>> 
>> (their current server.xml settings)
>> > maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
>>  enableLookups="false" redirectPort="8443" acceptCount="100"
>>  connectionTimeout="2" disableUploadTimeout="true" />
>> 
>> JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.Cla
>> ssLoaderLogManager
>> -
>> Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties
>> "
>> -server -Xms1024m -Xmx1536m
>> 
>> It seems to have improved, but the problem cropped up again.
>> 
>> We use log4j to perform our logging and if you notice below, we have 2
>> lines
>> of code logging some output one right after another.  typically, there
>> is
>> just ms's in the log between these 2 log stmts, but when the slowdown
>> occurs, you can see there is about 2 secs delay which leads me to
>> believe
>> the appserver has exhausted its threads and the servlet cannot get a
>> thread
>> to execute on.  We have disabled logging in the past to make sure the
>> logging itself wasn't the problem and we still encountered the
>> slowdown.
>> Note that the slowdown isn't just here in the log, but the entire
>> servlet
>> slows down, this part of the code is just a good indicator of how it is
>> affecting the servlet.
>> 
>> These 2 log stmts follow one another and use log4j internally:
>> LOG("ICConnectorManager.doGet: Wait time to return response:" +
>> (System.currentTimeMillis() - waitStart) + "ms for request ID:" +
>> reqID);
>> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
>> response back to caller:" + sResponse);
>> 
>> This is the output from those 2 log stmts, you can see the timestamp
>> shows 2
>> seconds between.
>> 10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to
>> return
>> response:10125ms for request ID:14252-592
>> 10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up 14252-
>> 592
>> and returning response back to caller:
>> 
>> 
>> My first question, what is the best tool to monitor this so we can get
>> an
>> accurate description of when the problems occur and what might be at
>> fault?
>> They just started running perfmon (on a Windows system), but as of yet
>> I
>> have not seen any data from it.  Is there a better monitoring tool?
>> 
>> Second question, what might we do to improve Tomcat performance?
>> Should we
>> continue to tweak the max threads and heap size?  Any other Tomcat
>> settings
>> that we should look at that might directly relate to this server
>> slowdown?
>> 
>>  thank you
>> 
>> 
>> --
>> View this message in context: http://www.nabble.com/Tracking-down-a-
>> Tomcat-slowdown-tp25081707p25081707.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tracking-down-a-Tomcat-slowdown-tp25081707p25084390.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



Re: ]OT] Running multiple tomcats

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 8/21/2009 11:39 AM, André Warnier wrote:
> Malladi, Sasikanth wrote:
>> I'm surprised to see a solicitation in this list. 
> 
> So are we.

Not so much surprised to see a solicitation on the list, but seeing one
so quickly. I've offered my services (or suggested the hiring of an
expert) several times on the list, but usually after trying to help
someone who didn't seem willing to take any advice... someone who wanted
the work to be done for them.

I remember a specific time when I suggested some code and architecture
strategy, and then posted some sample code. The response was something
along the lines of "I need more" so I said "you're going to have to pay
more; I've already written the code for you, I'm not going to compile
and install it for you unless you pay me".

Many of us could make good money if every decent suggestion on the list
earned us $1. Even better, €1 or £1.

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

iEYEARECAAYFAkqO3PsACgkQ9CaO5/Lv0PAhFQCeMdiUKBoMCZuFhgxfM4HiyAe7
7aEAn0D7UQMQM/NscJUQUFmmA7r7ofj8
=529e
-END PGP SIGNATURE-

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



Re: Tracking down a Tomcat slowdown

2009-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neil,

On 8/21/2009 11:10 AM, neilgoldsmith wrote:
> periodically they will experience a big slowdown on the app server
> which does eventually recover (slows down for maybe an hour). We had
> them increase their maxThreads from 150 to 300 and increase the heap
> size

If the heap size were a problem, you would be getting OutOfMemoryErrors.
I wouldn't bother increasing the heap size.

If periodic slowdowns are occurring on one box, and you can observe them
using code like this:

> LOG("ICConnectorManager.doGet: Wait time to return response:" +
> (System.currentTimeMillis() - waitStart) + "ms for request ID:" + reqID);
> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
> response back to caller:" + sResponse);

...then I would guess that increasing the number of worker threads would
exacerbate the problem rather than resolving it: your webapp is more
likely to be thrashing than anything else, and adding more threads isn't
likely to help.

You didn't say anything that would lead me down another path, so I'll
tell you what my gut tells me: you have a bad hard disk or NFS link
where your log files are being written. If that's the case, you'll see
multi-second hiccups and stuff like that while the log statements
attempt to flush to the disk (which may be masked at times by OS-level
buffering, etc.).

Thrashing and disk problems are the only things I can think of, and you
say that the box recovers (correlated to a drop in traffic?) and that
nothing else is running on the box, so I'd bet on #2.

Peter's suggestion that GC could be interfering is a good one, except
that you'd only expect to see several hiccups in performance maybe over
a 5-to-10 second period, depending on your heap settings (and 1GiB isn't
a very big heap). It shouldn't take very long to recover from a heap
shuffle. Knowing your JVM version and GC settings would be good, too.

Peter's question about app-level synchro locks is a good one, too. What
does the LOG method actually do? That's not a log4j method, so you've
probably wired log4j into your application using a log-agnostic API. Is
it possible you've synchronized that and created a problem for yourself?

Finally, what else can you tell us about these slowdowns? Do they always
occur at the same time of day? With the same amount of (high) volume? If
it happens at exactly the same time every day, consider blaming a backup
or similar process as has been suggested.

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

iEYEARECAAYFAkqO258ACgkQ9CaO5/Lv0PDY4wCdGK5ioG0gGP+dOAmtriEKnp2T
coMAoKLSfFV2IpriuRwpUkUlLRWxoAmG
=PbvQ
-END PGP SIGNATURE-

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



RE: Running multiple tomcats

2009-08-21 Thread Gwen Way


>Second one this week.  Recession.com?

p

According to the BOFH excuse server
(http://pages.cs.wisc.edu/~ballard/bofh/bofhserver.pl), "The rubber band
broke".

As good a reason as any other for solicitation.

Gwen

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



Re: Running multiple tomcats

2009-08-21 Thread Pid

On 21/08/2009 16:39, André Warnier wrote:

Malladi, Sasikanth wrote:

I'm surprised to see a solicitation in this list.


So are we.
But just ignore Martin, he's sometimes helpful but mostly a nuisance.


Second one this week.  Recession.com?

p


-
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: Connection Pool Exhausted

2009-08-21 Thread Martin Gainty

what were the correct settings
?
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 21 Aug 2009 09:10:51 -0700
> Subject: Re: Connection Pool Exhausted
> From: kwal...@sbceo.org
> To: users@tomcat.apache.org
> 
> I just wanted to report back on the connection pool exhausted issue.  I got
> some help from the JASIG uPortal list and it turns out that some of my
> settings in the uPortal config files were screwing with the way database
> connection pooling was working.  Now that those settings have been tweaked,
> it appears that connection pooling is working.  I am still doing some
> testing over here, but things are looking a lot better now that the uPortal
> settings are correct.
> 
> Thanks for all the help and troubleshooting ideas!  I really appreciate it.
> 
> -Kristen
> 
> 
> On 8/17/09 12:29 PM, "Bob Hall"  wrote:
> 
> > --- On Mon, 8/17/09 at 11:38 AM, Kristen Walker  wrote:
> > 
> >> We had some help debugging the connection pool exhausted issue over the
> >> weekend and for now it seems that changing jdbcUsePool=true to
> >> jdbcUsePool=false stops the site from crashing due to connection pool
> >> issues.  We are going to investigate more to see why connection pooling
> >> isn't working like expected.
> > 
> > You can obtain a stack trace that should point to the offending code
> > by using the Deprecated log abandoned functionality in BasicDataSource:
> > 
> >setLogAbandoned()
> >setRemoveAbandoned()
> >setRemoveAbandonedTimeout()
> > 
> >
> > http://commons.apache..org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSourc
> > e.html
> > 
> > There is some indication that logging of abandoned connections/statements
> > will continue in some form:
> > 
> >   http://wiki.apache.org/commons/DBCP
> > 
> > - Bob
> > 
> > 
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> > 
> 
> --
> Kristen Walker
> 
> Digital Media Resources Developer
> Instructional Media Services
> Santa Barbara County Education Office
> 4400 Cathedral Oaks Road
> P.O. Box 6307
> Santa Barbara, CA 93160-6307
> (805)964-4711 ext. 5244/FAX (805)683-3597
> kwal...@sbceo.org
> http://www.sbceoportal.org
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

RE: Tracking down a Tomcat slowdown

2009-08-21 Thread George Sexton
You know, it looks like I owe you an apology.

I answered your question without reading the whole thing. I know how
aggravated that makes me feel. 

I'm sorry.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

> -Original Message-
> From: neilgoldsmith [mailto:ne...@avaya.com]
> Sent: Friday, August 21, 2009 9:11 AM
> To: users@tomcat.apache.org
> Subject: Tracking down a Tomcat slowdown
> 
> 
> We have a servlet that handles incoming voice calls at customer
> locations, so
> you can have bursts of busy time (much like web traffic).  A customer
> of
> ours has been running this servlet (24/7) for a few months and can go
> weeks
> at a time with no problems, but periodically they will experience a big
> slowdown on the app server which does eventually recover (slows down
> for
> maybe an hour).   We had them increase their maxThreads from 150 to 300
> and
> increase the heap size:
> 
> (their current server.xml settings)
>  maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
>  enableLookups="false" redirectPort="8443" acceptCount="100"
>  connectionTimeout="2" disableUploadTimeout="true" />
> 
> JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.Cla
> ssLoaderLogManager
> -
> Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties
> "
> -server -Xms1024m -Xmx1536m
> 
> It seems to have improved, but the problem cropped up again.
> 
> We use log4j to perform our logging and if you notice below, we have 2
> lines
> of code logging some output one right after another.  typically, there
> is
> just ms's in the log between these 2 log stmts, but when the slowdown
> occurs, you can see there is about 2 secs delay which leads me to
> believe
> the appserver has exhausted its threads and the servlet cannot get a
> thread
> to execute on.  We have disabled logging in the past to make sure the
> logging itself wasn't the problem and we still encountered the
> slowdown.
> Note that the slowdown isn't just here in the log, but the entire
> servlet
> slows down, this part of the code is just a good indicator of how it is
> affecting the servlet.
> 
> These 2 log stmts follow one another and use log4j internally:
> LOG("ICConnectorManager.doGet: Wait time to return response:" +
> (System.currentTimeMillis() - waitStart) + "ms for request ID:" +
> reqID);
> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
> response back to caller:" + sResponse);
> 
> This is the output from those 2 log stmts, you can see the timestamp
> shows 2
> seconds between.
> 10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to
> return
> response:10125ms for request ID:14252-592
> 10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up 14252-
> 592
> and returning response back to caller:
> 
> 
> My first question, what is the best tool to monitor this so we can get
> an
> accurate description of when the problems occur and what might be at
> fault?
> They just started running perfmon (on a Windows system), but as of yet
> I
> have not seen any data from it.  Is there a better monitoring tool?
> 
> Second question, what might we do to improve Tomcat performance?
> Should we
> continue to tweak the max threads and heap size?  Any other Tomcat
> settings
> that we should look at that might directly relate to this server
> slowdown?
> 
>  thank you
> 
> 
> --
> View this message in context: http://www.nabble.com/Tracking-down-a-
> Tomcat-slowdown-tp25081707p25081707.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



ConcurrentModificationException when starting Tomcat with Velocity Engine configured

2009-08-21 Thread Pradnya Gawade
Hi,

I am using the Velocity Engine for the first time and need some help on the
following issue. Thanks in advance.

I have a web application which uses Spring framework. To send the template
based emails through application, I have added following to my Spring
context xml file:


http://mail.akazaresearch.com>"/>



   


 

class
 
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
 
 
   







MailManagerImpl is a class I have written sendEmail code to.
When I deploy the war file of for web application to Tomcat 6 and try to
start the tomcat from command prompt, I get  ConcurrentModificationException
during the tomcat method call
org.apache.catalina.loader.WebappClassLoader.clearReferences(). I have
pasted the exception stack trace at the end.

I know the exception is thrown when Velocity Engine is initialized because
if I remove the "velocityEngine" property mapping from "mailManager" bean,
tomcat do not throw any exception during the initalization.

After searching on web, I found that the system property
"org.apache.catalina.loader. WebappClassLoader.ENABLE_CLEAR_REFERENCES" for
tomcat is set to true by default and which is why  Tomcat attempts to null
out any static or final fields from loaded classes when a web application is
stopped as a work around for apparent garbage collection bugs and
application coding errors. I read about disabling this property but it took
me to another set of tomcat exceptions. So probably this is of no use.
I tried to use the "resource.loader" value as file for Velocity Engine but I
got the same ConcurrentModificationException.
Could some one please let me know how can I overcome the problem.

Regards,
Pradnya

Exception stack trace:
SEVERE: Exception during cleanup after start failed
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$EntryIterator.next(HashMap.java:883)
at java.util.HashMap$EntryIterator.next(HashMap.java:881)
at java.util.HashMap.putAllForCreate(HashMap.java:481)
at java.util.HashMap.clone(HashMap.java:713)
at
org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappCl
assLoader.java:1621)
at
org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.j
ava:1524)
at
org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707)
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:45
57)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
387)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
1)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)

at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:117)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)


Re: Connection Pool Exhausted

2009-08-21 Thread Kristen Walker
I just wanted to report back on the connection pool exhausted issue.  I got
some help from the JASIG uPortal list and it turns out that some of my
settings in the uPortal config files were screwing with the way database
connection pooling was working.  Now that those settings have been tweaked,
it appears that connection pooling is working.  I am still doing some
testing over here, but things are looking a lot better now that the uPortal
settings are correct.

Thanks for all the help and troubleshooting ideas!  I really appreciate it.

-Kristen


On 8/17/09 12:29 PM, "Bob Hall"  wrote:

> --- On Mon, 8/17/09 at 11:38 AM, Kristen Walker  wrote:
> 
>> We had some help debugging the connection pool exhausted issue over the
>> weekend and for now it seems that changing jdbcUsePool=true to
>> jdbcUsePool=false stops the site from crashing due to connection pool
>> issues.  We are going to investigate more to see why connection pooling
>> isn't working like expected.
> 
> You can obtain a stack trace that should point to the offending code
> by using the Deprecated log abandoned functionality in BasicDataSource:
> 
>setLogAbandoned()
>setRemoveAbandoned()
>setRemoveAbandonedTimeout()
> 
>
> http://commons.apache..org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSourc
> e.html
> 
> There is some indication that logging of abandoned connections/statements
> will continue in some form:
> 
>   http://wiki.apache.org/commons/DBCP
> 
> - Bob
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

--
Kristen Walker

Digital Media Resources Developer
Instructional Media Services
Santa Barbara County Education Office
4400 Cathedral Oaks Road
P.O. Box 6307
Santa Barbara, CA 93160-6307
(805)964-4711 ext. 5244/FAX (805)683-3597
kwal...@sbceo.org
http://www.sbceoportal.org




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



RE: Running multiple tomcats

2009-08-21 Thread Malladi, Sasikanth
Aargh!!
Everything is ok and the installation is running fine. It was a typo in the 
hostname that gave me a two hour run around.
Sorry for wasting your time and I deeply appreciate your help.
Special thanks to llg and André. And David, for trying to show me that it could 
be an OS issue.


Regards,
Sashi



-Original Message-
From: Malladi, Sasikanth [CCC-OT_IT]
Sent: Friday, August 21, 2009 11:58 AM
To: Tomcat Users List; a...@ice-sa.com
Subject: RE: Running multiple tomcats

Interesting. It's actually the other way.
telnet to 8008 seemed successful.

$ telnet  myhost 8008
Trying 169.193.129.130...
Connected to myhost.
Escape character is '^]'.

ls
HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Fri, 21 Aug 2009 15:54:14 GMT
Connection: close

0

Connection to emimmagg1 myhost closed by foreign host.


But telnet to 8080 was refused:

$ telnet  myhost 8080
Trying 1xx.1xx.1xx.1xx...
telnet: Unable to connect to remote host: Connection refused
---

This is my browser's response:

Unable to connect
Firefox can't establish a connection to the server at myhost:8008.


*   The site could be temporarily unavailable or too busy. Try again in a 
few
  moments.

*   If you are unable to load any pages, check your computer's network
  connection.

*   If your computer or network is protected by a firewall or proxy, make 
sure
  that Firefox is permitted to access the Web.

Regards,
Sashi



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Friday, August 21, 2009 11:39 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats

Malladi, Sasikanth wrote:
> No, no forwarding problems, as I can access the original instance at 
> http://myhost:8080
> It's just that my instance at http://myhost:8008 is not responding.
> It's not the localhost, but a remote Solaris box.
>
What is the exact error message you are getting in the browser, when you
try to access http://myhost:8080 ?
And, when you try the following command, do you get an answer, and which
one (type exactly as shown, in a command window on your current station) :

telnet myhost 8008

(replace "myhost" of course)
(and, for comparison, try the same, replacing 8008 by 8080)


If you are getting some response that indicates that the server refused
the connection on port 8008, then it means that something, between your
station and the server, is blocking connections to port 8008 on that
server (but letting through connections to port 8080).
The server logfiles would not show anything, because the connection is
never made.



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



RE: Running multiple tomcats

2009-08-21 Thread Malladi, Sasikanth
Interesting. It's actually the other way.
telnet to 8008 seemed successful.

$ telnet  myhost 8008
Trying 169.193.129.130...
Connected to myhost.
Escape character is '^]'.

ls
HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Fri, 21 Aug 2009 15:54:14 GMT
Connection: close

0

Connection to emimmagg1 myhost closed by foreign host.


But telnet to 8080 was refused:

$ telnet  myhost 8080
Trying 1xx.1xx.1xx.1xx...
telnet: Unable to connect to remote host: Connection refused
---

This is my browser's response:

Unable to connect
Firefox can't establish a connection to the server at myhost:8008.


*   The site could be temporarily unavailable or too busy. Try again in a 
few
  moments.

*   If you are unable to load any pages, check your computer's network
  connection.

*   If your computer or network is protected by a firewall or proxy, make 
sure
  that Firefox is permitted to access the Web.

Regards,
Sashi



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Friday, August 21, 2009 11:39 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats

Malladi, Sasikanth wrote:
> No, no forwarding problems, as I can access the original instance at 
> http://myhost:8080
> It's just that my instance at http://myhost:8008 is not responding.
> It's not the localhost, but a remote Solaris box.
>
What is the exact error message you are getting in the browser, when you
try to access http://myhost:8080 ?
And, when you try the following command, do you get an answer, and which
one (type exactly as shown, in a command window on your current station) :

telnet myhost 8008

(replace "myhost" of course)
(and, for comparison, try the same, replacing 8008 by 8080)


If you are getting some response that indicates that the server refused
the connection on port 8008, then it means that something, between your
station and the server, is blocking connections to port 8008 on that
server (but letting through connections to port 8080).
The server logfiles would not show anything, because the connection is
never made.



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



Re: Tracking down a Tomcat slowdown

2009-08-21 Thread Peter Crowther
2009/8/21 neilgoldsmith 

> My first question, what is the best tool to monitor this so we can get an
> accurate description of when the problems occur and what might be at fault?
> They just started running perfmon (on a Windows system), but as of yet I
> have not seen any data from it.  Is there a better monitoring tool?


For a first cut, there probably isn't.  Perfmon will show you whether the
issue is CPU, RAM, disk or (theoretically) network; that then shows where to
focus effort.  If it's none of those... does your app use a database?  Might
there be contention to that database?  Does the app use any internal
locking?  Might there be contention for those locks?

I would use some of the extra options in Perfmon after that first cut,
though.  If you determine it's a CPU issue, for example, then gather CPU
statistics by process (it's under the Process object) and make sure it's
really Tomcat that's eating CPU.

If you find that it's Tomcat eating CPU, or you find that there's no obvious
bottleneck, then somebody needs to be standing by when the slowdown occurs
ready to take a thread dump on Tomcat.  Try to get several: some under
normal operation, and as many as you can get, in sequence, when it's running
slowly.  Now look for differences!

Also, you might want to enable garbage collection logging.  Do the slowdowns
correspond to periods when large objects (or large numbers of objects) are
allocated, and you're thus more likely to trigger a GC?  If so, what JVM are
you using, and what GC options?  If it's a realtime application, you might
find one of the more realtime-optimised GCs helps - and you may find that
increasing thread counts and RAM make things no better and may actually
makes things worse, as GCs may take a little longer when they occur.


> Second question, what might we do to improve Tomcat performance?  Should we
> continue to tweak the max threads and heap size?  Any other Tomcat settings
> that we should look at that might directly relate to this server slowdown?
>
It's very hard to give more advice without the customer performing some of
the above steps, so that you've narrowed down the possible areas of
slowdown.  It's a little too easy to tune something expecting it to make a
difference... and it does, the wrong way!

Good luck!

- Peter


Re: Running multiple tomcats

2009-08-21 Thread André Warnier

Malladi, Sasikanth wrote:
I'm surprised to see a solicitation in this list. 


So are we.
But just ignore Martin, he's sometimes helpful but mostly a nuisance.


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



Re: Running multiple tomcats

2009-08-21 Thread André Warnier

Malladi, Sasikanth wrote:

No, no forwarding problems, as I can access the original instance at 
http://myhost:8080
It's just that my instance at http://myhost:8008 is not responding.
It's not the localhost, but a remote Solaris box.

What is the exact error message you are getting in the browser, when you 
try to access http://myhost:8080 ?
And, when you try the following command, do you get an answer, and which 
one (type exactly as shown, in a command window on your current station) :


telnet myhost 8008

(replace "myhost" of course)
(and, for comparison, try the same, replacing 8008 by 8080)


If you are getting some response that indicates that the server refused 
the connection on port 8008, then it means that something, between your 
station and the server, is blocking connections to port 8008 on that 
server (but letting through connections to port 8080).
The server logfiles would not show anything, because the connection is 
never made.




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



Re: Running multiple tomcats

2009-08-21 Thread David Fisher
Solaris 10 can turn off ports at the OS level. Your sysadmin may have  
those ports turned off. You may need to talk to the sysadmin of the box.


Regards,
Dave

On Aug 21, 2009, at 8:18 AM, Malladi, Sasikanth wrote:


No, no forwarding problems, as I can access the original instance at 
http://myhost:8080
It's just that my instance at http://myhost:8008 is not responding.
It's not the localhost, but a remote Solaris box.


Regards,
Sashi



-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 11:16 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats



Le 21/08/09 17:06, Malladi, Sasikanth a écrit :
Thank you for the reply. I've used netstat to ensure none of my  
ports are being currently used.

I updated the AJP connector to 8090 (from the original 8009).
As I said before, the startup seems smooth, with no errors/ 
exceptions being reported.
However, I can't access my instance via the web (the other instance  
is accessible).



Did you try on local (localhost:8008) ?

Is your box behind firewall or routers (forwarding problems) ?

Laurent


Any other tips/hints?

Thanks,
Sashi


-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 10:37 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats

Hi,

   perhaps you forgot the AJP Connector (8009).

You can see all listened ports with command :
netstat -laputen | grep java


Laurent

Le 21/08/09 16:31, Malladi, Sasikanth a écrit :


Hi all, I'm a relative newbie to this particular request.

I'm working on a Solaris 10 box which has an old (2003!) version  
of Tomcat running on the default 8080 port.


I've downloaded the latest Tomcat to my home directory and changed  
the server.xml to port 8008 instead of 8080.
I've also changed the shutdown port to 8001 (from 8005) so as not  
to clash with the existing instance.


I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right  
locations.


Then I ran startup.sh. Everything seemed to be good. I tailed the  
log file and it looks ok.

However, I can't access the default homepage at http://myhost:8008.
I've shutdown the server for now. Neither the startup nor the  
shutdown commands gave me any error.


#:>   ./shutdown.sh
Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
Using JRE_HOME:   /opt/SDK/jdk

What could I be missing?

Thanks a lot for your help!

Sashi

P.S. Here's the catalina.out from my logs dir:

Aug 21, 2009 2:14:54 PM  
org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows  
optimal performance in production environments was not found on  
the java.library.path: /opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/ 
jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/ 
opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/ 
iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/ 
eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib

Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1196 ms
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService  
start

INFO: Starting service Catalina
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine  
start

INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol  
start

INFO: Starting Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/52  config=null
Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2142 ms
Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol  
pause

INFO: Pausing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService  
stop

INFO: Stopping service Catalina
Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol  
destroy

INFO: Stopping Coyote HTTP/1.1 on http-8008

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




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




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




---

RE: Running multiple tomcats

2009-08-21 Thread Malladi, Sasikanth
I'm surprised to see a solicitation in this list. I'm unable to offer $$ for 
this request.
If anyone has the knowledge and the inclination to help, they'll respond. (As 
llg did earlier).
If not, I'll dig around and see what I can do.

On a personal note, I have a high regard for open source projects and have deep 
respect for the open and helpful nature of the OS community. I myself help out 
when I can, on forums that I can. I don't wish to pay money for helping out on 
these lists.


Regards,
Sashi


From: Martin Gainty [mailto:mgai...@hotmail.com]
Sent: Friday, August 21, 2009 11:22 AM
To: Tomcat Users List; Malladi, Sasikanth [CCC-OT_IT]
Subject: RE: Running multiple tomcats

at least 100 individuals on this list who could accomplish this task for you

if you could post a Statement Of work we could all respond within 24 hrs
http://www.usability.gov/methods/plan/sow.html

let us know where you have posted the SOW when it is posted.
Martin Gainty






> From: sasikanth.mall...@citi.com
> To: users@tomcat.apache.org
> Date: Fri, 21 Aug 2009 09:31:04 -0500
> Subject: Running multiple tomcats
>
> Hi all, I'm a relative newbie to this particular request.
>
> I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
> running on the default 8080 port.
>
> I've downloaded the latest Tomcat to my home directory and changed the 
> server.xml to port 8008 instead of 8080.
> I've also changed the shutdown port to 8001 (from 8005) so as not to clash 
> with the existing instance.
>
> I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.
>
> Then I ran startup.sh. Everything seemed to be good. I tailed the log file 
> and it looks ok.
> However, I can't access the default homepage at http://myhost:8008.
> I've shutdown the server for now. Neither the startup nor the shutdown 
> commands gave me any error.
>
> #:> ./shutdown.sh
> Using CATALINA_BASE: /home//apache-tomcat-6.0.20
> Using CATALINA_HOME: /home//apache-tomcat-6.0.20
> Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
> Using JRE_HOME: /opt/SDK/jdk
>
> What could I be missing?
>
> Thanks a lot for your help!
>
> Sashi
>
> P.S. Here's the catalina.out from my logs dir:
>
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not found on the 
> java.library.path: 
> /opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
> Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1196 ms
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
> Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=1/52 config=null
> Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 2142 ms
> Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-8008


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



RE: Tracking down a Tomcat slowdown

2009-08-21 Thread George Sexton
Good luck. It could be something stupid like backup is running during the
day, or some other periodic process. There's no sense troubleshooting a
tomcat slowdown until you know it's tomcat that's using the CPU.

If you're running Windows, you need to run perfmon on the the process and
chart process CPU and total cpu.

If you're running UNIX, you need to install sysstat and also use top or some
other tool.

Really, this is basic troubleshooting. Determine where the problem is, and
dig deeper to find the solution. Notice I didn't say: Assume where the
problem is and dig deeper to justify your assumptions.


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

> -Original Message-
> From: neilgoldsmith [mailto:ne...@avaya.com]
> Sent: Friday, August 21, 2009 9:21 AM
> To: users@tomcat.apache.org
> Subject: RE: Tracking down a Tomcat slowdown
> 
> 
> I don't have direct access to their system, but they assure me this
> server is
> only used for this purpose and nothing else is running on their
> servers.
> They have 2 servers (exact same config) running Tomcat and load balance
> 1:1
> between the 2.  When I looked at the log for the 2nd server, it had not
> experienced the slowdown although in theory it should have been just as
> busy
> as the 1st.   I don't know if I can conclude anything from that though.
> 
> 
> 
> George Sexton wrote:
> >
> > So, I take it you've monitored the machine and made sure there are no
> > other
> > processes using up CPU/IO Bandwidth?
> >
> > George Sexton
> > MH Software, Inc.
> > http://www.mhsoftware.com/
> > Voice: 303 438 9585
> >
> >
> >> -Original Message-
> >> From: neilgoldsmith [mailto:ne...@avaya.com]
> >> Sent: Friday, August 21, 2009 9:11 AM
> >> To: users@tomcat.apache.org
> >> Subject: Tracking down a Tomcat slowdown
> >>
> >>
> >> We have a servlet that handles incoming voice calls at customer
> >> locations, so
> >> you can have bursts of busy time (much like web traffic).  A
> customer
> >> of
> >> ours has been running this servlet (24/7) for a few months and can
> go
> >> weeks
> >> at a time with no problems, but periodically they will experience a
> big
> >> slowdown on the app server which does eventually recover (slows down
> >> for
> >> maybe an hour).   We had them increase their maxThreads from 150 to
> 300
> >> and
> >> increase the heap size:
> >>
> >> (their current server.xml settings)
> >>  >> maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
> >>  enableLookups="false" redirectPort="8443" acceptCount="100"
> >>  connectionTimeout="2" disableUploadTimeout="true" />
> >>
> >> JAVA_OPTS=%JAVA_OPTS% -
> Djava.util.logging.manager=org.apache.juli.Cla
> >> ssLoaderLogManager
> >> -
> >>
> Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties
> >> "
> >> -server -Xms1024m -Xmx1536m
> >>
> >> It seems to have improved, but the problem cropped up again.
> >>
> >> We use log4j to perform our logging and if you notice below, we have
> 2
> >> lines
> >> of code logging some output one right after another.  typically,
> there
> >> is
> >> just ms's in the log between these 2 log stmts, but when the
> slowdown
> >> occurs, you can see there is about 2 secs delay which leads me to
> >> believe
> >> the appserver has exhausted its threads and the servlet cannot get a
> >> thread
> >> to execute on.  We have disabled logging in the past to make sure
> the
> >> logging itself wasn't the problem and we still encountered the
> >> slowdown.
> >> Note that the slowdown isn't just here in the log, but the entire
> >> servlet
> >> slows down, this part of the code is just a good indicator of how it
> is
> >> affecting the servlet.
> >>
> >> These 2 log stmts follow one another and use log4j internally:
> >> LOG("ICConnectorManager.doGet: Wait time to return response:" +
> >> (System.currentTimeMillis() - waitStart) + "ms for request ID:" +
> >> reqID);
> >> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and
> returning
> >> response back to caller:" + sResponse);
> >>
> >> This is the output from those 2 log stmts, you can see the timestamp
> >> shows 2
> >> seconds between.
> >> 10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to
> >> return
> >> response:10125ms for request ID:14252-592
> >> 10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up
> 14252-
> >> 592
> >> and returning response back to caller:
> >>
> >>
> >> My first question, what is the best tool to monitor this so we can
> get
> >> an
> >> accurate description of when the problems occur and what might be at
> >> fault?
> >> They just started running perfmon (on a Windows system), but as of
> yet
> >> I
> >> have not seen any data from it.  Is there a better monitoring tool?
> >>
> >> Second question, what might we do to improve Tomcat performance?
> >> Should we
> >> continue to tweak the max threads and heap size?  Any other Tomcat
> >> settings
> >> that we should look at that might directly r

RE: Running multiple tomcats

2009-08-21 Thread Martin Gainty

at least 100 individuals on this list who could accomplish this task for you

if you could post a Statement Of work we could all respond within 24 hrs
http://www.usability.gov/methods/plan/sow.html

let us know where you have posted the SOW when it is posted.
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> From: sasikanth.mall...@citi.com
> To: users@tomcat.apache.org
> Date: Fri, 21 Aug 2009 09:31:04 -0500
> Subject: Running multiple tomcats
> 
> Hi all, I'm a relative newbie to this particular request.
> 
> I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
> running on the default 8080 port.
> 
> I've downloaded the latest Tomcat to my home directory and changed the 
> server.xml to port 8008 instead of 8080.
> I've also changed the shutdown port to 8001 (from 8005) so as not to clash 
> with the existing instance.
> 
> I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.
> 
> Then I ran startup.sh. Everything seemed to be good. I tailed the log file 
> and it looks ok.
> However, I can't access the default homepage at http://myhost:8008.
> I've shutdown the server for now. Neither the startup nor the shutdown 
> commands gave me any error.
> 
> #:> ./shutdown.sh
> Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
> Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
> Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
> Using JRE_HOME:   /opt/SDK/jdk
> 
> What could I be missing?
> 
> Thanks a lot for your help!
> 
> Sashi
> 
> P.S. Here's the catalina.out from my logs dir:
> 
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not found on the 
> java.library.path: 
> /opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
> Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1196 ms
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
> Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=1/52  config=null
> Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 2142 ms
> Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-8008
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009

RE: Tracking down a Tomcat slowdown

2009-08-21 Thread neilgoldsmith

I don't have direct access to their system, but they assure me this server is
only used for this purpose and nothing else is running on their servers. 
They have 2 servers (exact same config) running Tomcat and load balance 1:1
between the 2.  When I looked at the log for the 2nd server, it had not
experienced the slowdown although in theory it should have been just as busy
as the 1st.   I don't know if I can conclude anything from that though.



George Sexton wrote:
> 
> So, I take it you've monitored the machine and made sure there are no
> other
> processes using up CPU/IO Bandwidth?
> 
> George Sexton
> MH Software, Inc.
> http://www.mhsoftware.com/
> Voice: 303 438 9585
>  
> 
>> -Original Message-
>> From: neilgoldsmith [mailto:ne...@avaya.com]
>> Sent: Friday, August 21, 2009 9:11 AM
>> To: users@tomcat.apache.org
>> Subject: Tracking down a Tomcat slowdown
>> 
>> 
>> We have a servlet that handles incoming voice calls at customer
>> locations, so
>> you can have bursts of busy time (much like web traffic).  A customer
>> of
>> ours has been running this servlet (24/7) for a few months and can go
>> weeks
>> at a time with no problems, but periodically they will experience a big
>> slowdown on the app server which does eventually recover (slows down
>> for
>> maybe an hour).   We had them increase their maxThreads from 150 to 300
>> and
>> increase the heap size:
>> 
>> (their current server.xml settings)
>> > maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
>>  enableLookups="false" redirectPort="8443" acceptCount="100"
>>  connectionTimeout="2" disableUploadTimeout="true" />
>> 
>> JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.Cla
>> ssLoaderLogManager
>> -
>> Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties
>> "
>> -server -Xms1024m -Xmx1536m
>> 
>> It seems to have improved, but the problem cropped up again.
>> 
>> We use log4j to perform our logging and if you notice below, we have 2
>> lines
>> of code logging some output one right after another.  typically, there
>> is
>> just ms's in the log between these 2 log stmts, but when the slowdown
>> occurs, you can see there is about 2 secs delay which leads me to
>> believe
>> the appserver has exhausted its threads and the servlet cannot get a
>> thread
>> to execute on.  We have disabled logging in the past to make sure the
>> logging itself wasn't the problem and we still encountered the
>> slowdown.
>> Note that the slowdown isn't just here in the log, but the entire
>> servlet
>> slows down, this part of the code is just a good indicator of how it is
>> affecting the servlet.
>> 
>> These 2 log stmts follow one another and use log4j internally:
>> LOG("ICConnectorManager.doGet: Wait time to return response:" +
>> (System.currentTimeMillis() - waitStart) + "ms for request ID:" +
>> reqID);
>> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
>> response back to caller:" + sResponse);
>> 
>> This is the output from those 2 log stmts, you can see the timestamp
>> shows 2
>> seconds between.
>> 10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to
>> return
>> response:10125ms for request ID:14252-592
>> 10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up 14252-
>> 592
>> and returning response back to caller:
>> 
>> 
>> My first question, what is the best tool to monitor this so we can get
>> an
>> accurate description of when the problems occur and what might be at
>> fault?
>> They just started running perfmon (on a Windows system), but as of yet
>> I
>> have not seen any data from it.  Is there a better monitoring tool?
>> 
>> Second question, what might we do to improve Tomcat performance?
>> Should we
>> continue to tweak the max threads and heap size?  Any other Tomcat
>> settings
>> that we should look at that might directly relate to this server
>> slowdown?
>> 
>>  thank you
>> 
>> 
>> --
>> View this message in context: http://www.nabble.com/Tracking-down-a-
>> Tomcat-slowdown-tp25081707p25081707.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tracking-down-a-Tomcat-slowdown-tp25081707p25081898.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



RE: Running multiple tomcats

2009-08-21 Thread Malladi, Sasikanth
No, no forwarding problems, as I can access the original instance at 
http://myhost:8080
It's just that my instance at http://myhost:8008 is not responding.
It's not the localhost, but a remote Solaris box.


Regards,
Sashi



-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 11:16 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats



Le 21/08/09 17:06, Malladi, Sasikanth a écrit :
> Thank you for the reply. I've used netstat to ensure none of my ports are 
> being currently used.
> I updated the AJP connector to 8090 (from the original 8009).
> As I said before, the startup seems smooth, with no errors/exceptions being 
> reported.
> However, I can't access my instance via the web (the other instance is 
> accessible).
>
Did you try on local (localhost:8008) ?

Is your box behind firewall or routers (forwarding problems) ?

Laurent

> Any other tips/hints?
>
> Thanks,
> Sashi
>
>
> -Original Message-
> From: llg [mailto:l...@portaildulibre.fr]
> Sent: Friday, August 21, 2009 10:37 AM
> To: Tomcat Users List
> Subject: Re: Running multiple tomcats
>
> Hi,
>
> perhaps you forgot the AJP Connector (8009).
>
> You can see all listened ports with command :
> netstat -laputen | grep java
>
>
> Laurent
>
> Le 21/08/09 16:31, Malladi, Sasikanth a écrit :
>
>> Hi all, I'm a relative newbie to this particular request.
>>
>> I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
>> running on the default 8080 port.
>>
>> I've downloaded the latest Tomcat to my home directory and changed the 
>> server.xml to port 8008 instead of 8080.
>> I've also changed the shutdown port to 8001 (from 8005) so as not to clash 
>> with the existing instance.
>>
>> I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.
>>
>> Then I ran startup.sh. Everything seemed to be good. I tailed the log file 
>> and it looks ok.
>> However, I can't access the default homepage at http://myhost:8008.
>> I've shutdown the server for now. Neither the startup nor the shutdown 
>> commands gave me any error.
>>
>> #:>   ./shutdown.sh
>> Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
>> Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
>> Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
>> Using JRE_HOME:   /opt/SDK/jdk
>>
>> What could I be missing?
>>
>> Thanks a lot for your help!
>>
>> Sashi
>>
>> P.S. Here's the catalina.out from my logs dir:
>>
>> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
>> INFO: The APR based Apache Tomcat Native library which allows optimal 
>> performance in production environments was not found on the 
>> java.library.path: 
>> /opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
>> Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-8008
>> Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 1196 ms
>> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
>> INFO: Starting service Catalina
>> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
>> Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
>> INFO: Starting Coyote HTTP/1.1 on http-8008
>> Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>> Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
>> INFO: Jk running ID=0 time=1/52  config=null
>> Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
>> INFO: Server startup in 2142 ms
>> Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
>> INFO: Pausing Coyote HTTP/1.1 on http-8008
>> Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
>> INFO: Stopping service Catalina
>> Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
>> INFO: Stopping Coyote HTTP/1.1 on http-8008
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: Running multiple tomcats

2009-08-21 Thread llg



Le 21/08/09 17:06, Malladi, Sasikanth a écrit :

Thank you for the reply. I've used netstat to ensure none of my ports are being 
currently used.
I updated the AJP connector to 8090 (from the original 8009).
As I said before, the startup seems smooth, with no errors/exceptions being 
reported.
However, I can't access my instance via the web (the other instance is 
accessible).
   

Did you try on local (localhost:8008) ?

Is your box behind firewall or routers (forwarding problems) ?

Laurent


Any other tips/hints?

Thanks,
Sashi


-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 10:37 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats

Hi,

perhaps you forgot the AJP Connector (8009).

You can see all listened ports with command :
netstat -laputen | grep java


Laurent

Le 21/08/09 16:31, Malladi, Sasikanth a écrit :
   

Hi all, I'm a relative newbie to this particular request.

I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
running on the default 8080 port.

I've downloaded the latest Tomcat to my home directory and changed the 
server.xml to port 8008 instead of 8080.
I've also changed the shutdown port to 8001 (from 8005) so as not to clash with 
the existing instance.

I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.

Then I ran startup.sh. Everything seemed to be good. I tailed the log file and 
it looks ok.
However, I can't access the default homepage at http://myhost:8008.
I've shutdown the server for now. Neither the startup nor the shutdown commands 
gave me any error.

#:>   ./shutdown.sh
Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
Using JRE_HOME:   /opt/SDK/jdk

What could I be missing?

Thanks a lot for your help!

Sashi

P.S. Here's the catalina.out from my logs dir:

Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
/opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1196 ms
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/52  config=null
Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2142 ms
Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8008

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


 

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

   


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



RE: Tracking down a Tomcat slowdown

2009-08-21 Thread George Sexton
So, I take it you've monitored the machine and made sure there are no other
processes using up CPU/IO Bandwidth?

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

> -Original Message-
> From: neilgoldsmith [mailto:ne...@avaya.com]
> Sent: Friday, August 21, 2009 9:11 AM
> To: users@tomcat.apache.org
> Subject: Tracking down a Tomcat slowdown
> 
> 
> We have a servlet that handles incoming voice calls at customer
> locations, so
> you can have bursts of busy time (much like web traffic).  A customer
> of
> ours has been running this servlet (24/7) for a few months and can go
> weeks
> at a time with no problems, but periodically they will experience a big
> slowdown on the app server which does eventually recover (slows down
> for
> maybe an hour).   We had them increase their maxThreads from 150 to 300
> and
> increase the heap size:
> 
> (their current server.xml settings)
>  maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
>  enableLookups="false" redirectPort="8443" acceptCount="100"
>  connectionTimeout="2" disableUploadTimeout="true" />
> 
> JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.Cla
> ssLoaderLogManager
> -
> Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties
> "
> -server -Xms1024m -Xmx1536m
> 
> It seems to have improved, but the problem cropped up again.
> 
> We use log4j to perform our logging and if you notice below, we have 2
> lines
> of code logging some output one right after another.  typically, there
> is
> just ms's in the log between these 2 log stmts, but when the slowdown
> occurs, you can see there is about 2 secs delay which leads me to
> believe
> the appserver has exhausted its threads and the servlet cannot get a
> thread
> to execute on.  We have disabled logging in the past to make sure the
> logging itself wasn't the problem and we still encountered the
> slowdown.
> Note that the slowdown isn't just here in the log, but the entire
> servlet
> slows down, this part of the code is just a good indicator of how it is
> affecting the servlet.
> 
> These 2 log stmts follow one another and use log4j internally:
> LOG("ICConnectorManager.doGet: Wait time to return response:" +
> (System.currentTimeMillis() - waitStart) + "ms for request ID:" +
> reqID);
> LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
> response back to caller:" + sResponse);
> 
> This is the output from those 2 log stmts, you can see the timestamp
> shows 2
> seconds between.
> 10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to
> return
> response:10125ms for request ID:14252-592
> 10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up 14252-
> 592
> and returning response back to caller:
> 
> 
> My first question, what is the best tool to monitor this so we can get
> an
> accurate description of when the problems occur and what might be at
> fault?
> They just started running perfmon (on a Windows system), but as of yet
> I
> have not seen any data from it.  Is there a better monitoring tool?
> 
> Second question, what might we do to improve Tomcat performance?
> Should we
> continue to tweak the max threads and heap size?  Any other Tomcat
> settings
> that we should look at that might directly relate to this server
> slowdown?
> 
>  thank you
> 
> 
> --
> View this message in context: http://www.nabble.com/Tracking-down-a-
> Tomcat-slowdown-tp25081707p25081707.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



Tracking down a Tomcat slowdown

2009-08-21 Thread neilgoldsmith

We have a servlet that handles incoming voice calls at customer locations, so
you can have bursts of busy time (much like web traffic).  A customer of
ours has been running this servlet (24/7) for a few months and can go weeks
at a time with no problems, but periodically they will experience a big
slowdown on the app server which does eventually recover (slows down for
maybe an hour).   We had them increase their maxThreads from 150 to 300 and
increase the heap size:

(their current server.xml settings)


JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.Cla 
ssLoaderLogManager
-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
-server -Xms1024m -Xmx1536m

It seems to have improved, but the problem cropped up again.

We use log4j to perform our logging and if you notice below, we have 2 lines
of code logging some output one right after another.  typically, there is
just ms's in the log between these 2 log stmts, but when the slowdown
occurs, you can see there is about 2 secs delay which leads me to believe
the appserver has exhausted its threads and the servlet cannot get a thread
to execute on.  We have disabled logging in the past to make sure the
logging itself wasn't the problem and we still encountered the slowdown. 
Note that the slowdown isn't just here in the log, but the entire servlet
slows down, this part of the code is just a good indicator of how it is
affecting the servlet.

These 2 log stmts follow one another and use log4j internally:
LOG("ICConnectorManager.doGet: Wait time to return response:" +
(System.currentTimeMillis() - waitStart) + "ms for request ID:" + reqID);
LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
response back to caller:" + sResponse);

This is the output from those 2 log stmts, you can see the timestamp shows 2
seconds between.
10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to return
response:10125ms for request ID:14252-592
10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up 14252-592
and returning response back to caller:


My first question, what is the best tool to monitor this so we can get an
accurate description of when the problems occur and what might be at fault? 
They just started running perfmon (on a Windows system), but as of yet I
have not seen any data from it.  Is there a better monitoring tool?

Second question, what might we do to improve Tomcat performance?  Should we
continue to tweak the max threads and heap size?  Any other Tomcat settings
that we should look at that might directly relate to this server slowdown? 

 thank you


-- 
View this message in context: 
http://www.nabble.com/Tracking-down-a-Tomcat-slowdown-tp25081707p25081707.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



RE: Running multiple tomcats

2009-08-21 Thread Malladi, Sasikanth
Thank you for the reply. I've used netstat to ensure none of my ports are being 
currently used.
I updated the AJP connector to 8090 (from the original 8009).
As I said before, the startup seems smooth, with no errors/exceptions being 
reported.
However, I can't access my instance via the web (the other instance is 
accessible).

Any other tips/hints?

Thanks,
Sashi


-Original Message-
From: llg [mailto:l...@portaildulibre.fr]
Sent: Friday, August 21, 2009 10:37 AM
To: Tomcat Users List
Subject: Re: Running multiple tomcats

Hi,

   perhaps you forgot the AJP Connector (8009).

You can see all listened ports with command :
netstat -laputen | grep java


Laurent

Le 21/08/09 16:31, Malladi, Sasikanth a écrit :
> Hi all, I'm a relative newbie to this particular request.
>
> I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
> running on the default 8080 port.
>
> I've downloaded the latest Tomcat to my home directory and changed the 
> server.xml to port 8008 instead of 8080.
> I've also changed the shutdown port to 8001 (from 8005) so as not to clash 
> with the existing instance.
>
> I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.
>
> Then I ran startup.sh. Everything seemed to be good. I tailed the log file 
> and it looks ok.
> However, I can't access the default homepage at http://myhost:8008.
> I've shutdown the server for now. Neither the startup nor the shutdown 
> commands gave me any error.
>
> #:>  ./shutdown.sh
> Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
> Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
> Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
> Using JRE_HOME:   /opt/SDK/jdk
>
> What could I be missing?
>
> Thanks a lot for your help!
>
> Sashi
>
> P.S. Here's the catalina.out from my logs dir:
>
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not found on the 
> java.library.path: 
> /opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
> Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1196 ms
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
> Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=1/52  config=null
> Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 2142 ms
> Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-8008
> Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-8008
>
> -
> 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: Running multiple tomcats

2009-08-21 Thread llg

Hi,

  perhaps you forgot the AJP Connector (8009).

You can see all listened ports with command :
netstat -laputen | grep java


Laurent

Le 21/08/09 16:31, Malladi, Sasikanth a écrit :

Hi all, I'm a relative newbie to this particular request.

I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
running on the default 8080 port.

I've downloaded the latest Tomcat to my home directory and changed the 
server.xml to port 8008 instead of 8080.
I've also changed the shutdown port to 8001 (from 8005) so as not to clash with 
the existing instance.

I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.

Then I ran startup.sh. Everything seemed to be good. I tailed the log file and 
it looks ok.
However, I can't access the default homepage at http://myhost:8008.
I've shutdown the server for now. Neither the startup nor the shutdown commands 
gave me any error.

#:>  ./shutdown.sh
Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
Using JRE_HOME:   /opt/SDK/jdk

What could I be missing?

Thanks a lot for your help!

Sashi

P.S. Here's the catalina.out from my logs dir:

Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
/opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1196 ms
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/52  config=null
Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2142 ms
Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8008

-
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



Running multiple tomcats

2009-08-21 Thread Malladi, Sasikanth
Hi all, I'm a relative newbie to this particular request.

I'm working on a Solaris 10 box which has an old (2003!) version of Tomcat 
running on the default 8080 port.

I've downloaded the latest Tomcat to my home directory and changed the 
server.xml to port 8008 instead of 8080.
I've also changed the shutdown port to 8001 (from 8005) so as not to clash with 
the existing instance.

I've set the CATALINA_HOME, CATALINA_BASE, JAVA_HOME to the right locations.

Then I ran startup.sh. Everything seemed to be good. I tailed the log file and 
it looks ok.
However, I can't access the default homepage at http://myhost:8008.
I've shutdown the server for now. Neither the startup nor the shutdown commands 
gave me any error.

#:> ./shutdown.sh
Using CATALINA_BASE:   /home//apache-tomcat-6.0.20
Using CATALINA_HOME:   /home//apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home//apache-tomcat-6.0.20/temp
Using JRE_HOME:   /opt/SDK/jdk

What could I be missing?

Thanks a lot for your help!

Sashi

P.S. Here's the catalina.out from my logs dir:

Aug 21, 2009 2:14:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
/opt/SDK/jdk/jre/lib/sparc/server:/opt/SDK/jdk/jre/lib/sparc:/opt/SDK/jdk/jre/../lib/sparc:/usr/local/CAlib:/opt/CA/CAlib:/usr/lib:/usr/ucblib:/export/opt/CA/SharedComponents/iTechnology:/export/opt/CA/eTrustAudit//odbc/lib:/export/opt/CA/eTrustAudit//lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
Aug 21, 2009 2:14:54 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1196 ms
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 21, 2009 2:14:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Aug 21, 2009 2:14:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:14:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 21, 2009 2:14:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/52  config=null
Aug 21, 2009 2:14:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2142 ms
Aug 21, 2009 2:21:04 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8008
Aug 21, 2009 2:21:05 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 21, 2009 2:21:05 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8008

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



ConcurrentModificationException when starting Tomcat with Velocity Engine configured

2009-08-21 Thread Pradnya Gawade
Hi,

I am using the Velocity Engine for the first time and need some help asap on
the following issue. Thanks in advance.

I have a web application which uses Spring framework. To send the template
based emails through application, I have added following to my Spring
context xml file:


http://mail.akazaresearch.com>"/>



   


 

class
 
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
 
 
   







MailManagerImpl is a class I have written sendEmail code to.
When I deploy the war file of for web application to Tomcat 6 and try to
start the tomcat from command prompt, I get  ConcurrentModificationException
during the tomcat method call
org.apache.catalina.loader.WebappClassLoader.clearReferences(). I have
pasted the exception stack trace at the end.

I know the exception is thrown when Velocity Engine is initialized because
if I remove the "velocityEngine" property mapping from "mailManager" bean,
tomcat do not throw any exception during the initalization.

After searching on web, I found that the system property
"org.apache.catalina.loader. WebappClassLoader.ENABLE_CLEAR_REFERENCES" for
tomcat is set to true by default and which is why  Tomcat attempts to null
out any static or final fields from loaded classes when a web application is
stopped as a work around for apparent garbage collection bugs and
application coding errors. I read about disabling this property but it took
me to another set of tomcat exceptions. So probably this is of no use.
I tried to use the "resource.loader" value as file for Velocity Engine but I
got the same ConcurrentModificationException.
Could some one please let me know how can I overcome the problem.

Regards,
Pradnya

Exception stack trace:
SEVERE: Exception during cleanup after start failed
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$EntryIterator.next(HashMap.java:883)
at java.util.HashMap$EntryIterator.next(HashMap.java:881)
at java.util.HashMap.putAllForCreate(HashMap.java:481)
at java.util.HashMap.clone(HashMap.java:713)
at
org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappCl
assLoader.java:1621)
at
org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.j
ava:1524)
at
org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707)
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:45
57)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
387)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
1)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)

at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:117)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)


Re: pump up memory usage

2009-08-21 Thread Ronald Klop

Very well,

I just tried to inspire someone on how to 'pump up memory usage'. It wasn't 
about the details.

In fact: one line of code doesn't compile without a class and method 
declaration. So you could have mailed me a java-for-beginners manual. :-)

Cheers,

Ronald.


Op woensdag, 19 augustus 2009 22:49 schreef Christopher Schultz 
:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ronald,

On 8/19/2009 5:32 AM, Ronald Klop wrote:
> byte[] b = new byte[100];

Java limits arrays to 2147483648 elements, so the above shouldn't even
compile (and it doesn't for me).

Section 2.15.4 of the JLS says:

"
A component of an array is accessed using an array access expression.
Arrays may be indexed by int values; short, byte, or char values may
also be used as they are subjected to unary numeric promotion (§2.6.10)
and become int values.
"

Integer.MAX_VALUE is 2147483647 so the largest array you can allocate
will actually have 2147483647 elements (and not 2147483648).

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

iEYEARECAAYFAkqMZWQACgkQ9CaO5/Lv0PCIpACggoYXUr4aMq6bg35Irkxto4qd
xcAAn2EgjuBtsRRpdWPH9y1VNl8PLgRw
=f3l7
-END PGP SIGNATURE-

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