Re: jkstatus - Error connecting to tomcat - ajp_process_callback write failed

2009-09-07 Thread Rainer Jung
On 04.09.2009 11:42, mateo-jl wrote:
 Hello everybody,
 
 i got many errors about mod_jk but i don't know whether it's the good forum 
 ...
 I have configured 4 tomcat identical servers reached by a front server apache 
 through mod_jk.
 When I look at the jkstatus page, I can note a strange behaviour: only the 
 same server (4) is under loaded.
 Regular percentages are:
 1st:30% , 2nd:29%, 3rd:28, 4th:13%  (note: lbfactor is the same for the 4 
 workers)

What are therse percentages?

 I don't know which way I can scrutinize.
 I just can see a lot of errors within error.log:
 Error connecting to tomcat (not necessarily the 4th) or 
 ajp_process_callback write failed.

Not good.

 So, the question is, which are the first checkings at tomcat configuration I 
 can do ?

Read about timeouts:

http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

All attributes are listed on

http://tomcat.apache.org/connectors-doc/reference/workers.html

 Do you have an how to for interpreting jkstatus ?

Not really. What about jkstatus do you want to interprete?

There's a bit of information on

http://tomcat.apache.org/connectors-doc/reference/status.html

 or is there any other way, a kind of pure tomcat tool,  to check the tomcat 
 perfs.

Regards,

Rainer

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



Re: /context not working -- mod_jk error: no match for /server-status

2009-09-07 Thread Rainer Jung
On 04.09.2009 16:01, Dennis Christopher wrote:
 Rainer,
 
 Apparently apache is calling /server-status - I see that mod_status is

No, apache itself isn't calling anything.

 enabled in httpd.conf and exercises that context.
 
 One of the frustrations, and I dont know Apache well, is that the access
 log seldom updates.
 The error log in the same folder does update, but contains little
 information--apache restarts is about it.
 
 I don't know if this helps, but I just tried to access the sample web
 app from the server machine's own browser
 
 httpd://localhost/sample
 
 and I get Bad Gateway! The proxy server received an invalid response
 from an upstream server
 Error 502
 locahost

So that indicates, that Apache is answering via mod_jk (or mod_proxy).
You should try the correct URL

http://localhost/sample/

though.

 and this does update the access log.

So you have a problem reaching your web server from outside. Firewall,
DNS, routing or similar stuff.

 Dennis Christopher
 On Sep 4, 2009, at 12:49 AM, Rainer Jung wrote:
 
 On 03.09.2009 20:24, Dennis Christopher wrote:
 Rainer,

 Trying your /sample/ I get the same result.

 The log appears to respond to that try but the lines are similar to
 those I originally posted from mod_jk.log.

 It's as though every context request is translated into
 '/server-status'.

 Not very likely. Are those entries also appearing in times you are not
 testing? If so those are someone else, and your own request isn't
 handled by the Apache you are looking at. Can you find your request in
 the access log?

 Go through all config files and find out, what is configured about
 /server-status. That URL doesn't have anything to do with mod_jk.

 Regards,

 Rainer

 the bracketed numbers are:

 [221:268597152] [debug] attempting to map URI '/server-status' from 5
 maps.
 .
 .
 [221:268597152] [debug] attempting to map context URI
 '/sample/*.=JBOSS1*' source JKMount
 .
 .

 all the entries are marked [debug].

 221 is process httpd with user _www.

 Dennis

 On Sep 3, 2009, at 1:26 PM, Rainer Jung wrote:

 On 03.09.2009 19:15, Dennis Christopher wrote:
 The problem is that I am trying to support simple references to my
 context without the tomcat port explicitly included.

 example: myexample.com/sample should invoke the web-app sample.

 You don't have a JkMount for /sample, only one for /sample/*.
 What happens, if you point your browser to

 http://my.apache.name/sample/

 If it doesn't work, extract the lines from your mod_jk log, that refer
 to this request. Look for something like

 ... [A_NUMBER:ANOTHER_NUMBER] ... Attempting to map URI '/sample/'
 from ...

 Then note A_NUMBER:ANOTHER_NUMBER which are the process and thread id
 used for the request, and get all lines form the log, which have a
 timestamp close to your request and use the same IDs.

 Check whether there are any non-debug lines in there. If you can't see
 what goes wrong, post those lines.

 Regards,

 Rainer

 what happens instead: the browser tells me: file not found.

 looking at catalina.out it seems the request doesnt reach Tomcat at
 all.

 How I did it: he quick start guide at

 http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

 gives a simple proof of concept for a context setup (/examples).

 which I have followed implicitly. I believe you have already seen
 what I
 have done with the config files I posted.

 Dennis

 P.S as it may be important - if I try example.com:8080/sample the main
 page of my web app loads but all of its subreferences, to gif images
 etc, are broken.


 On Sep 3, 2009, at 12:48 PM, Rainer Jung wrote:

 On 03.09.2009 15:34, Dennis Christopher wrote:
 Rainer,

 I am not sending /server-status explicitly.

 The mod_jk log which I excerpted earlier shows the processing of
 server-status before any context is asked for, apparently when
 Tomcat
 starts up.

 The log continues to repeat these entries - apparently mod_jk is
 looping
 trying to satisfy this context and never does.

 No I'm pretty sure this is not the case. I expect someone has a
 monitoring tool running or a browser windows with auto-refresh for
 /server-status and that's what produces those debug log lines in
 mod_jk.
 No problem per se.

 So back to the basic question: what is your problem? What are you
 trying
 to achieve, what did you do to make it work, how do you test it, what
 result do you expect and what happens instead?

 Regards,

 Rainer

 I added JkMountCopy All but this had no effect.

 Dennis
 On Sep 3, 2009, at 4:18 AM, Rainer Jung wrote:

 On 02.09.2009 21:45, Dennis Christopher wrote:
 Rainer,

 Thanks for the reply. I was confused in my orginal post: I am not
 using
 JBoss at all, only mod_jk.

 The file contents are as follows below.

 Apache has a hosts directory, but I'm not sure if the files
 matter.
 They
 are either the apache .default files or slight modifications of
 them,
 e.g. virtual_host_global.conf contains just:

 Listen *:80

 I don't understand, why you test 

