tomcat ant test failure due to java exception.

2017-04-28 Thread Arjit Gupta
Hi,

I am building tomcat 7.0.77 with java7 on HP-UX(OS) itanium(IA64) processor.
After building it successful I am running *ant test*.
Multiple tests are failing due to below exception.

*Exception in thread "Thread-18" java.lang.AssertionError: Option not found*

Fail test cases are:-
175
 
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.BIO.txt:Tests
run: 3, Failures: 3, Errors: 0, Time elapsed: 9.213 sec
176
 
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.NIO.txt:Tests
run: 3, Failures: 3, Errors: 0, Time elapsed: 9.572 sec
183
 
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.BIO.txt:Tests
run: 2, Failures: 2, Errors: 0, Time elapsed: 43.762 sec
184
 
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.NIO.txt:Tests
run: 2, Failures: 2, Errors: 0, Time elapsed: 43.897 sec
185
 
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.BIO.txt:Tests
run: 2, Failures: 2, Errors: 0, Time elapsed: 30.797 sec
186
 
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.NIO.txt:Tests
run: 2, Failures: 2, Errors: 0, Time elapsed: 31.078 sec
187
 
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.BIO.txt:Tests
run: 3, Failures: 2, Errors: 0, Time elapsed: 27.097 sec
188
 
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.NIO.txt:Tests
run: 3, Failures: 2, Errors: 0, Time elapsed: 33.172 sec
359  TEST-org.apache.tomcat.util.net.TestClientCert.BIO.txt:Tests run: 5,
Failures: 0, Errors: 5, Time elapsed: 7.45 sec
360  TEST-org.apache.tomcat.util.net.TestClientCert.NIO.txt:Tests run: 5,
Failures: 0, Errors: 5, Time elapsed: 8.081 sec
361  TEST-org.apache.tomcat.util.net.TestCustomSsl.BIO.txt:Tests run: 3,
Failures: 0, Errors: 3, Time elapsed: 7.54 sec
362  TEST-org.apache.tomcat.util.net.TestCustomSsl.NIO.txt:Tests run: 3,
Failures: 0, Errors: 3, Time elapsed: 8.156 sec
363  TEST-org.apache.tomcat.util.net.TestSsl.BIO.txt:Tests run: 4,
Failures: 0, Errors: 3, Time elapsed: 8.117 sec
364  TEST-org.apache.tomcat.util.net.TestSsl.NIO.txt:Tests run: 4,
Failures: 0, Errors: 3, Time elapsed: 8.933 sec

Arjit Kumar


Http2UpgradeHandler crash

2017-04-28 Thread Matt Cosentino
Tomcat crashed on us today, here is an excerpt from the crash log:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 19003  org.apache.tomcat.jni.Socket.sendb(JLjava/nio/ByteBuffer;II)I (0 
bytes) @ 0x0599a2df [0x0599a280+0x5f]
J 42307 C2 org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking()V (90 
bytes) @ 0x02663b84 [0x026632e0+0x8a4]
J 38363 C2 org.apache.tomcat.util.net.SocketWrapperBase.flush(Z)Z (20 bytes) @ 
0x046e5a18 [0x046e59e0+0x38]
j  
org.apache.coyote.http2.Http2UpgradeHandler.sendStreamReset(Lorg/apache/coyote/http2/StreamException;)V+128
j  
org.apache.coyote.http2.Stream.close(Lorg/apache/coyote/http2/Http2Exception;)V+76
J 43733 C2 org.apache.coyote.http2.StreamRunnable.run()V (12 bytes) @ 
0x0af4d104 [0x0af4c720+0x9e4]
J 36891 C1 
java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V
 (225 bytes) @ 0x09a7797c [0x09a76940+0x103c]
J 41848 C1 java.util.concurrent.ThreadPoolExecutor$Worker.run()V (9 bytes) @ 
0x03ff180c [0x03ff1700+0x10c]
J 41853 C1 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()V 
(25 bytes) @ 0x07e8194c [0x07e81840+0x10c]
J 30379 C1 java.lang.Thread.run()V (17 bytes) @ 0x0170dac4 
[0x0170d980+0x144]
v  ~StubRoutines::call_stub

In my web application log I found this at the same time:


org.apache.coyote.CloseNowException: Connection [389], Stream [67], This stream 
is not writable

at 
org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:755)

at org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:721)

at org.apache.coyote.http2.Stream$StreamOutputBuffer.doWrite(Stream.java:682)

at org.apache.coyote.Response.doWrite(Response.java:522)

at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:351)


There were more for additional streams at this same time. I've seen quite a few 
of these CloseNowExceptions since upgrading to 8.5.14 from 8.5.11, but this is 
the first time it has crashed Tomcat. What could be the cause? What should I be 
looking for?

- Matt



RE: Skip resource path in TLD scanner?

2017-04-28 Thread Matt Cosentino
Yes, it's other folders within WEB-INF. I turned on the TldScanner logging and 
it is definitely what is causing the delay. My situation probably isn't very 
typical. The delay varies in my various web applications, the worst being about 
20 seconds. It all adds up though, and every second counts when our sites are 
down.

