RE: Tomcat on Windows: advantages of running as a service?

2005-10-12 Thread Peter Crowther
> From: Tom Burke [mailto:[EMAIL PROTECTED] 
> Sent: 12 October 2005 11:18
> To: Tomcat Users List
> Subject: Tomcat on Windows: advantages of running as a service?
> 
> I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to 
> automatically shut it down & restart it. One way is to control it via 
> shutdown.bat & startup.bat, and run these as scheduled tasks at (say) 
> 3:30am and 3:31am. However, I've noticed that while shutdown.bat will 
> shut it down if it was previously started as a service, startup.bat 
> won't run it as a service, it starts it at a command prompt.

Why not use net stop  and net start  with the
name of the Tomcat service?

> My question is: does this matter? If I'm running on Windows are there 
> any advantages to running Tomcat as a service? Or disadvantages to 
> running from the command prompt?

If you run it as a service: you can ensure it restarts if the machine
reboots unexpectedly for any reason; you can take actions if the service
crashes; and you can run the service as a specified user fairly simply.
If you run from the command line, you have none of these options.

- Peter

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



RE: Form Based Authentication

2005-10-11 Thread Peter Bright

> -Original Message-
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
> Sent: 11 October 2005 17:23
> To: Tomcat Users List
> Subject: RE: Form Based Authentication
> 
> > From: Peter Bright [mailto:[EMAIL PROTECTED]
> > Subject: RE: Form Based Authentication
> > 
> > > >  
> > > > It's point (c) that's proving problematic; there's no way to 
> > > > reauthenticate that I can see.
> > > 
> > > What happens if you just invalidate the existing session?
> > 
> > The user gets logged out.
> 
> Exactly - and they then must reauthenticate with the updated password.
> Isn't that what you want?
> 
No, sorry, it was unclear. I want them to be reauthenticat/ed/ with the
new credentials /automatically/.  Without making them have to
reauthenticate /by hand/.

***
The information contained in this electronic message may be confidential and/or 
privileged. Any unauthorized use, dissemination, distribution, or reproduction 
is strictly prohibited. If you have received this communication in error, 
please contact the sender by reply email and destroy all copies of the original 
message.
***


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



RE: Form Based Authentication

2005-10-11 Thread Peter Bright

> -Original Message-
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
> Sent: 11 October 2005 17:18
> To: Tomcat Users List
> Subject: RE: Form Based Authentication
> 
> > From: Peter Bright [mailto:[EMAIL PROTECTED]
> > Subject: Form Based Authentication
> >  
> > It's point (c) that's proving problematic; there's no way to 
> > reauthenticate that I can see.
> 
> What happens if you just invalidate the existing session?
> 

The user gets logged out.

***
The information contained in this electronic message may be confidential and/or 
privileged. Any unauthorized use, dissemination, distribution, or reproduction 
is strictly prohibited. If you have received this communication in error, 
please contact the sender by reply email and destroy all copies of the original 
message.
***


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



Form Based Authentication

2005-10-11 Thread Peter Bright
Hello,
 
We're currently using form-based authentication (i.e.
FORM) but, as I suspect many people have
found, it's rather limited.
 
One requirement we have is enforced password changes in certain
scenarios.  Currently the approach we were thinking of using is as
follows:
 
a) the realm recognizes that the user has a mandatory password change
flag set, and so gives them a degenerate set of roles; instead of their
true role, they just have a MUST_CHANGE_PASSWORD role.
b) a filter checks for the existance of this role, and if it's found,
forces the user to go to our change password page.
c) the password is changed and the user reauthenticated with their new
credentials, to retrieve their full set of roles.
 
It's point (c) that's proving problematic; there's no way to
reauthenticate that I can see.  Our thinking is that we can resolve the
inability to reauthenticate by creating a custom Authenticator; we could
set some flag in the session to perform on-demand reauthentication,
which would repopulate the list of roles, and everything would be hunky
dory.
 
Is this approach reasonable?  How have other people tackled similar
requirements?  Is there any less contrived way of achieving what we want
with the minimum of Tomcat-specific code?
 
Peter
 

***
The information contained in this electronic message may be confidential and/or 
privileged. Any unauthorized use, dissemination, distribution, or reproduction 
is strictly prohibited. If you have received this communication in error, 
please contact the sender by reply email and destroy all copies of the original 
message.
***



RE: manager outofmemory exception

2005-10-11 Thread Peter Crowther
> From: Enrique Rodriguez [mailto:[EMAIL PROTECTED] 
> What i don't understand is that I "sometimes" get OutOfMemoryException
> when i upload new aplitications to the tomcat using the manager.
> 
> I Profiled my aplication and i don't have any memory issue.

Just to check: Did your profiling include looking at PermGen?

> Is this a manager bug? Why the Total Memory is never higger 
> than 128 MB but I get OutOfMemoryExceptions?

Java always loads classes into the permanent generation (PermGen) and
never (to my knowledge) reclaims that space, even when you unload
classes.  So you may be running out of PermGen space.  You may wish to
increase that.  A search on a Tomcat archive for 'Permgen' should give
you plenty more information!

- Peter

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



apache question

2005-10-07 Thread peter thesing

Hi All.

Perhaps has this question answered in previous mails but i could not 
find it. I would like to put this question to the list...
At home i have 2 webservers running . the one of my partner (iis) on 
port 80 and mine at port 8000. I would like to continue with Apache2 
because it supports php. perl and so on and i have build my website 
around it. What i want to do is to include java server applets using 
jakarta tomcat but without disabling Apache2.


Can this be done and if so how?

What additional configuration needs to be done to let's say httpd.conf
Thanks in advance

Peter

ps

since apache has no means, that i can discover, to answer  this 
technical question perhaps someone on the list can direct me to the 
proper way

Thanks
;P

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



Re: sharing session information across tomcats on different machines

2005-10-06 Thread Peter Rossbach

Use session replication with Tomcat Clustering and mod_jk loadbalancing

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html

Peter


Mark schrieb:


Is there any possibility for tomcats on separate machines to share
session information.  I am looking into load balancing a few tomcats
with an apache in front of them.  In other words, the setup will be

internet <-> Apache(s) <-> Tomcats

Is it possible for this type of scenario to exist, and sesion
information be shared?


Thank you.

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




 







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



RE: Why getting this error?

2005-10-03 Thread Peter Crowther
> From: Ritchie Gillam [mailto:[EMAIL PROTECTED] 
> Thanks Peter!  Can you provide an example please?   Is this 
> defined somewhere in the server.xml file?

You should be able to set JAVA_OPTS, either within
$CATALINA_HOME/bin/catalina (from memory - CHECK! - it's too long since
I had to configure Tomcat on UNIX) or from the command line before
starting Tomcat:

export JAVA_OPTS=-XX:MaxPermSize=128m

Put it in the same place as the options to set your heap size.  If you
aren't already setting the heap size by some means, my guess is that
that'll be the next out-of-memory error you get!

- Peter

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



RE: Why getting this error?

2005-10-03 Thread Peter Crowther
> From: Ritchie Gillam [mailto:[EMAIL PROTECTED] 
> java.lang.OutOfMemoryError: PermGen space

Although your Java virtual machine has enough memory allocated to it,
something (probably the number of classes being loaded, or the number of
times you're reloading the webapp) is causing the permanent generation
to fill up.  This holds class files, for example.  PermGen defaults to
64 Mbytes, no matter how much heap space is allocated to Java.

Increase the memory allocated to PermGen using eg. -XX:MaxPermSize=128m
to double it.

    - Peter

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



[OT] RE: Installing Tomcat 5.5 on Fedora 4 via Yum

2005-09-30 Thread Peter Crowther
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
> I've never understood this fascination for fooling around 
> with 3rd-party
> packaged versions of Tomcat, rather than using the unadulterated
> originals directly from the Tomcat download site.  The 
> process couldn't
> be much simpler: download, unzip/untar, run.  What am I missing?

That some people trust packaged versions for their OS to install more
reliably than un-packaged versions, to have been compiled using a
consistent set of library versions, or otherwise believe them to have
been blessed by the OS maintainers.  In the case of Tomcat, I'm with
you; but that's the exception, as I know it's pure Java.  I would be
cautious of downloading an arbitrary compiled application and trying to
run it on an arbitrary Linux distro, simply because of the library
version problems that plague Linux as much as Windows.

- Peter

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



RE: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Peter Crowther
> From: Peter Crowther 
> That way, Linux can run as a non-root user but still see requests
> arriving on port 80.

Sorry.  Brain fade.  Replace 'Linux' with 'Tomcat' in the above.

- Peter

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



RE: Running Tomcat as Non-Root under Linux listen for port 80

2005-09-27 Thread Peter Crowther
> From: NoKideen [mailto:[EMAIL PROTECTED] 
> Subject: Running Tomcat as Non-Root under Linux listen for port 80
> 
> is there anybody know how to do this ?

Use the port redirection facilities in Linux (the details vary depending
on your kernel, but ipchains or iptables is a good place to start if I
recall) to forward all requests that come in on port 80 to port 8080.
That way, Linux can run as a non-root user but still see requests
arriving on port 80.

    - Peter

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



Re: TC v5.5.12 Broke My Configuration

2005-09-26 Thread Peter Miller
Hi Bob,

I would suggest to try it with a directory name without spaces (Test 1).
Could be that tc5.5.12 handles directories with spaces not
correct/different than earlier versions.

Hth
Peter

Bob Bronson schrieb:

> Hi all,
>
> I've just tried to "upgrade" from TC v5.5.9 to v5.5.12 and it seems my
> (very simple) configuration is now broken.
>
> The following configuration works beautifully under 5.5.9 -- no
> exceptions, no warnings, just utter perfection.
>
> Here's a description of my configuration (BTW, CATALINA_HOME and
> JAvA_HOME are fine, I'm sure they're not causing the problem).
>
> I have CATALINA_BASE set to:
>  C:\Projects\Configs\
>
> Within this "Configs" directory I have two sub-directories: "conf" and
> "Engine_01" like this:
>   C:\Projects\Configs\
>   |
>   +-conf\
>   +-Engine01\
>
>
> Within the "conf" directory I have my "server.xml" and the default
> "web.xml" files. Here is the server.xml contents:
>
> 
>  
>
>
>  
>
>  
> 
>
>
> Notice I am using an engine named, "Engine_01".
>
> In the "Engine_01" directory I have a context fragment file named,
> "ROOT.xml". Here is its one line contents:
>   
>
>
> In my "server.xml" you'll notice I have my appBase property set to
> "..\Sites\Test 1". Here is the "Sites" directory structure:
>
>   C:\Projects\Sites\
>   |
>   +-Test 1\
>   |
>   +-index.html
>   +-WEB-INF\
>   |
>   +-web.xml
>   +-classes\
>   +-root\
>
>
> It's all quite simple, I think. When I run under v5.5.9 it is perfect,
> as I said.
>
> Using the EXACT SAME configuration, running under v5.5.12, I see this
> WARNING and EXCEPTION when I start TC:
>
> WARNING: A docBase C:\Projects\Sites\Test 1\. inside the host appBase
> has been specified, and will be ignored
> Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext
> resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Document base
> C:\Projects\Configs\..\Sites\Test 1\ROOT does not exist or is not a
> readable directory
>at
> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
>
>at
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3777)
>
>at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3948)
>at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>
>at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)
>
>at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
>
>at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
>at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>
>at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>
>at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
>at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>at java.lang.reflect.Method.invoke(Unknown Source)
>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error in resourceStart()
> Sep 26, 2005 8:37:22 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error getConfigured
> Sep 26, 2005 8:37:22 PM org.apache.c

connecting httpd with Tomcat

2005-09-26 Thread Peter Menzel

Hello tomcat users,

I am trying to connect my Apache httpd 2.0.50 on SuSE 9.2 with a Tomcat 
5.5.9.

Actually I cannot figure out which Connector to use.
I read about mod_jk, mod_jk2 and came to the Tomcat Connectors project, 
which provides JK 1.2.13 and JK 2.0.4.


I tried JK 2.0.4. Is this the same as mod_jk2? It was not pretty stable, 
only a bunch of requests came through..

Is JK 1.2.13 the same as mod_jk?
But mod_jk2 should have replaced mod_jk, while they say that JK 2.0.4 is 
deprecated ?


I am totally confused about all the similiar names for different(?) stuff?

Which one is now the right one for my task?

Can anybody bring to the good side of the force?

Regards, Peter Menzel


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



RE: starting Tomcat service

2005-09-23 Thread Peter Crowther
> From: Tuan Quan [mailto:[EMAIL PROTECTED] 
> But I want the script to run at boot time, in Windows.

You might wish to look at srvany
(http://support.microsoft.com/default.aspx/kb/q137890/).  This allows
you to start any process as a Windows service.

- Peter

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



Re: tld processing performance at startup

2005-09-23 Thread Peter Rossbach


Create a directory at META-INF at your webapps/
Create file context.xml inside META-INF 
context.xml is the tomcat deployment descriptor

  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/deployer-howto.html
  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

Restart the app or the complete server and I am sure that  tld 
processing is off.


Peter

Brad Flynn schrieb:


Hi Peter, Thanks for your wicked fast help

I am unsure of what you mean byt setting up a META-INF/context.xml inside my app.  Where/how do I create this?   Should I be able to view images if I call them directly like here 


http://207.97.221.210:8080/jsp-examples/wirefusion/ScreenshotServer.jsp ?

 


I don't understand your question?


This is totally new to me so I appreciate your patience with a no0b!

Cheers.

Bradley

-Original Message-
From: Peter Rossbach [mailto:[EMAIL PROTECTED]
Sent: Friday, September 23, 2005 10:22 AM
To: Tomcat Users List
Subject: Re: tld processing performance at startup


Setup a META-INF/context.xml inside your app



And check Tim's tipps :-)

regards
Peter

Tim Funk schrieb:

 


There is an option to disable TLD processing. This is nice if:
1) You precompile
2) Or don't use tld files


See 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html 
for disabling them


If you place listeners in your TLD files - I am unsure if they are 
picked up if the TLD is explicitly listed in web.xml. If not - you can 
place the listener explicitly in web.xml.



-Tim

Jilles van Gurp wrote:

   


Hi,

I have a large site running on tomcat with some tag libs. Restarting 
tomcat can take up to 30-40 seconds which is not that bad except that 
we'd prefer to minimize this time because apache can queue a lot of 
incoming requests in this 30 seconds. We need to restart often 
because we are still tinkering with the site even though it already 
went live. In general, shorter startup times would be really nice 
anyhow.


Some analysis of what is taking up most of this time has shown that 
tomcat is spending a lot of time (>40-50%) processing all the files 
in the web application looking for tld descriptors. In this 
particular web application there a few thousand small files (e.g. xml 
descriptors, jsps, some static stuff, lots of scripts, etc). Only a 
small subset is jar files (about 20) and only about ten of the files 
are actually tlds, all conveniently located in a subdirectory of 
WEB-INF. The whole thing is deployed as an unzipped directory rather 
than a war file so we can update stuff faster (copy some jar files, 
stop/start). Auto reload is not compatible with our web app so we 
don't have that enabled.


This web log post: 
http://www.webweavertech.com/costin/archives/000164.html suggests 
that the reason for the poor performance may be a design flaw in the 
jsp spec which makes it necessary to do a lot of work. The ideal way 
would be for the tld descriptors to always be in the META-INF 
directory. However, the spec doesn't require this and tlds may be 
located anywhere in the webapplication. Is this analysis of the 
problem still correct for tomcat 5.0.28?


On the other hand the web.xml does specify explicitly where the tlds 
are so I don't fully understand the need to look through the whole 
web application directory.


Is there a way to optimize this problem away (even partially) by e.g. 
telling tomcat explicitly what tlds to process?


 


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




   





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


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




 





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



Re: tld processing performance at startup

2005-09-23 Thread Peter Rossbach

Setup a META-INF/context.xml inside your app



And check Tim's tipps :-)

regards
Peter

Tim Funk schrieb:


There is an option to disable TLD processing. This is nice if:
1) You precompile
2) Or don't use tld files