Tomcat App Configuration

2009-09-07 Thread skarahan

Hi,

I use tomcat5.5 on ubuntu and have java web application.When I run it, its
address looks like http://servername:8180/myapp; on browser address
line.But I don't like this.when I write  http://servername:8180/; address
on web browser address line,I want to open my application.

I hope that I can explain my question..

Thanks for your help.
-- 
View this message in context: 
http://www.nabble.com/Tomcat-App-Configuration-tp25327877p25327877.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat App Configuration

2009-09-07 Thread Markus Meyer

Hi,

just use an entry like the following in your Tomcat's server.xml 
configuration file:


Context path=/ docBase=/path/to/where/your/webapp/resides/

HTH
Markus

skarahan schrieb:

Hi,

I use tomcat5.5 on ubuntu and have java web application.When I run it, its
address looks like http://servername:8180/myapp; on browser address
line.But I don't like this.when I write  http://servername:8180/; address
on web browser address line,I want to open my application.

I hope that I can explain my question..

Thanks for your help.
  



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



Re: mod jk - multiple applications, different server clusers, sticky sessions

2009-09-07 Thread Rainer Jung
Hi Chris,

On 04.09.2009 16:29, Christopher Schultz wrote:
 Rainer,
 
 On 9/4/2009 12:52 AM, Rainer Jung wrote:
 On 03.09.2009 23:31, Christopher Schultz wrote:
 Whenever a client browses to webapps found on / and /foo, the requests
 to /foo will get TWO cookies, and confusion may occur (I'm not sure what
 mod_jk will do in this situation... Rainer?).
 
 Not sure either :(
 
 Even if I looked at the code now, I wouldn't take it for granted, that
 the behaviour can't change.
 
 Agreed. I don't have a cluster handy to test, but it would be good to
 know what mod_jk actually does in the case where multiple JSESSIONID
 cookies exist and have different jvmRoute suffixes.
 
 Actually I'm not even sure what the browser is supposed to send (the
 same cookie multiple times, or only the one with the longest path
 match).
 
 My experience was that /both/ cookies were sent (which makes sense,
 since there's no prohibition against the same cookie name being used
 more than one time when a different path is used).

OK, I did some (very little) work:

RFC 2109 and 2965 both state:

 If multiple cookies satisfy the criteria above, they are ordered in
   the Cookie header such that those with more specific Path attributes
   precede those with less specific.  Ordering with respect to other
   attributes (e.g., Domain) is unspecified.

(sections 4.3.4 resp. 3.3.4).

The code of mod_jk (1.2.28) looks for a URL encoded session id (and uses
that one if it finds one) and otherwise it takes all cookie session ids
it can find in the order of Cookie headers in the request.

It then uses all the session ids in this order and searches for a usable
worker (e.g. existing and not being in error or stopped) until it finds
one or runs out of session ids.

Regards,

Rainer

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



Re: mod_jk Tomcat AJP Connectivity problem

