Re: Error starting Tomcat

2011-09-14 Thread NaveenShan

Can anyone please help in this.. I am also facing the same error..

Regards
Naveen


Pratibha S wrote:
 
 Hi,
 
 I'm a newbie. I'm unable to start Tomcat from Eclipse Indigo and getting
 the
 error below. I checked forums and found that I need to remove servlet.api
 from CLASSPATH. I removed the entry in the Libraries and also tried
 removing the file from tomcat/lib. Now, Eclipse is not recognizing
 javax.servlet.annotation and some other servlet classes. Please help.
 
 
 
 Aug 25, 2011 6:00:34 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/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
 Aug 25, 2011 6:00:34 PM org.apache.tomcat.util.digester.SetPropertiesRule
 begin
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
 property 'source' to 'org.eclipse.jst.jee.server:RecommendationApp' did
 not
 find a matching property.
 Aug 25, 2011 6:00:35 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler [http-bio-8080]
 Aug 25, 2011 6:00:35 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler [ajp-bio-8009]
 Aug 25, 2011 6:00:35 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1634 ms
 Aug 25, 2011 6:00:35 PM org.apache.catalina.core.StandardService
 startInternal
 INFO: Starting service Catalina
 Aug 25, 2011 6:00:35 PM org.apache.catalina.core.StandardEngine
 startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.20
 Aug 25, 2011 6:00:35 PM org.apache.catalina.startup.Catalina start
 SEVERE: Catalina.start:
 org.apache.catalina.LifecycleException: Failed to start component
 [StandardServer[8005]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardService[Catalina]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 7 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 9 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
 at
 org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 11 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
 at
 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 14 more
 Caused by: java.lang.NoSuchMethodError:
 javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
 at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1308)
 at
 org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1390)
 at
 org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896)
 at
 org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322)
 at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at
 org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
 at
 

Re: Error starting Tomcat

2011-09-14 Thread NaveenShan

Can anyone please help in this.. I am also facing the same error..

Regards
Naveen


Pratibha S wrote:
 
 Hi,
 
 I'm a newbie. I'm unable to start Tomcat from Eclipse Indigo and getting
 the
 error below. I checked forums and found that I need to remove servlet.api
 from CLASSPATH. I removed the entry in the Libraries and also tried
 removing the file from tomcat/lib. Now, Eclipse is not recognizing
 javax.servlet.annotation and some other servlet classes. Please help.
 
 
 
 Aug 25, 2011 6:00:34 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/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
 Aug 25, 2011 6:00:34 PM org.apache.tomcat.util.digester.SetPropertiesRule
 begin
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
 property 'source' to 'org.eclipse.jst.jee.server:RecommendationApp' did
 not
 find a matching property.
 Aug 25, 2011 6:00:35 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler [http-bio-8080]
 Aug 25, 2011 6:00:35 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler [ajp-bio-8009]
 Aug 25, 2011 6:00:35 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1634 ms
 Aug 25, 2011 6:00:35 PM org.apache.catalina.core.StandardService
 startInternal
 INFO: Starting service Catalina
 Aug 25, 2011 6:00:35 PM org.apache.catalina.core.StandardEngine
 startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.20
 Aug 25, 2011 6:00:35 PM org.apache.catalina.startup.Catalina start
 SEVERE: Catalina.start:
 org.apache.catalina.LifecycleException: Failed to start component
 [StandardServer[8005]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardService[Catalina]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 7 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 9 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
 at
 org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 11 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
 at
 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 14 more
 Caused by: java.lang.NoSuchMethodError:
 javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
 at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1308)
 at
 org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1390)
 at
 org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896)
 at
 org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322)
 at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at
 org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
 at
 

Re: Tomcat Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread André Warnier

Shanti Suresh wrote:

All,

We are running into a peculiar issue.   We have Tomcat 6.0.24 
front-ended by Apache2.2.3.  We have a VirtuslHost serving port 80 where 
Apache simply hands off / to Tomcat's load-balancer.


VirtualHost *:80
  ServerName wwwprod.lsa.umich.edu
  ServerAlias wwwprod www www.lsa.umich.edu
  Redirect / balancer://dsmdelivery/
  ProxyPass/ balancer://dsmdelivery/
  ProxyPassReverse / balancer://dsmdelivery/
  TraceEnable Off
/VirtualHost


Why do you have a Redirect AND a ProxyPass above ?
At least the Redirect doesn't make sense to me here.
As written, it is also probably wrong :
From http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect :
The new URL should be an absolute URL beginning with a scheme and hostname, but a 
URL-path beginning with a slash may also be used, in which case the scheme and hostname of 
the current server will be added.


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



Request params randomly null in servlet(s)

2011-09-14 Thread Darius D.

Hi,

we have a problem of request params beeing null in servlets where it
shouldn't be ( post or get, in get we can even see that
request.getQueryString() is fine, but params are null).

It is more pronounced when using dedicated thread executor, moving to
threads provided by connector itself (with maxThreads=500 option using NIO
) seems to be lowering counts of errors. 


Atm we are seeing 3 modes of failure in our tomcat setup ( nginx reverse
proxy - tomcat with NIO connector )


1)
SEVERE: Error finishing response
java.lang.NullPointerException

and/or

SEVERE: Error processing request
java.lang.NullPointerException

in logs. ( could be some app problem, but still shady, as no stack trace is
given, like if exception object is gone itself??? )

2) Sometimes we get 502 (from nginx, that got upstream error) like Rakesh in
other thread, from servlets that should be fine ( result of NPE in real
strange places ).

3) And most scary ones are the following:

2011 09 13 14:18:20.568 WARN  Servlet  - error response: error=no action
query: [type=groupsChangedActionv=1315912033175] content type:null
protocol: HTTP/1.0 length:-1 character encoding: null  GET
2011 09 13 14:18:20.937 WARN  Servlet  - error response: error=no action
query: [type=groupsChangedActionv=1315912699092] content type:null
protocol: HTTP/1.0 length:-1 character encoding: null  GET

In tomcat access log they are shown as:
127.0.0.1 - - [13/Sep/2011:14:18:20 +0300] GET
/ourapp/servlet/Servlet?type=groupsChangedActionv=1315912033175 HTTP/1.0
200 15
127.0.0.1 - - [13/Sep/2011:14:18:20 +0300] GET
/ourapp/servlet/Servlet?type=groupsChangedActionv=1315912699092 HTTP/1.0
200 15

So as you can see, tomcat got that GET reqest with type and v params like it
gets and processes thousands others.