See 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html 
for disabling them


If you place listeners in your TLD files - I am unsure if they are 
picked up if the TLD is explicitly listed in web.xml. If not - you can 
place the listener explicitly in web.xml.



-Tim

Jilles van Gurp wrote:


Hi,

I have a large site running on tomcat with some tag libs. Restarting 
tomcat can take up to 30-40 seconds which is not that bad except that 
we'd prefer to minimize this time because apache can queue a lot of 
incoming requests in this 30 seconds. We need to restart often 
because we are still tinkering with the site even though it already 
went live. In general, shorter startup times would be really nice 
anyhow.


Some analysis of what is taking up most of this time has shown that 
tomcat is spending a lot of time (>40-50%) processing all the files 
in the web application looking for tld descriptors. In this 
particular web application there a few thousand small files (e.g. xml 
descriptors, jsps, some static stuff, lots of scripts, etc). Only a 
small subset is jar files (about 20) and only about ten of the files 
are actually tlds, all conveniently located in a subdirectory of 
WEB-INF. The whole thing is deployed as an unzipped directory rather 
than a war file so we can update stuff faster (copy some jar files, 
stop/start). Auto reload is not compatible with our web app so we 
don't have that enabled.


This web log post: 
http://www.webweavertech.com/costin/archives/000164.html suggests 
that the reason for the poor performance may be a design flaw in the 
jsp spec which makes it necessary to do a lot of work. The ideal way 
would be for the tld descriptors to always be in the META-INF 
directory. However, the spec doesn't require this and tlds may be 
located anywhere in the webapplication. Is this analysis of the 
problem still correct for tomcat 5.0.28?


On the other hand the web.xml does specify explicitly where the tlds 
are so I don't fully understand the need to look through the whole 
web application directory.


Is there a way to optimize this problem away (even partially) by e.g. 
telling tomcat explicitly what tlds to process?




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








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



RE: an advice neede for use of encodeURL method...

2005-09-22 Thread Peter Crowther
> From: jonas skrebys [mailto:[EMAIL PROTECTED] 
> .

- Peter

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



RE: Registering my own protocol in Tomcat

2005-09-22 Thread Peter Crowther
> From: Robert Koberg [mailto:[EMAIL PROTECTED] 
> > Is there a possibility to get tomcat working with my own ASCII based
> > protocol (instead of HTTP).
[...]
> Check out:
> 
> http://java.sun.com/developer/onlineTraining/protocolhandlers/

Different use of 'protocol' - that won't help the original poster,
unfortunately.

- Peter

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



Registering my own protocol in Tomcat

2005-09-22 Thread Martin Peter
Hi,

 

Is there a possibility to get tomcat working with my own ASCII based
protocol (instead of HTTP). Is there a possibility to register a
protocol-handler or something similar to handle the requests of my
protocol with a servlet?

 

Thanks,


Martin Peter
 

 



RE: Can the Tomcat authentication module use an ASP.NET security token?

2005-09-21 Thread Peter Crowther
> From: Tracy Spratt [mailto:[EMAIL PROTECTED] 
> Subject: Can the Tomcat authentication module use an ASP.NET 
> security token?
> 
> I have a Tomcat app (MM Flex app) that is called from an asp.net
> application which is secured by "forms" (cookie-based) authentication.
> (NOT NTLM / Windows Integrated)
> 
> I don't want the user to have to log in again.
> 
> I have a programmatic solution in mind, but it is going to be
> comparitively ugly.  
> 
> Any ideas?

You're going to have to use that programmatic solution.  Forms
authentication (by default) sets a session-id cookie, and the asp.net
worker process maintains state information such as login details
internally.  You can't even get to it via classic ASP on the same IIS.

- Peter

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



RE: Out of Memory on Jakarta Tomcat 5.0.19, jdk1.5.0_04

2005-09-20 Thread Peter Crowther
> From: NoKideen [mailto:[EMAIL PROTECTED] 
> usually I use String to collect output first and out.print() 
> those String
> example :
> String a="";
> a+="Test 1";
> a+="Test 2";
> // very long , and almost 1 page 
> 
> out.println(a);
> 
> can this cause out of memory problem ?

It won't help much - you'll build up String objects very quickly.  See
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html for
a better approach that won't leave so many string fragments lying
around, roughly:

StringBuffer a = new StringBuffer();
a.append("Test 1");
a.append("Test 2");
...
out.println(a.toString());

However, this will merely cause the GC to run more frequently; it won't
run you out of memory.  Something else is causing that.

- Peter

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



SSL problem for webservices

2005-09-20 Thread Peter Betz
Hi,

I am having a problem here. I am using Jakarta Tomcat V5.5 (part of
jboss-4.0.2) and j2sdk1.4.2_08 on a Redhat Linux server.

I have been trying to perform secure HTTPS webservices calls from an
external web-server but
have thus far been unsuccessful. The local client test environment
(simulating the external webserver) always returns
the following message:

Created service and call objects.
Set call endpoint and operation name.
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found

I have registered a self-signed certificate as described below. I have also
tested setting clientAuth="true" (in the server.xml) and the secure logon
command works but subsequent non-secure HTTP calls don't work... which
includes the user interface via the web browser.

What am I doing wrong? Should I use a different port for secure webservice
calls so the tested setting doesn't interfere with the web-browser? And if
so does this setting still guarantee the maintenance of the (webservices)
session data via JSESSIONID since calls are made on both secure and
non-secure ports?

Also is there anything else I need to be aware of if I want to enable calls
from foreign webservers?

Cheers,
Peter

> -Original Message-
> From: Mark Thomas [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 6 September 2005 02:17
> To: Tomcat Users List
> Subject: Re: SSL problem
>
>
> For 5, import the CA cert to $JAVA_HOME/jre/lib/security/cacerts
>
> Do 4 after 5.
>
> If you do it right, you shouldn't see the prompt to trust the CA as it
> is already in your list of trusted certs.
>
> Also, check the server cert you get back is indeed what you expect.
>
> Mark
>
> Peter Betz wrote:
> > Hi,
> >
> > I am having a problem here. I am using Jakarta Tomcat V5.5 (part of
> > jboss-4.0.2) and j2sdk1.4.2_08 on a Redhat Linux server.
> > I having been trying to register a signed certificate but have thus far
> > being unsuccessful.
> > It always comes out as a self-signed certificate. What am I doing wrong?
> > Details are as follows:
> >
> > Here is what I have been doing:
> >
> ~~
> ~~
> > ~~~
> > Logged in and performed commands as jboss user because the J2EE
> and Jakarta
> > Tomcat environment is run under jboss user.
> >
> > 1. Generate a private key with the following command:
> > $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore
> > k-factor88.kdb
> >
> > 2. Generate the Certificate Signing Request (CSR)
> > $JAVA_HOME/bin/keytool -certreq -alias tomcat -keystore
> k-factor88.kdb -file
> > k-factor88.csr
> >
> > 3. Generate the Server Certificate
> > Submit k-factor88.csr to root certification authority and save returned
> > certificate into k-factor88.cer
> >
> > 4. Import the Server Certificate
> > $JAVA_HOME/bin/keytool -import -trustcacerts -keystore
> k-factor88.kdb -alias
> > root -file k-factor88.cer
> > Note: Keytool confirms that the certificate has been signed by a
> > certification authority. I choose to trust it.
> >
> > 5. Import the Trust Certificate
> > $JAVA_HOME/bin/keytool -import -trustcacerts -keystore
> k-factor88.kdb -alias
> > jboss -file UTN.cer
> > Note: UTN.cer is the certification authority certificate and needs to be
> > imported.
> >
> > server.xml
> >
> ~~
> ~~
> > ~
> >   >maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
> >emptySessionPath="true"
> >scheme="https" secure="true" clientAuth="false"
> >keystoreFile="${jboss.home.dir}/bin/certs/k-factor88.kdb"
> >keystorePass="changeit" sslProtocol = "TLS" />
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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



Re: Newbie question. /manager only gives the directory listing

2005-09-18 Thread Peter Johnson

Jimi,

try /manager/html

PJ

[EMAIL PROTECTED] wrote:


Hi all,

I have been using Tomcat for some time now, but I still feel like a newbie in
most regards. At least when it comes to configuring it.
Tomcat has been working great, together with Apache 2, for several months now.
But now, I find myself wanting to use the manager webapp for the first time.
But it doesn't work. When I try to go to /manager all I get from Tomcat is the
directory listing of the manager-folder. I know this request is handled
by Tomcat, because I have the required JKMount's in the Apache httpd.conf file,
and at the bottom of the directory listing it says "Apache Tomcat/5.5.9".

I have checked the archive for this maining list, and I have checked the
documentation and searched on google, but I can't find any information on how
to set up the default manager. All they say is that it is installed by default.
And I'm sure that it worked at the beginning, but then I must have made
something that messed it up, but since I haven't used it at all I have no idea
when, how
and why it got messed up.

Is there a simply "checklist" that I can go through step by step, to check that
my configuration is as it should be? Or maybe some kind soul could take a look
at my configuration files and figure out what I'm doing wrong?


Some info on my system:
---
Windows XP
Apache 2.0.54 (as service)
Apache Tomcat 5.5.9 (as service)
docBase changed so that my only webapp (located at c:\community) is reached when
i type localhost:8080/ (se context.xml in configuration files below)
the manager webapp is untouched, in Tomcat5.5\server\webapps\manager


The configuration files can be found at:
http://www.hullegard.com/tomcat/

The community folder is located under c:\
The httpd.conf is from the apache conf folder.
All other files are from the Tomcat5.5\conf folder

Anyone who can help me with this?

Regards
/Jimi

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

 



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



Re: Cluster and notifications to nodes

2005-09-18 Thread Peter Rossbach

Hey Bradley,

a)   mark application as priviliged=true
b)   define and implement your own ClusterMessage
c)   via MbeansServer you got the Catalina:type=Cluster,host=localhost 
mbean and send your

operation ( send(ClusterMessage)).
d)   Register a ClusterListener.
 with 5.5.11 you can configure this directly inside Cluster 
element.
 with 5.5.9 you must implement you own host listener to 
register a ClusterListener.


I am motivate to implement a simple sample and add this to the tomcat docs..

Peter

Bradley McLain schrieb:


this is a good question.  i'll be facing the same issue soon.  for
session-based information, your answer is fine, but what about other
types of info, say at the app-level?  in one of my apps, for example, I
can change some config data using a web request, but what if i want to
ensure it is replicated to the other nodes in the cluster?

On Fri, 2005-09-16 at 17:53 +0200, Lionel Farbos wrote:
 


Hi,

Why do you want your application to send a notification ?
If you configure Session Replication in each of your Tomcat servers, 
every time there will be a change in your HTTP session, the others AS in the cluster will be notified and synchronized automatically.

You have nothing to do...

On Fri, 16 Sep 2005 15:18:58 +0100 (BST)
Eino Lilius <[EMAIL PROTECTED]> wrote:

   


Hi,

I have successfully installed a Tomcat cluster :) 
I need to notify other nodes in the cluster when a