2009-09-07 Thread Rainer Jung
On 05.09.2009 11:02, Joseph2009 wrote:
 
 I am using Tomcat 5.5.20 and Apache 2.2 with Mod_jk 1.2.2.7 on Solaris 10
 intel platform. Following is my configurations
 
 Tomcat
 
 port=8030
 enableLookups=false
 redirectPort=8444
 protocol=AJP/1.3
 compression=on
 compressableMimeType=text/html,text/xml,text/css,text/javascript
 maxThreads=250
 maxSpareThreads=75
 minSpareThreads=25
 connectionTimeout=60
 
 Apache
 
 IfModule mpm_prefork_module
 StartServers 10
 MinSpareServers  10
 MaxSpareServers  20
 MaxClients  200
 MaxRequestsPerChild   0
 /IfModule
 
 mod_jk
 worker.template.type=ajp13
 worker.template.lbfactor=1
 worker.template.ping_timeout=1000
 worker.template.ping_mode=A
 worker.template.socket_timeout=10
 worker.template.connection_pool_timeout=600
 worker.anznz.reference=worker.template
 worker.anznz.host=localhost
 worker.anznz.port=8030
 
 My website is running fine for the entire day and mod_jk started throwing
 the following error end of the day
 
 [Sat Sep 05 11:27:05 2009][23566:1] [error] jk_ajp_common.c (2400): ()
 sending request to tomcat failed (unrecoverable),  (attempt=1)
 
 [Sat Sep 05 11:27:04 2009][7724:1] [info] jk_ajp_common.c (1104): ()
 can't receive the response message from tomcat, tomcat (127.0.0.1:8030) has
 forceda connection close for socket 36
 
 [Sat Sep 05 11:27:05 2009][7724:1] [error] jk_ajp_common.c (1920): ()
 Tomcat is down or refused connection. No response has been sent to the
 client (yet
 )
 
 Once the abouve error hits, the user get the service not available pages. It
 is not happening to all users. Then when I restart the Tomcat, it started
 working. There is no problem in accessing the site through the HTTP
 connector in the Tomcat.
 
 Did someone experience similar problem and is there any solution for this
 problem?

Maybe you run out of Tomcat threads because requests start hanging and
slowly your thread pool gets exhausted. Try to do a few (like 3) thread
dumps, each a few (like 3) seconds apart form each other.

Thread Dump: kill -QUIT to the Tomcat PID. It writes a list of all
thread to catalina.out, together with their stack, i.e. what code they
are running at that moment).

Regards,

Rainer

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



RE: maling list archives and bug tracker dumps for academic research evaluation

2009-09-07 Thread Iqbal, Aftab

Hi Mark,
 
2009/9/4 Iqbal, Aftab aftab.iq...@deri.org:

 Any update or news about the maling list archives and bug tracker dumps ?

 regards
 Aftab Iqbal


By the way, the mail archives are available here:
http://tomcat.apache.org/mail/dev/

I got the link of mailing list archives from Konstantin (thanks to him :)). I 
would like to know about the possibility for Bug tracker dump of Tomcat.

Those are gzipped mbox files. Though I do not see that location to be
documented/mentioned anywhere.


thanks and looking forward for your kind response.
regards
Aftab Iqbal

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




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

Re: Tomcat App Configuration

2009-09-07 Thread skarahan

Hi ,
thanks your help.I add this line server.xml Context path=/
docBase=/usr/share/tomcat5.5/webapp/myapp/ I can see it manager page
path column.But its not running.is there another xml file to congire it.?


Markus Meyer wrote:
 
 Hi,
 
 just use an entry like the following in your Tomcat's server.xml 
 configuration file:
 
 Context path=/ docBase=/path/to/where/your/webapp/resides/
 
 HTH
 Markus
 
 skarahan schrieb:
 Hi,

 I use tomcat5.5 on ubuntu and have java web application.When I run it,
 its
 address looks like http://servername:8180/myapp; on browser address
 line.But I don't like this.when I write  http://servername:8180/;
 address
 on web browser address line,I want to open my application.

 I hope that I can explain my question..

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

-- 
View this message in context: 
http://www.nabble.com/Tomcat-App-Configuration-tp25327877p25328261.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: maling list archives and bug tracker dumps for academic research evaluation

2009-09-07 Thread Mark Thomas
Iqbal, Aftab wrote:
 Hi Mark,
  
 2009/9/4 Iqbal, Aftab aftab.iq...@deri.org:
 Any update or news about the maling list archives and bug tracker dumps ?

 regards
 Aftab Iqbal

 
 By the way, the mail archives are available here:
 http://tomcat.apache.org/mail/dev/
 
 I got the link of mailing list archives from Konstantin (thanks to him :)). I 
 would like to know about the possibility for Bug tracker dump of Tomcat.

It is on my todo list.

Mark




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



Re: Tomcat App Configuration

2009-09-07 Thread Markus Meyer
I'm not sure what's the problem, but I would not put the app into 
/usr/share/tomcat5.5/webapps because this is the default location. I 
would put the webapp into a different location. Also, check if you 
already have a ROOT directory in your webapps/ path which may interfere 
with your other root setting.



Markus

skarahan schrieb:

Hi ,
thanks your help.I add this line server.xml Context path=/
docBase=/usr/share/tomcat5.5/webapp/myapp/ I can see it manager page
path column.But its not running.is there another xml file to congire it.?


Markus Meyer wrote:
  

Hi,

just use an entry like the following in your Tomcat's server.xml 
configuration file:


Context path=/ docBase=/path/to/where/your/webapp/resides/

HTH
Markus

skarahan schrieb:


Hi,

I use tomcat5.5 on ubuntu and have java web application.When I run it,
its
address looks like http://servername:8180/myapp; on browser address
line.But I don't like this.when I write  http://servername:8180/;
address
on web browser address line,I want to open my application.

I hope that I can explain my question..

Thanks for your help.
  
  

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






  



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



Re: Tomcat App Configuration

2009-09-07 Thread André Warnier

Markus,
that was a bad recommendation.
Look here instead :
http://wiki.apache.org/tomcat/HowTo#head-2e16a614a1be6e03102fc69dd59587a30e20bc5c


Markus Meyer wrote:
I'm not sure what's the problem, but I would not put the app into 
/usr/share/tomcat5.5/webapps because this is the default location. I 
would put the webapp into a different location. Also, check if you 
already have a ROOT directory in your webapps/ path which may interfere 
with your other root setting.



Markus

skarahan schrieb:

Hi ,
thanks your help.I add this line server.xml Context path=/
docBase=/usr/share/tomcat5.5/webapp/myapp/ I can see it manager page
path column.But its not running.is there another xml file to congire it.?


Markus Meyer wrote:
 

Hi,

just use an entry like the following in your Tomcat's server.xml 
configuration file:


Context path=/ docBase=/path/to/where/your/webapp/resides/

HTH
Markus

skarahan schrieb:
   

Hi,

I use tomcat5.5 on ubuntu and have java web application.When I run it,
its
address looks like http://servername:8180/myapp; on browser address
line.But I don't like this.when I write  http://servername:8180/;
address
on web browser address line,I want to open my application.

I hope that I can explain my question..

Thanks for your help.


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






  



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






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



Re: Tomcat App Configuration

2009-09-07 Thread David Smith

Just delete the original ROOT webapp and rename your webapp ROOT.

-- David

On Sep 7, 2009, at 5:54 AM, skarahan samilkara...@gmail.com wrote:



Hi,

I use tomcat5.5 on ubuntu and have java web application.When I run  
it, its

address looks like http://servername:8180/myapp; on browser address
line.But I don't like this.when I write  http://servername:8180/;  
address

on web browser address line,I want to open my application.

I hope that I can explain my question..

Thanks for your help.
--
View this message in context: 
http://www.nabble.com/Tomcat-App-Configuration-tp25327877p25327877.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



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



RE: maling list archives and bug tracker dumps for academic research evaluation

2009-09-07 Thread Iqbal, Aftab

 Hi Mark, 
 I got the link of mailing list archives from Konstantin (thanks to him :)). 
 I would like to know about the possibility for Bug tracker dump of Tomcat.

It is on my todo list.

Thanks

regards
Aftab Iqbal



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




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

Version in web.xml

2009-09-07 Thread David Balažic
Hi!

Is the version mismatch in the web-app tag, like this:

web-app version=2.4 xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;

an error? Or is it valid? Tomcat 6.0.20 appears to accept it.

Regards,
David

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



Re: Version in web.xml

2009-09-07 Thread Mark Thomas
David Balažic wrote:
 Hi!
 
 Is the version mismatch in the web-app tag, like this:
 
 web-app version=2.4 xmlns=http://java.sun.com/xml/ns/javaee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 
 an error? Or is it valid? Tomcat 6.0.20 appears to accept it.

It is an error but Tomcat will ignore it. That would probably change if
you enabled validation

Mark




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



Re: Tomcat App Configuration

2009-09-07 Thread Markus Meyer

Hi André,

sorry if I got that one wrong. It's just that it works for me the way I 
describe it. (I generally avoid putting my webapps into the default 
setting and create Context entries for all of them.)



Markus

André Warnier schrieb:

Markus,
that was a bad recommendation.
Look here instead :
http://wiki.apache.org/tomcat/HowTo#head-2e16a614a1be6e03102fc69dd59587a30e20bc5c 




Markus Meyer wrote:
I'm not sure what's the problem, but I would not put the app into 
/usr/share/tomcat5.5/webapps because this is the default location. 
I would put the webapp into a different location. Also, check if you 
already have a ROOT directory in your webapps/ path which may 
interfere with your other root setting.



Markus

skarahan schrieb:

Hi ,
thanks your help.I add this line server.xml Context path=/
docBase=/usr/share/tomcat5.5/webapp/myapp/ I can see it manager 
page
path column.But its not running.is there another xml file to congire 
it.?



Markus Meyer wrote:
 

Hi,