- Matt


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, April 28, 2017 7:28 AM
To: Tomcat Users List 
Subject: Re: Skip resource path in TLD scanner?

On 27/04/17 23:39, Matt Cosentino wrote:
> https://tomcat.apache.org/tomcat-8.0-doc/config/systemprops.html
> 
> There is one for skipping jar files:
> 
> tomcat.util.scan.StandardJarScanFilter.jarsToSkip



> It skips /WEB-INF/classes/ and /WEB-INF/lib/, but it does not check any 
> property to skip user defined paths.

Is it other paths within WEB-INF you need to skip?

When I read "skipping resource paths" I was thinking of skipping the various 
places where Tomcat treat directories as JARs that then get scanned for TLDs 
(which can be configured via the JarScanner). But it sounds like skipping those 
won't help you.

How sure are you that it is checking the directories below WEB-INF that is the 
cause of the delay? That isn't a typical source of start-up delay although it 
is certainly possible.

Finally, what sort of delay are we talking out here? Seconds? Minutes?

Mark


> -Original Message-
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: Thursday, April 27, 2017 5:05 PM
> To: Tomcat Users List 
> Subject: Re: Skip resource path in TLD scanner?
> 
> On 27/04/17 21:17, Matt Cosentino wrote:
>> I need to skip some of the resource paths within WEB-INF. I know 
>> there's a property for skipping jar files, but I couldn't find one 
>> for resource paths. I reported this as a bug and was told that the 
>> property exists. Where is it?
> 
> Where have you looked?
> 
> Mark

-
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: Skip resource path in TLD scanner?

2017-04-28 Thread Matt Cosentino
I already did, that only mentions skipping jar files.

- Matt


-Original Message-
From: Violeta Georgieva [mailto:violet...@apache.org] 
Sent: Friday, April 28, 2017 1:30 AM
To: Tomcat Users List 
Subject: Re: Skip resource path in TLD scanner?

Hi,

2017-04-27 23:17 GMT+03:00 Matt Cosentino :
>
> I need to skip some of the resource paths within WEB-INF. I know 
> there's
a property for skipping jar files, but I couldn't find one for resource paths. 
I reported this as a bug and was told that the property exists.
Where is it?

Check this wiki https://wiki.apache.org/tomcat/HowTo/FasterStartUp

Regards,
Violeta

> - Matt
>


Re: Skip resource path in TLD scanner?

2017-04-28 Thread Mark Thomas
On 27/04/17 23:39, Matt Cosentino wrote:
> https://tomcat.apache.org/tomcat-8.0-doc/config/systemprops.html
> 
> There is one for skipping jar files:
> 
> tomcat.util.scan.StandardJarScanFilter.jarsToSkip



> It skips /WEB-INF/classes/ and /WEB-INF/lib/, but it does not check any 
> property to skip user defined paths.

Is it other paths within WEB-INF you need to skip?

When I read "skipping resource paths" I was thinking of skipping the
various places where Tomcat treat directories as JARs that then get
scanned for TLDs (which can be configured via the JarScanner). But it
sounds like skipping those won't help you.

How sure are you that it is checking the directories below WEB-INF that
is the cause of the delay? That isn't a typical source of start-up delay
although it is certainly possible.

Finally, what sort of delay are we talking out here? Seconds? Minutes?

Mark


> -Original Message-
> From: Mark Thomas [mailto:ma...@apache.org] 
> Sent: Thursday, April 27, 2017 5:05 PM
> To: Tomcat Users List 
> Subject: Re: Skip resource path in TLD scanner?
> 
> On 27/04/17 21:17, Matt Cosentino wrote:
>> I need to skip some of the resource paths within WEB-INF. I know 
>> there's a property for skipping jar files, but I couldn't find one for 
>> resource paths. I reported this as a bug and was told that the 
>> property exists. Where is it?
> 
> Where have you looked?
> 
> Mark

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



Re: URL decoding

2017-04-28 Thread Stephen Crawford

On 4/27/2017 4:52 PM, Christopher Schultz wrote:

When I take your browser-encoded query string from above and send it
to Tomcat, I don't get any errors or anything.

Are you sure this isn't a problem with the application?


Hi Chris,

That happens to me too, in the sense that usually Tomcat throws an error 
or Geoserver throws an error, but in this case nothing happens except 
for the 400 BAD REQUEST.  Nothing in logs of Tomcat or Geoserver.  I 
have not yet tried changing the logging level.


Thanks,
Steve

--
Stephen Crawford
Center for Environmental Informatics
The Pennsylvania State University
src...@psu.edu



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



Re: tuning to accommodate Apache 2.4 event mpm

2017-04-28 Thread Suvendu Sekhar Mondal
John,