state is changed in my web application. My problem is
that I don't know how to send those notifications. 


I've found one reply to similar question: "You can
register your own Cluster Message Listener and with 
SimpleTcpCluster.send(ClusterMessage) you can send

your message to all cluster nodes."

How is that done in practice? Does someone have an
example how to get the reference to that
SimpleTcpCluster instance? 


Any help is appreciated :)

Thanks,
Eino



___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


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


 


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


   




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




 






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



Re: jconsole & security manager

2005-09-18 Thread Peter Rossbach

You can find detail information here:
http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanPermission.html

Very simple config example:
http://mx4j.sourceforge.net/docs/ch03s10.html

Peter


Pfingstl Gernot schrieb:


I like to monitor my tomcat 5.5 (running on jdk 1.5.0) with jconsole.
If I run tomcat without security manager everything works well.
If I run tomcat with security manager, monitoring the tomcat mbeans works well 
- but jconsoles memory view doensn't work!
Sun's doc says: "If your application runs a security manager, then additional 
permissions are required in the security permissions file."

But I have not found which permissions are required?

Has somebody have solved this?
Which permissions are required?

Thanks,
Gernot


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




 




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



Re: Order of WebApp Loading

2005-09-16 Thread Peter Menzel

I see,
if i can't count on the order of loading, I tried something other:
I set crossContext="true" for both webapps and while in 
contextInitialized() of the webapp which schould run only after the 
first webapp finished loading
I use context.getContext("/db-app") to look if the first app ist already 
there. If not then it should wait with Thread.sleep().
Unfortunately my Tomcat 5.5 seems to use only one thread for loading all 
web-apps, so if I let it wait the loading of all web-apps is blocked.


Obviously this solution will not work reliably, because it depends on 
the threading model the container uses to load its apps.

Do you have any other recommendations for this issue ?

Kind regards, Peter Menzel


Robert Harper schrieb:


The case is still that most servlet containers, Tomcat included, are
multithreaded and order of processing should not be counted on. One app may
be swapped out while the other app runs. It is far better to write your
servlets so that there is no dependency on order of operation, order of
parameters, etc. Another reason not to count on this is that it is not part
of the specification and one implementation or version of a container may
choose to provide order or not and this might change. There have been many
recommendations on how to do this and I would suggest you try them. Your
apps will probably end up being more scaleable as well.

Robert S. Harper
Information Access Technology, Inc.
 




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



Re: mod_jk performance

2005-09-16 Thread Peter Flynn
On Wed, 2005-09-14 at 18:52, Mark Thomas wrote:
> KEREM ERKAN wrote:
> > Tomcat is harder to configure and -sadly- it has a far worse documentation
> > than Apache (for now).
> 
> I look forward to seeing your documentation patches in Bugzilla ;)

I will certainly document how to fix my problem once it's fixed, but 
anything I have ever sent to Bugzilla either gets ignored or argued 
about ad infinitum and nothing ever done, so any doc I write will go 
on my blog or my web site (from where anyone is free to take/copy it).

///Peter


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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-16 Thread Peter Flynn
On Wed, 2005-09-14 at 14:04, Michael Lai wrote:
> KEREM ERKAN wrote:
> 
> >OK, start with downloading and installing a binary version of Tomcat for
> >your OS and also download the 1.2.10 version of mod_jk. I think we should
> >handle the rest off list not to bother the list anymore.
> >
> 
> Just to give you another option if you like.  I don't even use mod_jd.  
> I make use of Apache's reverse proxy feature.  In my httpd.conf, I add 
> the following lines in my virtual host:

[snip]

That's extremely useful, thanks.

But I don't want to serve a single whole directory Tomcat,
I need to server about a dozen isolated JSP files.

Can ProxyPass hand off *.jsp to Tomcat rather than a whole 
directory?

///Peter



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



Re: mod_jk performance

2005-09-16 Thread Peter Flynn
On Wed, 2005-09-14 at 13:50, Andrew Miehs wrote:
> We did some comparisons between running Tomcat 5.0 standalone, or TC  
> 5.0 and Apache 2.0
> 
> If you are ONLY delivering JSPs, we found that we could only deal  
> with 50% of the requests when running combined Apache TC and mod_jk

OK, that's useful information. 

But I have 300,000+ static HTML files to server, and about
10 JSP files. I'm surely not switching my entire server to 
Tomcat...:-)

///Peter



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