just use an entry like the following in your Tomcat's server.xml 
configuration file:


Context path=/ docBase=/path/to/where/your/webapp/resides/

HTH
Markus

skarahan schrieb:
  

Hi,

I use tomcat5.5 on ubuntu and have java web application.When I run 
it,

its
address looks like http://servername:8180/myapp; on browser address
line.But I don't like this.when I write  http://servername:8180/;
address
on web browser address line,I want to open my application.

I hope that I can explain my question..

Thanks for your help.


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






  



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






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




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



Cookie value with equal sign getting truncated

2009-09-07 Thread Joerg Schaefer
It seems, that Tomcat doesn't allow a =  sign in the cookie value.
If there is a = it put the value into  -signs.
This problem occurs with Tomcat 6.0.18.
Are there a workarounds available to disable this behavior?

regards, Joerg

*** DEPARTMENT DISCLAIMER ***

Re: Cookie value with equal sign getting truncated

2009-09-07 Thread Mark Thomas
Joerg Schaefer wrote:
 It seems, that Tomcat doesn't allow a =  sign in the cookie value.

It is the cookie specs that doesn't allow unquoted '=' and Tomcat got
stricter about enforcing the specs as a result of a couple of security
vulnerabilities.

 If there is a = it put the value into  -signs.

Yep - as per the spec. Values that contain '=' have to be v1 cookies and
have to be quoted.

 This problem occurs with Tomcat 6.0.18.

The cookie changes started in 6.0.14 and caused various regressions. The
6.0.18+ behaviour (ie the auto switching to v1 cookies) was added to
help those apps that used '=' in the value and couldn't easily fix this
themselves.

 Are there a workarounds available to disable this behavior?

Your options are:

1) Have v0 cookies with '=' treated as invalid (use
STRICT_SERVLET_COMPILANCE)
2) Have Tomcat automatically switch the cookie to v1 and add the quotes
(the default)
3) Don't use '=' in cookie values (ie change your app)

Mark




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



Re: Cookie value with equal sign getting truncated

2009-09-07 Thread Joerg Schaefer
Hi Mark,
thanks for the quick reply.
How can i realize option 1?
How can i configure STRICT_SERVLET_COMPILANCE?

thanks,
Joerg




Mark Thomas ma...@apache.org 
07.09.2009 15:17
Please respond to
Tomcat Users List users@tomcat.apache.org


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

Subject
Re: Cookie value with equal sign getting truncated






Joerg Schaefer wrote:
 It seems, that Tomcat doesn't allow a =  sign in the cookie value.

It is the cookie specs that doesn't allow unquoted '=' and Tomcat got
stricter about enforcing the specs as a result of a couple of security
vulnerabilities.

 If there is a = it put the value into  -signs.

Yep - as per the spec. Values that contain '=' have to be v1 cookies and
have to be quoted.

 This problem occurs with Tomcat 6.0.18.

The cookie changes started in 6.0.14 and caused various regressions. The
6.0.18+ behaviour (ie the auto switching to v1 cookies) was added to
help those apps that used '=' in the value and couldn't easily fix this
themselves.

 Are there a workarounds available to disable this behavior?

Your options are:

1) Have v0 cookies with '=' treated as invalid (use
STRICT_SERVLET_COMPILANCE)
2) Have Tomcat automatically switch the cookie to v1 and add the quotes
(the default)
3) Don't use '=' in cookie values (ie change your app)

Mark




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




*** DEPARTMENT DISCLAIMER ***

Re: Cookie value with equal sign getting truncated

2009-09-07 Thread Mark Thomas
Joerg Schaefer wrote:
 Hi Mark,
 thanks for the quick reply.
 How can i realize option 1?
 How can i configure STRICT_SERVLET_COMPILANCE?

http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html

Mark




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



Re: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7

2009-09-07 Thread lmk

Hi,

I have  the same problem using tomcat 6 and jdk 6,  do you find a workaround
?

Regards!


Mark Thomas wrote:
 
 Bradley Wagner wrote:
 Ok, I'll try that next. Two things:
 - Did some searching, but couldn't find how to determine the default GC
 method for my Java version
 
 http://blogs.sun.com/watt/resource/jvm-options-list.html is a useful
 reference
 
 - Would you recommend I move this problem elsewhere, given that this is
 likely not related to Tomcat at all. I don't want to spam this list.
 
 No need. GC freezes are close to the most common issue I see with
 unstable production Tomcat systems so I think it is very relevant.
 
 Mark
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/100--usage-and-hanging-on-startup-of-Spring-Hibernate-app-in-Tomcat--5.5-on-Ubuntu-7-tp25194606p25331069.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: avoiding ssl vulnerabilities in tomcat