On Fri, Apr 28, 2017 at 11:48 AM, Rainer Jung  wrote:
> Am 27.04.2017 um 22:21 schrieb Mark Thomas:
>>
>> On 27/04/17 20:08, John Cartwright - NOAA Federal wrote:
>>>
>>> Thanks for your reply Mark!  My sysadmin tells me just that we're
>>> using "the defaults" for event_mpm.  However we are still using the
>>> BIO AJP connector:
>>>
>>> >> maxThreads="300" minSpareThreads="25"
>>> maxSpareThreads="75" connectionTimeout="2"/>
>>>
>>> Is there a way I can tell from the Tomcat side when there is thread
>>> starvation?
>>
>>
>> You'd need to look at the number of active connections. If it gets to
>> 300 then you likely have a problem.
>>
>> netstat might be the least invasive way of doing that. Other options
>> include the Manager app, JMX and thread dumps.
>>
>> Switching to NIO will allow you to server more connections with the same
>> number of threads.
>
>
> I assume you are using the latest mod_jk version?
>
> The current version of mod_jk also counts the total connection number (sum
> of connections from all Apache child processes to your Tomcat) and makes it
> available via the status worker for monitoring. The counting was a bit buggy
> in older versions, but should be correct in the latest one.
>
> Event MPM and mod_jk: the relevant phase in Apache is the handler phase,
> where the actual request forwarding is done by mod_jk. Things do not really
> need to change in the handler phase for proxying modules with event MPM.
> mod_jk does not need to know about the MPM or behave specific, the
> forwarding runs synchronously. By default mod_jk uses as many connections
> per Apache process as you have worker threads per Apache process configured.
> On the Tomcat side with BIO you need as many threads for the AJP connector
> as all you Apache fronting that Tomcat might have threads in total. Using
> the NIO connector on the Tomcat side is indeed better than BIO especially
> when you expect lots of concurrency (many Apache threads configured). Make
> sure you also use a recent Tomcat patch level then.
>
> What messages did you get in your mod_jk error log?

I also have the same question. Please check mod_jk log entries in the
time frame when you are getting 503s. It must have some clues.

We had similar type of problem a year ago(although we were using
mod_proxy_http). Later we found that backend Tomcat servers were not
responding to httpd's ping. As a result httpd was throwing 503s
sporadically. In our case long GC pauses were causing the problem. We
tuned GC and problem went away completely. You can check if you are
having something like that or not. Again you need to correlate 503
occurrences with GC logs.

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

>
> For the mod_jk config, a good starter is the config files we bundle with the
> source download of mod_jk. You can also find them under
>
> http://svn.apache.org/viewvc/tomcat/jk/trunk/conf/
>
> These files set timeouts etc.
>
> Regards,
>
> Rainer
>
>
> -
> 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: Skip resource path in TLD scanner?

2017-04-28 Thread Violeta Georgieva
Hi,

2017-04-27 23:17 GMT+03:00 Matt Cosentino :
>
> I need to skip some of the resource paths within WEB-INF. I know there's
a property for skipping jar files, but I couldn't find one for resource
paths. I reported this as a bug and was told that the property exists.
Where is it?

Check this wiki https://wiki.apache.org/tomcat/HowTo/FasterStartUp

Regards,
Violeta

> - Matt
>


Re: tuning to accommodate Apache 2.4 event mpm

2017-04-28 Thread Rainer Jung

Am 27.04.2017 um 22:21 schrieb Mark Thomas:

On 27/04/17 20:08, John Cartwright - NOAA Federal wrote:

Thanks for your reply Mark!  My sysadmin tells me just that we're
using "the defaults" for event_mpm.  However we are still using the
BIO AJP connector:



Is there a way I can tell from the Tomcat side when there is thread starvation?


You'd need to look at the number of active connections. If it gets to
300 then you likely have a problem.

netstat might be the least invasive way of doing that. Other options
include the Manager app, JMX and thread dumps.

Switching to NIO will allow you to server more connections with the same
number of threads.


I assume you are using the latest mod_jk version?

The current version of mod_jk also counts the total connection number 
(sum of connections from all Apache child processes to your Tomcat) and 
makes it available via the status worker for monitoring. The counting 
was a bit buggy in older versions, but should be correct in the latest one.


Event MPM and mod_jk: the relevant phase in Apache is the handler phase, 
where the actual request forwarding is done by mod_jk. Things do not 
really need to change in the handler phase for proxying modules with 
event MPM. mod_jk does not need to know about the MPM or behave 
specific, the forwarding runs synchronously. By default mod_jk uses as 
many connections per Apache process as you have worker threads per 
Apache process configured. On the Tomcat side with BIO you need as many 
threads for the AJP connector as all you Apache fronting that Tomcat 
might have threads in total. Using the NIO connector on the Tomcat side 
is indeed better than BIO especially when you expect lots of concurrency 
(many Apache threads configured). Make sure you also use a recent Tomcat 
patch level then.


What messages did you get in your mod_jk error log?

For the mod_jk config, a good starter is the config files we bundle with 
the source download of mod_jk. You can also find them under


http://svn.apache.org/viewvc/tomcat/jk/trunk/conf/

These files set timeouts etc.

Regards,

Rainer

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