Servlet code looks like:
private void doProcess(HttpServletRequest request, HttpServletResponse
response) throws IOException {
HttpSession session = request.getSession();
if (session != null) {

String action = request.getParameter(type);
logger.debug(action:  + action);
   
if (action == null) {

printError(request, response,error=no
action);


private void printError(HttpServletRequest request,
HttpServletResponse response, String error) throws IOException {
logger.warn(error response:  + error +  ip:   +
request.getRemoteAddr() +  query: [ + request.getQueryString() + ] + 
content type: + request.getContentType() +  protocol:  +
request.getProtocol() +   length: + request.getContentLength() + 
character encoding:  + request.getCharacterEncoding() ++
request.getMethod());
   
response.setContentType(text/plain);
PrintWriter out = response.getWriter();
out.print(error);
out.flush();
out.close();
}

It happens several times in a day in bursts ( GC collecting something?).


So really puzzling and random error, tomcat got proper request as shown in
access logs (and even request.getQueryString() is valid :) ) , processed
request from same user 5s ago, will process one more 5s later, but somehow
request is NULL??? Now we handle it by retrying, but such random NULL is
fatal for other servlets and services that throw NPEs and it seems that some
tomcat code is affected too with (1).


I'd grateful if some smart guys could look into this problem and willing to
provide any other info.


Only connector running is:
Connector port=8080
protocol=org.apache.coyote.http11.Http11NioProtocol
   connectionTimeout=2
   enableLookups=false
   acceptCount=1000
   maxThreads=500
   maxPostSize=10485760
/

Also using 
Valve className=org.apache.catalina.valves.RemoteIpValve
protocolHeader=X-Forwarded-Proto /


BR,

Darius. 




-- 
View this message in context: 
http://old.nabble.com/Request-params-randomly-null-in-servlet%28s%29-tp32461421p32461421.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 and MS LDAP Configuration Problem

2011-09-14 Thread Pid
On 13/09/2011 23:35, Rudy Gireyev wrote:
 If I change the url-pattern to /* then the user is authenticated each
 and every time the application is accessed and the
 request.getRemoteUser() is then set to that user name. But then I
 cannot store anything in the session of the application. When I do
 request.getSession(false).setAttribute(oy, vey); the session is not
 updated and doing the request.getSession(false).getAttribute(oy)
 returns null.

Sounds like the session isn't being maintained in between requests.


p



signature.asc
Description: OpenPGP digital signature


Re: Request params randomly null in servlet(s)

2011-09-14 Thread Pid
On 14/09/2011 08:34, Darius D. wrote:
 
 Hi,
 
 we have a problem of request params beeing null in servlets where it
 shouldn't be ( post or get, in get we can even see that
 request.getQueryString() is fine, but params are null).
 
 It is more pronounced when using dedicated thread executor, moving to
 threads provided by connector itself (with maxThreads=500 option using NIO
 ) seems to be lowering counts of errors. 
 
 
 Atm we are seeing 3 modes of failure in our tomcat setup ( nginx reverse
 proxy - tomcat with NIO connector )
 
 
 1)
 SEVERE: Error finishing response
 java.lang.NullPointerException
 
 and/or
 
 SEVERE: Error processing request
 java.lang.NullPointerException
 
 in logs. ( could be some app problem, but still shady, as no stack trace is
 given, like if exception object is gone itself??? )
 
 2) Sometimes we get 502 (from nginx, that got upstream error) like Rakesh in
 other thread, from servlets that should be fine ( result of NPE in real
 strange places ).
 
 3) And most scary ones are the following:
 
 2011 09 13 14:18:20.568 WARN  Servlet  - error response: error=no action
 query: [type=groupsChangedActionv=1315912033175] content type:null
 protocol: HTTP/1.0 length:-1 character encoding: null  GET
 2011 09 13 14:18:20.937 WARN  Servlet  - error response: error=no action
 query: [type=groupsChangedActionv=1315912699092] content type:null
 protocol: HTTP/1.0 length:-1 character encoding: null  GET
 
 In tomcat access log they are shown as:
 127.0.0.1 - - [13/Sep/2011:14:18:20 +0300] GET
 /ourapp/servlet/Servlet?type=groupsChangedActionv=1315912033175 HTTP/1.0
 200 15
 127.0.0.1 - - [13/Sep/2011:14:18:20 +0300] GET
 /ourapp/servlet/Servlet?type=groupsChangedActionv=1315912699092 HTTP/1.0
 200 15
 
 So as you can see, tomcat got that GET reqest with type and v params like it
 gets and processes thousands others.
 
 Servlet code looks like:

doProcess(req, res) is not a Servlet API method. What other method(s)
call it?

 private void doProcess(HttpServletRequest request, HttpServletResponse
 response) throws IOException {
 HttpSession session = request.getSession();
 if (session != null) {
 
 String action = request.getParameter(type);
 logger.debug(action:  + action);

 if (action == null) {
 
 printError(request, response,error=no
 action);
 
 
 private void printError(HttpServletRequest request,
 HttpServletResponse response, String error) throws IOException {
 logger.warn(error response:  + error +  ip:   +
 request.getRemoteAddr() +  query: [ + request.getQueryString() + ] + 
 content type: + request.getContentType() +  protocol:  +
 request.getProtocol() +   length: + request.getContentLength() + 
 character encoding:  + request.getCharacterEncoding() ++
 request.getMethod());

 response.setContentType(text/plain);
 PrintWriter out = response.getWriter();
 out.print(error);
 out.flush();
 out.close();
 }
 
 It happens several times in a day in bursts ( GC collecting something?).
 
 
 So really puzzling and random error, tomcat got proper request as shown in
 access logs (and even request.getQueryString() is valid :) ) , processed
 request from same user 5s ago, will process one more 5s later, but somehow
 request is NULL??? Now we handle it by retrying, but such random NULL is
 fatal for other servlets and services that throw NPEs and it seems that some
 tomcat code is affected too with (1).

 I'd grateful if some smart guys could look into this problem and willing to
 provide any other info.

Usually this type of thing occurs because the request (or response) is
being held as an instance field somewhere in a thread-unsafe way.


p

 Only connector running is:
 Connector port=8080
 protocol=org.apache.coyote.http11.Http11NioProtocol
connectionTimeout=2
enableLookups=false
acceptCount=1000
maxThreads=500
maxPostSize=10485760
 /
 
 Also using 
 Valve className=org.apache.catalina.valves.RemoteIpValve
 protocolHeader=X-Forwarded-Proto /
 
 
 BR,
 
 Darius. 
 
 
 
 




signature.asc
Description: OpenPGP digital signature


Re: Request params randomly null in servlet(s)

2011-09-14 Thread Darius D.



Pid * wrote:
 
 doProcess(req, res) is not a Servlet API method. What other method(s)
 call it?
 
 Usually this type of thing occurs because the request (or response) is
 being held as an instance field somewhere in a thread-unsafe way.
 
 

It is called from:
public void doGet(HttpServletRequest request, HttpServletResponse 
response)
throws ServletException, IOException {
doProcess(request, response);
}

and doPost(...) as well. 

I am not quite sure where and what could be holding the request, as this
method is the called directly and request params are already NULL ?

-- 
View this message in context: 
http://old.nabble.com/Request-params-randomly-null-in-servlet%28s%29-tp32461421p32462485.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 Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread Shanti Suresh
Hi Andre,

Thanks so much for the observation.  Yes, The Redirect is redundant.  I will 
leave it in there for now though as this is not a recent change.  I would like 
to isolate what's causing //.
I wanted to crank up logging in Tomcat side to catch the Request and Response 
processing.  I tried the RequestDumperValve.  But the 302s were not being 
caught.
Please let me know if there is a better way debugTomcat's request and response 
processing.

I would like to find out how Tomcat processes requests for 
wwwprod.lsa.umich.edu/polisci different from www.lsa.umich.edu/polisci, 
causing it to send a // for the latter.

Thanks.

 -Shanti

On Sep 14, 2011, at 2:58 AM, André Warnier wrote:

 Shanti Suresh wrote:
 All,
 We are running into a peculiar issue.   We have Tomcat 6.0.24 front-ended by 
 Apache2.2.3.  We have a VirtuslHost serving port 80 where Apache simply 
 hands off / to Tomcat's load-balancer.
 VirtualHost *:80
  ServerName wwwprod.lsa.umich.edu
  ServerAlias wwwprod www www.lsa.umich.edu
  Redirect / balancer://dsmdelivery/
  ProxyPass/ balancer://dsmdelivery/
  ProxyPassReverse / balancer://dsmdelivery/
  TraceEnable Off
 /VirtualHost
 Why do you have a Redirect AND a ProxyPass above ?
 At least the Redirect doesn't make sense to me here.
 As written, it is also probably wrong :
 From http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect :
 The new URL should be an absolute URL beginning with a scheme and hostname, 
 but a URL-path beginning with a slash may also be used, in which case the 
 scheme and hostname of the current server will be added.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 !DSPAM:4e7050e3221842560778728!
 
 
 

--
Shanti Suresh
App Systems Analyst Lead
Web Services, LSA Development
University of Michigan
Office: 734-763-4807
sha...@umich.edu
http://lsa.umich.edu/cms







Re: Request params randomly null in servlet(s)

2011-09-14 Thread Pid
On 14/09/2011 11:55, Darius D. wrote:
 
 
 
 Pid * wrote:

 doProcess(req, res) is not a Servlet API method. What other method(s)
 call it?

 Usually this type of thing occurs because the request (or response) is
 being held as an instance field somewhere in a thread-unsafe way.


 
 It is called from:
   public void doGet(HttpServletRequest request, HttpServletResponse 
 response)
 throws ServletException, IOException {
   doProcess(request, response);
   }
 
 and doPost(...) as well. 
 
 I am not quite sure where and what could be holding the request, as this
 method is the called directly and request params are already NULL ?

They are in *that* thread.

It is possible to expose either request or response object outside of
the scope of the thread, so a second request sees a modified version of
the same object.

E.g.

 public class SomeServlet extends HttpServlet {

   private HttpServletRequest request;

   protected void doGet(HttpServletRequest rq, HttpServletResponse rs) {

 // this is a handy value, let's store it (FAIL!)
 this.request = request;

 // do something...
 process(this.request);
 // finish...

   }

 }


So a different thread entering the method causes the request object to
be updated before the other thread has finished using it.  There are
other, more subtle, ways to cause the same effect.


p






signature.asc
Description: OpenPGP digital signature


tomcat 7.0.21: bug in RemoteAddrValve?

2011-09-14 Thread Francis GALIEGUE
Hello,

I have a base Tomcat install with only the manager webapp in it at
startup (I deploy other webapps using it in text mode) but since I
upgraded from 7.0.16 to 7.0.21, the manager no longer works with the
RemoteAddrValve.

The context.xml is:


Context docBase=/usr/share/tomcat7/webapps/manager
antiResourceLocking=false privileged=true
Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=127\.0\.0\.1|::1/
/Context


This worked fine with 7.0.16 and doesn't work anymore with 7.0.21, I
get 403 each time... Anyone seeing the same problem?

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



Re: Tomcat Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread André Warnier

Shanti Suresh wrote:

Hi Andre,

Thanks so much for the observation.  Yes, The Redirect is redundant.  I will leave it in 
there for now though as this is not a recent change.  I would like to isolate what's 
causing //.


Understood. But what I am wondering about, is if this redundant (and syntactically 
incorrect) Redirect may play a role in your problem.  It's mere presence triggers the fact 
that Apache will pass the request for inspection to the mod_alias module, which may (or 
may not) start processing the request and modify some internal structure linked to it, 
thus causing (perhaps) some inconsistency which causes the later issue.


A weak suspicion I admit, but maybe worth commenting-out this anyway-redundant Redirect 
and checking ?




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



Re: Tomcat Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread Shanti Suresh
Hi Andre,

Oh sure :-)  I forgot to mention that I did try commenting out and testing but 
left it back on as it did not make a difference.
Thanks, and sorry about the ommission.

   -Shanti

On Sep 14, 2011, at 11:20 AM, André Warnier wrote:

 Shanti Suresh wrote:
 Hi Andre,
 Thanks so much for the observation.  Yes, The Redirect is redundant.  I will 
 leave it in there for now though as this is not a recent change.  I would 
 like to isolate what's causing //.
 
 Understood. But what I am wondering about, is if this redundant (and 
 syntactically incorrect) Redirect may play a role in your problem.  It's mere 
 presence triggers the fact that Apache will pass the request for inspection 
 to the mod_alias module, which may (or may not) start processing the request 
 and modify some internal structure linked to it, thus causing (perhaps) some 
 inconsistency which causes the later issue.
 
 A weak suspicion I admit, but maybe worth commenting-out this 
 anyway-redundant Redirect and checking ?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 !DSPAM:4e70c661259585640420339!
 
 
 

--
Shanti Suresh
App Systems Analyst Lead
Web Services, LSA Development
University of Michigan
Office: 734-763-4807
sha...@umich.edu
http://lsa.umich.edu/cms







HTTP errors Logging

2011-09-14 Thread Michael Gesundheit
Hi,
I could not find anything in the archive so here is my question:Is there any 
way to get DEBUG or any log regarding HTTP error messages?
I currently get a 403 but, so far, can't find the root cause.
Thanks,-Michael

Re: tomcat 7.0.21: bug in RemoteAddrValve?

2011-09-14 Thread André Warnier

Francis GALIEGUE wrote:

Hello,

I have a base Tomcat install with only the manager webapp in it at
startup (I deploy other webapps using it in text mode) but since I
upgraded from 7.0.16 to 7.0.21, the manager no longer works with the
RemoteAddrValve.

The context.xml is:


Context docBase=/usr/share/tomcat7/webapps/manager
antiResourceLocking=false privileged=true
Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=127\.0\.0\.1|::1/
/Context


This worked fine with 7.0.16 and doesn't work anymore with 7.0.21, I
get 403 each time... Anyone seeing the same problem?


Maybe try to modify that regexp somewhat, like to
allow=(127\.0\.0\.1)|(::1)
or
allow=127\.0\.0\.1|\:\:1
just in case the regexp library version changed, and it now interprets the original 
expression slightly differently ?
Could it also be that previously, Tomcat saw an IPv4 address and it worked, but now it 
sees an IPv6 address and the ::1 part in fact never worked, but was never used before ?



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



Strange networking trace

2011-09-14 Thread David kerber
I don't really think this issue is related to Tomcat, but I'm not sure, 
so I'm starting here.


Running:
   TC 7.0.20 64-bit on
   64-bit Windows server 2008 Standard SP2, with
   64-bit JRE 6.0_27 in server mode.
The server is a single physical machine, not virtual and not clustered, 
and has no VMs inside it either.  The NIC is a 1Gbps server NIC, with 
TOE enabled.


The issue we're having is that we're getting duplicate responses from 
the server to a request from our automated data collection systems in 
the field.  There is no human interaction with this data flow.  The data 
is transmitted as an HTTP POST request, with a short (~75 byte) string 
as the actual data payload, and an even shorter response string sent 
back after the data is processed.


What got us looking at this is that it doesn't quite keep up with the 
data flow.  A much older machine running Windows 2000 Server keeps up 
with no trouble at all, running the exact same application (just copy 
the .war over), but on TC 6.0.something and an older 32-bit JRE in 
server mode.


In this table, right arrows are data coming in from the field, and left 
arrows are data sent out from the server in response.  This data was 
collected with WireShark monitoring the NIC on the machine, and the 
entire exchange takes much less than a second.  The duplicate responses 
follow extremely quickly behind the original, within a few microseconds.


Dir Sz  Action
-  62  Start session
-  58  Response and ACK
-  58  Duplicate response and ACK
-  60  ACK
- 292  HTTP Headers
-  54  ACK
-  54  Duplicate ACK
- 126  Content (72 bytes)
- 191  HTTP response
- 191  Duplicate HTTP response
-  54  ACK and FIN
-  54  Duplicate ACK and FIN
-  60  ACK
-  60  FIN, ACK
-  54  ACK
-  54  Duplicate ACK

1482 (660-/820-) bytes for delivery of a 72 byte payload

411 bytes from duplicate transmissions.


Googling indicates that this kind of thing can sometimes be a congestion 
control technique at the NIC layer, but this is happening even when the 
links don't appear to be congested.  Anybody seen anything like this, or 
have any suggestions where to look for causes and/or fixes?


TIA!
D

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



Re: Request params randomly null in servlet(s)

2011-09-14 Thread Darius D.


Pid * wrote:
 
 On 14/09/2011 11:55, Darius D. wrote:
 
 They are in *that* thread.
 
 It is possible to expose either request or response object outside of
 the scope of the thread, so a second request sees a modified version of
 the same object.
 
 E.g.
 
  public class SomeServlet extends HttpServlet {
 
private HttpServletRequest request;
 
protected void doGet(HttpServletRequest rq, HttpServletResponse rs) {
 
  // this is a handy value, let's store it (FAIL!)
  this.request = request;
 
  // do something...
  process(this.request);
  // finish...
 
}
 
  }
 
 
 So a different thread entering the method causes the request object to
 be updated before the other thread has finished using it.  There are
 other, more subtle, ways to cause the same effect.
 
 
 p
 

Well the problem is that we already looked for that mode of failure, our
servlet class has 0 instance variables... Basically it is a method like i
pasted before, doing HttpSession session = request.getSession(); and if
session is valid (it is!) immediately reading those params with String
action = request.getParameter(type);

Request object is perfectly valid when those params are missing ( session,
query etc are preserved, its just those params we are missing ). Error
happens in bursts in a rate of ~25 / million requests.







-- 
View this message in context: 
http://old.nabble.com/Request-params-randomly-null-in-servlet%28s%29-tp32461421p32464563.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 7.0.21: bug in RemoteAddrValve?

2011-09-14 Thread Francis GALIEGUE
On Wed, Sep 14, 2011 at 17:28, André Warnier a...@ice-sa.com wrote:
 Francis GALIEGUE wrote:
[...]
    Valve className=org.apache.catalina.valves.RemoteAddrValve
        allow=127\.0\.0\.1|::1/
[...]

 Maybe try to modify that regexp somewhat, like to
 allow=(127\.0\.0\.1)|(::1)
 or
 allow=127\.0\.0\.1|\:\:1
 just in case the regexp library version changed, and it now interprets the
 original expression slightly differently ?

Nope... I also tried 127\.0\.0\.1 alone and no dice.

I'll try your two other suggestions but if any works, it means the
regex engine used is seriously buggy!

 Could it also be that previously, Tomcat saw an IPv4 address and it worked,
 but now it sees an IPv6 address and the ::1 part in fact never worked, but
 was never used before ?


The machine has IPv4 only. I just put in the ::1 in prevision of a not
so distant future...

But maybe it is some other part of the configuration (server.xml?
default context.xml?) which needs to be changed?

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



RE: Strange networking trace

2011-09-14 Thread Caldarale, Charles R
 From: David kerber [mailto:dcker...@verizon.net] 
 Subject: Strange networking trace

 -  58  Response and ACK
 -  58  Duplicate response and ACK

 -  54  ACK
 -  54  Duplicate ACK

 - 191  HTTP response
 - 191  Duplicate HTTP response

 -  54  ACK and FIN
 -  54  Duplicate ACK and FIN

 -  54  ACK
 -  54  Duplicate ACK

Do the duplicates have the same TCP sequence numbers as the originals?  If so, 
Tomcat is not involved.

Have you tried replacing the NIC?  Or turning off TOE?

 - 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



Tomcat 7.0.21: BufferOverflowException in AjpAprProcessor.output()

2011-09-14 Thread verlag.preis...@t-online.de
Hi,

I'm using Tomcat 7.0.21 with Native 1.1.22 and AJP-APR connector on Windows 
Server 2008 (32 bit) with Java 1.7.0, using ISAPI Connector 1.2.32 for IIS 7.

When I looked into the log today, I found two occurrencies of a 
BufferOverflowException:

Sep 14, 2011 1:55:20 PM org.apache.coyote.ajp.AjpAprProcessor process
Schwerwiegend: Error processing request
java.nio.BufferOverflowException
at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:343)
at 
org.apache.coyote.ajp.AjpAprProcessor.output(AjpAprProcessor.java:273)
at 
org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1082)
at org.apache.coyote.Response.doWrite(Response.java:533)
at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:368)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437)
at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:321)
at 
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
at 
org.apache.catalina.connector.Response.finishResponse(Response.java:502)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:432)
at 
org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:185)
at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

I've never seen those before.
What do these exceptions mean? (Why would Tomcat write over the limit of an 
ByteBuffer?)


Regards,

Konstantin Preißer



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



Re: HTTP errors Logging

2011-09-14 Thread Rudy Gireyev
Hi Michael.

Not sure if this is what you're asking, but there's a logs directory
in your Tomcat installation directory. In it there should be several
log files that may contain a clue.

Rudy



On Wed, Sep 14, 2011 at 8:26 AM, Michael Gesundheit
mi...@rocketmail.com wrote:
 Hi,
 I could not find anything in the archive so here is my question:Is there any 
 way to get DEBUG or any log regarding HTTP error messages?
 I currently get a 403 but, so far, can't find the root cause.
 Thanks,-Michael

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



Using calendar .ics files over Tomcat 5.5

2011-09-14 Thread Dean Hoover
Hello,

I am running Tomcat 5.5 in support of a internal-use only JSPWiki site.

To consolidate, I decided to move our internal calendars (using the iCal
.ics extension) from our very old Win2k server to the root directory of
Tomcat as well.

The problem I am having is that we are unable to modify (add/remove calendar
entries) after the move.  We can read them just fine.  I figure there is an
issue of permissions, and have Googled many sites that tell me to change the
catalina.policy file and add the ability for that directory to have read and
write access.  I've even used the AllPermissions setting, but with no
success.

I tried running catalina.sh start -debug, but I don't get anything
substantial from the log files, either.

Any advice would be greatly appreciated.

Dean Hoover
Waukesha, Wisconsin


Re: Strange networking trace

2011-09-14 Thread David kerber

On 9/14/2011 11:48 AM, Caldarale, Charles R wrote:

From: David kerber [mailto:dcker...@verizon.net]
Subject: Strange networking trace



-  58  Response and ACK
-  58  Duplicate response and ACK



-  54  ACK
-  54  Duplicate ACK



- 191  HTTP response
- 191  Duplicate HTTP response



-  54  ACK and FIN
-  54  Duplicate ACK and FIN



-  54  ACK
-  54  Duplicate ACK


Do the duplicates have the same TCP sequence numbers as the originals?  If so, 
Tomcat is not involved.


Yes, the sequence numbers are the same.  So I'll look elsewhere for the 
answer.




Have you tried replacing the NIC?  Or turning off TOE?


Both of the machines are showing duplicate ACKs, but one can keep up any 
way, and the other does not.  But they both have TOE enabled.  That 
gives me something to try, any way.


Thanks, Chuck.

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



Re: Error starting Tomcat

2011-09-14 Thread Rudy Gireyev
In Eclipse, you do not run Tomcat on its own. It is configured as a
Server within Eclipse and then all of your programs that use Tomcat
will run within that Server.

1. To create a Server. Click File - New - Other and then expand the
Server category and select Server. Go through the wizard which will
ask you for the installation directory of your Tomcat, so that it can
find the libraries.

2. Now you create and code your Dynamic Web Projects that will contain
Servlets within them. When you run these Eclipse will ask you which
Server you want to associate them with. Once you make the association
Eclipse will start and stop Tomcat automatically as you start and stop
your application.

See Eclipse documentation for more.
HTH
Rudy




On Tue, Sep 13, 2011 at 11:31 PM, NaveenShan naveens...@yahoo.com wrote:

 Can anyone please help in this.. I am also facing the same error..

 Regards
 Naveen


 Pratibha S wrote:

 Hi,

 I'm a newbie. I'm unable to start Tomcat from Eclipse Indigo and getting
 the
 error below. I checked forums and found that I need to remove servlet.api
 from CLASSPATH. I removed the entry in the Libraries and also tried
 removing the file from tomcat/lib. Now, Eclipse is not recognizing
 javax.servlet.annotation and some other servlet classes. Please help.


 
 Aug 25, 2011 6:00:34 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/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
 Aug 25, 2011 6:00:34 PM org.apache.tomcat.util.digester.SetPropertiesRule
 begin
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
 property 'source' to 'org.eclipse.jst.jee.server:RecommendationApp' did
 not
 find a matching property.
 Aug 25, 2011 6:00:35 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler [http-bio-8080]
 Aug 25, 2011 6:00:35 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler [ajp-bio-8009]
 Aug 25, 2011 6:00:35 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1634 ms
 Aug 25, 2011 6:00:35 PM org.apache.catalina.core.StandardService
 startInternal
 INFO: Starting service Catalina
 Aug 25, 2011 6:00:35 PM org.apache.catalina.core.StandardEngine
 startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.20
 Aug 25, 2011 6:00:35 PM org.apache.catalina.startup.Catalina start
 SEVERE: Catalina.start:
 org.apache.catalina.LifecycleException: Failed to start component
 [StandardServer[8005]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardService[Catalina]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 7 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 9 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
 at
 org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
 ... 11 more
 Caused by: org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
 at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
 at
 

Re: HTTP errors Logging

2011-09-14 Thread Michael Gesundheit
Thanks,I know about them but to see anything specific you need to turn on 
logging for the specificmodule. I could not find in the docs how to do it.
-Michael
--- On Wed, 9/14/11, Rudy Gireyev rgire...@gmail.com wrote:

From: Rudy Gireyev rgire...@gmail.com
Subject: Re: HTTP errors Logging
To: Tomcat Users List users@tomcat.apache.org
Date: Wednesday, September 14, 2011, 10:12 AM

Hi Michael.

Not sure if this is what you're asking, but there's a logs directory
in your Tomcat installation directory. In it there should be several
log files that may contain a clue.

Rudy



On Wed, Sep 14, 2011 at 8:26 AM, Michael Gesundheit
mi...@rocketmail.com wrote:
 Hi,
 I could not find anything in the archive so here is my question:Is there any 
 way to get DEBUG or any log regarding HTTP error messages?
 I currently get a 403 but, so far, can't find the root cause.
 Thanks,-Michael

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



Re: HTTP errors Logging

2011-09-14 Thread Rudy Gireyev
Sorry. I don't understand at all what you are asking. What does module
mean? By module do you mean some part of Tomcat itself? Or some
application that you have written that runs within Tomcat?

If the latter then you have to configure the logging within that
Servlet system, which will depend on the logging library used.
Although this has little to do with Tomcat.

Rudy



On Wed, Sep 14, 2011 at 10:37 AM, Michael Gesundheit
mi...@rocketmail.com wrote:
 Thanks,I know about them but to see anything specific you need to turn on 
 logging for the specificmodule. I could not find in the docs how to do it.
 -Michael
 --- On Wed, 9/14/11, Rudy Gireyev rgire...@gmail.com wrote:

 From: Rudy Gireyev rgire...@gmail.com
 Subject: Re: HTTP errors Logging
 To: Tomcat Users List users@tomcat.apache.org
 Date: Wednesday, September 14, 2011, 10:12 AM

 Hi Michael.

 Not sure if this is what you're asking, but there's a logs directory
 in your Tomcat installation directory. In it there should be several
 log files that may contain a clue.

 Rudy



 On Wed, Sep 14, 2011 at 8:26 AM, Michael Gesundheit
 mi...@rocketmail.com wrote:
 Hi,
 I could not find anything in the archive so here is my question:Is there any 
 way to get DEBUG or any log regarding HTTP error messages?
 I currently get a 403 but, so far, can't find the root cause.
 Thanks,-Michael

 -
 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 and MS LDAP Configuration Problem

2011-09-14 Thread Rudy Gireyev
Thank you P for the response. I admit I don't 100% understand what you mean by
Sounds like the session isn't being maintained in between requests.
Is this something that I'm doing wrong? Or is this something outside
of my control?

The strange thing is that this very same code works just fine and is
able to interact with the session just fine when the url-pattern is
/jsp/*. However as soon as the pattern is changed to /* the session
becomes unusable.

Rudy




On Wed, Sep 14, 2011 at 1:43 AM, Pid p...@pidster.com wrote:
 On 13/09/2011 23:35, Rudy Gireyev wrote:
 If I change the url-pattern to /* then the user is authenticated each
 and every time the application is accessed and the
 request.getRemoteUser() is then set to that user name. But then I
 cannot store anything in the session of the application. When I do
 request.getSession(false).setAttribute(oy, vey); the session is not
 updated and doing the request.getSession(false).getAttribute(oy)
 returns null.

 Sounds like the session isn't being maintained in between requests.


 p



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



Re: tomcat 7.0.21: bug in RemoteAddrValve?

2011-09-14 Thread Mark Eggers
- Original Message -

 From: Francis GALIEGUE f...@one2team.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Wednesday, September 14, 2011 8:42 AM
 Subject: Re: tomcat 7.0.21: bug in RemoteAddrValve?
 
 On Wed, Sep 14, 2011 at 17:28, André Warnier a...@ice-sa.com wrote:
  Francis GALIEGUE wrote:
 [...]
     Valve 
 className=org.apache.catalina.valves.RemoteAddrValve
         allow=127\.0\.0\.1|::1/
 [...]
 
  Maybe try to modify that regexp somewhat, like to
  allow=(127\.0\.0\.1)|(::1)
  or
  allow=127\.0\.0\.1|\:\:1
  just in case the regexp library version changed, and it now interprets the
  original expression slightly differently ?
 
 Nope... I also tried 127\.0\.0\.1 alone and no dice.
 
 I'll try your two other suggestions but if any works, it means the
 regex engine used is seriously buggy!
 
  Could it also be that previously, Tomcat saw an IPv4 address and it worked,
  but now it sees an IPv6 address and the ::1 part in fact never 
 worked, but
  was never used before ?
 
 
 The machine has IPv4 only. I just put in the ::1 in prevision of a not
 so distant future...
 
 But maybe it is some other part of the configuration (server.xml?
 default context.xml?) which needs to be changed?


I've not tried this in Tomcat, but here's a thought.

According to:

http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Remote_Address_Filter


Tomcat uses java.util.regex for pattern matching. This means that if you want a 
string regular expression to include a ., you'll end up entering it as \\.

Try using 127\\.0\\.0\\.1|::1 and see if that fixes your problem.

I have no idea why it would work in previous versions (have not checked the 
change log).

. . . . just my two cents.
/mde/

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



Re: tomcat 7.0.21: bug in RemoteAddrValve?

2011-09-14 Thread André Warnier

Francis GALIEGUE wrote:

On Wed, Sep 14, 2011 at 17:28, André Warnier a...@ice-sa.com wrote:

Francis GALIEGUE wrote:

[...]

   Valve className=org.apache.catalina.valves.RemoteAddrValve
   allow=127\.0\.0\.1|::1/

[...]

Maybe try to modify that regexp somewhat, like to
allow=(127\.0\.0\.1)|(::1)
or
allow=127\.0\.0\.1|\:\:1
just in case the regexp library version changed, and it now interprets the
original expression slightly differently ?


Nope... I also tried 127\.0\.0\.1 alone and no dice.

I'll try your two other suggestions but if any works, it means the
regex engine used is seriously buggy!


Could it also be that previously, Tomcat saw an IPv4 address and it worked,
but now it sees an IPv6 address and the ::1 part in fact never worked, but
was never used before ?



The machine has IPv4 only. I just put in the ::1 in prevision of a not
so distant future...

But maybe it is some other part of the configuration (server.xml?
default context.xml?) which needs to be changed?



Not that I know of.  As far as I know, the Valve element can be placed inside of the 
Manager's context.xml, and should then affect only the Manager app.

And it worked before, didn't it ?

Plus, you say that you are getting a 403 error.  If the Valve was being ignored, I 
believe you would not get that error. So it looks like the Valve gets triggered, but it 
finds a Remote address other than 127.0.0.1.


Now sorry to ask, but you /are/ connecting to Tomcat from the same host as the Tomcat 
host, are you ? without any front-end in front of Tomcat ?


Also, isn't there anything in the logs ?


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



Re: tomcat 7.0.21: bug in RemoteAddrValve?

2011-09-14 Thread André Warnier

Mark Eggers wrote:
...



Try using 127\\.0\\.0\\.1|::1 and see if that fixes your problem.



Of course ! I missed that one.



I have no idea why it would work in previous versions (have not checked the 
change log).


neither have I.



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



Re: Tomcat and MS LDAP Configuration Problem

2011-09-14 Thread Konstantin Kolinko
2011/9/14 Rudy Gireyev rgire...@gmail.com:
 Thank you P for the response. I admit I don't 100% understand what you mean by
 Sounds like the session isn't being maintained in between requests.
 Is this something that I'm doing wrong? Or is this something outside
 of my control?

 The strange thing is that this very same code works just fine and is
 able to interact with the session just fine when the url-pattern is
 /jsp/*. However as soon as the pattern is changed to /* the session
 becomes unusable.

In short:
1. When session cookie is created in recent versions of Tomcat,  the
Path parameter in it is set to   webappName + /.

2. Requests to webappName are usually automatically redirected to
webappName + / (Tomcat sends response code 302),

but in some rare configurations this redirect does not happen.
I do not remember what exactly are the circumstances, but I think that
this involved a servlet that is mapped to /*, and maybe absence of a
welcome page.


If your servlet reacts to request to webappName, then the
sessionCookie with Path of webappName + / woundn't be sent by
browser when it repeats the request.

The reason for appending / to the session cookie path is that
otherwise some web browsers do send cookies set by foo webapp when
client requests foobar, and that is insecure.


It should be possible to explicitly configure the Path attribute of
the session cookie using cookie-config element in web.xml.  See
cookie-configType in
http://java.sun.com/xml/ns/javaee/web-common_3_0.xsd

Best regards,
Konstantin Kolinko

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



501 error not going to location

2011-09-14 Thread kkrikor

Hey guys, 

I have set up an error page for the 501 error code. But it seems that it is
not going to the error.html page when a 501 happens. Testing with Tomcat 7. 

error-page
 error-code501/error-code
 location/error.html/location
/error-page

Here's how i'm testing - 

$ telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
METHOD /lab-0.1.0.BUILD-SNAPSHOT/signup HTTP/1.1
Host: localhost

HTTP/1.1 501 Not Implemented
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Wed, 14 Sep 2011 18:59:52 GMT
Connection: close
0
Connection closed by foreign host.

So i see 0 instead of the html content of error.html - Any ideas ? 

Thank you
-- 
View this message in context: 
http://old.nabble.com/501-error-not-going-to-location-tp32466722p32466722.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 Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread Konstantin Kolinko
2011/9/14 Shanti Suresh sha...@umich.edu:
 All,

 We are running into a peculiar issue.   We have Tomcat 6.0.24 front-ended by
 Apache2.2.3.  We have a VirtuslHost serving port 80 where Apache simply
 hands off / to Tomcat's load-balancer.

 VirtualHost *:80
  ServerName wwwprod.lsa.umich.edu
  ServerAlias wwwprod www www.lsa.umich.edu
  Redirect         / balancer://dsmdelivery/
  ProxyPass        / balancer://dsmdelivery/
  ProxyPassReverse / balancer://dsmdelivery/
  TraceEnable Off
 /VirtualHost


The examples in [1] do not have trailing / neither in Proxy
element nor in ProxyPass setting, while [2] has one such example
(search for A sample balancer setup).

[1] http://httpd.apache.org/docs/2.1/mod/mod_proxy_balancer.html
[2] http://httpd.apache.org/docs/2.1/mod/mod_proxy.html#proxypass

So, how is your Proxy element configured?


 The problem cropped up when all systems including the F5 load-balancer
 had to be rebooted after last weekend's storm.

So it did work before?


Best regards,
Konstantin Kolinko

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



RE: 501 error not going to location

2011-09-14 Thread Caldarale, Charles R
 From: kkrikor [mailto:krikor.kruml...@gmail.com] 
 Subject: 501 error not going to location

 I have set up an error page for the 501 error code.

Where did you configure the error-page?  (Be precise.)

 Testing with Tomcat 7. 

Tomcat 7.what.what?  (Be precise.)

Since error pages are specific to individual webapps, Tomcat cannot honor such 
configuration if the request is so malformed that it's impossible to select a 
webapp to which to give the request.

 - 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: Using calendar .ics files over Tomcat 5.5

2011-09-14 Thread Pid
On 14/09/2011 18:14, Dean Hoover wrote:
 The problem I am having is that we are unable to modify (add/remove calendar
 entries) after the move.

How are you trying to update them?


p



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7.0.21: BufferOverflowException in AjpAprProcessor.output()

2011-09-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 9/14/2011 12:53 PM, verlag.preis...@t-online.de wrote:
 I'm using Tomcat 7.0.21 with Native 1.1.22 and AJP-APR connector on
 Windows Server 2008 (32 bit) with Java 1.7.0, using ISAPI Connector
 1.2.32 for IIS 7.
 
 When I looked into the log today, I found two occurrencies of a
 BufferOverflowException:
 
 Sep 14, 2011 1:55:20 PM org.apache.coyote.ajp.AjpAprProcessor
 process Schwerwiegend: Error processing request 
 java.nio.BufferOverflowException at
 java.nio.DirectByteBuffer.put(DirectByteBuffer.java:343) at
 org.apache.coyote.ajp.AjpAprProcessor.output(AjpAprProcessor.java:273)

 
at
org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1082)
 at org.apache.coyote.Response.doWrite(Response.java:533) at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:368)

 
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437)
 at
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:321)

 
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
 at
 org.apache.catalina.connector.Response.finishResponse(Response.java:502)

 
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:432)
 at
 org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:185)

 
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
 at
 org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)

 
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

 
at java.lang.Thread.run(Thread.java:722)
 
 I've never seen those before. What do these exceptions mean? (Why
 would Tomcat write over the limit of an ByteBuffer?)

Are you using unusually large requests, possibly including chains of
client certs?

If you have a lot of info that needs to be forwarded from the proxy to
Tomcat, you can exceed the max packet size of the connector, and it's
possible you could get this exception (instead of a nicer error
message). The default is 8k, so if you have large amounts of requests
data, you could be overflowing this packet size.

Have you set packetSize on your Connector? Have you set
max_packet_size on any of your workers? If so, the
worker.max_packet_size and Connector packetSize=... must agree.

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

iEYEARECAAYFAk5xI1kACgkQ9CaO5/Lv0PDj8gCgua6OVYMwNUHbQ63uqXgo99so
yyUAn1eOnZSos7qZJbjaWgf7P0WEoGh/
=crZV
-END PGP SIGNATURE-

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



Re: Tomcat and MS LDAP Configuration Problem

2011-09-14 Thread Rudy Gireyev
Thank you for your reply Konstantin.

 In short:
 1. When session cookie is created in recent versions of Tomcat,  the
 Path parameter in it is set to   webappName + /.

 2. Requests to webappName are usually automatically redirected to
 webappName + / (Tomcat sends response code 302),

 but in some rare configurations this redirect does not happen.
 I do not remember what exactly are the circumstances, but I think that
 this involved a servlet that is mapped to /*, and maybe absence of a
 welcome page.

Sorry I'm a little lost here, but is there anything I can do to avoid
having to force Tomcat to do this redirect? I tried this in three
different ways with the same result.
1. I tried placing a welcome page at the webappName level.
2. I also tried placing a welcome page inside the jsp folder
3. Lastly I tried calling a Servlet directly bypassing any jsp page first.

When the url-pattern is /jsp/* - then request.getRemoteUser() is null,
but I'm able to use the session normally. Inspecting
request.getRemoteUser() in the welcome page shows that it is in fact
set, but apparently for that page only.
When the url-pattern is /* - then request.getRemoteUser() is set
notmallyl, but I'm unable to use the session.



 If your servlet reacts to request to webappName, then the
 sessionCookie with Path of webappName + / woundn't be sent by
 browser when it repeats the request.

Sorry I didn't understand what this meant. :(


 It should be possible to explicitly configure the Path attribute of
 the session cookie using cookie-config element in web.xml.  See
 cookie-configType in
 http://java.sun.com/xml/ns/javaee/web-common_3_0.xsd

I looked through the document and found the cookie-config spec, but am
not sure which parameter you are suggesting that I set and to which
value. Sorry about that.

When my welcome page is inside the jsp folder it has the following syntax:
response.sendRedirect(/webappName/myServletName); %
However when it is in the webappName directory I simply do
response.sendRedirect(myServletName); %

Lastly I upgraded from Tomcat 7.0.19 to 7.0.21 thinking maybe that
would fix it. :)

Thank you very much.
Rudy

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



Re: Using calendar .ics files over Tomcat 5.5

2011-09-14 Thread Dean Hoover
We're using Lightning (add-on from Thunderbird email client).  The error we
get is MODIFICATION_FAILED, which from some review points to permissions to
the .ics file.

On Wed, Sep 14, 2011 at 4:34 PM, Pid p...@pidster.com wrote:

 On 14/09/2011 18:14, Dean Hoover wrote:
  The problem I am having is that we are unable to modify (add/remove
 calendar
  entries) after the move.

 How are you trying to update them?


 p




Re: Tomcat Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread Shanti Suresh

Hi Konstantin,

Our Balancer is setup as follows:

Proxy balancer://dsmdelivery
  BalancerMember http://lsa-cmsproddlv1.lsa.umich.edu:8080 retry=2
  BalancerMember http://lsa-cmsproddlv2.lsa.umich.edu:8080 retry=2 status=+H
  ProxySet stickysession=JSESSIONID|jsessionid
/Proxy

Yes, it worked as-is before.

The funny thing is that both server names on the same VirtualHost are  
serviced identically by the same Tomcat engines, yet with a different  
outgoing 302.  I also notice that the correct (single-slash) 302 has  
Transfer-Encoding: Chunked, while the // 302 has a  
Content-Length:0 header as one of the main differences.  The F5  
load-balancer Cookie may be ignored in the www.lsa.umich.edu case.


I appreciate your questions and thoughts.

Thanks!
-Shanti

Quoting Konstantin Kolinko knst.koli...@gmail.com:


2011/9/14 Shanti Suresh sha...@umich.edu:

All,

We are running into a peculiar issue.   We have Tomcat 6.0.24 front-ended by
Apache2.2.3.  We have a VirtuslHost serving port 80 where Apache simply
hands off / to Tomcat's load-balancer.

VirtualHost *:80
 ServerName wwwprod.lsa.umich.edu
 ServerAlias wwwprod www www.lsa.umich.edu
 Redirect         / balancer://dsmdelivery/
 ProxyPass        / balancer://dsmdelivery/
 ProxyPassReverse / balancer://dsmdelivery/
 TraceEnable Off
/VirtualHost



The examples in [1] do not have trailing / neither in Proxy
element nor in ProxyPass setting, while [2] has one such example
(search for A sample balancer setup).

[1] http://httpd.apache.org/docs/2.1/mod/mod_proxy_balancer.html
[2] http://httpd.apache.org/docs/2.1/mod/mod_proxy.html#proxypass

So, how is your Proxy element configured?



The problem cropped up when all systems including the F5 load-balancer
had to be rebooted after last weekend's storm.


So it did work before?


Best regards,
Konstantin Kolinko

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


!DSPAM:4e711122127951222944467!









--
Shanti Suresh
LSA Development
500 S. State Street
Ann Arbor MI 48109-1382
Office: 734-763-4807
sha...@umich.edu

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



Re: Tomcat Redirect Issue - Extra / after hostname - Help Please

2011-09-14 Thread Shanti Suresh

Hi all,

I traced the problem to a missing ProxyPreserveHost On directive on  
the LSA and the II VirtualHosts.  I added the missing directive, and  
things are working fine.


Apache documentation says:

When enabled, this option will pass the Host: line from the incoming  
request to the proxied host, instead of the hostname specified in the  
proxypass line.


This option should normally be turned Off. It is mostly useful in  
special configurations like proxied mass name-based virtual hosting,  
where the original Host header needs to be evaluated by the backend  
server.



In our case, we are doing mass name-based virtual hosting and were  
missing this directive.



Thanks.

   -Shanti

Quoting Shanti Suresh sha...@umich.edu:


Hi Konstantin,

Our Balancer is setup as follows:

Proxy balancer://dsmdelivery
  BalancerMember http://lsa-cmsproddlv1.lsa.umich.edu:8080 retry=2
  BalancerMember http://lsa-cmsproddlv2.lsa.umich.edu:8080 retry=2 status=+H
  ProxySet stickysession=JSESSIONID|jsessionid
/Proxy

Yes, it worked as-is before.

The funny thing is that both server names on the same VirtualHost  
are serviced identically by the same Tomcat engines, yet with a  
different outgoing 302.  I also notice that the correct  
(single-slash) 302 has Transfer-Encoding: Chunked, while the //  
302 has a Content-Length:0 header as one of the main differences.   
The F5 load-balancer Cookie may be ignored in the  
www.lsa.umich.edu case.


I appreciate your questions and thoughts.

Thanks!
-Shanti

Quoting Konstantin Kolinko knst.koli...@gmail.com:


2011/9/14 Shanti Suresh sha...@umich.edu:

All,

We are running into a peculiar issue.   We have Tomcat 6.0.24  
front-ended by

Apache2.2.3.  We have a VirtuslHost serving port 80 where Apache simply
hands off / to Tomcat's load-balancer.

VirtualHost *:80
 ServerName wwwprod.lsa.umich.edu
 ServerAlias wwwprod www www.lsa.umich.edu
 Redirect         / balancer://dsmdelivery/
 ProxyPass        / balancer://dsmdelivery/
 ProxyPassReverse / balancer://dsmdelivery/
 TraceEnable Off
/VirtualHost



The examples in [1] do not have trailing / neither in Proxy
element nor in ProxyPass setting, while [2] has one such example
(search for A sample balancer setup).

[1] http://httpd.apache.org/docs/2.1/mod/mod_proxy_balancer.html
[2] http://httpd.apache.org/docs/2.1/mod/mod_proxy.html#proxypass

So, how is your Proxy element configured?



The problem cropped up when all systems including the F5 load-balancer
had to be rebooted after last weekend's storm.


So it did work before?


Best regards,
Konstantin Kolinko

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












--
Shanti Suresh
LSA Development
500 S. State Street
Ann Arbor MI 48109-1382
Office: 734-763-4807
sha...@umich.edu

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


!DSPAM:4e715c9d273571336712104!









--
Shanti Suresh
LSA Development
500 S. State Street
Ann Arbor MI 48109-1382
Office: 734-763-4807
sha...@umich.edu

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