2009-09-07 Thread sunil chandran
Hello all,
As per the suggestion from tomcat forum users,I went ahead and installed 
tomcat4.1.40
Then i copied the original webapps file from the back up tomcat (old version).
I tried to start the server. It shows this error
Sep 7, 2009 10:13:11 PM org.apache.coyote.http11.Http11BaseProtocol initINFO: 
Initializing Coyote HTTP/1.1 on http-8080Sep 7, 2009 10:13:12 PM 
org.apache.coyote.http11.Http11BaseProtocol initINFO: Initializing Coyote 
HTTP/1.1 on http-8443Starting service Tomcat-StandaloneApache 
Tomcat/4.1.40Catalina.start: LifecycleException:  Context startup failed due to 
previous errorsStopping service Tomcat-StandaloneCatalina.stop: 
LifecycleException:  Coyote connector has not been startedLifecycleException:  
Coyote connector has not been started
Please help me 
regardsSunil C



--- On Fri, 14/8/09, Christopher Schultz ch...@christopherschultz.net wrote:

From: Christopher Schultz ch...@christopherschultz.net
Subject: Re: avoiding ssl vulnerabilities in tomcat
To: Tomcat Users List users@tomcat.apache.org
Date: Friday, 14 August, 2009, 7:55 PM

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sunil,

On 8/13/2009 1:11 AM, sunil chandran wrote:
 Now installing tomcat 4.1.40 what all changes will be required in my sevice..
 
 no change in application?

You are very unlikely to require any webapp changes.

 maybe installation and configuration changes will be needed?

You are very unlikely to require any configuration changes. That's what
moving from patch level (4.1.x to 4.1.y) means: very little should be
required of you.

That being said, it is up to you to read the change log to find out of
any breaking changes have been introduced. This often happens when a
security bug is fixed which requires, say, URLs to be interpreted
differently. If your webapp relies on that old behavior, you'll need to
make arrangements for that (often using a configuration parameter).

The ChangeLog for Tomcat 4.1 can be found here:

http://archive.apache.org/dist/tomcat/tomcat-4/v4.1.40/RELEASE-NOTES-4.1.txt