Tomcat directory protection (was: Re: mod_jk performance

2005-09-16 Thread Peter Flynn
On Wed, 2005-09-14 at 13:29, Hassan Schroeder wrote:
> KEREM ERKAN wrote:
> > Apache has better directory/file restricting and handling than Tomcat
> 
> better in what way? What actual *security* issue are we talking
> about -- in other words, what exploit is Tomcat susceptible to
> that Apache is not?

I don't know if Kerem Erkan was talking about exploits, but I have 
looked for some facility in Tomcat equivalent to Apache .htaccess
files and failed to find any mention of them. Is it possible to do
this kind of IP-level or simple username/password restriction in
Tomcat?

///Peter



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



RE: How to serve just JSP (was: Re: JSP on RHEL4 with Apache http d RPM?

2005-09-16 Thread Peter Flynn
On Wed, 2005-09-14 at 13:22, KEREM ERKAN wrote:
> OK, start with downloading and installing a binary version of Tomcat for
> your OS and also download the 1.2.10 version of mod_jk. I think we should
> handle the rest off list not to bother the list anymore.

Yes, that's lot's already installed and has been running 
fine. 

///Peter



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



Order of WebApp Loading

2005-09-15 Thread Peter Menzel

Hi there,

I have a question concerning Tomcats webapp loading:
What is the order in which tomcats loads its webapps ?
I have two webapps configured by /conf/Catalina/localhost/XXX.xml and I 
need one webapp to be loaded before the other, because it starts the 
database.

How does Tomcat choose the first, second, ...
And what is the loading sequence, if both are deployed as a .war ?

Kind regards, Peter Menzel


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



RE: How to serve just JSP (was: Re: JSP on RHEL4 with Apache http d RPM?

2005-09-14 Thread Peter Flynn
On Wed, 2005-09-14 at 12:19, KEREM ERKAN wrote:
> > 
> > Unfortunately I have to keep the main port 80 httpd, as it's 
> > serving 20Gb of other material (the entire campus web site).
> > 
> > All I need is the trick to make Apache httpd hand off any 
> > .jsp files to Tomcat.
> > 
> As I am newly subscribed to this list, I don't know if you have got a
> satisfactory answer for your question, but if you don't; I have the same
> configuration like yours, static files are served by Apache and *.jsp files
> are served by Tomcat.

That's exactly what I want.

> All you have to do is to use Java Connector to mount jsp files to Tomcat.
> You can find the necessary documentation in "Connectors" part of Tomcat
> documentation. 

Aha! Yes, AJP connector looks like what I need. Unfortunaely the
documentation doesn't seem to show how to do this.

> If you can't get out of it, I can help you set it up off or
> on list.

That would be great, many thanks.

///Peter


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



RE: Multiple Remote Debugging of TOMCAT

2005-09-14 Thread Peter Crowther
> From: rahul [mailto:[EMAIL PROTECTED] 
> We are three people working on three different application which
> are deployed on a single remote machine
> We all want to remotely debug our application. 
> 
> Is it possible with one instance of tomcat? (I think no)

At the same time?  Not to my knowledge - JPDA expects a single remote
connection, I think.

> If not, then there is only one solution 
> which is running multiple instance of tomcat
> 
> Can anyone tell me how to go with this

What OS?  I run up to five instances on this machine, and have examples
of startup files for Windows... Contact me off-list for copies if you
want them.

- Peter

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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Peter Flynn
On Wed, 2005-09-14 at 10:17, Michael Lai wrote:
> Peter Flynn wrote:
> >If Tomcat doesn't have any such webapp, where do I get one?
> >I certainly can't write one, as I'm not a Java programmer.
> >
> 
> I am limited in my knowledge of tomcat but from my understanding, tomcat 
> can be ran either as a standalone server or behind a webserver.  In your 
> case, it seems like you don't actually need a webserver in front so you 
> should be able to connect to tomcat using the url:

Unfortunately I have to keep the main port 80 httpd, as it's
serving 20Gb of other material (the entire campus web site).

All I need is the trick to make Apache httpd hand off any .jsp
files to Tomcat.

///Peter


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



How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Peter Flynn
[Sorry for the repost but I still don't have an answer to this one]

On Fri, 2005-09-09 at 15:50, Steve Dodge wrote:

> 1.is an apache http server directive.

Right, but it was put there by Tomcat's auto-config. What I was trying 
to find out was, by "localhost" did Tomcat mean "my (Tomcat's) 
localhost" -- the server on 8080 -- or "Apache's localhost", which is 
the server on port 80, which responds to many Virtual Hosts already
in the httpd.conf file.

> 2. With JkMount you're not actually mapping a physical directory, it's a 
> url pattern.  

Yes, but all the ones that Tomcat auto-config'd into mod_jk.conf are 
relative to the Tomcat webapps directory. How do I write a url pattern
that can be interpreted as relative to Apache's document root, so that
JSP files in there will be passed to Tomcat for serving?

> If you have a tomcat webapp that serves jsp's such as 
> http://localhost:8080/mywebapp, then you can map jsp requests to that 
> webapp using JkMount /mywebapp/*.jsp

Ah...this exposes the gap in my understanding.
Where do I get a "tomcat webapp that serves jsp's"? 
This is what I need. I thought one was built into Tomcat -- in fact I
thought JSP serving was the original purpose of Tomcat.

If Tomcat doesn't have any such webapp, where do I get one?
I certainly can't write one, as I'm not a Java programmer.

///Peter



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



RE: Storing a request

2005-09-13 Thread Peter Crowther
> From: Ajay Arjandas Daryanani [mailto:[EMAIL PROTECTED] 
> I'm developing a authorization filter for Tomcat 5; in some cases, if
> the user credentials are invalid, I have to save the original request,
> redirect the user to an external authentication engine, handle the
> response and then proceed with the original request. The problem is, I
> can't find a way to clone the request or create a new one.
> 
> Any comments are welcome.

There was a similar thread a couple of months back.  The conclusion of
that thread was that you cannot clone the original or create a new
request, and that there are sound architectural reasons for this.
Instead, you'll have to do it the "proper" way - store the data you need
from the original request in some appropriate manner, then handle the
new request using that stored data when it comes in.

- Peter

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



Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-09 Thread Peter Flynn
On Fri, 2005-09-09 at 15:50, Steve Dodge wrote:

> 1.is an apache http server directive.

Right, but it was put there by Tomcat's auto-config. What I was trying 
to find out was, by "localhost" did Tomcat mean "my (Tomcat's) 
localhost" -- the server on 8080 -- or "Apache's localhost", which is 
the server on port 80, which responds to many Virtual Hosts already
in the httpd.conf file.

> 2. With JkMount you're not actually mapping a physical directory, it's a 
> url pattern.  

Yes, but all the ones that Tomcat auto-config'd into mod_jk.conf are 
relative to the Tomcat webapps directory. How do I write a url pattern
that can be interpreted as relative to Apache's document root, so that
JSP files in there will be passed to Tomcat for serving?

> If you have a tomcat webapp that serves jsp's such as 
> http://localhost:8080/mywebapp, then you can map jsp requests to that 
> webapp using JkMount /mywebapp/*.jsp

Ah...this exposes the gap in my understanding.
Where do I get a "tomcat webapp that serves jsp's"? 
This is what I need. I thought one was built into Tomcat -- in fact I
thought JSP serving was the original purpose of Tomcat.

If Tomcat doesn't have any such webapp, where do I get one?
I certainly can't write one, as I'm not a Java programmer.

///Peter



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



Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-09 Thread Peter Flynn
On Fri, 2005-09-09 at 06:13, Nikola Milutinovic wrote:
> Peter Flynn wrote:
> 
> >I need to add JSP ability to a RHEL4 server running the
> >current Apache httpd from the Red Hat RPM. 
[...]
> >Has anyone managed to serve JSP with Tomcat on a RHEL4
> >machine running their stock httpd? 
> 
> You're looking for mod_jk RPM or mod_jk2 (which has been dropped from 
> development). 

I found mod_jk-ap20-1.2.10-1jpp.i386.rpm at http://www.jpackage.org and
It installed without error on RHEL4 running stock httpd-2.0.52-9.ent.rpm

So far, so good. So I added the suggested element



to the  container in server.xml and 
restarted Tomcat. 

This created /usr/local/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf 
(NOT mod_jk.conf.auto as the Jakarta Tomcat Connector Apache HowTo 
documentation says). 

The mod_jk.conf was pretty skeletal, so I added:

   JkWorkersFile /usr/local/jakarta-tomcat-5.5.9/conf/workers.properties

and edited workers.properties to reflect the locations

   workers.tomcat_home=/usr/local/jakarta-tomcat-5.5.9
   workers.java_home=/usr/java/jdk1.5.0_03

and added this line to /etc/httpd/conf/httpd.conf

   Include /usr/local/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf

and finally restarted Apache. No error, but it doesn't do anything
meaningful with my JSP files: it just serves them through Apache. 

Looking in mod_jk.conf I see it mentions all the subdirectories in 
Tomcat's webapps directory, but nowhere does it reference any 
directories in my Apache document tree. 

I've obviously missed how to get it configured to serve JSP files 
from the Apache web server directories. I have no interest in serving 
any JSPs from the Tomcat directories, as all I use Tomcat:8080 for is 
serving Cocoon, which already works fine.

The JkMount directives in mod_jk.conf all refer to /directory being
in Tomcat's webapps directory. How do I reference directories which
are actually below /var/www/html so that they get handled by Tomcat?

In mod_jk.conf, what does this refer to:

   
ServerName localhost

The Tomcat:8080 server or the Apache httpd:80 server? 

If it's Tomcat, then I can understand why JkMount /directory refers 
to Tomcat's webapps, but it seems very weird that the autoconf should 
configure mod_jk.conf to mount only Tomcat's directories, when the 
entire point of the operation is to enable serving of Apache's own
JSP files.

If it's Apache's httpd, which it is presumably intended for, as this
file gets Include'd from Apache's httpd.conf, then why does it still
refer to localhost instead of picking up the ServerName from the
httpd.conf?

Should I change both localhost's to my server's FQDN?

///Peter


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



Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-09 Thread Peter Flynn
On Fri, 2005-09-09 at 06:13, Nikola Milutinovic wrote:
> Peter Flynn wrote:
> 
> >I need to add JSP ability to a RHEL4 server running the
> >current Apache httpd from the Red Hat RPM. Apparently the 
> >httpd RPM available from Red Hat doesn't have the hooks
> >needed to allow JSP files to be passed to Tomcat (or if it
> >does, I can't find them).
> >
> >Has anyone managed to serve JSP with Tomcat on a RHEL4
> >machine running their stock httpd? 
> >
> >I'd rather not have to resort to building Apache httpd from 
> >scratch, as that would mean also moving away from RPMs for 
> >MySQL and PHP, in order to maintain synchronisation between 
> >them.
> >  
> You're looking for mod_jk RPM or mod_jk2 (which has been dropped from 
> development). 

Thanks very much. Unfortunately the Tomcat I am using is one I
installed from source, as I didn't know at the time that Red Hat
had gotten around to making an RPM...and their RPM doesn't appear
to support Cocoon (I tested it on a clone box and adding the war 
file to webapps just causes error messages about missing jar files
to go into the logs).

> If you see mod_webapp RPM, run for your life.

I'm getting good at that :-)

> As a workaround, you should be able to use mod_proxy to proxy requests 
> for TC to it.

Interesting idea, thanks.

///Peter


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



JSP on RHEL4 with Apache httpd RPM?

2005-09-08 Thread Peter Flynn
I need to add JSP ability to a RHEL4 server running the
current Apache httpd from the Red Hat RPM. Apparently the 
httpd RPM available from Red Hat doesn't have the hooks
needed to allow JSP files to be passed to Tomcat (or if it
does, I can't find them).

Has anyone managed to serve JSP with Tomcat on a RHEL4
machine running their stock httpd? 

I'd rather not have to resort to building Apache httpd from 
scratch, as that would mean also moving away from RPMs for 
MySQL and PHP, in order to maintain synchronisation between 
them.

///Peter



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



RE: compile precompile jsps at runtime

2005-09-06 Thread Peter Crowther
> From: Zachi Hazan [mailto:[EMAIL PROTECTED] 
> Subject: Re: compile precompile jsps at runtime
> 
> So, how can I do it with tomcat not "out of the box"?

One approach would be to cheat!  Tomcat compiles the page when the page
is first invoked.  So, you could for example define a special parameter
as part of the query string (such as 'precompile=true') and modify the
code for each page so that if the parameter is found, the page does
nothing.  However, Tomcat has still compiled it.

Then all you need is some kind of script (using cURL or a similar tool)
that fetches each page and adds a '?precompile=true' suffix.  Deploy,
run the script, and all your pages are precompiled.

Low-tech, I agree, and I suspect others on the list will be able to come
up with a better approach.

- Peter

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



SSL problem

2005-09-05 Thread Peter Betz
Hi,

I am having a problem here. I am using Jakarta Tomcat V5.5 (part of
jboss-4.0.2) and j2sdk1.4.2_08 on a Redhat Linux server.
I having been trying to register a signed certificate but have thus far
being unsuccessful.
It always comes out as a self-signed certificate. What am I doing wrong?
Details are as follows:

Here is what I have been doing:

~~~
Logged in and performed commands as jboss user because the J2EE and Jakarta
Tomcat environment is run under jboss user.

1. Generate a private key with the following command:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore
k-factor88.kdb

2. Generate the Certificate Signing Request (CSR)
$JAVA_HOME/bin/keytool -certreq -alias tomcat -keystore k-factor88.kdb -file
k-factor88.csr

3. Generate the Server Certificate
Submit k-factor88.csr to root certification authority and save returned
certificate into k-factor88.cer

4. Import the Server Certificate
$JAVA_HOME/bin/keytool -import -trustcacerts -keystore k-factor88.kdb -alias
root -file k-factor88.cer
Note: Keytool confirms that the certificate has been signed by a
certification authority. I choose to trust it.

5. Import the Trust Certificate
$JAVA_HOME/bin/keytool -import -trustcacerts -keystore k-factor88.kdb -alias
jboss -file UTN.cer
Note: UTN.cer is the certification authority certificate and needs to be
imported.

server.xml

~
 



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



RE: Multiple IP addresses

2005-09-02 Thread Peter Crowther
> From: Fadil [mailto:[EMAIL PROTECTED] 
> But it doesn't work...

What error are you getting, from what?

    - Peter

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



RE: Multiple IP addresses

2005-09-02 Thread Peter Crowther
> From: Fadil [mailto:[EMAIL PROTECTED] 
> I do not understand very well, if we did this configuration, 
> (with a new IP 
> for tomcat and one for IIS web app on the same server) :
> 
> we don't have to specify port number for IIS or Tomcat ?

Each would bind to port 80, each on its own IP address on the Web
server.  Port 80 is the default port for HTTP, so none of your URLs
would need a ':8080' or similar suffix.

> Can we fix tomcat's with by default 80 ? this configuration 
> doesn't mess if we want to use ldap or ssl?

If you have a separate IP address for Tomcat from the one you are using
for IIS, then you can also bind any other ports you need for Tomcat on
that separate IP address.  So Tomcat's SSL would be on :443, IIS's SSL on :443.

> Is this kind of installation is best than only one ip, IIS on 
> 80, tomcat on 8080 and isapi redirector 1.14 ?

That depends on your specific requirements, I cannot give a general
answer.

- Peter

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



RE: Multiple IP addresses

2005-09-02 Thread Peter Crowther
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED] 
> I seem to remember when I was working with IIS some years 
> ago, I could map
> multiple IP addresses to one instance of IIS, i.e., IIS could service
> multiple web sites for me, each web site having it's own, 
> unique IP address.
> Is there a way to do this with Tomcat stand alone or is 
> Apache Web Server or
> IIS required?

Works fine with Tomcat.  Modify your server.xml to have multiple
Services, each with its own set of innards like Connectors and Hosts,
and each with its own appbase.  Then use

address="numeric.ip.address.required"

in each of the connector attributes to force a bind to just that IP
address for that connector.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html for the
details on Connector.

- Peter

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



Unable to start Tomcat with JSVC

2005-09-01 Thread Peter . Neu
Hello, 
 
I got some problems with starting Tomcat as a daemon on my linux box(SUSE 
9 ES). When the startup script "tomcat5" is invoked I get this error: 
  
/etc/init.d/rc5.d/S01tomcat5: 
line55: /home/tom5/jdk1.5.0_04/lib/tools.jar:: No such file or directory 
jsvc error: No class specified 
jsvc error: Cannot parse command line arguments 
 
The path is ok. I double checked it in the navigator. I even put the all 
permission to all users. What could be the problem? 
 
cheers 
 
Peter 

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

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



RE: Servlet lush problems via JK-1.2.14 and TC_5.0.28

2005-09-01 Thread Peter Crowther
> From: Zsolt [mailto:[EMAIL PROTECTED] 
> When I start a long running servlet I want to give the user 
> some feedback
> about the progress, thus I just print some characters to the 
> browser from
> the servlet. It works fine when I go directly tomcat but when 
> I go through
> apache and tomcat connector I see the characters in the 
> browser only when
> the servlet is ready (that might take 20-30 minutes).
[...]
> How can I force a flush via connector?

I don't think you can.

If the process is going to be running for that length of time, would it
make sense to delegate the processing to some other object?  Then the
page can return immediately, with some appropriate code that requests
the browser to refresh the page at an appropriate interval.  During a
refresh, you could poll the request's status and return an appropriate
message.

- Peter

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



Re: installing admin webapp

2005-08-30 Thread Peter Kennard

Will do - where is the procedure for opening an enhancement ticket outlined?
Thanks.

At 05:37 PM 8/30/2005, you wrote:

From: "Peter Kennard" <[EMAIL PROTECTED]>


I would write up such a thing if I knew how to get it in there ;^>


Since it sounds like you want it to be a text file included in the admin 
app zip file, you might try writing it up and opening an enhancement 
ticket against Tomcat 5.5.  Attach your suggested README file to the ticket.


Meanwhile, the answer is now part of the list archives, so the next person 
who happens along should be able to find it.


--
Wendy Smoak




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



Re: installing admin webapp

2005-08-30 Thread Peter Kennard
BTW the other potential for my "failure" may be that somewhere in the chain 
between Tomcat and the browser the error message page was cached.  The link 
to the admin webapp may itself may not have the headers set to prevent the 
error message from caching ???


I'm only trying to help other's first time experiences be smooth and get 
them off to a good start :)


PK

At 04:58 PM 8/30/2005, you wrote:

Thanks for reply !

I did this at the suggestion of someone on a sysadmin list I'm on,
(Nowhere do any docs actually say this :)

I also added the "admin" rolename type to the user "peterk" in the

config/tomcat-users.xml file such that it now looks like this



  
  
  
  
  


And restarted the server using the windows "services" UI.

However after doing this when accesing the link for "admin" I got the "you 
must install ...". message


*

However I just accessed it again and it worked :O
It apears restarting the server using the windows services UI somehow did 
not cause it to refresh the config properly (??)  (I rebooted the machine 
for another reason between previously accesing admin failing and the last 
success)


I also noticed that if you put a comment in the tomcat-users.xml file the 
comment is not preserved when the server restarts.  It apparently reads 
the file (disgards the comments) and then writes out the file upon restart.


--> Since I wish to promote OSS and Apache there really should be a complete
and explicit even though tiny and trivial "howto install this" text file
included in the admin download since it will likely be the first thing
any new user confronts when installing it :)

Thanks
PK

At 01:42 PM 8/30/2005, you wrote:

From: "Peter Kennard" <[EMAIL PROTECTED]>


Is there a link - howto etc on how to install and configure the admin
webapp.
I have looked at Faqs for v 5.5.9, googled for it, etc.

There is no "howto-install .." "RUNNING" etc in the webapp .zip file.


The 'admin' zip file is structured to overlay the Tomcat install and put the
files in the right place.

Unzip it in the same place you unzipped the Tomcat 5.5.9 .zip file.
(Alternately, unzip it somewhere else and copy the files into your Tomcat
install directory, being careful to start at the "right place" so it will
overlay properly.)

--
Wendy Smoak


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




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





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



RE: installing admin webapp

2005-08-30 Thread Peter Kennard
Thanks - For the sake of "marketing" this trivial install should be 
explicitly stated in a very obvious "how to install" information included 
with the package.  Especially since it is something that if done improperly 
(from a POV of not knowing) could affect security.


One of the biggest objections I hear from clients who might use OSS is that 
it is "too hard for people to get started" with it.  A new user is a 
valuable user when trying to propagate a standard.


I would write up such a thing if I knew how to get it in there ;^>

Thanks!
PK

At 01:43 PM 8/30/2005, you wrote:

> From: Peter Kennard [mailto:[EMAIL PROTECTED]
> Subject: installing admin webapp
>
> Is there a link - howto etc on how to install and configure
> the admin webapp.

Installation borders on the trivial: download, unzip.  The only
configuration necessary is creating the admin role and associated
userid/password in the conf/tomcat-users.xml file.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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




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



Re: installing admin webapp

2005-08-30 Thread Peter Kennard

Thanks for reply !

I did this at the suggestion of someone on a sysadmin list I'm on,
(Nowhere do any docs actually say this :)

I also added the "admin" rolename type to the user "peterk" in the

config/tomcat-users.xml file such that it now looks like this



  
  
  
  
  


And restarted the server using the windows "services" UI.

However after doing this when accesing the link for "admin" I got the "you 
must install ...". message


*

However I just accessed it again and it worked :O
It apears restarting the server using the windows services UI somehow did 
not cause it to refresh the config properly (??)  (I rebooted the machine 
for another reason between previously accesing admin failing and the last 
success)


I also noticed that if you put a comment in the tomcat-users.xml file the 
comment is not preserved when the server restarts.  It apparently reads the 
file (disgards the comments) and then writes out the file upon restart.


--> Since I wish to promote OSS and Apache there really should be a complete
and explicit even though tiny and trivial "howto install this" text file
included in the admin download since it will likely be the first thing
any new user confronts when installing it :)

Thanks
PK

At 01:42 PM 8/30/2005, you wrote:

From: "Peter Kennard" <[EMAIL PROTECTED]>


Is there a link - howto etc on how to install and configure the admin
webapp.
I have looked at Faqs for v 5.5.9, googled for it, etc.

There is no "howto-install .." "RUNNING" etc in the webapp .zip file.


The 'admin' zip file is structured to overlay the Tomcat install and put the
files in the right place.

Unzip it in the same place you unzipped the Tomcat 5.5.9 .zip file.
(Alternately, unzip it somewhere else and copy the files into your Tomcat
install directory, being careful to start at the "right place" so it will
overlay properly.)

--
Wendy Smoak


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





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



installing admin webapp

2005-08-30 Thread Peter Kennard

Is there a link - howto etc on how to install and configure the admin webapp.
I have looked at Faqs for v 5.5.9, googled for it, etc.

There is no "howto-install .." "RUNNING" etc in the webapp .zip file.

Is this list the right place to ask such a question?

PK


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



admin install question suggestion

2005-08-29 Thread Peter Kennard


This may come under the category of first time user usability testing.

- I installed Tomcat on my box and it runs fine.
- The admin webapp is in a separate download so one
   can safely install it (proper)

BUT :)

From my naive user (and valuable in usability testing) POV I don't know 
the "proper" way to install and set up the admin webapp from the download 
".zip" file.  (Probably brain dead simple.)


It would be extremely new user fiendly to include a "howto-install.txt" (or 
similar stick out at you file name) in the root level of the "admin-webapp" 
zip and tar.gz files. Or have it somwhere in the DOCs included with the 
base level tomcat install.  I am not qualified to write it at present.


I looked about and googled "apache tomcat admin webapp install", looked at 
the "faq" and didn't find any specific relevant item.  I still want to know :)


Thanks
PK




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



Re: Cluster tcpThreadCount

2005-08-27 Thread Peter Rossbach

Hey,

Use the 5.5.9 with cluster fix pack for fastasyncqueue cluster mode. 
Yes, you can use the default config, but
change the ackTimeout to 45000 when you have heavy load and big session 
replicated messages.


At 5.5.11 I have change a lot inside the cluster implementation, but 
this version is currently an alpha release.


Peter

Randy Paries schrieb:


Thanks for the response.

What version was fastasyncqueue implemented? I am still running
jakarta-tomcat-5.0

There are so many different values

Is this a good default to start with (from the doc page)??




-Original Message-
From: Peter Rossbach [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 27, 2005 1:41 AM

To: Tomcat Users List
Subject: Re: Cluster tcpThreadCount

Hey Randy,

tcpThreadCount is the number of parallel NIO receiver threads. Every tomcat
cluster node with pooled mode has
25 sender threads (Default). Normally two receiver thread per backup node
are calc.  More recevier worker means that you produce more load for
replication at backup!
At  heavy loaded site I use only the fastasyncqueue mode. This mode has at
my test case better performance and more guaranty that replication works
well. You can also switch to the domain cluster model.
Install more nodes with different backup domainnodes.

Example

Apache 1 and four tomcats

T01 and T03 are inside domain A ( same mcast port)
T02 and T04 are inside domain B ( same mcast port)

T01 and T02 living at box  B1
T03 and T04 living at box  B2

Peter

PS: When you used tomcat 5.5.9 don't forget to install the cluster fix pack
( s. bugzilla)


Randy Paries schrieb:

 


Hello,

How do I determine what value I should set  tcpThreadCount to

Currently I have the setting below and a very busy app server.

Thanks
Randy



  ackTimeout="15000"/> 





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






   






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





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




 






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



Re: Cluster tcpThreadCount

2005-08-27 Thread Peter Rossbach

Hey Randy,

tcpThreadCount is the number of parallel NIO receiver threads. Every 
tomcat cluster node with pooled mode has
25 sender threads (Default). Normally two receiver thread per backup 
node are calc.  More recevier worker means that

you produce more load for replication at backup!
At  heavy loaded site I use only the fastasyncqueue mode. This mode has 
at my test case
better performance and more guaranty that replication works well. You 
can also switch to the domain cluster model.

Install more nodes with different backup domainnodes.

Example

Apache 1 and four tomcats

T01 and T03 are inside domain A ( same mcast port)
T02 and T04 are inside domain B ( same mcast port)

T01 and T02 living at box  B1
T03 and T04 living at box  B2

Peter

PS: When you used tomcat 5.5.9 don't forget to install the cluster fix 
pack ( s. bugzilla)



Randy Paries schrieb:


Hello,

How do I determine what value I should set  tcpThreadCount to

Currently I have the setting below and a very busy app server.

Thanks
Randy



   ackTimeout="15000"/> 





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




 






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



RE: using disks SATA against SCSI in tomcat 5.5.9 cluster servers

2005-08-26 Thread Peter Crowther
> From: Acácio Furtado Costa [mailto:[EMAIL PROTECTED] 
> In the specification of the disks I have doubts because the 
> new disks SATA has great performance and speed and with cost 
> comparative minor to the SCSI Disks.  
>   
> Considering applications WEB, where the >WAR files are loaded 
> in memory and having enough memory (2 Gbytes) so that there 
> is not use of virtual memory (windows XP), would there be 
> some advantage to use disks SCSI?  or can we wait for the 
> same performance considering disks sata 7200 rpm against 
> disks scsi of 7200 rpm?  
>   
> Could anybody explain to myself this doubts?

You will only really be able to answer this by benchmarking your application 
and finding out how much of the time it spends accessing the disk.

SCSI disks and controllers typically have two other advantages over SATA disks 
and controllers: faster average seek times, and more write cache.  However, if 
the performance under SATA is "good enough", then you will not want to spend 
the extra for SCSI.

I support a number of live applications deployed on servers using mirrored SATA 
disks, as they are "good enough" for the clients.

- Peter

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



Re: Sharing non-session data in a cluster

2005-08-26 Thread Peter Rossbach

Hey Joakim,

you can register your own ClusterListener and send ClusterMessages with 
SimpleTcpCluster object.
With the 5.5.11 release you can configure it and look inside following 
code pieces:

jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\ClusterSessionListener.java
jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\JvmRouteSessionIDBinderListener.java
jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\JvmRouteBinderValve.java
jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\SessionIDMessage.java
jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\SessionMessageImpl.java

Peter


Joakim Ahlén schrieb:


Hi!

Is there any way of sharing data within a cluster which is not stored 
in session? Think of this as sharing the application state or some 
cluster-wide global state.


Regards

Joakim


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





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



Re: Clustering problems

2005-08-26 Thread Peter Rossbach

Read the doc and configure greater waitForAck timeouts
and more pooled worker.



I only used fastasyncqueue mode in my production system!



Peter

Randy Paries schrieb:


Hello
I have two tomcat servers (flanders and krusty)
Their server.xmls are below

they have two nic cards. The incoming http requests come in via the 192.168
ips and go out the real ips 66.208

the 192.168 nics are on a gigbit network

When my servers get really busy i messages in the log file (see below) Once
this happens my httpd starts backing up
and it gets real ugly fast. I have to stop both instances and restart them

Does my config look ok?

any suggestions?

Thanks
Randy



From log file


Aug 25, 2005 3:22:36 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.0.20
4:4001,192.168.0.204,4001, a
live=47087979]
Aug 25, 2005 3:22:37 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.0.204:4001
,192.168.0.204,4001, aliv
e=47092679]
Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.SocketSender
waitForAck
WARNING: Wasn't able to read acknowledgement from
server[/192.168.0.204:4001] in 15000 ms. Disconnecting socket, and trying ag
ain.
Aug 25, 2005 3:22:51 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter sendMessageData
WARNING: Unable to send replicated message, is server down?
java.net.SocketTimeoutException: Read timed out
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(SocketInputStream.java:129)
   at java.net.SocketInputStream.read(SocketInputStream.java:182)
   at
org.apache.catalina.cluster.tcp.SocketSender.waitForAck(SocketSender.java:13
4)
   at
org.apache.catalina.cluster.tcp.SocketSender.sendMessage(SocketSender.java:1
25)
   at
org.apache.catalina.cluster.tcp.PooledSocketSender.sendMessage(PooledSocketS
ender.java:119)
   at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(Repli
cationTransmitter.java:117)
   at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(Replicati
onTransmitter.java:149)
   at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:
409)
   at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:
417)
   at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.jav
a:202)
   at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
   at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
   at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296)
   at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694)
   at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:626)
   at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:807)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:644)
   at java.lang.Thread.run(Thread.java:534)
Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.SocketSender
waitForAck
WARNING: Wasn't able to read acknowledgement from
server[/192.168.0.204:4001] in 15000 ms. Disconnecting socket, and trying ag
ain.
Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.SocketSender
waitForAck
WARNING: Wasn't able to read acknowledgement from
server[/192.168.0.204:4001] in 15000 ms. Disconnecting socket, and trying ag
ain.



Flanders - 192.168.0.203



   

   

   

   
   


Krusty - 192.168.0.204



   

   

   

   
   








 




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



RE: Redirect to 443

2005-08-23 Thread Peter Crowther
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Is posible to force redirect to 443 when a non-ssl request is 
> received (without having a  )?

You could, for example, write a filter for your webapp that checked
whether the protocol was secure on an icoming request and responded with
a redirect if not.

    - Peter

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



RE: playing outside the tomcat 4 classloaders "sandbox"

2005-08-23 Thread Peter Crowther
> From: Fabien Benoit [mailto:[EMAIL PROTECTED] 
> I'm using Tomcat (4.1) and Axis 1.2 to provide a web service interface
> to a classical 2-tier application. My problem is, I need to access the
> existing API of this application, a single jar located outside the
> tomcat install. Copying this jar inside tomcat commmon lib dir or
> webapp lib dir is not permitted.
> Since tomcat gets rid of the system classpath

... But you can put it back by modifying catalina.{bat,sh} depending on
platform, which will be more robust than relying on a classloader.  If
you have a constraint that you're *also* not allowed to touch the Tomcat
startup files, then I would feed back that the combination of these
constraints will make any eventual solution *less* robust rather than
the intention behind the constraints of making more robust systems.

- Peter

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



Re: Problem VirtualHost WebApp Served on Two URLs

2005-08-20 Thread Peter Rossbach

You must rename your directory from mysite to ROOT.

source="com.ibm.wtp.web.server:mysite"/>



Peter

TroyGeek schrieb:

I have a problem with Tomcat Virtual Hosting. I have my virtual host defined 
like so in server.xml (the source thing there is from Eclipse Webtools):


http://www.mysite.com>" 
appBase="c:\sites\www.mysite.com\" unpackWARs="true" autoDeploy="true" 
xmlValidation="false" xmlNamespaceAware="false">


source="com.ibm.wtp.web.server:mysite"/>




When I bring up the site in the browser I can access it at:
http://www.mysite.com/
and
http://www.mysite.com/mysite/
I don't want the site to be available at http://www.mysite.com/mysite/
Do you know why it's serving the webapp at these two locations and not just 
the first? 
thank you for your time, 
Troy Campano


 





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



Re: Securing Tomcat Context Descriptor

2005-08-20 Thread Peter Rossbach
I thing you can use the Java Security Manager and OS level file 
permisssion for this

or wrote your own DataSource JNDI Factory.

Peter

Brett Parsons schrieb:


Hi All,

There is a requirement on the server that we have Tomcat 5.0.28 
deployed that no username/password information can be stored in 
plaintext (in the open).  Like many people, we are using JNDI 
datasources in our web application.  The datasource connection 
information (including the database username/password) is stored in 
the Tomcat Context Descriptor under 
TOMCATDIR/conf/Catalina/localhost/myApp.xml.


Does Tomcat provide a more secure way of storing the connection 
information stored in these context deployment descriptors?  Has 
anyone else run into the same problem and been able to solve it somehow?


Thanks,

Brett



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








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



Re: Tomcat 5.5.9 Cluster Error

2005-08-19 Thread Peter Rossbach

Which OS you used and is your firewall open for UDP port

45564 and TCP 4001 ? Is your network interface enabled for Multicast
Packages ?

Why you used the deployer ?

Peter

SUGAHARA Toshio schrieb:

>Sorry, attached file was not sent and I'll try again.
>
>[error message]
>ERROR main
>org.apache.catalina.cluster.tcp.SimpleTcpCluster - Unable
>to start cluster.
> java.net.SocketException: error setting options
>   at java.net.PlainDatagramSocketImpl.join(Native Method)
>   at
>java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:172)
>   at
>java.net.MulticastSocket.joinGroup(MulticastSocket.java:276)
>   at
>org.apache.catalina.cluster.mcast.McastServiceImpl.start(McastServiceImpl.java:174)
>   at
>org.apache.catalina.cluster.mcast.McastService.start(McastService.java:217)
>   at
>org.apache.catalina.cluster.mcast.McastService.start(McastService.java:167)
>   at
>org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:418)
>   at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1002)
>   at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>   at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>   at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>   at
>org.apache.catalina.core.StandardService.start(StandardService.java:450)
>   at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
>   at
>org.apache.catalina.startup.Catalina.start(Catalina.java:537)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>Method)
>   at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:585)
>   at
>org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>   at
>org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
>ERROR main org.apache.catalina.startup.Catalina -
>Catalina.start: 
> LifecycleException:  java.net.SocketException: error
>setting options
>   at
>org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:434)
>   at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1002)
>   at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>   at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>   at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>   at
>org.apache.catalina.core.StandardService.start(StandardService.java:450)
>   at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
>   at
>org.apache.catalina.startup.Catalina.start(Catalina.java:537)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>Method)
>   at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:585)
>   at
>org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>   at
>org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
>
>  
>
>>Hi all,
>>
>>I'm building Tomcat Cluster environment on the same
>>box.
>>Configuring sevrer.xml and starting tomcat instance,
>>I got
>>error message as attached file.
>>
>>Here is my envrinment;
>>Apache:2.0.54 MPM worker
>>Tomcat:5.5.9
>>JK_Connector:mod_jk 1.2.14.1
>>JDK:J2SE 1.5.0_04
>>
>>Also, I modified web.xml and added
>>"".
>>
>>What am I missing? I'm at a loss.
>>Any help would be very much appreciated.
>>
>>Thanks
>>
>>
>>
>>__
>>Save the earth
>>http://pr.mail.yahoo.co.jp/ondanka/
>>
>>
>>>
>>>  
>>>
>>
>>
>>
>>
>>
>>
>>  >
>>
>>
>className="org.apache.catalina.mbeans.ServerLifecycleListener"
>  
>
>>/>
>>  >
>>
>>
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
>  
>
>>/>
>>  >
>>
>>
>className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
>  
>
>>  
>>  
>>
>>
>>>type="java.lang.Integer" value="30"/>
>>
>&g

RE: Calculating required memory

2005-08-18 Thread Peter Crowther
> From: Oleg [mailto:[EMAIL PROTECTED] 
> Now regarding shared/lib directory I thought that every 
> application loads 
> its own copy of those libraries, but if its only one time 
> load and since all 
> my applications are identical copies (only data changes) I 
> might as well 
> move all my classes into shared, before I only had struts, 
> hibernate jars and so on

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
is the page you want.  They're loaded by the Shared classloader, of
which there is only one per Tomcat instance.

> That wouldnt create any thread safety issues would it?

Potentially yes (so test with Jmeter or similar), and it might also
cause some fun and games with multiple servlets if any perform
initialization assuming they're the only user of a particular library.
Imagine one servlet running for an extended period using a library, then
a second servlet starting and calling the initialization code of that
library... You get the idea.  A well-written library should ride this
out.

- Peter

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



Re: Problem including a file in Tomcat 5.5.9

2005-08-18 Thread Peter Miller
Hi Gabriel,

TC 5 needs strictly correct XML-Syntax.
If you take




TC 5 expects some other fields (like "value" or "name") inbetween these
2 tags.
Hth
Peter

Rakesh schrieb:

>No, this is not a bug.
>
>
>- Original Message - 
>From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
>To: 
>Sent: Thursday, August 18, 2005 4:57 PM
>Subject: Problem including a file in Tomcat 5.5.9
>
>
>  
>
>>Hi,
>>
>>Writing a jsp page in my app, I need to include other file in it, but
>>I got this issue in my Tomcat 5.5.9, when I write the include without
>>parameters like this:
>>
>>
>>
>>
>>I doesn't like written like this, so I write it like this and it works:
>>
>>
>>
>>But, I tested the same page in a Tomcat 4.1.12 and it worked OK the
>>first form too.
>>
>>Is this a Tomcat 5.5.9 bug? or it is OK that doesn't let me write
>>includes without parameters like in the first form?
>>
>>Regards,
>>Gabriel
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>


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



Re: access symbolic link

2005-08-18 Thread Peter Miller
Hi Sade,

try
docBase="edoc"

don't use the '/'  in the docBase param
Regards,
Peter


Sade schrieb:

>i am using apache tomcat 5.0.28.
>how to access symbolic link using the apache tomcat 5.0.28 web server?
>I have modified the context in server.xml as follow; still does not work
>
>workDir="/edoc/work" >
>   verbosity="4" timestamp="true"/>
>   allowLinking="true"/>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>

-- 
Mit freundlichen Grüssen,

Peter Miller
Brockhaus/Commission - EDV
Kreidlerstrasse 9
70806 Kornwestheim
Tel.: 07154 / 1327-95
mobil: 0151 / 11 63 68 25
www.brocom.de


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



RE: Calculating required memory

2005-08-17 Thread Peter Crowther
> From: Oleg [mailto:[EMAIL PROTECTED] 
> I am trying to approximate the amount of memory my server 
> will need running 
> tomcat. I understand that a lot depends on how the appication handles 
> resources, however at this point I am trying to figure out 
> what will be the 
> mimimum needed. In my case I have virtual hosting setup, with 
> all hosts 
> sharing the same libraries, so I have struts, hibernate,... 
> all sitting in 
> shared/lib directory of Tomcat. Would I be correct to 
> estimate that Tomcat 
> will atleast need
> 
> n(number of users/applications) * mb(total size of shared/lib)

As Chuck has already pointed out, no (but I'm going to try a slightly
different angle on it :-) ).  Each class that is loaded from shared/lib
will be loaded by the Shared classloader, so you'll only have one copy
of the class in your JVM.  Jars are compressed, so the sizes of the
loaded classes will be larger than the bytes occupied on disk; but not
all of the classes from a jar will be loaded, so the sizes will probably
be smaller.  Note, however, that any classes in the webapp's WEB-INF/lib
*will* be loaded once per webapp.  If you have large numbers of
applications, you may want to put more common libraries in shared/lib,
and you may also wish to increase the size of the permanent generation
(PermGen) in the JVM's memory model as this is where the classes are
stored.

Your per-session and per-page data will dwarf the space required for
classes; and, as Chuck pointed out, the only way to find out these sizes
is to profile the app.  This will also make sure that you're not going
to fall foul of any other performance limits, such as CPU use or disk
bandwidth.

- Peter

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



RE: 64 Bit Machines and Tomcat

2005-08-16 Thread Peter Crowther
> From: J R [mailto:[EMAIL PROTECTED] 
> Thanks... I didn't realize that Tomcat was pure Java.

There's the odd shell script and batch file to assist; other than that,
it's pure Java.  Certainly there's nothing that needs a
platform-specific compiler before it'll run, just the JVM.

> Being tortured through several CS classes that use
> Java.. I am familiar with its platform capabilities.

Heh.  Oh well, I get the 'teaching grandmother to suck eggs' prize for
the week.

- Peter

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



RE: 64 Bit Machines and Tomcat

2005-08-16 Thread Peter Crowther
> From: J R [mailto:[EMAIL PROTECTED] 
> Are there 64 bit counterparts?  If not, would the 32
> bit ones definitely work?

Assuming you have a Java virtual machine that runs on your system, the
Tomcat Java classes will run unchanged.  The 'virtual' in 'virtual
machine' means that compiled Java classes are insulated from the details
of the underlying machine - Tomcat runs unchanged on Windows, MacOS*,
and many flavours of UNIX.

For further reading, check out 'application virtual machine' at
http://en.wikipedia.org/wiki/Virtual_machine and
http://en.wikipedia.org/wiki/Java_virtual_machine

- Peter

* Although Tomcat 5.5 is a bit awkward until Sun release a Java 1.5
virtual machine for Mac.

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



Re: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread Peter Rossbach

Hey Michael,

I look inside the tomcat source and find that we don't set the cookie 
hostname attribute.
That means that the calling client/browser must made the hostname 
handling. I also

thing the redirect way is currently right direction.

Peter

Paul Singleton schrieb:


Michael Teter wrote:


If my users come to "blahblah.com", then go away, then return, they
get a new session id (for www.blahblah.com).

But if they come to www.blahblah.com, leave, and return (via link from
external site), they keep the same session.

I finally discovered that the browser (Firefox in this case) ends up
with two different session cookies - one for www.blahblah.com and one
for blahblah.com.



this behaviour seems reasonable to me...


What's the right thing to do to solve this?



it doesn't need solving, just accepting :-)

but assuming you want www.blahblah.com and blahblah.com
to behave (session-wise) like one domain, which they aren't,
you could redirect (client-side) from www.blahblah.com
(which IMHO is the redundant/obsolete/legacy domain) to
blahblah.com, which allocates sessions and dishes out cookies.

i.e. www.blahblah.com is a static site which just serves e.g.


  
<%= a.appTitle %>: redirection page
http://blahblah.com"; />
  
  http://blahblah.com')">

  


NB I haven't actually *tried* this :-)

Paul Singleton







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



Re: session problems: www.blahblah.com versus blahblah.com

2005-08-15 Thread Peter Rossbach

Hmm,

I thing  a host alias at for your tomcat configuration was helpfull :-)


   www.blahblah.com



Peter

Michael Teter schrieb:


Howdy.

I'm having some problems with sessions.

If my users come to "blahblah.com", then go away, then return, they
get a new session id (for www.blahblah.com).

But if they come to www.blahblah.com, leave, and return (via link from
external site), they keep the same session.

I finally discovered that the browser (Firefox in this case) ends up
with two different session cookies - one for www.blahblah.com and one
for blahblah.com.

What's the right thing to do to solve this?

Thanks much.

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




 




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



Re: Loadbalancer in Tomcat 5.5

2005-08-15 Thread Peter Rossbach

Why you don't use apache with mod_jk?
Then you can used directly the mod_jk loadbalancer features and 
apache/ssl support?


peter

samuel cheung schrieb:


Peter,

Thank you.
Can you please tell me if the Tomcat load balance supports SSL? 
If yes, do I need to setup certificate in the apache as well?


Thank you.

On 8/14/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
 


Mark your session with jvmRoute parameter.

 ...

see.http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html

Why you can't used balancer demo app?
   Read http://www.onjava.com/pub/a/onjava/2004/03/31/clustering.html

peter



samuel cheung schrieb:

   


Hi,

Can I use the LoadBalancer webapp to load balance requests to a number
of tomcat server in round-robin fashion?  I know there is an example
of the Loadbalancer in the documentation, but that is different from
what I want.

And how can the load balancer make sure the same session (based on the
session id) handles  by the SAME tomcat server?

Thank you.
Sam

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






 




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


   



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




 






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



Re: Sharing server information across a cluster ?

2005-08-14 Thread Peter Rossbach

Use tomcat cluster api >= 5.5.10 to implement you own cluster messages.
You can register your own Cluster Message Listener and with 
SimpleTcpCluster.send(ClusterMessage) you

can send your message to all cluster nodes.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html

Peter

Ronald Klop schrieb:

Jini? JavaSpaces? Put your data in a database? Maybe the 
ServletContext is already clustered in Tomcat 5.5.x?


JMS?

There is more than Tomcat out there.

Ronald.

On Tue Aug 09 15:59:58 CEST 2005 Tomcat Users List 
 wrote:




Hello,

we're currently setting up a Tomcat 5.5.9 cluster and we'd like to 
share server information between the different instances. Our 
approach so far has been to :

*create a session
*set it so that it never dies
*share it across the instances using session replication
*have the instances periodically post info about themselves to a bean 
in that session


However, it turns out that that the session (sessions?) quickly 
become de-synchronized, so that the different containers don't see 
the same info in the shared bean. Looking through the mailing-list 
and the code, it would seem that this is the expected behaviour, as 
the DeltaManager will only replicate a session after a request has 
been completed (and thus wouldn't be expected to do anything if the 
session is accessed through some other mean).


Is there any other way to accomplish what we're trying to do 
(basically, broadcasting info to the servers in the cluster) by 
piggy-backing on the clustering mechanism ? Better yet, would anyone 
have a piece of code that does something like that ?


Thanks in advance,
Laurent

***
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et etablis a l'intention exclusive de

ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. Le Groupe 
France Telecom decline toute responsabilite au titre de

ce message s'il a ete altere, deforme ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire 
immediatement et d'avertir l'expediteur.

***
This message and any attachments (the "message") are confidential and 
intended solely for the addressees. Any unauthorised

use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall 
not be liable for the message if altered, changed or

falsified.
If you are not receiver of this message, please cancel it immediately 
and inform the sender.

***

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








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



Re: Fault Tolerance in Tomcat Cluster

2005-08-14 Thread Peter Rossbach
This is information is wrong, tomcat >=5.0.19 and 5.5 have a cluster 
implementation with

fail over mechanism when use mod_jk or other loadbalancer modules.

Peter

samuel cheung schrieb:


Hi,


From this article

http://www.onjava.com/pub/a/onjava/2004/03/31/clustering.html?page=2,
it said "Tomcat 5 does not provide a built-in fail over mechanism to
detect when a cluster member crashes."

Can someone tell me if Tomcat 5.5 provides fail over detection in
tomcat cluster?

Thank you.
Sam

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




 





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



Re: Loadbalancer in Tomcat 5.5

2005-08-14 Thread Peter Rossbach

Mark your session with jvmRoute parameter.

 ...

see.http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html

Why you can't used balancer demo app?
   Read http://www.onjava.com/pub/a/onjava/2004/03/31/clustering.html

peter


  
samuel cheung schrieb:



Hi,

Can I use the LoadBalancer webapp to load balance requests to a number
of tomcat server in round-robin fashion?  I know there is an example
of the Loadbalancer in the documentation, but that is different from
what I want.

And how can the load balancer make sure the same session (based on the
session id) handles  by the SAME tomcat server?

Thank you.
Sam

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




 






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



Re: Clusters - Disabling or restricting autodiscovery via multicast (security question)

2005-08-14 Thread Peter Rossbach

OK, this is correct! Sorry, but I also thing that we must
have a secretKey and a restricted IP list to register inside cluster I 
want implement this
inside the next release. But currenly the cluster message are not 
crypted and when clients can connect
to your network your go in trouble. At secure production sites the 
replication and membership traffic send over

seperate network cards and switches.

Thanks
Peter

ryan boyd schrieb:


When using tomcat clusters on an untrusted subnet or using a routable
multicast address, i see the potential for a rogue tomcat instance to
join a cluster in order to hijack session information.  This doesn't
seem to be cured by any firewalling of incoming connections to the
valid servers, as, from what i have read, the valid servers will do a
unicast conect to the rogue sever on the address/port specified by the
rogue server's multicast transmission and will transfer session data
to it.

If this is incorrect, I'd be grateful for an explanation.  If this is
correct, Is there any way to restrict autodiscovery of cluster
membership to a known list of IPs or disable auto discovery
alltogether?

Thanks,

Ryan

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




 






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



Re: DeltaManager: calculation of deltas

2005-08-14 Thread Peter Rossbach
Yes, the DeltaManager work as you describe. Only as set/removeAttribute 
the changes was replicated, this
is an effective method that not all session attributes must be 
replicated at every request.  Currently this replication

method is the "quasi" standard at all cluster implementation that I have
used the last seven years. Inside the JBossCache AOP Framework you can 
find first implementation
to fine grain replication objects. 
(http://www.jboss.org/products/jbosscache). Let us know it works better

for you.

Peter

Ryan Heaton schrieb:


I'm trying to understand how the DeltaManager determines the deltas of a
session.  From what I could find out by browsing the source code, there is no
way to know whether a session attribute is dirty unless is it "set" again, e.g.
HttpSession.setAttribute(Object obj).  In other words, if the following piece of
servlet code were serviced within the context of a DeltaManager, I could not
expect the Count object to be broadcast to the cluster as a delta:

Count count = (Count) request.getSession().getAttribute("count");
count.value++;

I would have to ensure that the following code were executed in order to
broadcast the "count" attribute as a delta:

request.getSession().setAttribute("count", count);

1. Are my findings correct?
2. If my findings are correct, where is the justification for this logic?  Is
there some specification or other official documentation that acknowledges that
this is acceptable?

Regards,

-Ryan Heaton

--
This message may contain confidential information, and is
intended only for the use of the individual(s) to whom it
is addressed.
--


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




 





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



Re: JMX Remote monitoring with jakarta-tomcat-5.5.9 and jdk1.5.0_04

2005-08-14 Thread Peter Rossbach

Hey Joe,

currently the default java 5 jmx rmi implementation can't set a fix rmi 
port.
You can only set the naming port. Really bad, but the only way to change 
this,
is to implement a tomcat listener and start your own rmi connector. I am 
very happy

to see the implementation. :-)

Peter


Joe R. Lindsay schrieb:


So, I have it up and running, but it seems that remote
monitoring requires a random 2nd data port

So, even when I set the remote jmx port to say 1234
after restarting tomcat I see it listening on port 1234
and something like 33051.  This makes jmx remote a
bit difficult to use in a secure environment.

What secret am I missing?  I by playing with the
iptables and the dynamic port opened for listening I can
verify that my jconsole connect failures are related to this 2nd 
port.


Thanks!! Joe


 




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



Re: Monitor Tomcat with SNMP (MRTG etc)?

2005-08-10 Thread Peter Lin
JMeter has a tomcat monitor, which can access tomcat's status servlet
to get memory and thread info.

jmeter can monitor up to 200 servers on a 1.4ghz laptop with 1gb of
ram without any problems.

you can find out more on jmeter's site or go directly to the user manual here

http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html

peter lin


On 8/10/05, Lintang JP <[EMAIL PROTECTED]> wrote:
> how can I do monitoring with JMeter ? plis advice...
> 
> On 8/11/05, Peter Lin <[EMAIL PROTECTED]> wrote:
> >
> > if you use tomcat 5.0.19 or new, you can use JMeter to monitor tomcat.
> >
> > peter
> >
> >
> > On 8/10/05, Seth Ladd <[EMAIL PROTECTED]> wrote:
> > > Dave Morrow wrote:
> > > > Does anyone know how to use SNMP tools to monitor a Tomcat server? Are
> > > > there any open source tools to assist or add this ability?
> > >
> > > With JDK 5 you can enable the builtin SNMP agent. This can export all
> > > the standard JMX attributes of the VM. I don't think there's a way to
> > > export anything else, though. At least this gives memory, cpu, etc
> > > monitoring.
> > >
> > > Seth
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> ---
> http://www.psychotazkia.or.id
> 
>

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



Re: Monitor Tomcat with SNMP (MRTG etc)?

2005-08-10 Thread Peter Lin
if you use tomcat 5.0.19 or new, you can use JMeter to monitor tomcat.

peter


On 8/10/05, Seth Ladd <[EMAIL PROTECTED]> wrote:
> Dave Morrow wrote:
> > Does anyone know how to use SNMP tools to monitor a Tomcat server?  Are
> > there any open source tools to assist or add this ability?
> 
> With JDK 5 you can enable the builtin SNMP agent.  This can export all
> the standard JMX attributes of the VM.  I don't think there's a way to
> export anything else, though.  At least this gives memory, cpu, etc
> monitoring.
> 
> Seth
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: anonymising Tomcat

2005-08-05 Thread Peter Crowther
> From: Paul Singleton [mailto:[EMAIL PROTECTED] 
> Is it possible to configure Tomcat (5.5.9) so that a
> moderately able hacker couldn't figure out what is
> serving up our web apps?

It's possible to add the 'server' attribute to the connector definition
for the HTTP connector; server="BogoMAX v0.1 testing" should anonymise
the single most obvious piece of information, but pick your own string
so that when the hacker searches Google for the string they don't find
this post.  See
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for
details.

It's possible that a more able hacker could also gain information from
the usual range of specially-crafted invalid TCP packets [so use a
decent firewall in front of the app server that detects and drops
these], from traffic analysis of the way in which the app server returns
data in the case of buffered and unbuffered pages, and likely from other
techniques that I've not considered.

- Peter

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



RE: 1 jakarta server + multiple ip's

2005-08-04 Thread Peter Crowther
> From: Justin Jaynes [mailto:[EMAIL PROTECTED] 
> I tried the solution you offered (below) about
> creating more than one service and using the
> address="xxx" parameter in the Connectors tags.  It
> works great.

Glad to hear it.

> However, what do you mean in your
> "disclaimer" that it is from the documentation and is
> untested?  Did you mean to say NOT from the
> documentation?

I mean that I have not personally tested the solution, but have instead
read the documentation and have come up with that solution.  I would
expect the Tomcat development team to have tested the address attribute
and its consequences.

> And if it is untested, but it is
> working, are there any reasons not to use it in a
> production server?  Is it safe?

I'm the wrong person to answer that - not being on the Tomcat dev team
and not running such a site myself!  However, from my poking around the
innards of UNIX, Windows and Tomcat over the years:

- Binding a socket to a particular IP address rather than all the
addresses on a machine is stable and well-tested on Windows and all the
UNIX networking stacks I know;

- Java's socket interface appears stable under such conditions;

- I am aware of a few other sites running Tomcat for production use
under such conditions - not least to get multiple SSLs onto one Tomcat
instance.  I have seen no traffic on this list over the past year or so
that would indicate Tomcat is unstable under these conditions, but it is
undoubtedly a less common configuration than running Tomcat with a
single listening socket.

Sorry to weasel-word the answer, Justin; I'm trying to make clear the
limits of my own knowledge and where I'm relying on others for
information.

- Peter

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



RE: tomcat base vs. home

2005-08-02 Thread Peter Crowther
> From: Sternbergh, Cornell [mailto:[EMAIL PROTECTED] 
> Is Tomcat home the place tomcat looks for its stuff and Tomcat base
> where it looks for applications?  And then where would the HTML/JSP
> pages go?

Not quite.  HOME is where the Tomcat binaries live.  BASE allows you to
set up an alternative structure of conf/logs/temp/webapps/work so that
you can host multiple Tomcats from the same set of binaries - I use this
to run several Tomcat 5.0.28s.  My batch file is as follows:

set CATALINA_HOME=C:\Progra~1\APACHE~2\TOMCAT~1.0
set CATALINA_BASE=c:\cattery\bodington2
cd %CATALINA_HOME%\bin
start catalina run

Under c:\cattery\bodington2 (one of my Tomcat installations) you'll find
conf, logs, temp, webapps and work, with conf/server.xml and so forth.
So possibly not quite what you want - there's more there than just the
applications.

You might want to investigate the appBase attribute in server.xml,
however.

    - Peter

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



RE: 1 jakarta server + multiple ip's

2005-08-02 Thread Peter Crowther
> From: [EMAIL PROTECTED] 
> I'm configuring a tomcat-server and the server has multiple 
> ip's. I would like
> to setup virtual hosts based on the ip-address. I wouldn't 
> like running
> multiple servers.
> 
> What I've done: I have setup aliases for the possible 
> dns-names of the second
> virtual host (the possible names for one of the ip's). I have 
> also added the ip
> itself to the aliases link.
> However, I don't know how tomcat filter based on these names. 
> The ip-alias seems
> to work, so I'm wondering what tomcat is comparing it with.

Try this.  Beware, this is from the documentation and is untested!
Based on my 5.0.28 installation.

In your server.xml for Tomcat, set up two different Services - copy and
paste the existing chunk of XML for the Service, its Engine (and the
bits inside that) and its Connectors.

Change the appBase of the second Host to the place you want the second
virtual host to find its files.

In the Connectors of each Service, add:

address="ip.of.virtual.host"

near the port="port" attribute.  THis should cause the Connector to bind
to that IP rather than every IP on the machine.

Hope this helps.

- Peter

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



RE: TC5.5.9 Linux - shutdown port 8005 not bound BUG?

2005-08-01 Thread Peter Crowther
> From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
> Sorry yes... 8009 is the apj13 port (was figuring you'd guess).

Doh.  My bad - I use Tomcat directly, not via a front-end, so missed
that one.  Sorry Darryl (and anyone reading this thread in the
archives).

> My apache is using it locally I have added 
> address="127.0.0.1" for ajp13 
> so its not exposed externally.

Makes sense.

I'll crawl back into my hole now.

- Peter

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



RE: TC5.5.9 Linux - shutdown port 8005 not bound BUG?

2005-08-01 Thread Peter Crowther
> From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
> Subject: TC5.5.9 Linux - shutdown port 8005 not bound BUG?
> I've never had TC bind itself to 127.0.0.1:8005 to allow correct 
> shutdown to occur.

[...]

> $ netstat -tanp | grep 80
> tcp0  0 :::127.0.0.1:8009   
> :::*LISTEN  4621/jsvc.exec

There it is, on 8009 not 8005.

> Should I file this as a bug ?

Depends - have you changed your server.xml at all?

- Peter

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



RE: HTTP/1.1 GZIP compression and its impact on server

2005-07-29 Thread Peter Crowther
> From: Ronald Klop [mailto:[EMAIL PROTECTED] 
> Ethernet uses packets of 1500 bytes, this includes some 
> headers. So if your html is smaller than about 1400 bytes 
> your are sending the same number of packets over your network 
> with or without compression.

Not entirely true, as for Internet use intermediate routers may have
their own Maximum Transfer Unit (MTU), and TCP tries to guess the MTU,
usually starting at a segment size of 576 bytes of payload and moving up
or down on a per-connection basis.  Finally, gigabit and above Ethernet
allow frame bursts and may allow larger frame sizes.

Unless you have only Ethernet between your server and your clients, with
no wide-area network segments, it's unwise to assume a packet size.
Even if you only have Ethernet, different OSs handle the TCP segment
size differently.

> If the performance of your application depends 
> on these small things you have a very efficient application. 
> ;-) I think you can better spend some time profiling the rest 
> of the application to win in cpu speed.

Absolutely!

> Compressing images is useless.

Assuming they're already in a compressed format such as GIF, JPEG, PNG.
Uncompressed formats such as BMP would still benefit, but I wouldn't
expect most folks to be using them in an Internet app!

- Peter

PS: Beware, my knowledge of the innards of TCP/IP was current some years
ago, and some of the numbers may be off!

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



RE: Problem Running Tomcat on Russian MS Windows

2005-07-29 Thread Peter Crowther
> From: CW Lee [mailto:[EMAIL PROTECTED] 
> 1) Why doesn't Tomcat work on Russian MS Windows?
> 2) Is there anything i can do for Tomcat to run on Russian MS Windows?
> 2) Is there any other solution which allows me to run JSP off Russian
> MS Windows?

CW, have you successfully installed and run Tomcat on a
non-Russian-language Windows, so that you can tell that you have it
working on a non-Russian and failing on a Russian OS?  Or is this the
first time you have tried to run Tomcat, and you happen to be running it
on a Russian-language Windows?  The steps to debug the problem in the
two cases are very different.

We'll need some more information in order to be able to help you:

- Windows version (Windows for Workgroups? Windows 95? Windows XP?
Longhorn? Give us some help here!)

- Java version and whether it's a runtime environment (JRE) or
development environment (JDK)

- Tomcat version (should be a 3-digit number eg. 5.0.28, 5.5.10)

- A more detailed description of what doesn't work

At the moment, we have the equivalent of "Why doesn't my car work, how
can I fix it or are there other cars that work?" - we need more
information!

- Peter

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



RE: tomcat not starting properly

2005-07-26 Thread Peter Crowther
> From: blackwater dev [mailto:[EMAIL PROTECTED] 
> I am having trouble starting tomcat.  It gets to a point then 
> just stops. 
> 
> What am I doing wrong?
> 
> [EMAIL PROTECTED] bin]# ./catalina.sh jpda run
> Using CATALINA_BASE:   /usr/tomcat
> Using CATALINA_HOME:   /usr/tomcat
> Using CATALINA_TMPDIR: /usr/tomcat/temp
> Using JRE_HOME:   /usr/java/jdk1.5.0_04
> Listening for transport dt_socket at address: 8000

You have JPDA debugging enabled?

> Jul 26, 2005 8:48:25 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-80
> Jul 26, 2005 8:48:25 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 2932 ms
> Jul 26, 2005 8:48:26 AM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jul 26, 2005 8:48:26 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
> Jul 26, 2005 8:48:26 AM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jul 26, 2005 8:48:32 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-80

OK, there's port 80

> Jul 26, 2005 8:48:33 AM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009

There's its shutdown port

> Jul 26, 2005 8:48:33 AM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/179  config=null
> Jul 26, 2005 8:48:33 AM 
> org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Jul 26, 2005 8:48:34 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 8138 ms

... all looks OK to me.  It starts up and is waiting for you to connect
to eg. http://localhost:80.  What isn't happening that you would expect?

- Peter

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



AW: tomcat 5.5.9, JSP, EL evaluation

2005-07-26 Thread Peter . Zoche
Hi Walther,

be sure your web.xml is set to the following:

http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">

It has to be version 2.4 of Servlet Specification to enable
EL in your jsp's. It does not work with older versions!

Hope this helps,

Peter

-Ursprüngliche Nachricht-
Von: Walther Hautermann [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. Juli 2005 10:37
An: tomcat-user@jakarta.apache.org
Betreff: tomcat 5.5.9, JSP, EL evaluation


Hi,

 

My jsp page contains a . The result is
${users}. I had a look in the generated .java and it seems the ${users}
is not evaluated : _jspx_th_c_out_0.setValue(new String("${users}"));

 

Is there something to configure with tomcat 5.5.9 to enable the
evaluation of the EL ?

 

Thanks for your help.

Walther


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



Re: Reloading web context in a cluster

2005-07-22 Thread Peter Rossbach

Davide Romanini schrieb:


Il giorno ven, 22/07/2005 alle 16.39 +0200, Peter Rossbach ha scritto:
 


Hey,

a)   don't share things between cluster nodes!
   



You mean that Tomcat has problems using a shared filesystem???

 


No, tomcat has no problem with shared systems

b)   before you change your lib at one node please shutdown the context 
with manager app or ant tasks.
c)   Release change at runtime with cluster is heavy and can not made 
with the same nodes.
 OK, when no class changed that used inside session replication, it 
can be work!

d)   Don't change all nodes at the same time.
 Change one and
 after restart context - see that all session comes in.
 Then made change the others.
e)   Build cluster domains and not running all nodes inside one cluster.
 Tomcat cluster replicated all sessions between every node and 
this is very memory intensive.


   



We are not using (for now) clustering features of Tomcat: we only have 6
instances of Tomcat running without knowing of the others, we have no
session replication.

 

OK, but the word "cluster" means to mean me that replication is 
active... :-)



So the only solution to update my classes seems to be:

- unload the Axis context for each of the six machines
- update my jar file into WEB-INF/lib
- reload the Axis context for each of the six machines

 



Have you at the reloading="true" to your context.xml? At default tomcat 
not look for class and jar updates!



Am I right?

 


I think no!


Bye,
Davide Romanini



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




 




--
J2EE Systemarchitekt und Tomcat Experte

http://objektpark.de/
http://tomcat.objektpark.org/
http://centaurus.sourceforge.net/

Am Josephsschacht 72, 44879 Bochum, Deutschland
Telefon:  (49) 234 9413228
Mobil:(49) 175 1660884
E-Mail:  [EMAIL PROTECTED]




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



Re: Reloading web context in a cluster

2005-07-22 Thread Peter Rossbach

Hey,

a)   don't share things between cluster nodes!
b)   before you change your lib at one node please shutdown the context 
with manager app or ant tasks.
c)   Release change at runtime with cluster is heavy and can not made 
with the same nodes.
 OK, when no class changed that used inside session replication, it 
can be work!

d)   Don't change all nodes at the same time.
 Change one and
 after restart context - see that all session comes in.
 Then made change the others.
e)   Build cluster domains and not running all nodes inside one cluster.
 Tomcat cluster replicated all sessions between every node and 
this is very memory intensive.


Peter


Davide Romanini schrieb:


Hi,

I'm developing some web services using Axis. The whole axis context
(containing all my services) is embedded as a servlet into Tomcat 5.5.9.
Any time I create a new version of one service, I need to replace the
previous jar file into WEB-INF/lib, so to make changes effective I also
must reload the axis context (using manager facility).

My problem is that in production environment we have 6 machines with a
shared filesystem (gpfs) in load-balancing. So I think that if I do a
reload of the context using manager, I actually reload just one of the 6
istances of Tomcat (the one answered me in that moment), but the other 5
don't see the changes made to WEB-INF/lib and continue to run and old
version of the service.

Take into account that I don't have access to each single machine of the
cluster, so I can't do a reload of all the 6 contexts from my machine.

There's a way to propagate a context reload between the clusters?? I
really need to access each machine and reload for each single Tomcat
instance?

Thanks in advance.

Bye,
Davide Romanini


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




 




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



Re: Production cluster crashed with 'SEVERE: TCP Worker thread...' error

2005-07-19 Thread Peter Rossbach

Why you use your own SesssionManager?
Log say that your backup node is down.
Why you don't use the cluster domain feature?
   T1 and T3   Domain 20 at port 10020
   T2 and  T4 Domain 21 at port 10021

   T1 and T2 hosted at host 1
   T3 and T4 hosted at host 2

   Apaches at host 1 and  host 2 can access all tomcats
   A Ip Loadbalancer balanced the load between A1 and A2

Have you install the 5.5.9 ClusterFix pack!!

http://issues.apache.org/bugzilla/show_bug.cgi?id=34389


Peter

Joseph Lam schrieb:


Several minutes before the crash, I found some session replication error.
That seemed to cause all my JK connector threads being hold up and no
responding to further requests.

catalina.out:

Jul 15, 2005 10:29:01 AM org.apache.catalina.cluster.tcp.DataSender
pushMessage
INFO: resending 504 bytes to 203.194.228.76:4001 from 52990
java.net.SocketTimeoutException: Read timed out
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(SocketInputStream.java:129)
   at java.net.SocketInputStream.read(SocketInputStream.java:182)
   at
org.apache.catalina.cluster.tcp.DataSender.waitForAck(DataSender.java:542)
   at
org.apache.catalina.cluster.tcp.DataSender.pushMessage(DataSender.java:504)
   at
org.apache.catalina.cluster.tcp.DataSender.sendMessage(DataSender.java:378)
   at
org.apache.catalina.cluster.tcp.PooledSocketSender.sendMessage(PooledSocketSender.java:124)
   at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(ReplicationTransmitter.java:651)
   at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:348)
   at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:466)
   at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:495)
   at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:210)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
   at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
   at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
   at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Jul 15, 2005 10:29:01 AM org.apache.catalina.cluster.tcp.DataSender
pushMessage
INFO: resending 487 bytes to 203.194.228.77:4001 from 52737
java.net.SocketException: Socket closed
   at java.net.SocketInputStream.read(SocketInputStream.java:162)
   at java.net.SocketInputStream.read(SocketInputStream.java:182)
   at
org.apache.catalina.cluster.tcp.DataSender.waitForAck(DataSender.java:542)
   at
org.apache.catalina.cluster.tcp.DataSender.pushMessage(DataSender.java:504)
   at
org.apache.catalina.cluster.tcp.DataSender.sendMessage(DataSender.java:378)
   at
org.apache.catalina.cluster.tcp.PooledSocketSender.sendMessage(PooledSocketSender.java:124)
   at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(ReplicationTransmitter.java:651)
   at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:348)
   at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:466)
   at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:495)
   at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:210)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
   at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
   at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
   at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Jul 15, 2005 10:29:02 AM org.apache.catalina.cluster.tcp.DataSender
waitForAck
WARNING: Wasnt able to read acknowledgement from
server[{0}:{1,number,integer}] in {2,number,integer} ms. Disconnecting
socket, and trying again.

Jul 15, 2005 10:29:

Re: Tomcat 5.5 changes in Log format

2005-07-19 Thread Peter Rossbach

read documenctation:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

Robert Abbate schrieb:


Hello. We run a webhosting environment, and in previous releases we were
able to have separate logs for *each* virtual host by using something like
this:


...

...


After we just upgraded to Tomcat 5.5, we see this support was removed, and
are looking for ways to get around this and still provide seperate logging
ability for each virtual host. Does anyone have any suggestions on how to
set something like this up on Tomcat 5.5 ? We looked at log4j but it doesn't
seem like the same thing.

Kind Regards,
Robert


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




 





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



Re: Session Replication w/ Tomcat 5.0.30

2005-07-19 Thread Peter Rossbach


OK,

a) windows standalone need that mcastBindAddress is set to 127.0.0.1.
b) Please, use for consists sessions handling sticky session at mod:jk, 
backup is only for failover.
c) Used tomcat 5.5.9 with cluster fix pack 
  http://issues.apache.org/bugzilla/show_bug.cgi?id=34389


Peter


Jalenak, Jerry schrieb:


I'm testing a clustered Tomcat (5.0.30) configuration on Windows XP
Professional, behind Apache 2.0.54 with mod_jk as my load balancer.
Load balancing works fine, as I can see sessions being dispatched to
each Tomcat from mod_jk (sticky sessions is disabled.)  The problem I
have is that session replication between the Tomcat instances is
failing.  I've verified that the multicast 'heartbeats' are being sent
(via Ethereal), but I never see any TCP traffic between the instances.
This PC is NOT multi-homed (only have one network card), but I've been
able to do similar setups in Linux (multiple instances on one server)
without any problems.



Does anyone have a suggestions on what I can try to do to get sessions
to replicate?



Thanks!



Jerry Jalenak

Software Engineer

Netopia, Inc.




 






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



AW: Tomcat 5.5.9 connection pooling

2005-07-18 Thread Peter . Zoche
Here is the exception that is thrown. As you can see my
connection seems to be already closed. But why? Can this
be configured somewhere?

-Ursprüngliche Nachricht-
Von: Viorel Dragomir [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 18. Juli 2005 14:46
An: Tomcat Users List
Betreff: Re: Tomcat 5.5.9 connection pooling


Can you attach the exception thrown ?



Viorel Dragomir

.
..
---



- Original Message - 
From: [EMAIL PROTECTED] 
To: tomcat-user@jakarta.apache.org 
Sent: Monday, July 18, 2005 13:38
Subject: Tomcat 5.5.9 connection pooling


Hi!

I am using Tomcat 5.5.9 and I have established a DataSource for
database connection pooling where I can get connections from.
But when I try to close the connection via myConnection.close(),
always an exception is thrown. Is it right to close the connection
this way or do I have to return the connection to the pool in 
another way? 

Peter

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

java.sql.SQLException: Connection is closed.
at 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:174)
at 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:179)
at 
com.materna.buc.buildmanager.database.impl.BMDatabaseHandlerImpl.getUserList(Unknown
 Source)
at 
com.materna.buc.buildmanager.actions.CreateLoginAction.execute(Unknown Source)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at 
com.materna.buc.buildmanager.controller.BMRequestProcessor.processPreprocess(Unknown
 Source)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:184)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at 
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
at 
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
at 
org.apache.struts.taglib.logic.ForwardTag.doForward(ForwardTag.java:121)
at 
org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:105)
at 
org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(org.apache.jsp.index_jsp:88)
at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:61)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at

Tomcat 5.5.9 connection pooling

2005-07-18 Thread Peter . Zoche
Hi!

I am using Tomcat 5.5.9 and I have established a DataSource for
database connection pooling where I can get connections from.
But when I try to close the connection via myConnection.close(),
always an exception is thrown. Is it right to close the connection
this way or do I have to return the connection to the pool in 
another way? 

Peter

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



RE: Preprocessing JSP pages

2005-07-18 Thread Peter Crowther
> From: Edward Hibbert [mailto:[EMAIL PROTECTED] 
> Indeed, we don't want to have them permanently present in the 
> JSP at all (i.e. convert the pre-processing into a run-time 
> check), also for performance reasons.  That was the original 
> motivation for making this stuff pre-processed.

If you haven't benchmarked the effect on performance of leaving the
switches in the code, you might like to look at the log4j site, where
there are benchmarks on log4j.  It's illuminating.

- Peter

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



  1   2   3   4   5   6   7   8   9   10   >