RE: Tomcat does not shutdown properly and kill -3 does not work!

2008-08-06 Thread Peter Crowther
 From: Maduranga Kannangara [mailto:[EMAIL PROTECTED]
 Below is my dump and thanks a lot for your time.
[...]
 Thread [EMAIL PROTECTED]: (state = BLOCKED)
  - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
  - org.quartz.core.QuartzSchedulerThread.run() @bci=870, line=420
 (Interpreted frame)
[...]
 Thread [EMAIL PROTECTED]: (state = BLOCKED)
  - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
  - org.quartz.simpl.SimpleThreadPool$WorkerThread.run()
 @bci=44, line=523
 (Interpreted frame)

Ah.  Quartz is used in your webapp!  It's a known problem.

I assume you've tried following the instructions at 
http://jira.springframework.org/browse/INT-147 and used 
destroy-method=shutdown in the bean config?  If not, try that and see what 
happens.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible virus uploaded to Tomcat 5.5.3

2008-08-08 Thread Peter Crowther
 From: Warren Bell [mailto:[EMAIL PROTECTED]
[details of attack elided]
 The network that the server is on has a Lynksys RV082 small business
 router with the firewall completely locked down except for port 8080
 available only to the networks with the kiosks. The kiosks are on a
 basic Linksys home router.

That's a nice little JSP - once it's on the system, the attacker can do 
anything they like that's allowed by the outbound firewall, with the privilege 
of the user running Tomcat.  I assume the server can connect freely to other 
URLs, such as wherever it pulled init.exe from?  So the problem reduces to how 
someone managed to drop that JSP into 5.5.3 such that it could be invoked once?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how to make context path case insensitive

2008-08-11 Thread Peter Crowther
 From: persistence k [mailto:[EMAIL PROTECTED]
 Can anybody tell me how to make context path of a web application case
 insensitve.
 I need a case insenstive context path for my web application.

Do you need a case insensitive context path, or do you need users to be able to 
type in either case initially and to be directed to the same webapp?  If it's 
the latter, you could deploy your webapp at one variant of the context path 
(say the lowercase one) and deploy a small webapp at the other that simply 
redirects to the lowercase version.

If you genuinely need a case insensitive context path, can you give us some 
more details about what you're trying to do?  Also, what OS, and what version 
of Tomcat?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with in Synchronized methods in Tomcat 4.x

2008-08-11 Thread Peter Crowther
 From: Thangavel Sankaranarayanan [mailto:[EMAIL PROTECTED]
 After number of session in my application has reached in some point of
 time. the synchronized method is not executed and  the
 system hangs
 waiting to execute that method.

 I could'nt make a thread dump as my tomcat is started as  a window
 service.What can i do at this point of time??

Find some way of getting that thread dump - nobody will be able to help you 
more until we can see it.  If necessary, start Tomcat from a command prompt to 
get it.

I strongly suspect you have a logic error or race condition in your code so 
that another of your threads is stuck inside the synchronised block.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Will tomcat handles Syn

2008-08-11 Thread Peter Crowther
As far as I know...

 From: Thangavel Sankaranarayanan [mailto:[EMAIL PROTECTED]
 Does Synchronization is taken care by Tomcat itself when i
 call a static method from a thread

No.

 should i use synchronized keyword

Depends.  If your application will fail under some circumstances if the call is 
not synchronised, then you should synchronise it.  You are the only person who 
knows the detail of your application; nobody on this list can answer this 
question for you.

 And J2EE application are multithread,so its container
 responsibilities to handle all these stuff for user.

No.  The container can do some things, but it does not inspect your code for 
calls to static methods and synchronise them.

 Even if you use 'synchronized' keyowrd in J2EE application
 than you are
 trying to make your container life tuff which you shd not
 be the case.

Depends.  Large synchronised areas may lead to lock contention and hence slow 
down your application.  In the extreme case, they could lead to deadlock.  It's 
up to you to design your application appropriately, mainly by avoiding shared 
state as far as possible.  It's not the container's job to get you out of the 
mess if you code your own solution.

 Conatiner will do better handling of common resource,so we shd not use
 'synchronized' keyword.

Yes, where the container is aware of the common resource and knows how to pool 
it.  No, where it's your own code implementing the common resource.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Chaining Request Processing

2008-08-12 Thread Peter Crowther
 From: Jeng Yu [mailto:[EMAIL PROTECTED]
 The servlet (in Appserver A) then processes part of
 the
 form input in the doGet method and then needs to send
 the rest of the form to another web server
 (Appserver B) to process and return the results
 (response code or something) to the calling servlet
 which is waiting for it. The servlet receives the
 results and based on the results, sends
 response back to the client, all within the same doGet
 method.

 Is this doable, and What's the best way to go about
 it?

Best or Easiest to code? :-)

Best from a performance point of view is to change your application so that 
it's *not* all happening in the same doGet call.  You don't know how long your 
call will take.  You should submit the request via some appropriate mechanism 
and return a holding page to the user.  Every so often, the holding page should 
poll to see whether the call has completed.  You'll need some way of storing 
the results from appserver B, along with a way of managing timeouts and 
similar.  Since you've not said how appserver B expects its data, we can't 
really suggest specific technologies.  This approach minimises the number of 
threads that will be waiting at any time.

Easiest to code is to use the same doGet call.  Be aware that you may tie up 
a *lot* of Tomcat threads waiting for responses from B.  Your worst case is 
when B black-holes at the busiest time for your application, meaning that A has 
to wait for a timeout on every call.  You'll need at least that many threads 
configured unless you want unpleasant error messages returned to your users.

 Should I make the call to Appserver B in a separate
 thread (I'm considering it)?

If you're doing this in the same doGet call, why bother?  It's extra overhead 
for no good reason - you're already tying up the Tomcat thread for the duration 
of the call.

If you're changing your architecture, you'll definitely need to do this.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how to allow remote login in tomcat ?

2008-08-26 Thread Peter Crowther
 From: Ajay Garg [mailto:[EMAIL PROTECTED]
 b) In Tomcat deployment, Tomcat needs the credentials to
 login into the
 shared folder (the fact that the
 the network folder has already been mapped onto a drive
 SUPPOSEDLY does not
 help ...)

Mapped drives are per-user, not per-system.  If Tomcat's running as a service 
or under a different user ID to yours, it won't see the mapped drive.  Who's it 
running as?

Also, if Tomcat's running as a service, it doesn't load a full profile - 
notably including the mapped drives.  What's it running as?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: Can't generate class file from Interface

2008-08-26 Thread Peter Crowther
This is not a Tomcat question.  Please find a more appropriate list.

- Peter

 -Original Message-
 From: sam wun [mailto:[EMAIL PROTECTED]
 Sent: 26 August 2008 13:03
 To: Tomcat Users List
 Subject: Can't generate class file from Interface

 Hi,



 In Eclipse 3.4 (not sure about the previous version), I have
 a project, in
 the src, there is a interface file called
 DatabaseCommand.java. This file
 is an interface file.

 It s content is shown below:

 package command;

 import java.sql.Connection;
 import java.sql.SQLException;

 public interface DatabaseCommand {
 public Object executeDatabaseOperation(Connection conn) throws
 SQLException ;
 }





 Another file CreateOrder.java *implements* this interface.

 Its content shown as below:



 Package command;

 import java.sql.Connection;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.ResultSet;
 import java.util.ArrayList;
 import domain.Customer;

 /**
  * List existing customers in the database
  */

 public class ListCustomers implements DatabaseCommand {

 public Object executeDatabaseOperation(Connection conn) throws
 SQLException {
 // List customers in the database

 ArrayListCustomer list = new ArrayListCustomer();
 Statement sta = conn.createStatement();
 ResultSet rs = sta.executeQuery(SELECT ID, FIRST_NAME,
 LAST_NAME, ADDRESS FROM CUSTOMER);
 while(rs.next()) {
 Customer cust = new Customer();
 cust.setId(rs.getInt(1));
 cust.setFirstName(rs.getString(2));
 cust.setLastName(rs.getString(3));
 cust.setAddress(rs.getString(4));
 list.add(cust);
 }

 rs.close();
 sta.close();

 return list;
 }
 }



 When I press Clt-B to build the project(All),
 DatabaseCommand.java does not
 get compiled, no DatabaseCommand.class generated in the
 build\classes\command\ directory. The syntax highlithed in the
 CreateOrder.java file indicated that DatabaseCommand is an
 unknown type,
 that meant no class found.



 How can I get around this issue? may be I should ask how to
 generate an
 interface dot class file (eg. DatabaseCommand.class in this instance)?



 Thanks

 Sam




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.0.26 / Performance issue

2008-08-27 Thread Peter Crowther
 From: Anthony COMMUNIER [mailto:[EMAIL PROTECTED]
 I'am doing load tests with a web application that is deployed
 under Tomcat 5.5.0.26

Tomcat has 3-character version numbers, so this is probably 5.0.26 or 5.5.26?

 With only one request (no load just one call) it tooks 150 ms
 to call the method getParameterNames from class
 org.apache.catalina.connector.RequestFacade.

Is this for the first call, or for second and subsequent calls as well?  First 
calls are often much slower as code is loaded.  If it's for second and 
subsequent calls, then there's a problem!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: Can't execute servlet project

2008-08-27 Thread Peter Crowther
 From: sam wun [mailto:[EMAIL PROTECTED]
 OK, I followed your instruction to invoke the servlet class
 file, but I got errors.
[...]
 root cause java.lang.UnsupportedClassVersionError: Bad version number in
 .class file

You're compiling your class with a newer Java version than your Tomcat instance 
is running on.  You probably want to find which JDK your Tomcat's running on, 
and change that to the same one that you're using for compilation.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Ignorance about some things.

2008-09-01 Thread Peter Crowther
 From: Ronald Klop [mailto:[EMAIL PROTECTED]
 My experience is also that java likes more memory on 64-bit
 systems. But I can't prove or explain it.

I would expect 64-bit Java to use 64-bit object pointers, and 32-bit Java to 
use 32-bit object pointers.  Given how often object pointers occur in typical 
Java programs, that's a fair bit of extra memory.  If you assume that half of a 
typical object's state is references to other objects, then (naively) you'll 
use 50% more memory.

Now I'll sit back and wait for Chuck to contradict me :-).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Peter Crowther
 From: Steve G.B. [mailto:[EMAIL PROTECTED]
 I need to install multiple instances of Tomcat on my server.

 I changed all the connection and redirect ports, but the
 second Tomcat still
 doesn't start.

 What should I do?

Give us more information - that's far too vague for us to help you.

Post:
- Tomcat versions;
- Any error messages you get in either set of logs while starting Tomcat.

Also: If you start the two services in the opposite order, which one fails?  Is 
it always one instance of Tomcat (in which case you should be looking for 
config errors in that Tomcat) or is it always the second one started (in which 
case you should be looking for contention issues)?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Peter Crowther
 From: Steve G.B. [mailto:[EMAIL PROTECTED]
 I'm trying to overload the Virtual Machine on which I've
 installed the two Tomcats.

To check: this is a virtual computer (on a physical host computer) running a 
virtual operating system on which you are running two copies of Tomcat in two 
separate Java virtual machines?

 But I can't exceed a 50% of CPU Utilization.

How many virtual cores have you set up?  How many physical cores on the host 
computer do you have?  How many of those are allocated to the virtual computer?

 I believe it's a JVM limitation.

What JVM are you using?  If it's a Sun one, I don't believe you ;-).  I've 
saturated 8-core processors on 1.4 and 1.5 with no issues; I can't see that 
having regressed in 1.6, although I don't have personal experience.

 Is there a way to change jvm configurations
 in order, for example, to create even more threads?

Depends on your JVM.  But I'm willing to bet that the bottleneck is in one or 
more of:
- Your test harness;
- Your web app (do all the threads access a common object?);
- A library you're using that single-threads;
- Your back-end systems, such as your database server.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Peter Crowther
 From: Steve G.B. [mailto:[EMAIL PROTECTED]
 I've created a VM with 4 VCores, and all of the cores are
 allocated to the VM.

OK, so 50% CPU = 2 cores maxed out.  Out of interest, is it 25% with only one 
Tomcat started?

 I'm using Sun JVM 1.6, and stressing the Guest with
 Loadrunner on another
 machine (if you ask: this machine with loadrunner isn't the
 bottleneck)

 No Databases, no I/O requests, no Network saturation.

OK.

Given that you're getting exactly 50% CPU use (it *is* exact, right?) that 
indicates the test harness is very unlikely to be the problem.  It would almost 
certainly bottleneck at some other CPU value.

 that's why I think it's the JVM.
 For my tests I used the standard demo webapp in Loarunner
 (Mercury Tours),
 and a couple of stupid jsp pages. So Apache and Tomcat both.

I'll highlight that to the folks who know the demo app better: does it run 
properly under load?  I'd assume so...

 Fun thing is that when using Tomcat and Apache combined, I
 can get an 80-85% CPU Utilization.

Yes.  If you've got httpd passing everything through it as well, you'll 
increase the CPU load - that's expected!

 Problem is that for my tests I need
 something more simple and the same server.

Yes.  Why add complexity when it's not required? :-)

 How do you saturate an 8-core host?

With some reasonably complex code in the JSPs :-).  Out of interest, if your 
JSPs call something that loops a couple of million times before returning, what 
happens to the CPU use?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [NEWBIE] Separate tomcat engines on the same physical server

2008-09-09 Thread Peter Crowther
 From: Jon Camilleri [mailto:[EMAIL PROTECTED]
 Hence, is it feasible to have:

 - Server 1 installed with Tomcat instance #1 and
 Tomcat instance #2 over JVM #1

 - Server 2 installed with Tomcat instance #1 and
 Tomcat instance #2 over JVM #2

If by JVM you mean the files installed to support Java on the computer, yes.  
One Java installation can support many concurrent processes running Java.

If by JVM you mean one process running Java, no.  Each Tomcat must run in its 
own process.

 What are your views on this?

I've successfully run up to three Tomcats on the same machine, as three 
processes, all with the same JAVA_HOME.  It's a good way of providing isolation 
between applications, or even Tomcat versions (I was running two 5.0.x, one 
5.5.x).

 Any relevant documentation on configuring them this way?

See the file RUNNING.txt in the Tomcat zip you download.  There's a section at 
the end on running multiple Tomcats on the same box.  Setup can get a little 
interesting if you're running on Windows and want both processes to start as 
services, but even that's entirely possible to configure.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JVM per Context

2008-09-10 Thread Peter Crowther
 From: Michael Dehmlow [mailto:[EMAIL PROTECTED]
 I have multiple contexts that are defined for a given host in
 my server.xml
 each context I would like to start up in its own jvm, for dll and
 enviornment variable reasons.

As a solution sketch (I've never done it), you'll need to deploy eclipsev1 and 
eclipsev2 in two different Tomcat instances.  See the file RUNNING.txt that 
comes with your version of Tomcat (which you didn't tell us!) for details on 
setting up multiple instances.  You'll then need something that talks AJP or 
can reverse proxy to sit at the front of the two Tomcats and divide incoming 
requests to the multiple Tomcats.  Apache httpd (what most people call 
Apache) can do this.  Again, check the docs at http://tomcat.apache.org for 
integration of httpd as a front-end, Tomcat as a back-end.

I suspect you'll get more detailed responses; this is rapid rather than 
complete!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Filesystems allowing spaces (was RE: html entities and urls with spaces)

2008-09-11 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Whichever bright developer invented the first filesystem
 allowing spaces in filenames should be found and shot.

You'd have to go a long way back - UNIX has had them at least since I started 
using it*.  Besides, users love 'em - it's just us command-line types who have 
problems.

- Peter

* I'm a latecomer - mid-1980s

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Browser Limited web application

2008-09-17 Thread Peter Crowther
 From: karthikn [mailto:[EMAIL PROTECTED]
 Question 2:  How to fetch the MAC address (Physical address) of
   the clients using web application  ?

You can not do this at the server.  Some clients may not even have one - a 
computer with no network card using a dial-up modem to access the Internet has 
no MAC address.  If you look at the OSI 7-layer model, the MAC address exists 
in some Datalink (layer 2) implementations, but need not exist on all.

If you really, *really* need the MAC address, you would have to write a piece 
of code to download to the client computer and run on the client computer to 
get it.  I suspect most anti-malware programs would recognise that software as 
spyware and stop it running.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache and tomcat version

2008-09-17 Thread Peter Crowther
 From: Hardik Shah [mailto:[EMAIL PROTECTED]
 is tomcat 3.2.1  and apache 1.3.27 are both server

Tomcat 3.2.1 is a web server.  You can use it to serve Web pages or web 
applications directly.  You do not need to use any version of Apache httpd as 
well.

If you want to use Apache httpd as well, you can connect Tomcat to httpd using 
AJP.  It is more difficult to set up the two servers in this way.

If possible, I would use a newer version of Tomcat than version 3.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: Browser Limited web application

2008-09-17 Thread Peter Crowther
[Marked off-topic as this now has nothing to do with Tomcat]

 From: karthikn [mailto:[EMAIL PROTECTED]
 But some Browsers provide modification of User-Agent

 Is this fool proof ?

No.  You have no control over the client; you cannot determine what it really 
is, only what it says it is.  AVG8, for example, can pretend pretty 
convincingly to be Internet Explorer.

The only way to be relatively certain is to send a page to the browser that 
uses Javascript to check for known bugs or quirks in the browser, and sends 
back to you a status report.  Of course, a hacker has control over the client, 
so could change the Javascript code you send (or run it under a debugger) to 
report whatever they wanted... you can never be *certain*.

If you told us what you were trying to do, and what is an acceptable level of 
confidence in the result, we might be able to help more.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat usage

2008-09-18 Thread Peter Crowther
 From: Kusuma Pabba [EMAIL PROTECTED]
 what is the difference between running tomcat server  and as client

Tomcat is a Web server.  There is no concept of running it as a client.

What are you trying to do?  We might be able to help more if you tell us!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache and tomcat version

2008-09-18 Thread Peter Crowther
 From: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Does Tomcat do the same thing as Apache? ie http; as well as the bonus of
 java?

Yes, with reservations.  Tomcat's a Web server in its own right - and a pretty 
fast one, in its modern versions.  You'll saturate your network bandwidth long 
before you saturate your CPU.  It's tuned for serving static content and Java 
web application content.  It *can* serve other content via custom webapps and 
filters, but in my opinion this is less well developed than the facilities in 
Apache httpd (what most people call Apache).

 I am using PhP, and would to like to also have Java/AJAX?J2EE on my web
 page, and I am not sure if I need both Apache and Tomcat, or can just use
 Tomcat? (I dont know if it will do everything that Apache does plus more?)

httpd has more modules available, and is probably a better choice as your 
front-end if you're running several different active server technologies such 
as PHP and Java.  Tomcat *can* serve PHP, but as far as I'm aware the 
integration is slower than httpd's.  I've not done it, however - can anyone who 
has comment on performance?

If you do run httpd in front of Tomcat, you do of course have the integration 
job to do.  The appropriate version of the docs at http://tomcat.apache.org 
will, of course, be of benefit :-).  I'd go with Tomcat 6 unless you have a 
good reason to use an older version.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat usage

2008-09-18 Thread Peter Crowther
 From: Kusuma Pabba [mailto:[EMAIL PROTECTED]
 actually i want to use tomcat on my arm processor  and i am not
 understanding how to use it on that

1) Set up an appropriate operating system on your ARM processor that includes a 
TCP/IP stack and support for a good Java virtual machine (must be at least J2SE 
- I don't think Tomcat will work under J2ME).

2) Test for TCP/IP network connectivity between whatever you're using to view 
your Tomcat content and your ARM device.

3) Ensure the Java virtual machine runs at least a hello world program that 
you've developed.

4) Download an appropriate version of Tomcat, and install on the operating 
system and Java virtual machine that you have tested and shown to be working.  
As you have installed an appropriate operating system, you should be able to 
follow the instructions for that operating system.

5) Start Tomcat, and browse to its default page using a browser on whatever 
system you identified in step 2.

There may be other ways of working, but most of the embedded Tomcats I've seen 
on devices are running on embedded Linux of one variety or another.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HTTPS and Virtual Hosts

2008-09-22 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
 As I remember from reading about this a while ago, there is/was a
 fundamental incompatibility between the HTTP Virtual Host
 mechanism, and
 HTTPS/SSL, in the sense that there is some egg-and-chicken problem
 involved, which roughly goes like this :
 - the client connects to the host and requests an encrypted connection
 to a certain hostname

Almost.  The client connects to the host on a given IP address and port, which 
requires an encrypted connection.  No hostname is transferred at this point, as 
encryption must happen first.

 - the host and client negociate the encryption (based or not
 on the name of the host)

Based on the certificate that the host sends to the client as part of 
negotiating the encryption.  That certificate contains the common name of the 
host (or occasionally a wildcard name such as *.melandra.com).  The client 
should be suspicious if the common name in the certificate does not match the 
hostname the client thinks it sent the request to.

Therefore, the host cannot know to which virtual host the client wishes to 
connect when it sends the certificate.

Therefore, the host cannot send the right certificate unless all requests to 
a given hostname and port are designed to use the same certificate.

Therefore, virtual hosting using SSL is a problem.

 Is the above, very roughly and approximatively still a valid
 explanation
 of what happens, or is it totally wrong, or has something changed
 in-between that I am unaware of ?

It's close, but the problem occurs at an earlier step than you outline :-).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: HTTPS and Virtual Hosts

2008-09-22 Thread Peter Crowther
 From: Ognjen Blagojevic [mailto:[EMAIL PROTECTED]
 For instance, you
 could put 2 or more network cards in the server, and than
 configure one virtual host for each of these cards.

Or configure multiple IP addresses on one card - almost all operating systems 
these days allow multiple IP addresses on one adapter.  Cheaper, and you don't 
run out of card slots so fast :-).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Connector problem

2008-09-22 Thread Peter Crowther
 From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED]
 Let's say I want a user to access the website in this fashion

 https://www.domain1.com ( SSL from thawte )
 https://www.domain2.com ( SSL from thawte )
 https://www.domain1.se ( SSL from thawte )

 What would I have to do to make this work? I only have one
 server that is running tomcat 6.

You would have to:

- Obtain and set up 3 different IP addresses for the server;

- Set up DNS to point www.domain1.com to one of the IP addresses, 
www.domain2.com to another, and www.domain1.se to the third.

- Configure 3 different Host elements in your server.xml, each for one of the 
secure domains;

- Configure each Host to use the appropriate certificate from your 
keystore(s).  This is no harder than configuring one Host for SSL, you just 
need to do it three times :-).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HTTPS and Virtual Hosts

2008-09-22 Thread Peter Crowther
 From: Johnny Kewl [mailto:[EMAIL PROTECTED]
 I actually cant see any
 reason why the hand shake couldnt be extended to look at the
 incoming URL...

Because the URL (or at least the host header) would have to be sent over the 
wire in cleartext, as it's before the encrypted connection is negotiated.  This 
is an information disclosure vulnerability.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Connector problem

2008-09-22 Thread Peter Crowther
 From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED]
 When a user access www.domain1.se then I read the
 HTTPServletRequest host
 name to see what site
 he/she want's to access. This is because I do not want 3
 hibernate access to
 the same database because that won't work. I would get a lot
 of exceptions
 from hibernate if an entity is changed in one domain and not
 the other.

 So, can I set up the server in the way I have done now? If I
 use 3 different
 hosts, how can this point to the same war file without
 loading the war file twice?

I am not aware of any way of doing this, unless you re-architect the 
application so that all Hibernate access is done in classes that are only 
loaded once.  However, I'm not a Tomcat expert and there may be ways round the 
problem!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HTTPS and Virtual Hosts

2008-09-22 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
 I seem to remember that there was talk about a scheme or a
 protocol that
 would allow (very roughly) a client/server pair to start a
 session using
 HTTP (not SSL), negociate, then in the course of the session upgrade
 this link to HTTPS.  And that this somehow could be a solution to the
 Virtual Host issue under HTTPS.
 Am I dreaming this up, or does there exist something in that
 general area ?

I've no idea whether such a protocol exists today; however, the current set of 
browsers don't appear to support such a beast.  It might be a good solution 5 
years down the line, once all the old browsers that don't support it have 
fallen out of use, but even if the protocol's ready to go now the installed 
browser base isn't ready for a site that uses it.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Connector problem

2008-09-22 Thread Peter Crowther
 From: Jörg Fröber [mailto:[EMAIL PROTECTED]
 Sorry to kind of hijack this thread, but would it be possible
 to use one
 of the certificates linked below with tomcat, when only 1 IP and 1
 SSL-Connector is used for different Host elements?

 http://www.geotrusteurope.com/products/ssl_certificates/true_b
 usinessid_mdm.asp
 http://www.positivessl.com/ssl-certificate-products/ssl/multi-
 domain-ssl-certificate.html

Assuming the browser support is out there then yes, it should be possible.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: HTTPS and Virtual Hosts

2008-09-22 Thread Peter Crowther
[Marked OT as this is not even remotely about Tomcat]

 From: Johnny Kewl [mailto:[EMAIL PROTECTED]
 http://support.microsoft.com/kb/257591

... OK...

 If it send the HOST info in step one

... which it doesn't as far as I can see...

 and the server chose the correct
 cert I see no problem, the secure session hasnt even
 kicked in yet ;)

Yes, exactly.  So anything sent across the wire (such as the host header) is 
subject to eavesdropping.

The URL, in particular, MUST NOT be sent in cleartext - consider a URL of the 
form https://www.innocentsite.com/myphotos/notsoinnocent/llamapr0n372.jpg *.  
The user would no doubt expect SSL to defend his/her access to that URL from 
eavesdropping :-).

The case for not sending the host header in cleartext is weaker, but still 
present.  Consider a blog site such as LiveJournal, for example.  It hosts a 
range of content, separated onto one hostname per blog.  Some of that content 
is pretty explicit, and some people might get rather upset if they knew that 
*even though they thought they were on a secure channel* then others could 
eavesdrop on the mere fact that they were reading *that* content, rather than 
some other innocent content that happened to be on the same IP.  So I consider 
that the ID vul is still present, even via disclosure of just the host header.

 If not what is the vulnerability? Whatever cert is sent what
 oput there by
 the admin dudes, and will be checked client side anyway ;)

You're thinking about ID vuls from the side of the server admin.  Broaden your 
thinking - what might a *client* get upset about?

- Peter

* With thanks to User Friendly (http://www.userfriendly.org), over the years, 
for warping my mind enough to devise this URL.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: manipualting a select list from within an event handler

2008-09-24 Thread Peter Crowther
 From: Robert Welz [mailto:[EMAIL PROTECTED]
 Manipulating checkboxes from withing an onchange event handler works
 but I'd like to manipulate a select list like in this code example,
 but without luck? I'd appreciate some little help, that would be
 fantastic.

[Javascript elided]

Ask on a Javascript list?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Reloading Tomcat Server

2008-10-07 Thread Peter Crowther
 From: Barry Fawthrop [mailto:[EMAIL PROTECTED]
[...]
 wget  -O  .../local_news
 http://www.topix.com/rss/county/citrus-fl
[...]
 java.io.FileNotFoundException:
 http://www.topix.com/rss/county/citrus-fl
 at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt
 pURLConnection.java:1239)
 at
 com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:100)
 at
 com.sun.cnpi.rss.taglib.FeedTag.doStartTag(FeedTag.java:121)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:155)

Are you *sure* you've changed your JSP to read from the local file?  That looks 
like it's still trying to read directly from the URL during the request.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Communicating between webapps

2008-10-08 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Maybe hacks, but why not use them if they are easier, faster,
 and have a smaller memory footprint ?

Because they can be harder to maintain.  Note *can be* - it depends on the 
developers and admins.

 Not being very good at either Java or Tomcat, I'll submit the
 following
 ideas, and watch for comments :

 Depending on what exactly you need to pass as information,
 why not just
 the fact of whether a given flag file exists in a directory under
 catalina.base ? I know that this sounds quite pedestrian, but
 considering that a webserver already makes zillions of file accesses
 anyway, I don't think the overhead of a few more would matter.

 Or, if both webapps already use some common database, a
 record in ditto
 database. That is probably more flexible and more reliable re locking.

 Or, a webapp with the appropriate permissions can set/reset/read a
 system property, and these should be shared by all apps under the same
 JVM instance, no ? what I don't know is if set/reset of a system
 property is atomic.

I think the OP wanted webapp A to call webapp B and return the result from B, 
via A, to the user.  None of these cause A to invoke code in B, though they're 
all solutions to the problem of A informing B that something has changed.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Appeal to Tomcat developers

2008-10-16 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
  From earlier Tomcat expert's messages here, I understand that the
 previous logging methods were technically flawed, and that the new
 methods, technically, are far superior.

 But from tens of user's messages on this list, it is clear
 that in terms
 of setup and configuration, the new methods are too
 complicated, and the
 available documentation is too obscure for most of the Tomcat
 users that
 are not themselves Java or Tomcat experts.

What would you change?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Appeal to Tomcat developers

2008-10-16 Thread Peter Crowther
I think there's a miscommunication going on.

 From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
 well our [...]
 admins are well able to configure tomcat logging as they wish (mainly
 by using log4j configs we (developers) [...]).

OK.  So your admins have in-house developers to turn to.

[...]
 I would doubt that the majority of tomcat users (i.e. java developers)
[...]

Andre's original premise is that the majority of Tomcat users are *not* Java 
developers.  They are, instead, people who have a webapp they need to run and 
maintain.  They have downloaded Tomcat in order to run it.

I agree with Andre.  I think his 90% estimate is high, but I suspect pure 
admins are in the majority.  Certainly I think equating tomcat user with 
java developer is naïve.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where to look for connection refused errors in Tomcat6.0.18 ?

2008-10-17 Thread Peter Crowther
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 If still more simultaneous requests are received, they are
 stacked up inside the server socket created by the Connector,
 up to the
 configured maximum (the value of the acceptCount attribute.
 Any further
 simultaneous requests will receive connection refused errors, until
 resources are available to process them.   So where can we
 expect to see those errors in Tomcat?

You *can never* see these errors in Tomcat, because Tomcat is never aware that 
the connection was received.  The operating system's TCP/IP stack has received 
the incoming SYN, tried to queue the connection request on Tomcat's accept 
queue, failed, and simply sends a RST to close the connection.

You *might* be able to monitor the total number of connection refusals at the 
OS level.  Netstat on Windows will give you this, for example, though it 
combines refusals due to load and refusals due to no port being configured to 
accept a connection.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat is running but page is not displayed

2008-10-22 Thread Peter Crowther
 From: Danny_HY052 [mailto:[EMAIL PROTECTED]
 When the tomcat is running i am able to access the
 application, however,
 after some time when i try again to access the application i get Page
 cannot be Displayed. (ensured that the tomcat was still running)

 I need to restart the tomcat server manually to get the page to be
 displayed.

I'm guessing that you have a memory leak in your application, and that after a 
while your JVM runs out of heap.  You could test this by increasing or 
decreasing the heap space available to the JVM, and seeing whether this 
increases or decreases the time to failure.  Then you have the fun job of 
finding the leak - there are many threads in the Tomcat archive on doing this, 
just search for memory leak and follow the threads.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.26 Vulnerability - Test

2008-10-23 Thread Peter Crowther
Which JDK are you using, and do those vulnerabilities apply to that *specific* 
JDK?

They are all Java vuls, not Tomcat vuls.

- Peter

 -Original Message-
 From: Gozde Aytan [mailto:[EMAIL PROTECTED]
 Sent: 23 October 2008 12:32
 To: users@tomcat.apache.org
 Subject: Tomcat 5.5.26 Vulnerability - Test

  Dear all,

 In our project, we are using Tomcat 5.5.26 and as it is
 reported that some
 vulnerabilities have been found. So, I just want to test our
 system if these
 vulnerabilties are exploited in our side or not. But I do not
 know how to
 test? Is there someone else who could help me in testing (how
 to generate)
 any of the following cases below? If at least one of them can
 be tested and
 resulted failure, that means Tomcat will be upgraded.

 Any help will be appreciated.
 Thanks.

 1) An error in the Java Runtime Environment Virtual Machine
 can be exploited
 by a malicious, untrusted applet to read and write local
 files and execute
 local applications.

 2) An error in the Java Management Extensions (JMX)
 management agent can be
 exploited by a JMX client to perform certain unauthorized
 operations on a
 system running JMX with local monitoring enabled.

 3) Two errors within the scripting language support in the
 Java Runtime
 Environment can be exploited by malicious, untrusted applets to access
 information from another applet, read and write local files,
 and execute
 local applications.

 4) Boundary errors in Java Web Start can be exploited by an
 untrusted Java
 Web Start applications to cause buffer overflows.

 5) Three errors in Java Web Start can be exploited by an
 untrusted Java Web
 Start applications to create or delete arbitrary files with
 the privileges
 of the user running the untrusted Java Web Start application, or to
 determine the location of the Java Web Start cache.

 6) An error in the implementation of Secure Static Versioning
 allows applets
 to run on an older release of JRE.

 7) Errors in the Java Runtime Environment can be exploited by
 an untrusted
 applet to bypass the same origin policy and establish socket
 connections to
 certain services running on the local host.

 8) An error in the Java Runtime Environment when processing
 certain XML data
 can be exploited to allow unauthorized access to certain URL
 resources or
 cause a DoS.
 Successful exploitation requires the JAX-WS client or service
 in a trusted
 application to process the malicious XML data.

 9) An error in the Java Runtime Environment when processing
 certain XML data
 can be exploited by an untrusted applet or application to
 gain unauthorized
 access to certain URL resources.

 10) A boundary error when processing fonts in the Java
 Runtime Environment
 can be exploited to cause a buffer overflow.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question about Tomcat context

2008-10-24 Thread Peter Crowther
 From: Jerome Lepage - AKEROZ [mailto:[EMAIL PROTECTED]
 I have developped a web application on Tomcat (5.0.28).
 My webapp use Hibernate 3 and i have a Singleton pattern too.

 I want have my webapp deployed N time in same Tomcat Server.
 But i don't want to share context, hibernate and Singleton
 from one webapp to other.
 (Like database access is not the same)

Have you tried just deploying it N times, making sure all the jars are in 
WEB-INF/lib?  Each webapp should get its own classloader, and hence will have 
its own copies of Hibernate and your singleton.  I *think* they'll have 
different contexts, too, but I've not tried this.

By the way: if you start getting out of memory errors as you deploy more 
copies, make sure you have enough perm space configured in your JVM options.  
Hibernate can generate a lot of classes, and lots of copies of these classes 
can consume a lot of perm space.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question about Tomcat context

2008-10-24 Thread Peter Crowther
 From: Jerome Lepage - AKEROZ [mailto:[EMAIL PROTECTED]
 But when i launch tomcat with this env vars :
 JAVA_OPTS=-XX:MaxPermSize=512m -Xms24m -Xmx512m

Well, yes :-).  That should give you enough perm space.

 Tomcat looks like not really care about the memory i grant to JVM.
 It's seems that tomcat have the memory but don't give to the
 différents contexts
 I have a poor Free memory at each time...

I'm simplifying here - you're better off reading the JVM docs or waiting for 
Chuck* to tell me I'm wrong ;-).  Any Java virtual machine will only collect 
garbage a) when you tell it (and sometimes not then), or b) when it runs out of 
free memory and needs to allocate something.  Low free memory is not 
necessarily a problem - the JVM may just be being lazy about garbage collection.

- Peter

* who has forgotten more about Java virtual machines than I will ever learn

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Obfuscating a Servlet

2008-10-24 Thread Peter Crowther
 From: Jeng Yu [mailto:[EMAIL PROTECTED]
 I just wanted to know if I can first obfuscate my
 selvlet
 with ProGuard before I deploy it in Tomcat
 environment.

As long as ProGuard doesn't hack around with the servlet interface calls, you 
should have no problem.  However, I've never tried.

 Will doing this really protect my servlet

No.

 and make it
 really difficult for someone to reverse engineer or
 decompile it, as people seem to say?

Obfuscation makes it *more* difficult to reverse engineer, as (for example) the 
names of functions and types no longer give any clues.  However, if there's 
enough information in the code to run it, there's enough to reverse engineer it.

It's like installing better locks on your house: fewer thieves will get in, but 
a determined thief will always do so.  Generally via a way you didn't think of. 
 For example, have you defended against someone breaking in and stealing the 
machine with your source code on? ;-)

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TomCat question

2008-10-24 Thread Peter Crowther
 From: Ghanta, Bose [mailto:[EMAIL PROTECTED]
 Will Tomcat run with J2SE or does it require J2EE?

The ones I have here run just fine on J2SE.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multiple IIS sites and ISAPI redirect problem

2008-10-24 Thread Peter Crowther
Martin, read the OP's information?

 From: Martin Gainty [mailto:[EMAIL PROTECTED]
[...]
 For non server products like Windows 2000 Professional or
 Windows XP the number of concurrent connections is limited to 10

[...]
  Mikko Pukki wrote:
   System is Windows Server 2003

That's a server product, and your (correct) information about non-server 
products is not relevant to the OP's problem as far as I can see?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Are multiple contexts of the same code code base visible to each other?

2008-10-25 Thread Peter Crowther
[My mailer appears to be missing part of the thread, ignore this if the 
question's already been answered]

 From: Jonathan Mast [mailto:[EMAIL PROTECTED]
 getInstance(path) checks a static hashmap for path

Static held where?  In MultiLogger, and Multilogger is a class (or in a jar) 
that is deployed with each context?

 How will 2 copies of MultiLogger handle 2 requests for
 com.mysite.stuff.foo.log ?

They're two copies.  They're separate classes, loaded by separate classloaders, 
with separate copies of the static HashMap.  They will behave in that way, i.e. 
you'll get two different instances from your two requests.

If that's not what you want, you may want to investigate putting MultiLogger in 
common/lib - see the TC5.5 documentation about the classloader hierarchy.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how to integrate Shibboleth and Tomcat

2008-11-05 Thread Peter Crowther
 From: Lucia Moreno Lopez [mailto:[EMAIL PROTECTED]
 I need to integrate Shibboleth and Tomcat.
 We are using tomcat 5.5.23, mod_jk connector 1.2.23 and the reference
 implementation of Shibboleth version 2.0.

Do you *need* httpd in front?  If not, how about 
http://www.guanxi.uhi.ac.uk/index.php ?  It's a pure Java Shibboleth 
implementation.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread Peter Crowther
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 I am running tomcat server on Redhat linux. Tomcat server 5.

There' a 5.0 stream (no longer maintained) and a 5.5 stream (maintained).  The 
third version number then becomes significant.  Could you give us any more of 
the version numbers, such as 5.0.26?

[...]
 The only thing i see that has changed on the server is that
 up2date ran october 29th and updated a bunch of stuff.

Ah.  The machine doesn't have a standard Tomcat install on it, I think.  I 
suspect you'll have more initial luck posting on a RedHat list.  They 
distribute a re-packaged version of Tomcat that puts a lot of things in very 
odd places compared to the default installation, and few people here are 
familiar with it.

That said, if you can find out where the Tomcat server's log files have been 
put, I'd strongly suggest looking in there for errors.  If you can then post 
the errors here, we might be able to help.  I'd love to suggest possible file 
names, but the repackagers may have changed those as well.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread Peter Crowther
 From: djbowen1 [mailto:[EMAIL PROTECTED]
 I have the catalina.out and the catalina.date logs.which one is more
 usefull?

The .out file typically has any errors in it.  The logging format is similar to 
many other applications.  I'd suggest looking through that for error messages - 
a swift hunt for xception in your text editor of choice is often remarkably 
informative!

To find the most recent set of exceptions, go to the end of the file and search 
backwards for startup.  YOu should find a startup complete line.  Anything 
more recent than that is after the webapp started, but I suspect you'll find 
problems before that - look backwards in the file for things that look 
problematic.

If you're new to Java and Tomcat, one piece of advice: post *full* stack traces 
of any exceptions you need more information about.  The headline exception 
often has nested exceptions inside it, and it's often the innermost one (and 
hence the bottom one on the stack trace) that's the most infomative one.  Along 
the lines of:

FubarException: Couldn't start application
[... trace...]
-- nested exception --
SqlException: Couldn't connect
[... trace...]
-- nested exception --
SocketException: Connection refused
[... trace...]

As you can imagine, it's a lot easier to diagnose the problem with all of that 
than if we just see the FubarException!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat webapp stopped working, please help

2008-11-14 Thread Peter Crowther
 From: djbowen1 [mailto:[EMAIL PROTECTED]
[...]
 INFO: The Apache Tomcat Native library which allows optimal
 performance in production environments was not found

Not a problem.

 /usr/java/jdk1.6.0_01/jre/lib/i386/client

That's quite an old 1.6.  If the app was working before, and this isn't a 
recent update from RedHat, keep it - but I'd update to a more recent stable 
version where possible.  There have been some comments on this list that the 
latest (_10) isn't that stable, but don't take it as gospel!

 INFO: Starting Servlet Engine: Apache Tomcat/6.0.10

That's not a Tomcat 5.0.  Were you expecting it to be?

5.x and 6.0 are *very* different - if RedHat has pulled a 5.x out from under 
your webapp and put a 6.0 in, I would expect your app to fail.  It's a little 
like pulling out Apache httpd 1.x and putting 2.0 in, and expecting everything 
to work... ain't going to happen!

[...]
 INFO: JK: ajp13 listening on /0.0.0.0:8009

Are you connecting to Tomcat via Apache httpd?  I assume not, as you're talking 
about port 8010.  If not, once all this is fixed, you might want to edit your 
conf/server.xml file (wherever RedHat have put it!) and comment out the 
Connector that's on port 8009.  Don't do it now, on the principle of changing 
one thing at once!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat request processing gets stuck

2008-11-19 Thread Peter Crowther
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 acceptCount=200 just means that the socket will accept 200
 clients /in
 addition/ to those currently being served by RequestProcessor threads.
 The only way to see those waiting clients would be to query
 the socket itself (maybe only available at the C-library level?).

Rarely even that - these connections are held in limbo in the kernel.  There 
are sometimes ways of examining the next request in the queue (to see whether 
you want to accept it or reject it), but I'm not aware of a general way of 
examining *all* requests in an accept queue.  I'd love to hear about any that 
exist, as in the past I've needed to monitor these!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat virtual host

2008-11-20 Thread Peter Crowther
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 I deployed my webapp svn.war on webapps directory of tomcat 6.
 I configured localy a virtual host with tomcat 6, but it does
 not work.
 This url works :
 http://localhost:8080/svn/

 But when i use the virtual host, it does not works :
 http://mysvn:8080/

 This is a part of server.xml :

 ...
 Host name=mysvn
 appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false
 xmlNamespaceAware=false

Valve
 className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 prefix=mysvn_log. suffix=.txt
 pattern=combined
 resolveHosts=false/
 /Host
 ...

What Connectors do you have configured?  What does not work - *exactly* what 
are the symptoms?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat virtual host

2008-11-20 Thread Peter Crowther
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 When i tape http://mysvn:8080/ in browser to access to my web
 application, i have this :
 Internet Explorer cannot display the web page
 but when i tape http://localhost:8080/svnrepository; i access
 correctely to my application.
 Find file attached server.xml

 any idea ?

I agree with the other response: rename your war to ROOT.war, so that it is the 
root web application.

By the way, it is worth changing only one thing at once in your URL when 
testing.  You are changing two.

Does http://localhost:8080/ work?

Does http://mysvn:8080/svnrepository work?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache HTTP + Tomcat + SSL

2008-11-21 Thread Peter Crowther
 From: Alexander Diedler [mailto:[EMAIL PROTECTED]
 What ist he best-practice to use SSL with a Frontend Apache
 Webserver and a mod_jk connected Tomcat? Define the SSL in
 Tomcat or in Apache Frontend?

In Apache httpd.

 Has the SSL functions to be
 enabled on Tomcat?

No.  In a pure mod_jk system, Tomcat will only have a mod_jk connector - no 
HTTP or HTTPS connectors at all.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5.5.20 security issue

2008-11-24 Thread Peter Crowther
 From: Serge Fonville [mailto:[EMAIL PROTECTED]
 Just a few questions off the top off my head:

... and to add another one:

 What is your OS

What is your Java virtual machine?  In particular, are you using a non-Sun JVM 
such as GCJ?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: GPGPU and Tomcat

2008-11-27 Thread Peter Crowther
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Frequently, webapps do relatively minor processing, with the
 brunt of the work being performed in a data base engine
 (usually running on a separate system).

To me, the database is one of the more interesting places to use GPUs.  Half a 
gigabyte of very fast RAM and some high speed simple processors is a good place 
to put some critical data that you want to search.  Because of the architecture 
of a typical GPU, it seems unlikely that it's the best place to process complex 
threaded code, even if (say) the JVM could make use of it.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: Manager app language

2008-11-28 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Caldarale, Charles R wrote:
  Is the server named after a legendary British king, the
 Kinks album, or the HHGTTG character?
 HHGTTG.
 We also have marvin, ford, dent, zaphod, trillian, fenchurch,.. even a
 slartibartfast (wich also has an alias, for evident reasons).
 marvin is an old Sun, which has been making strange complaining noises
 for a while now, unsurprisingly.

Zaphod: Computer...

Eddie: Hi, this is Eddie, your shipboard computer.  I hope you're having a 
great day!

Zaphod: ... yeah.  Er... computer...

Eddie: Call me Ed, please, if it'll help you relax.

Zaphod: ... look, can you just tell me the probability of everybody on the 
Tomcat mailing list being able to get the right combination of JVM, Tomcat 
version, lack of repackaging, AJP connector options and logging configured?

Eddie: Oh, that's an easy one!  Two to the power of infinity minus one... and 
rising!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: jvm cowardly refuses to print a thread dump

2008-12-01 Thread Peter Crowther
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 That's ugly.  Sounds like either the OS failed to deliver the
 signal, or the JVM is locked up internally (probably the
 latter).

That's rather what I was reckoning.  I've had signal delivery fail before if 
all the threads were stuck in kernel code via system calls.  This was SunOS 
3.x, which shows my age - NFS was kernel-mode at that point, which made for 
interesting times if file accesses got stuck.  Processes not responding to a 
kill -9 was a new one on me!

Might the code have ended up with all threads stuck in OS calls?  It feels a 
little unlikely, as I assume the JVM keeps a couple of threads for itself...

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: mixed html and jsp site using ProxyPass

2008-12-03 Thread Peter Crowther
 From: David Goodenough [mailto:[EMAIL PROTECTED]
 I have a site which is a mixture of html (and a bunch of images and
 flash and other such stuff which came in from the web designer) and
 a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
 5.5, using ProxyPass statements with ajp in the Location tag.

Is there any reason for such a complex setup?  Tomcat will quite happily serve 
the static content itself.  You could:

1) Put all the content in the same directory for Tomcat to serve, keep Apache 
httpd, but all your content goes through Tomcat-httpd-user;

2) Put all the content in the same directory for Tomcat to serve, remove Apache 
httpd, serve the content directly through a http Connector in Tomcat.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] JK Connector problem

2008-12-04 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Folder/directory/file names with spaces in them are evil, and
 should be
 forbidden in any new OS, by unanimous decision of the UN Security
 Council, US Supreme Court and EU Commission.  The developers who first
 allowed this should be tracked down and named publically.  Their boss
 who approved this should be fired (he's probably already
 retired though).

As I've commented before, it's at least as old as UNIX, probably older.  If you 
try to stop the accounts team naming their Excel files Budgets from Margaret 
2008-2009 you may find your office surrounded by a mob of pitchfork- and 
torch-waving users chanting give us back our readable filenames.  Overall, I 
suspect more hours have been saved by humanity having readable filenames* than 
lost by developers having to work round the problems.

 The Apache group should stop installing their Windows versions by
 default in a directory containing the silly names Apache
 Group and/or
 Program Files in the path.  How many useless programming
 and debugging
 hours does it have to cost before this issue is put to rest ?

Program Files is mandated by Microsoft, lobby them.  I partially agree that 
Apache Group is a poor name for a directory; it does, at least, force 
implementors to face up to the problem early, rather than facing a surprise 
later.  This may or may not be a good thing overall.

- Peter

* 
ReadingSpeedGoesUpWhenTheSpacesAreInTheCorrectPlace.HowLongHasItTakenYouToReadThisComparedToYourUsualReadingSpeed?Andhowmuchslowerisitwhenthereisn'tevencamelcasetohelpyoudistinguishwordbreaks?
 OK, now multiply that by all filenames read by all users over all their time 
interacting with their computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat MySQL Server Configuration

2008-12-16 Thread Peter Crowther
 From: Carl Crawford
 Someone gave me the attached configuration suggestions.

Note that this list strips attachments.  Could you host the image somewhere and 
post a link?

- Peter

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



RE: Installation apache tomcat

2008-12-19 Thread Peter Crowther
 From: Vida Luz Arista [mailto:vida.ari...@ideay.net.ni]
 I downloaded the version apache-tomcat-6.0.18-src, I follow
 step by step the
 instructions, when I executed ant download, the following erro occur



 BUILD FAILED

 /opt/apache-tomcat-6.0.18-src/build.xml:701: The following
 error occurred
 while executing this line:

 /opt/apache-tomcat-6.0.18-src/build.xml:771: Compile failed; see the
 compiler error output for details.

OK... so what does the compiler error output say?

Taking a step back, why are you compiling from source rather than downloading a 
binary?  Tomcat is pure Java, so provided you're running a decent Java virtual 
machine (the Sun one - *don't* use gcj to run Tomcat) the binary should work on 
your platform.

- Peter

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



RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread Peter Crowther
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.

32-bit or 64-bit OS?

 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m

You probably want to make -Xms and -Xmx the same.  There's no point fragmenting 
the heap if you don't need to.

 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?

You are the only person who can answer that question, by monitoring and 
profiling your application.  Performance is often 1% Tomcat and 99% application.

 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@vopium ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335

Looks healthy enough.

 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.

Why are you running Apache httpd as well as Tomcat?  Because the book told me 
to or because you have a real need for it?

- Peter

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



RE: tomcat - OutOfMemoryError

2005-11-02 Thread Peter Crowther
  From: Anna Seekamp [mailto:[EMAIL PROTECTED]
  The jvm (1.4.2 Suse-Linux) starts with:
   -server -Xmx1500m -Xms1500ms
 
  We have 9 webapps.
  One webapp has 50% load.
  The other share the rest.
  If we put 7 webapps online, we
  ran into problems. After a few hours we get OutOfMemoryErrors. The
  tomcat crashes an we get no response. But there isn't a 
 heavy load (
  1). There isn't OutOfMemory (the last Runtime.freeMemory(): 
 1,3 GB) The
  Thread-Dump of the crashed server is unspecific. Most threads are
  waiting on findBundle in CoyoteConnector.createRequest().
 
  Are there any suggestions. Everything is welcome!
  I don't know where to look. Threads, Sockets, Memory (is 
 there a problem
  with Runtime.freeMemory)

1. Check the PermGen usage - are you slowly loading more classes in
until the default (64M I think) PermGen is exhausted?
Runtime.freeMemory doesn't take into account the separation between
PermGen and the other generations.

2. Java has a distressing habit of throwing out of memory errors when it
runs out of any resources, including file descriptors or sockets.
You'll have one heck of a log file to analyse, but as a last ditch
effort I'd try running a system call tracer on the process and look for
failed calls.

However, I'm a novice in these areas.  I've no doubt you'll get better
advice from those more experienced with large production apps.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: Google Map of active users on this list

2005-11-04 Thread Peter Crowther
 From: Luis Torres [mailto:[EMAIL PROTECTED] 
 Very nice work. Any plans to release details on how you did 
 it?

One could do something similar by:

- Subscribe to the list.

- Archive the messages in (say) mbox format.

- Write yourself a little script that pulls out message headers, in
particular the From: and Received: headers for each message (don't
forget to recombine multi-line headers before you do this).

- In each of the Received: headers, look for IP addresses or hostnames
(a couple of regular expressions should do 99% of cases).  Discard any
lines where this fails.

- Where you have hostnames, try to resolve to IP addresses.  Discard any
you can't resolve.

- Using one of the location services, for each message, in order of
first Received header to last, pass in the IP address and see if you get
a match back.  If you do, that's the location.  If not, keep trying
until you run out of header lines or find a match.  If you want to be
flash about this, maintain a 'stop list' of IP addresses of known mail
gateways that are just too general to be useful.

- Extract the sender's mail address and name (if present) from the From:
line and add a record to your database with name, email address, and
location.

There are refinements, but I suspect that would work.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SSO question

2005-11-11 Thread Peter Crowther
 From: Klotz Jr, Dennis [mailto:[EMAIL PROTECTED] 
 Is it possible using LDAP, whether it is using custom JAAS code or a
 third party product such as Vintela's VSJ
 (http://www.vintela.com/products/vsj/), to do the following:
 
 ... prevent, control or limit the simultaneous active usage 
 of the same
 user id. The number of simultaneous active sessions shall be settable
 per user id.
 
 The show stopper for me is whether I can inform the LDAP 
 server when the
 user has logged out. The default JNDIRealm does not, to my knowledge,
 provide that ability. JNDIRealm is just for authenticating and role
 retrieval.

You *could* do something like this by storing a custom attribute in LDAP
and incrementing/decrementing that when a user logs in/out.  I'm not
sure where it'd get you, though, given users' distressing habits of
closing browsers without logging out of an app and hence leaving the
session open for a period.  That sounds like it's come straight out of a
requirements doc.  I'd ask who wrote the requirements doc, what's the
business reason behind that requirement, and can it be accomplished
another way?

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat and linux system users

2005-11-14 Thread Peter Crowther
 From: Kosarev A.V. [mailto:[EMAIL PROTECTED] 
 Whether  I  can  configure  tomcat  so that for each context worked on
 behalf of various linux system users?

Tomcat runs in a single Java virtual machine, and that entire JVM
process runs under a single user ID.  To my knowledge (I'm sure others
will correct me if I'm wrong), there is no way to change the user ID
depending on the context in which a request is processed.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: advice on auto logout servlet

2005-11-15 Thread Peter Crowther
 From: Mark [mailto:[EMAIL PROTECTED] 
 So there is no way to provide this functionality using just 
 servlets :(

You could sort-of hack something together using meta-refresh directives
on the pages so that the browser knew to refresh the page just as the
server timed out the session, but you need to tell the browser
*something* in order for it even to request the page from the server.
HTTP is a pull technology, not a push technology; a browser has to ask
for content.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: stress test on tomcat

2005-11-17 Thread Peter Crowther
 From: William Mok [mailto:[EMAIL PROTECTED] 
 java.net.SocketException: Too many open files

What operating system?  Naively, that looks like the good ol' UNIX limit
on the number of file descriptors available to a process - if so, read
up on how to change the descriptor table size for your kernel.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Package naming

2005-11-18 Thread Peter Crowther
 From: Ajay Arjandas Daryanani [mailto:[EMAIL PROTECTED] 
 i've written a authorization filter for Tomcat. The question is: is
 there any convention about package naming? Can I use, for example,
 'package es.mydomain.myname;'? Or it's better to use 'package 
 filters;'?

The conventional Java approach of using your domain name to ensure the
uniqueness of package names applies just as much in Tomcat as everywhere
else.  I've only needed to break that once, when I was hacking at some
Tomcat internals and needed access to some classes that only had package
access.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: heap size problems (speed) [2]

2005-11-29 Thread Peter Crowther
 From: Cristian S [mailto:[EMAIL PROTECTED] 
 Frankly I have no ideea what's the point of loading almost 
 400M of data in memory in a HashMap.
 Maybe this very approach has a design flaw when it comes to JAVA.

If it's expensive to generate / load that data and the app has tight
response time restrictions, and if there's enough RAM to keep the data
in main memory without paging, and if the heap is large enough to allow
other processing to take place, and if the map is set up so that there
are few collisions, then the map is a very sensible approach.

That's a lot of ifs.

I'd try the following:

- Check for paging traffic on your server.  Are other apps causing
Tomcat to be paged out, leading to expensive disk I/O when the map is
accessed?

- Follow Chuck's suggestion to check for garbage collection activity.
If possible, try increasing the Java heap size (and check for paging
activity on the server).

- Talk to your dev team to find out how well or badly the map is keyed.
A HashMap with a lot of entries can be slow if the hash for the key is
poor.  I'd expect to see high CPU usage *or* high paging activity if
this was the case, as the server will either spend a lot of its time
hashing or have to load a lot of pages from backing store to examine
them for hash keys.  Neither is pleasant.

Java HashMaps aren't inherently slow; something's poorly configured.
Those are a few guesses, no more than that.  I also suspect it's *not*
your CPU cache size.  Yes, going to RAM is slower than loading from a
processor cache line, but it's still a *lot* faster than retrieving a
row from the database.  I'd be looking elsewhere.  Intel have spent a
lot of money making people think that the CPU is the only contributor to
overall system speed; RAM and disk I/O speeds play a much larger part
these days.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is TC 5.0.28 forward compatible with Java 5

2005-12-05 Thread Peter Crowther
 From: Satish MG [mailto:[EMAIL PROTECTED] 
 I am using Tomcat 5.0.28. Now I have to port the Tomcat to
 Java 5.0. Even though Tomcat 5.5.X is Java 5 compatible with Java 5,
 I wanted Tomcat 5.0.28 on Java 5. So I wanted to Know whether Tomcat
 5.0.28 is compatible with Java 5. If not Which version Of 
 Tomcat 5.0.X is compatibl?.

I've been running a small Tomcat 5.0.28 installation on Windows, first
on various flavours of 1.4.2 and now on 1.5.  I've not seen any problems
running Tomcat 5.0.28 on Java 5, but - to be clear - it's a small
installation and is not heavily loaded.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Howto delete a file with a servlet???

2005-12-07 Thread Peter Crowther
 From: Carl Olivier [mailto:[EMAIL PROTECTED] 
[...]
   if (!toDel.delete()) {
   Thread.sleep(1000); //try get around file lock/release
 issue? (? Stab in the dark maybe!)
[...]

Heh.  Is someone working on Windows here?  There's a known issue that
the JVM holds onto file handles until a garbage collection, which
prevents deletion if the file has recently been used.  Instead of
sleeping, you may want to hint to the JVM about a garbage collection,
then retry.  Not an issue on UNIX as unlink() works with outstanding
file descriptors referencing the file, by design.

This recently cost me half a day of debugging effort.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: UnsupportedClassVersionError

2005-12-08 Thread Peter Crowther
 

 -Original Message-
 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED] 
[...]
 java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main
 (Unsupported major.minor version 49.0)

I suspect the tools.jar in your classpath is from Java 1.5, not Java
1.4.  Certainly *something* you're trying to load has been compiled
using 1.5.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Top posting (was RE: question)

2006-01-03 Thread Peter Crowther
 From: Carl Olivier [mailto:[EMAIL PROTECTED] 
 A lot of people on this forum Top Post.
 
 Is this really such a big issue?

I can sum it up with the following quote:

-- snip --
A: Top posting.

Q: What's the most confusing thing about mailing list messages?
-- snip --

If I'm reading through list traffic, I cannot remember the context of
each thread, and that context may jump about as different posters
respond to different parts of a thread at different times.  *Carefully
trimmed* context, followed by a response, helps me get up to speed and
respond more quickly and possibly more accurately than I otherwise
would.  However, speaking personally, I'd rather somebody top-posted
than left ten pages of mangled context in place and added a line at the
bottom.

A message to a mailing list will get read many more times than it is
written.  Overall, time is saved if the poster makes the effort to
create a clear, communicative message.  However, the poster's time is
typically saved by not doing so, and an individual will usually only do
something if it is worthwhile to *them* rather than to the community at
large.  That's life.  I'd like to think that if I reliably construct
clear messages, regulars on the list may choose to respond to me where
they wouldn't choose to respond to a messy, mangled message*.  However,
I've not seen or done any studies to check whether this might be the
case.

- Peter

* Interested parties may wish to check the game theory literature for
repeated rounds in games, of which the most famous is probably the
repeated Prisoner's Dilemma.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Top posting (was RE: question)

2006-01-03 Thread Peter Crowther
 From: George Sexton [mailto:[EMAIL PROTECTED] 
 Since most people use threaded mail readers that go from oldest to newest, 
 this isn't much of a problem for most people.

... I'm sorry?  Which 'this' were you referring to here?  It wasn't in context, 
so I'm afraid I can't tell for sure.  I'll have to guess - another issue with 
top posting.

[scrolls down, reads his entire earlier message]

Ah.  After some research, I assume it was:

   that context may jump about as different posters 
  respond to different parts of a thread at different times.

It would appear that 'most people' have better memories than I do, then - which 
is fair enough.

 You should look for a better mail reader.

I've used plenty of different mail and news readers over the years.  I've not 
yet found one that reminds me of the context when I have jumped back (say) five 
messages in a thread, rather than (say) eight.  As always, I'd welcome any 
recommendations!

   - Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: 5.0.28 and 64 bit and Libc

2006-01-04 Thread Peter Crowther
 From: Shawn Snodgrass [mailto:[EMAIL PROTECTED] 
 Having weird install problems need a quick sanity check, 
 version 5.0.28 will
 run on 64 bit architecture right?
 
 Tomcat Version = 5.0.28
 
 Architecture = AMD64
 
 OS = Linux ES 3.0
 
 Libraries = All 64 bit

What JVM are you using?

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using Tomcat 5.5 as a standalone web server

2006-01-10 Thread Peter Crowther
 From: George Sexton [mailto:[EMAIL PROTECTED] 
 I'm running around 700,000 pages a month on a pure tomcat 
 installation with no problems.

Just for interest, George, is that on similar hardware / software to
your benchmark at
http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?page=622.htm
?

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how to suppor 30000 concurrent users

2006-01-12 Thread Peter Crowther
 From: vishwas kharajge [mailto:[EMAIL PROTECTED] 
 howmany concurrent users does tomcat support?

Depends very largely on your webapp.  How efficient is it?  How many
operations per minute is each user making?  Does it require session
state, or can you get away without it?  Can it be clustered?

I strongly suspect that you'll make much more of a difference by careful
construction of your application than you will with Tomcat's overhead.
That said, http://www.theserverside.com/news/thread.tss?thread_id=38377
may be relevant - no doubt others will come up with better links!

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat integegrated with Apache

2006-01-12 Thread Peter Crowther
 From: Rafal Zawadzki [mailto:[EMAIL PROTECTED] 
 Why not use squid?

One view: Why go through another user-level process when you can simply
redirect the socket connections via iptables for fewer CPU cycles and
less RAM?

Another view: squid may be faster at serving static content, so
interposing it could be useful if you suspect that is a bottleneck.
Recent Tomcats are faster than older Tomcats at serving static content.

My view: It depends on your mix of content and your webapp.  In general,
it's not possible to know which is more efficient *in your environment*
without benchmarking it.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: concurrency of users on tomcat

2006-01-13 Thread Peter Crowther
 From: vishwas kharajge [mailto:[EMAIL PROTECTED] 
 Our requirement is to provide 200 concurrent hits per second
 There are 300K users registration on the server
 For this what is the requirement?

Hiring someone who can do the calculations.

 How much bandwidht it require for giving above concurrency?

If you are serving (eg) the old homepage to www.purple.com, around 200 x
1kbyte/sec - call it 2Mbit/s.

If you are serving (eg) large PDFs or images, very much more than that.

It is *impossible* for anyone on this list to answer that question
without detailed knowledge of your application.  If you're not
comfortable doing the calculation yourselves, hire someone who is.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5 ssl w/multiple IPs

2006-01-15 Thread Peter Crowther
 From: Chris Pat [mailto:[EMAIL PROTECTED] 
 do I 
 really need to a dedicated NIC for each of the static 
 IPs I want run SSL sites on?
 
No.  The configuration mechanism depends on your OS, however.
 
Windows boxes can have at least 20 IP addresses bound to one adapter.  Get the 
adapter properties, double-click TCP/IP, click the Advanced button, and fill in 
pairs of IP address and subnet mask.
 
Linux boxes can have multiple IP addresses bound to 'virtual' adapters eth0:0, 
eth0:1, eth0:2... up to (presumably) some kernel limit.  These virtual adapters 
are then each configured separately.
 
Haven't tried it on other OSs, so don't know the precise mechanism.
 
- Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Windows XP SP2 - design question

2006-01-20 Thread Peter Crowther
 From: Snow white [mailto:[EMAIL PROTECTED] 
 We use a
 cookie to maintain the state that determines what is sent to the
 client, and we update the cookie in every response of this URL
 request.

So, presumably, your app already breaks if a user uses the 'Refresh'
button on the page, even pre-SP2?

 This is an old application that has been working fine for many years,
 so I would like to change it minimal. Let me know if anyone has any
 thoughts to handle this.

You'll have to modify your app.

One approach would be to have one change of state going into the page
that requires the control, and another once you know the control is
active - but that's difficult to do if the control stays installed
between sessions.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: writing files with a web application

2006-01-23 Thread Peter Crowther
 From: SOA Work [mailto:[EMAIL PROTECTED] 

Check the Servlet Spec (version 2.4 is at
http://www.jcp.org/aboutJava/communityprocess/final/jsr154/
) for questions of this kind.

From memory in both cases (so treat with caution):

 1.) am I allowed to call main methods or programms in my web 
 applicatio?

If you wish to be spec-compliant, no.  However, it should work depending
on Tomcat's security settings.

 2.) am I allowed to write files on the disk from within an 
 web application? If I am, something went wrong while trieing ;-)
 Can i write anywhere or have I to write to my application dir 
 or to temp dir or something.


If you wish to be spec-compliant, you can only write to a temporary
directory that you ask the context for.  However, this may or may not be
enforced depending on Tomcat's security settings.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Starting Tomcat

2006-01-25 Thread Peter Crowther
 From: Hooper, Paul [mailto:[EMAIL PROTECTED] 
 I am a new Tomcat user and am having some difficulties starting the
 server
[...]
 Using JRE_HOME:   /export/home/liondev/software/java_1.4.2_10

5.5 needs *either* a Java 1.5 VM *or* the JDK 1.4 Compatability Package
available from the download links at
http://tomcat.apache.org/download-55.cgi - this may be your problem.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: From Java to C#, ASP.NET [Off Topic]

2006-01-30 Thread Peter Crowther
 From: Jess Holle [mailto:[EMAIL PROTECTED] 
 Nice terminology quandry that the app server marketeers have 
 dug for us.
 
 They've painted a world of J2EE == EJB and J2EE == the only (good) 
 way to do Java in the enterprise and transitively EJB == the only 
 (good) way to do Java in the enterprise.

EJB implies J2EE, but the reverse implication does not hold.  That
recognition is enough to defeat the marketing spin.

- Peter

P.S. So far to day, I've spent about half the day developing in C# and
ASP.Net, and the other half developing in Java and JSP.  I find them
about as productive as each other, and neither as productive as one
would ideally like.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Memory Management between different webapps

2006-02-02 Thread Peter Crowther
 From: Roel De Nijs [mailto:[EMAIL PROTECTED] 
 I have a tomcat with ± 10 web-applications. Is there a 
 maximum or some guidance in the number of web-apps you can 
 put in one instance of Tomcat?

Tomcat itself uses relatively little memory per-webapp (a few megabytes, 
depending on version).  The major load comes from the number of simultaneous 
connections (and hence the size of the thread pool) and, even more, from how 
the webapps are written.  You're in the best place to evaluate these.

 And i start tomcat with the options -Xmx1024m -Xms1024m -- 
 is there some information or articles about how tomcat is 
 spreading all this memory over the web-apps? Is this 
 completely random, or first come first gets? What if a 
 web-app is called for the first time and all possible memory 
 is allocated to other web-apps?

It's all one big object memory, shared between all the webapps.  Roughly (there 
are many more nuances than this): whenever it gets full, the garbage-collector 
is run.  If there's not enough space to allocate an object after the garbage 
collector has run, you get an OutOfMemoryError.  So memory will be allocated as 
your webapps request it (and potentially returned to the Java VM's pool of free 
memory some unknown time after they stop using it); if a webapp is called for 
the first time and there's not enough space to allocate the memory required for 
its startup, you'll get an OOME.

To my knowledge, there is no way of partitioning memory inside a single JVM 
such that the amount available to a given webapp can be restricted.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Port 8443 won't become active

2006-02-02 Thread Peter Crowther
 From: Jeffery G. Summers [mailto:[EMAIL PROTECTED] 
 Our webserver is an IBM P615C AIX 5.2 box.
 
Whose JVM and what version?
 
- Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: problems running Tomcat

2006-02-08 Thread Peter Crowther
 From: Riccardo Roasio [mailto:[EMAIL PROTECTED] 
 it seems to start but if i try to see http://10.2.254.103 ( 
 the address 
 of the machine) from a browse  it says impossible to connect...

Try http://10.2.254.103:8080 - port 8080 is the default port on which
Tomcat starts, not port 80.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: WAR problems

2007-10-25 Thread Peter Crowther
 From: Demetris Zavorotnichenko [mailto:[EMAIL PROTECTED]
 I am having problems running .WAR applications.

 I have Tomcat 6 through IIS

 Is there something I should know about this ?

Divide the problem.  If you use a direct connector in Tomcat (i.e. contact 
Tomcat directly, not through IIS), does it work?  If yes, the problem is with 
IIS or your JK connection.  If no, the problem is with how you're deploying the 
WAR.  Either way, we will need much more information about the error you are 
getting before we can help you.

What error are you getting when you get problems running .WAR applications?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: What do I do with a heap dump? (OOM Permgen)

2007-11-02 Thread Peter Crowther
 From: Greg Vilardi [mailto:[EMAIL PROTECTED]
 How do I figure out what is in that 440kb per deployment?
 What should I be looking for?

As far as I know, public enemy #1 for eating PermGen space is still developers 
using the Singleton pattern in their code and not having listeners to null out 
the singleton instance when the webapp is undeployed.  I've no doubt I'll be 
yelled at by other list members if Java 6 or Tomcat 6 have dealt with this - 
I'm still on 5.5!

A description of the problem (there are plenty of others on the list over the 
years, and this may not be the best) can be found at:
http://readlist.com/lists/tomcat.apache.org/users/3/19056.html

You've probably seen the following two general links, but just in case:
http://tomcat.apache.org/faq/memory.html
and from that...
http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: speed up the server

2007-11-09 Thread Peter Crowther
 From: tbt [mailto:[EMAIL PROTECTED]
 it was working very fast before being deployed. About 30 people login
 simultaneously to this application. Once this happens the
 application is very slow.

How many concurrent users do you test with, before you deploy?  30?  Or one 
developer checking the functionality using a web browser?

What happens if you use a tool like JMeter to generate a load on your test 
server that's similar to the load on your real server?  Is the test server fast 
or slow?  If the test server's fast, the issue is probably to do with the 
configuration of the production server.  If the test server's slow... my guess 
is that the issue is to do with your application :-).

Have you tried:

- Profiling your application to see whether any parts are particularly slow;

- Checking the load on the mysql database to see whether you're saturating the 
database with queries, or whether concurrency issues are limiting the 
throughput on the database;

- Running the Performance Monitor from Administrative Tools and seeing whether 
you're short of CPU (sustained CPU load over 80%), RAM (Pages/sec consistently 
high or Memory/Available Bytes consistently below 10% of system RAM) or disk 
I/O (physical disk queue length often greater than 2 per spindle in your disk 
subsystem)?  This will give you a much better clue as to where to start looking 
for the problem.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PermGen Out of memory exception

2007-11-12 Thread Peter Crowther
 From: Jim [mailto:[EMAIL PROTECTED]
 PermGen space, on the other hand, doesn't get garbage
 collected, so you
 need to ensure you're allocating enough to handle all that your
 application will need.  Unfortunately with the web application
 classloader-system, every time you deploy an application without
 restarting the application server, more PermGen space is eaten up, and
 this is never recovered (not even if you undeploy an application).

Not entirely true.  Modern Java virtual machines perform garbage collection on 
PermGen, but it's remarkably easy to leave a reference lying around that will 
hold a class in memory - which holds the class' ClassLoader in memory, which 
holds all the other classes loaded by that ClassLoader in memory.  Unless you 
have unusually good hygiene rules as you develop, this makes it look like 
PermGen never gets garbage collected!

There's plenty of past discussion on the list on this topic; I've no doubt 
Chuck will reply, but I suggest http://tomcat.apache.org/faq/memory.html as a 
good place to start reading.

It may not be your webapp's code that's at fault, by the way.  There are plenty 
of third party libraries that don't clean up after themselves properly 
(including some I've written, I'm ashamed to admit).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best Linux distribution

2007-11-15 Thread Peter Crowther
 From: Andrew Hole [mailto:[EMAIL PROTECTED]
 In your opinion what is the best LINUX distribution for a server with
 an instance of Tomcat and an J2EE application of medium load?

The one with which your organisation already has experience.  Familiarity and 
ease of admin is king here.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Ooh, shiny! (was RE: Best Linux distribution)

2007-11-16 Thread Peter Crowther
 From: Warren Pace [mailto:[EMAIL PROTECTED]
 Point taken.  We ran a Vax until last year...

 On Nov 15, 2007 10:52 AM, Steve Ochani [EMAIL PROTECTED] wrote:
  If everyone based their decisions solely on that criteria
  we would be all using pdp-11s.
[...]

I think some companies are rather gung-ho about upgrading to the shiniest new 
kit (and OS) at every opportunity.  There's a line to tread between leaving 
upgrades so long that you can't maintain the system, and upgrading so regularly 
that there's constant churn and disruption.

Unfortunately too many IT teams that I've encountered tend towards the Ooh, 
shiny new toy! and My server's newer than your server views of the world.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: java.lang.OutOfMemoryError: PermGen space

2007-11-16 Thread Peter Crowther
 From: loredana loredana [mailto:[EMAIL PROTECTED]
 I'm having some problems figuring out what webapp is causing
 this problem.

It's not simple!  However, the main use for PermGen is storage for classes.  Do 
you have any webapps that dynamically generate classes?  Is it happening when 
you redeploy a webapp, or randomly on a production server?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Initial Setup: The type java.lang.Object cannot be resolved.

2007-11-16 Thread Peter Crowther
 From: Ian Pushee [mailto:[EMAIL PROTECTED]
 I am running a debian install of tomcat5.5, using
 java-gcj-compat-dev (a free jdk replacement).

Oh, dear.  Get a real JDK (the Sun one is fine), and a real Tomcat from 
http://tomcat.apache.org (the tarball is fine).  GNU java is a nice toy, but we 
get regular reports of problems when people try to use it in production.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question about multiple SSL at same machine

2007-11-29 Thread Peter Crowther
 From: Alex Florentino [mailto:[EMAIL PROTECTED]
 I have windows colocation and have one site that have ssl and
 it works fine,
 now I have another site and need set up another ssl, I think
 that change ssl
 port for second site is good solutions but my client don't
 like this idea,
 then I need set up another ip.. but I not sure how I make it...

Ask your hosting provider to assign you another IP address.  If you're behind a 
NATted router, they'll tell you what the new internal address is; if not, 
they'll tell you the new external address.  Add that as a second IP on your 
Windows box, then bind port 443 on the new site to it.  Also, you or your 
hosting/DNS provider will need to set up a DNS entry for the new site.

Most providers will charge you for extra IP addresses, and some more for the 
setup.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat5.5 postgresql, security oh my

2007-12-03 Thread Peter Crowther
Exactly which Tomcat version?
What doesn't work?  What error do you get, under what circumstances?

- Peter

 -Original Message-
 From: Chris Baty [mailto:[EMAIL PROTECTED]
 Sent: 03 December 2007 13:37
 To: users@tomcat.apache.org
 Subject: Tomcat5.5 postgresql, security oh my

 Hi all,
  I'm trying to get Tomcat5.5 working with Poestgresql.  I know I got
  everything configured right because if I turn Tomcat
 security off, in /
  etc/default/tomcat, everything works fine.  My site directory
  is at /usr/share/tomcat5.5-webapps/ROOT/myapp.  I want security on so
  this is my /etc/tomcat5.5/policy.d/02debian.policy file:

  // These permissions apply to all JARs from Debian packages
  grant codeBase file:/usr/share/java/- {
permission java.security.AllPermission;

 };


 //Driver location
  grant codeBase file:/usr/share/tomcat5.5/common/lib/- {
permission java.security.AllPermission;
  };


 grant codeBase file:/usr/share/tomcat5.5-webapps/ROOT/myapp/- {
permission java.security.AllPermission;
  };


 grant codeBase file:/usr/share/ant/lib/- {
permission java.security.AllPermission;
  };


 It doesn't work so could someone tell me where I'm going as stray?
  Thanks.
  Chris





 __
 __
 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat5.exe increasing memory allocation

2007-12-06 Thread Peter Crowther
 From: Stefano Martines [mailto:[EMAIL PROTECTED]
 I am running Tomcat 5.0.28 in a production environment.
 It has the default settings you get from the initial installation.
 The Tomcat5.exe process allocates 250 MB memory right now and
 it is increasing from day to day.

 What is the reason?

Almost certainly: the webapp you are running has one or more memory leaks.  
There are users on this list running Tomcats for months on end with heavy load, 
no restarts and no increase in memory usage, so it's unlikely to be Tomcat 
itself.

 How can I stop the increase of memory allocation?

Get whoever created the webapp to find and fix the memory leak(s).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4.1.31 crashing with memory errors, crashing with no errors and shutting down cleanly without manual intervention

2007-12-06 Thread Peter Crowther
 From: Sean Carnes [mailto:[EMAIL PROTECTED]
 *We are having an issue with the tomcat service crashing
 version 4.1.31,
 sometimes with these memory errors and sometimes not.  We
 have a backup but
 once the load moves to that server the backup crashes also almost
 immediately after the load balancer switches.  This has
 happened multiple
 times to us over the past few days with no changes made to
 the server, just a slight increase in load.

Looks like that slight increase in load has tipped you over from being 
just-about-alright to just-about-failing.  If you can't increase heap space, 
can't decrease load and can't alter the application, your only remaining choice 
is to add capacity: install another server and load-balance across N+1 servers 
rather than N servers.  Also remember that if you have plenty of spare RAM on 
the machines hosting Tomcat, and it's just maximum heap size that's the issue, 
then you might be able to run two Tomcat processes (on different ports) on the 
same server, avoiding the need to deploy new hardware.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   3   4   5   6   7   8   9   10   >