It's not in the most easily-read format (changes are described by
component, then by version, rather than the other way around, which is
how I would have done it), but you still have to read it: look for every
change between 4.1.24 (that's your current version, right?) and 4.1.40.
You may have to read relevant bug reports, too.

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

iEYEARECAAYFAkqFc9oACgkQ9CaO5/Lv0PAYhQCeJkuKdCkwd/UcQHxUh7/Zii8l
KnIAoIClIURe/eRpAavc/HO2KtnkWhPc
=KB5m
-END PGP SIGNATURE-

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




  See the Web#39;s breaking stories, chosen by people like you. Check out 
Yahoo! Buzz. http://in.buzz.yahoo.com/

detecting oracle connection failures

2009-09-07 Thread Roberto Benedetti

hi everyone,
  I'm having problems trying to combine Oracle and Tomcat: if I define 
a DB connection to a MySQL or Postgres resource, everything works fine 
and DB failures are properly detected.
conversely, if I define an Oracle DataSource, apparently RDBMS or 
network problems are not detected and my application keeps waiting ad 
libitum, ignoring the maxWait parameter.


my conf:
Context
Resource name=jdbc/myoracle
auth=Container
type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@host:port:sid
username=username
password=
maxActive=2
maxIdle=2
maxWait=2000/
!-- WatchedResourceWEB-INF/web.xml/WatchedResource --
/Context

my environment:
- apache-tomcat-6.0.20
- jdk-1.6.0_14
- ojdbc6.jar (2111220 bytes)

is it a driver-specific issue?
I couldn't find out any useful (i.e. pastable) hint. is tomcat+oracle 
such a rare combination?


thanks in advance,
  roberto



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



tomcat web server optimization

2009-09-07 Thread Bilal Jan
Please consider the following details:
Scenario: We put load on tomcat (basically a simple http request) and in 
response an http response sends 1 to show success.
 
Executor and Connector configuration (TOMCAT 6) with java version 1.4.2:
Executor name=tomcatThreadPool namePrefix=catalina-exec- 
    maxThreads=300 minSpareThreads=100 maxIdleTime=12 /
 
Connector executor=tomcatThreadPool port=8080  protocol=HTTP/1.1 
   acceptCount=100
   acceptorThreadCount=2
   processCache=-1
       enableLookups=”false”
   connectionTimeout=12
   socket.tcpNoDelay=true 
   redirectPort=8443 /
 
Now I have tried many other configurations but I think this basic configuration 
should work.What we eventually want is TPS around 1000.I have tried the  
version where we don’t use the executor and have useExecutor=”false” in 
connector settings and define maxthread and minspare thread count in 
connector.In all cases TPS seems pretty much the same. More so I have also 
tried using different protocol 
protocol=”org.apache.coyote.http11.HTTP11NioProtocol” as well. We have heap 
size increased to 1GB.
 
Load  Testing and results:
100 users hit once we get  23 tps at max
100 users hit thrice with no gap we get 250 tps.
But as we go to increase the number of users and not iterations we get a 
bottleneck of 25 tps at max and not more.As minSpareThread count is 25 by 
default. I thought that it may very well explain the bottleneck but increasing 
the minsparethread count doesn’t help at all we get same results.
  
What we want is a simple configuration that ensures high tps .
I am stuck here would really appreciate your help.Would be waiting for your 
response.


  

Re: detecting oracle connection failures

2009-09-07 Thread David Smith
I think you've misunderstood what maxWait does.  It tells the pool how
long to have your webapp code wait for a connection when all the
connections in the pool are busy servicing other requests (the pool is
exhausted).  Sounds to me like you've successfully received a
connection, are attempting a transaction and the transaction is hung up
somehow with a potential network issue.  I've not done any work with the
Oracle drivers so maybe someone else on the list has an idea?

--David

Roberto Benedetti wrote:
 hi everyone,
   I'm having problems trying to combine Oracle and Tomcat: if I define
 a DB connection to a MySQL or Postgres resource, everything works fine
 and DB failures are properly detected.
 conversely, if I define an Oracle DataSource, apparently RDBMS or
 network problems are not detected and my application keeps waiting ad
 libitum, ignoring the maxWait parameter.

 my conf:
 Context
 Resource name=jdbc/myoracle
 auth=Container
 type=javax.sql.DataSource
 driverClassName=oracle.jdbc.OracleDriver
 url=jdbc:oracle:thin:@host:port:sid
 username=username
 password=
 maxActive=2
 maxIdle=2
 maxWait=2000/
 !-- WatchedResourceWEB-INF/web.xml/WatchedResource --
 /Context

 my environment:
 - apache-tomcat-6.0.20
 - jdk-1.6.0_14
 - ojdbc6.jar (2111220 bytes)

 is it a driver-specific issue?
 I couldn't find out any useful (i.e. pastable) hint. is tomcat+oracle
 such a rare combination?

 thanks in advance,
   roberto



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



-- 
David Smith
Programmer/Analyst
College of Agriculture and Life Sciences
Cornell University
B32 Morrison Hall
Ithaca, NY 14853
Phone: (607) 255-4334


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



RE: detecting oracle connection failures

2009-09-07 Thread Caldarale, Charles R
 From: Roberto Benedetti [mailto:r.benede...@cineca.it]
 Subject: detecting oracle connection failures
 
 if I define an Oracle DataSource, apparently RDBMS or
 network problems are not detected and my application
 keeps waiting ad libitum, ignoring the maxWait parameter.

You might want to try setting the testOnBorrow and validationQuery attributes 
for your connection pool.  This will avoid DBCP giving out dead connections.  
Doc is here:
http://commons.apache.org/dbcp/configuration.html

 - Chuck


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


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



RE: tomcat web server optimization

2009-09-07 Thread Caldarale, Charles R
 From: Bilal Jan [mailto:just4u_...@yahoo.com]
 Subject: tomcat web server optimization
 
 Executor and Connector configuration (TOMCAT 6) with java version
 1.4.2:

Not possible; Tomcat 6 requires JRE/JDK 1.5 or higher.  What are you really 
running?

 But as we go to increase the number of users and not iterations 
 we get a bottleneck of 25 tps at max and not more.

What's your CPU utilization?  What does a thread dump show is going on?  Do you 
have enough RAM to support that large a heap without paging?

You need to do some basic performance analysis homework first.

 - Chuck


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



RE: Can't start Tomcat5 service on Windows Vista Home Premium

2009-09-07 Thread Caldarale, Charles R
 From: Mark Thomas [mailto:ma...@apache.org]
 Subject: Re: Can't start Tomcat5 service on Windows Vista Home Premium
 
 Maybe, maybe not. Looking again at the log message it does look more
 like a 64-bit issue rather than the JVM issue.

The log shows that it's using a 32-bit JVM - C:\Program Files (x86) - so the 
default tomcat6.exe should work.

I'd suggest downloading the .zip version and verify that Tomcat functions with 
the installed JVM, and only then trying to install the service with the 
service.bat script.

 - Chuck


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


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



RE: Tomcat App Configuration

2009-09-07 Thread Caldarale, Charles R
 From: Markus Meyer [mailto:me...@mesw.de]
 Subject: Re: Tomcat App Configuration
 
 sorry if I got that one wrong. It's just that it works for me the way I
 describe it.

I doubt it.  Not only are you violating standard practice by putting a 
Context element in server.xml, your path attribute is wrong: the default 
webapp is , not /.  Whatever happens to be working in your environment is 
an accident.

 I would not put the app into /usr/share/tomcat5.5/webapps
 because this is the default location.

??? That makes no sense at all.  Using the default location makes thing easier.

To the OP: ignore Markus' very poor recommendation, and just rename your webapp 
to ROOT, as David suggested.  

 - Chuck


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



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



RE: Realm configuration issues

2009-09-07 Thread Caldarale, Charles R
 From: Adam Posner [mailto:cuco2...@gmail.com]
 Subject: Re: Realm configuration issues
 
 I tried commented out everything between the context tags in
 server.xml and put it in context.xml like this:

What context.xml?  Be specific as to the location.

 It broke it; I got a parse error(NullPointerException) in context.xml
 line 21.

I don't see anything in particular wrong with what you posted; is that an exact 
copy  paste, or is it subject to transcription errors?

 This brings me to the question about the resource element.
 Where should that be put ?

As the documentation for DataSourceRealm states, you may place the Resource 
inside the Context element, as long as you set the localDataSource attribute 
for the Realm to true.

 Do I still need that Resource element above to be defined somewhere,

Yes - the Realm needs to use it.

 resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/trailsDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref

The resource-ref shouldn't be used, since it's the Realm that needs the 
JDBC connection, not your webapp.

 - Chuck


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


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



Number of threads

2009-09-07 Thread keeplearning

How do I know how many threads are being used during a test run (both tomcat
and apache)? We used to have some tools for that but not currently in the
new environment.

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Number-of-threads-tp25336823p25336823.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Realm configuration issues

2009-09-07 Thread Adam Posner
Yes, that was an exact copy and paste. Here it is again - of my
META-INF/context.xml, before I deleted it and put it back in server.xml :

?xml version=1.0 encoding=UTF-8?
Context
 Resource name=jdbc/trailsDB auth=Container
 type=javax.sql.DataSource
 username=buzz password=99
 driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/trailsDB
 maxActive=8
 /
Realm classname=
   org.apache.catalina.realm.DataSourceRealm
dataSourceName=jdbc/trailsDB
 roleNameCol=role_name
userCredCol=user_pass
userNameCol=user_name
userRoleTable=user_roles
userTable=user
localDataSource=true
/

/Context

It throws a NullPointerException due to a parse error in context.xml:

Sep 7, 2009 3:29:47 PM org.apache.catalina.startup.ContextConfig
processContextConfig
SEVERE: Parse error in context.xml for /blurbV1
java.lang.NullPointerException
at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2808)
at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2834)
at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1361)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFra...

I'm using the editor Kate; I dont see any extra tabs or spaces in
the wrong places, Kate has syntax highlighting so I would see that anyway.

But it does work (up to the authentication part) when I put everything from
my META-INF/context.xml into a context element in server.xml:

  Context path=/blurbV1 docBase=blurbV1 reloadable=true

!--
9/6 ?user=buzzamp;password=99 maxActive=8:
Removing this from the line below gave me an
'access denied for user @ localhost (HTTP 500),
using password .. no'; it only works for user buzz,
not user cuco; (get the same error, but ('..using password .. yes'
--

  Resource name=jdbc/trailsDB auth=Container
type=javax.sql.DataSource
driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://localhost:3306/trailsDB?user=buzzamp;password=99
maxActive=8/

   Realm className=org.apache.catalina.realm.DataSourceRealm
dataSourceName=jdbc/trailsDB
localDataSource=true
debug=99
userTable=users
userNameCol=user_name
userCredCol=user_pass
userRoleTable=user_roles
roleNameCol=role_name
/
  /Context

Note that I need to enter everything after the '?' above, I can't just put
up to the 'trailsDB' part of the url attribute.
Anyway, here's a copy and paste of catalina.out  with the configuration of
the Realm in server.xml, which is the closest I can get to having it work:

c...@coati:~/apache-tomcat-6.0.16$ cat logs/catalina.out
Sep 7, 2009 3:42:38 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context/Realm}
Setting property 'debug' to '99' did not find a matching property.
Sep 7, 2009 3:42:38 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/lib/jdk/jre/lib/i386/client:/usr/lib/jdk/jre/lib/i386:/usr/lib/jdk/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Sep 7, 2009 3:42:38 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 7, 2009 3:42:38 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 393 ms
Sep 7, 2009 3:42:38 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 7, 2009 3:42:38 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Sep 7, 2009 3:42:39 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener listeners.ContextListener is already configured for
this context. The duplicate definition has been ignored.
Sep 7, 2009 3:42:39 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener listeners.SessionListener is already configured for
this context. The duplicate definition has been ignored.
Sep 7, 2009 3:42:39 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 7, 2009 3:42:39 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 7, 2009 3:42:39 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/23  config=null


I'm ready to pull my hair out with this, I haven't been able to find
a good Tomcat book, unfortunately.
Thanks for all your help,

Adam




On Mon, Sep 7, 2009 at 12:33 PM, Caldarale, Charles R