Re: Http/2 : Tomcat NIO2 fails on large number of POST request with payload

2019-03-05 Thread Santhosh Kumar
Sometimes more than 10x

On Tue, Mar 5, 2019 at 10:00 PM John Dale  wrote:

> How many orders of magnitude slower are the post requests?
>
> On 3/5/19, Santhosh Kumar  wrote:
> > I was testing in the localhost
> >
> > On Tue, Mar 5, 2019 at 9:32 PM John Dale  wrote:
> >
> >> Are you running your test client (h2load) on the same machine, same
> >> network, or is it over the net (so, like 20ms latency on each
> >> request)?  The reason I ask is that if you are local (especially), it
> >> may queue up too many requests for tomcat to handle in the testing
> >> period with its thread pool.  Will let you know if I have any other
> >> ideas.
> >>
> >> On 3/5/19, Santhosh Kumar  wrote:
> >> > Bytes
> >> >
> >> > On Tue, Mar 5, 2019 at 9:28 PM John Dale  wrote:
> >> >
> >> >> 1000-1500 MB or KB?
> >> >>
> >> >> On 3/4/19, Santhosh Kumar  wrote:
> >> >> > As per the documentation,
> >> >> >
> >> >>
> >>
> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig
> >> >> >
> >> >> > this connector supports maxPostSize, by default the limit is set to
> >> 2MB
> >> >> >
> >> >> > On Tue, Mar 5, 2019 at 5:09 AM John Dale 
> wrote:
> >> >> >
> >> >> >> Does anyone know if this connector supports maxPostSize parameter?
> >> >> >>
> >> >> >> On 3/4/19, Santhosh Kumar  wrote:
> >> >> >> > Hi,
> >> >> >> >
> >> >> >> > We have a tomcat instance which is http2 enabled and it needs to
> >> >> >> > serve
> >> >> >> > large number of requests using multiplexing, so we have
> >> >> >> > configured
> >> >> >> > our
> >> >> >> > instance as follows,
> >> >> >> >
> >> >> >> >  >> >> >> > sslImplementationName="org.apache.tomcat.util.net
> >> >> >> .openssl.OpenSSLImplementation"
> >> >> >> > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
> >> >> >> >  maxThreads="5" SSLEnabled="true"
> >> >> >> >
> >> >> >>
> >> >>
> >>
> compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
> >> >> >> >  compression="on" minSpareThreads="25"
> >> >> >> > noCompressionUserAgents="gozilla, traviata" scheme="https"
> >> >> >> > secure="true"
> >> >> >> > keystoreFile="conf/myfile.keystore" keystorePass="password"
> >> >> >> >  socket.appReadBufSize="81920"
> >> >> >> > socket.appWriteBufSize="81920" socket.rxBufSize="251880"
> >> >> >> > socket.txBufSize="438000">
> >> >> >> >  >> >> >> >
> maxConcurrentStreamExecution="200"
> >> >> >> > maxConcurrentStreams="200"
> >> >> >> > className="org.apache.coyote.http2.Http2Protocol"/>
> >> >> >> >   
> >> >> >> >
> >> >> >> > This instance mainly serves concurrent POST request which will
> >> >> >> > have
> >> >> >> payload
> >> >> >> > of size, approx 1000-1500, which can be verified by tomcat logs
> >> >> >> >
> >> >> >> > org.apache.coyote.http2.Http2Parser.validateFrame Connection
> [0],
> >> >> >> > Stream
> >> >> >> > [19], Frame type [DATA], Flags [1], Payload size [*1195*]
> >> >> >> >
> >> >> >> > We tested our server with the help of h2load as follows,
> >> >> >> >
> >> >> >> > h2load -n100 -c1 -m100 https://localhost:9191/ -d
> >> >> >> > '/agentRequest.txt'
> >> >> >> >
> >> >> >> > We are getting this error as follows,
> >> >> >> >
> >> >> >> >
> >> >> >> > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch
> >> >> >> > Connection
> >> >> >> [0]
> >> >> >> >  java.io.IOException: Unable to unwrap data, invalid status
> >> >> >> > [BUFFER_OVERFLOW]
> >> >> >> > at
> >> >> >> > org.apache.tomcat.util.net
> >> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1041)
> >> >> >> > at
> >> >> >> > org.apache.tomcat.util.net
> >> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
> >> >> >> > at
> >> >> >> > java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
> >> >> >> > at
> >> >> >> > java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
> >> >> >> > at
> >> >> >> > java.base/sun.nio.ch
> >> >> >>
> >> >>
> >>
> .UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:552)
> >> >> >> > at
> >> >> >> > java.base/sun.nio.ch
> >> >> >>
> >> >>
> >>
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
> >> >> >> > at
> >> >> >> > java.base/sun.nio.ch
> >> >> >>
> >> >>
> >>
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
> >> >> >> > at
> >> >> >> > org.apache.tomcat.util.net
> >> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1027)
> >> >> >> > at
> >> >> >> > org.apache.tomcat.util.net
> >> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
> >> >> >> > at
> >> >> >> > org.apache.tomcat.util.net
> >> >> >> .SecureNio2Channel.read(SecureNio2Channel.java:1067)
> >> >> >> > at
> >> >> >> > org.apache.tomcat.util.net
> >> >> >>
> >> >>
> >>
> 

Re: Get startTime of coyoteRequest object from RequestFacade

2019-03-05 Thread Mark Thomas
On 05/03/2019 14:29, Helena Carbajo wrote:
>  >I can think of a couple of other ways of doing this but what problem are
>> you trying to solve?
> 
> I need it in order to calculate the time requests spend in the queue since
> the arrive at the server until a thread process them. I haven't seen any
> other parameter to make this calculation.

Getting closer but my question still stands. What problem are you trying
to solve.

Note that by the time startTime is set, a thread has been allocated so
it won't give you the time you are looking for.

Mark


> 
> Helena
> 
> El mar., 5 mar. 2019 a las 15:25, Mark Thomas () escribió:
> 
>> I can think of a couple of other ways of doing this but what problem are
>> you trying to solve?
>>
>> Mark
>>
>>
>> On 05/03/2019 13:35, Helena Carbajo wrote:
>>> Hi!
>>> I'd like to get the startTime field of a request. The problem is that
>> what
>>> I get is a RequestFacade, which has the
>>> org.apache.catalina.connector.Request object that holds the
>>> org.apache.coyote.Request object. Yet, the catalina.connector.Request is
>> a
>>> protected field, and doesn't have a getter method either. I also tried to
>>> create subclass from RequestFacade but still need the
>>> org.apache.catalina.connector.Request for the constractor. So far, the
>> only
>>> solution I've found is using reflection:
>>>
>>> f = request.getClass().getDeclaredField("request");
>>> f.setAccessible(true);
>>> realRequest = (org.apache.catalina.connector.Request)
>>> f.get(request);
>>> this.coyote_request = realRequest.getCoyoteRequest();
>>> return this.coyote_request.getStartTime();
>>>
>>> However, I don't think this is a good practice, so is there any way to
>> get
>>> this field or to expose it?
>>> Thank you!
>>>
>>
>>
>> -
>> 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 8.5.13 - random issue with HTTPS (blank page) - working good with HTTP

2019-03-05 Thread John Dale
I do not typically use that log file .. have you searched other log
files in the tomcat/logs/* directory?

On 3/5/19, youness.dakk...@bnpparibasfortis.com
 wrote:
> /logs/stderr.log
>
> -Original Message-
> From: John Dale [mailto:jcdw...@gmail.com]
> Sent: Tuesday, March 05, 2019 4:57 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working
> good with HTTP
>
> Which log file are you looking at?  /logs/catalina.out?
>
> On 3/5/19, youness.dakk...@bnpparibasfortis.com
>  wrote:
>> We only use tomcat log files but we don't find relevant information on it
>> as
>> we don't received an error messages but just a blank page.
>> --> is there a way to have more detailed logging  ?
>>
>> I think it's a matter of config parameter to limit the number of
>> connections
>> but we need first to have a clea view of the behaviour from logging..
>>
>> No the timeout is set it up to 60min but the error can come every minute
>>
>> What is the best practice to configure the tomcat in a more efficient way
>> ?
>>
>>
>> Do you want the HTTPS config we have ? from Tomcat configuration JAVA tab
>> ?
>>
>>
>> -Original Message-
>> From: John Dale [mailto:jcdw...@gmail.com]
>> Sent: Monday, March 04, 2019 6:45 PM
>> To: Tomcat Users List
>> Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) -
>> working
>> good with HTTP
>>
>> We need some more information .. what are you using to log?
>>
>> Do you wait to see if there will be a timeout, after which something
>> more meaningful might appear in the logs?
>>
>> Memory/resource leak would be my guess.  Uses all the threads, none of
>> which seem to be properly reclaimed, so it eventually just hangs
>> waiting for a processing thread.
>>
>> Need more info.
>>
>> Hey gang - are there any known issues like this?
>>
>> On 3/4/19, youness.dakk...@bnpparibasfortis.com
>>  wrote:
>>> Dear,
>>>
>>> We are facing instability on our BI platform due to Tomcat.
>>>
>>> We have our https url working but sometimes, we get a blank page and
>>> stay
>>> like that for several time, in the meantime if we use the url without
>>> HTTPS
>>> as HTTP it works.
>>>
>>> The only fix we apply know is to restart the tomcat but this is not a
>>> solution...
>>>
>>> So, the issue is related to HTTPS, can you help us to tackle this
>>> problem
>>> and find the root cause ? and better logging ?
>>>
>>> ==
>>> BNP Paribas Fortis disclaimer:
>>> http://www.bnpparibasfortis.com/e-mail-disclaimer.html
>>>
>>> BNP Paribas Fortis privacy policy:
>>> https://www.bnpparibasfortis.com/footer-pages/privacy-policy
>>>
>>> ==
>>>
>>
>> -
>> 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: How to display the current In-Use Stack Size

2019-03-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Lance,

On 3/4/19 10:49, Campbell, Lance wrote:
> Tomcat 9.x

Note that the answer to this is not Tomcat-specific.

> What is the easiest way to identify how much memory Tomcat/Java is 
> currently using from the Java stack -Xss ?  Not max but currently 
> being used.

Uh... there is no "maximum stack size". There is only "stack size".
Each thread gets a stack of exactly that size.

> Is there a particular statement I can put into a servlet to see
> what the current memory usage is of the stack?

RuntimeMXBean rbean = ManagementFactory.getRuntimeMXBean();

List args = rbean.getInputArguments();

Then look through them for "-Xss" and the accompanying size.

The "used stack size" is the number of live threads times that number.

I don't know if there is a way to check that it was effective, though.

For example, there may be multiple -Xss arguments and the JVM picks one
of them to use (probably the last one, but I don't know for sure).

Also, there may be some minimum / maximum size that will be chosen if
the number is not sane. Or there may be magic numbers like 0 or -1 that
mean "the default for the platform" or whatever.

YMMV.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlx+0DwACgkQHPApP6U8
pFhaRQ//e3GW8AlMVxve9LTljwvtHcZcaCsjA4UWyDyi14rLEu4aHClf5mRluxwE
F0cvsEThxFIv2mpvY0aijs9Vcu+Uf8qMEncks3LTEPxq5GUoRdTHvO4dIqQh2tLd
LVRKBMj7TqeSeQqGjmkgxFHf+F2iuOj34q3LGWzhVbHTn94JOka65nZx75auTySS
jv/+pQGTPjJ8WgGCI3NQIlkg4t7+46i2lWI/D3FhFi0h7uqmV31wly4p7Pz1KxZa
6veaGcutwU7V5brl2vF00AXZsQPSlTQYNLEAfvL87S1WrXWeRTel4Xu/PIPKGq3H
bDbGeC7fh0KR1Gu7sBNlc9ZPxZs57B250ouvkEJ6wj3VG9RA6/MpdCsES9Mv8Z3m
jiwizYnpE2aVKTlH5ID3NPlxH4mCKVl4xxV2JKPeSqBRhnQJkRWE06Mg9XaW6LMv
f1GO9TJ5DSL+Qyb+9i29qy47c9oPrOL4I/9ABOkPfDQzc7iUHdfvpZbKg0BCzgSN
s9vQbzhl32tsJCskjg8OqY7NfzmO8rbcDj90/q60ekCYIz1QzFtJpp6WDMYtbcmW
I9W8dErov/iZSrRpw8selIvjYjJ//2cJ4vm6m9NBg3euT4NasiywidByaF5kOEZE
l5vBcSbDM6/am6b/ukSvRBX33LT5brPv4JQa33haGsKHgNoqc34=
=ZIok
-END PGP SIGNATURE-

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



RE: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working good with HTTP

2019-03-05 Thread youness.dakk...@bnpparibasfortis.com
/logs/stderr.log

-Original Message-
From: John Dale [mailto:jcdw...@gmail.com] 
Sent: Tuesday, March 05, 2019 4:57 PM
To: Tomcat Users List
Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working 
good with HTTP

Which log file are you looking at?  /logs/catalina.out?

On 3/5/19, youness.dakk...@bnpparibasfortis.com
 wrote:
> We only use tomcat log files but we don't find relevant information on it as
> we don't received an error messages but just a blank page.
> --> is there a way to have more detailed logging  ?
>
> I think it's a matter of config parameter to limit the number of connections
> but we need first to have a clea view of the behaviour from logging..
>
> No the timeout is set it up to 60min but the error can come every minute
>
> What is the best practice to configure the tomcat in a more efficient way ?
>
>
> Do you want the HTTPS config we have ? from Tomcat configuration JAVA tab ?
>
>
> -Original Message-
> From: John Dale [mailto:jcdw...@gmail.com]
> Sent: Monday, March 04, 2019 6:45 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working
> good with HTTP
>
> We need some more information .. what are you using to log?
>
> Do you wait to see if there will be a timeout, after which something
> more meaningful might appear in the logs?
>
> Memory/resource leak would be my guess.  Uses all the threads, none of
> which seem to be properly reclaimed, so it eventually just hangs
> waiting for a processing thread.
>
> Need more info.
>
> Hey gang - are there any known issues like this?
>
> On 3/4/19, youness.dakk...@bnpparibasfortis.com
>  wrote:
>> Dear,
>>
>> We are facing instability on our BI platform due to Tomcat.
>>
>> We have our https url working but sometimes, we get a blank page and stay
>> like that for several time, in the meantime if we use the url without
>> HTTPS
>> as HTTP it works.
>>
>> The only fix we apply know is to restart the tomcat but this is not a
>> solution...
>>
>> So, the issue is related to HTTPS, can you help us to tackle this problem
>> and find the root cause ? and better logging ?
>>
>> ==
>> BNP Paribas Fortis disclaimer:
>> http://www.bnpparibasfortis.com/e-mail-disclaimer.html
>>
>> BNP Paribas Fortis privacy policy:
>> https://www.bnpparibasfortis.com/footer-pages/privacy-policy
>>
>> ==
>>
>
> -
> 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: Http/2 : Tomcat NIO2 fails on large number of POST request with payload

2019-03-05 Thread John Dale
How many orders of magnitude slower are the post requests?

On 3/5/19, Santhosh Kumar  wrote:
> I was testing in the localhost
>
> On Tue, Mar 5, 2019 at 9:32 PM John Dale  wrote:
>
>> Are you running your test client (h2load) on the same machine, same
>> network, or is it over the net (so, like 20ms latency on each
>> request)?  The reason I ask is that if you are local (especially), it
>> may queue up too many requests for tomcat to handle in the testing
>> period with its thread pool.  Will let you know if I have any other
>> ideas.
>>
>> On 3/5/19, Santhosh Kumar  wrote:
>> > Bytes
>> >
>> > On Tue, Mar 5, 2019 at 9:28 PM John Dale  wrote:
>> >
>> >> 1000-1500 MB or KB?
>> >>
>> >> On 3/4/19, Santhosh Kumar  wrote:
>> >> > As per the documentation,
>> >> >
>> >>
>> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig
>> >> >
>> >> > this connector supports maxPostSize, by default the limit is set to
>> 2MB
>> >> >
>> >> > On Tue, Mar 5, 2019 at 5:09 AM John Dale  wrote:
>> >> >
>> >> >> Does anyone know if this connector supports maxPostSize parameter?
>> >> >>
>> >> >> On 3/4/19, Santhosh Kumar  wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > We have a tomcat instance which is http2 enabled and it needs to
>> >> >> > serve
>> >> >> > large number of requests using multiplexing, so we have
>> >> >> > configured
>> >> >> > our
>> >> >> > instance as follows,
>> >> >> >
>> >> >> > > >> >> > sslImplementationName="org.apache.tomcat.util.net
>> >> >> .openssl.OpenSSLImplementation"
>> >> >> > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
>> >> >> >  maxThreads="5" SSLEnabled="true"
>> >> >> >
>> >> >>
>> >>
>> compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>> >> >> >  compression="on" minSpareThreads="25"
>> >> >> > noCompressionUserAgents="gozilla, traviata" scheme="https"
>> >> >> > secure="true"
>> >> >> > keystoreFile="conf/myfile.keystore" keystorePass="password"
>> >> >> >  socket.appReadBufSize="81920"
>> >> >> > socket.appWriteBufSize="81920" socket.rxBufSize="251880"
>> >> >> > socket.txBufSize="438000">
>> >> >> > > >> >> >maxConcurrentStreamExecution="200"
>> >> >> > maxConcurrentStreams="200"
>> >> >> > className="org.apache.coyote.http2.Http2Protocol"/>
>> >> >> >   
>> >> >> >
>> >> >> > This instance mainly serves concurrent POST request which will
>> >> >> > have
>> >> >> payload
>> >> >> > of size, approx 1000-1500, which can be verified by tomcat logs
>> >> >> >
>> >> >> > org.apache.coyote.http2.Http2Parser.validateFrame Connection [0],
>> >> >> > Stream
>> >> >> > [19], Frame type [DATA], Flags [1], Payload size [*1195*]
>> >> >> >
>> >> >> > We tested our server with the help of h2load as follows,
>> >> >> >
>> >> >> > h2load -n100 -c1 -m100 https://localhost:9191/ -d
>> >> >> > '/agentRequest.txt'
>> >> >> >
>> >> >> > We are getting this error as follows,
>> >> >> >
>> >> >> >
>> >> >> > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch
>> >> >> > Connection
>> >> >> [0]
>> >> >> >  java.io.IOException: Unable to unwrap data, invalid status
>> >> >> > [BUFFER_OVERFLOW]
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1041)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
>> >> >> > at
>> >> >> > java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
>> >> >> > at
>> >> >> > java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
>> >> >> > at
>> >> >> > java.base/sun.nio.ch
>> >> >>
>> >>
>> .UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:552)
>> >> >> > at
>> >> >> > java.base/sun.nio.ch
>> >> >>
>> >>
>> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
>> >> >> > at
>> >> >> > java.base/sun.nio.ch
>> >> >>
>> >>
>> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1027)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> .SecureNio2Channel.read(SecureNio2Channel.java:1067)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >>
>> >>
>> .Nio2Endpoint$Nio2SocketWrapper$VectoredIOCompletionHandler.completed(Nio2Endpoint.java:1153)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> .Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:1026)
>> >> >> > at
>> >> >> > org.apache.tomcat.util.net
>> >> >> 

Re: Http/2 : Tomcat NIO2 fails on large number of POST request with payload

2019-03-05 Thread Santhosh Kumar
I was testing in the localhost

On Tue, Mar 5, 2019 at 9:32 PM John Dale  wrote:

> Are you running your test client (h2load) on the same machine, same
> network, or is it over the net (so, like 20ms latency on each
> request)?  The reason I ask is that if you are local (especially), it
> may queue up too many requests for tomcat to handle in the testing
> period with its thread pool.  Will let you know if I have any other
> ideas.
>
> On 3/5/19, Santhosh Kumar  wrote:
> > Bytes
> >
> > On Tue, Mar 5, 2019 at 9:28 PM John Dale  wrote:
> >
> >> 1000-1500 MB or KB?
> >>
> >> On 3/4/19, Santhosh Kumar  wrote:
> >> > As per the documentation,
> >> >
> >>
> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig
> >> >
> >> > this connector supports maxPostSize, by default the limit is set to
> 2MB
> >> >
> >> > On Tue, Mar 5, 2019 at 5:09 AM John Dale  wrote:
> >> >
> >> >> Does anyone know if this connector supports maxPostSize parameter?
> >> >>
> >> >> On 3/4/19, Santhosh Kumar  wrote:
> >> >> > Hi,
> >> >> >
> >> >> > We have a tomcat instance which is http2 enabled and it needs to
> >> >> > serve
> >> >> > large number of requests using multiplexing, so we have configured
> >> >> > our
> >> >> > instance as follows,
> >> >> >
> >> >> >  >> >> > sslImplementationName="org.apache.tomcat.util.net
> >> >> .openssl.OpenSSLImplementation"
> >> >> > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
> >> >> >  maxThreads="5" SSLEnabled="true"
> >> >> >
> >> >>
> >>
> compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
> >> >> >  compression="on" minSpareThreads="25"
> >> >> > noCompressionUserAgents="gozilla, traviata" scheme="https"
> >> >> > secure="true"
> >> >> > keystoreFile="conf/myfile.keystore" keystorePass="password"
> >> >> >  socket.appReadBufSize="81920"
> >> >> > socket.appWriteBufSize="81920" socket.rxBufSize="251880"
> >> >> > socket.txBufSize="438000">
> >> >> >  >> >> >maxConcurrentStreamExecution="200"
> >> >> > maxConcurrentStreams="200"
> >> >> > className="org.apache.coyote.http2.Http2Protocol"/>
> >> >> >   
> >> >> >
> >> >> > This instance mainly serves concurrent POST request which will have
> >> >> payload
> >> >> > of size, approx 1000-1500, which can be verified by tomcat logs
> >> >> >
> >> >> > org.apache.coyote.http2.Http2Parser.validateFrame Connection [0],
> >> >> > Stream
> >> >> > [19], Frame type [DATA], Flags [1], Payload size [*1195*]
> >> >> >
> >> >> > We tested our server with the help of h2load as follows,
> >> >> >
> >> >> > h2load -n100 -c1 -m100 https://localhost:9191/ -d
> >> >> > '/agentRequest.txt'
> >> >> >
> >> >> > We are getting this error as follows,
> >> >> >
> >> >> >
> >> >> > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch
> >> >> > Connection
> >> >> [0]
> >> >> >  java.io.IOException: Unable to unwrap data, invalid status
> >> >> > [BUFFER_OVERFLOW]
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1041)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
> >> >> > at
> >> >> > java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
> >> >> > at
> >> >> > java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
> >> >> > at
> >> >> > java.base/sun.nio.ch
> >> >>
> >>
> .UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:552)
> >> >> > at
> >> >> > java.base/sun.nio.ch
> >> >>
> >>
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
> >> >> > at
> >> >> > java.base/sun.nio.ch
> >> >>
> >>
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1027)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .SecureNio2Channel.read(SecureNio2Channel.java:1067)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >>
> >>
> .Nio2Endpoint$Nio2SocketWrapper$VectoredIOCompletionHandler.completed(Nio2Endpoint.java:1153)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:1026)
> >> >> > at
> >> >> > org.apache.tomcat.util.net
> >> >> .SocketWrapperBase.read(SocketWrapperBase.java:1012)
> >> >> > at
> >> >> >
> >> >>
> >>
> org.apache.coyote.http2.Http2AsyncParser.readFrame(Http2AsyncParser.java:61)
> >> >> > at
> >> >> > 

Re: Http/2 : Tomcat NIO2 fails on large number of POST request with payload

2019-03-05 Thread John Dale
Are you running your test client (h2load) on the same machine, same
network, or is it over the net (so, like 20ms latency on each
request)?  The reason I ask is that if you are local (especially), it
may queue up too many requests for tomcat to handle in the testing
period with its thread pool.  Will let you know if I have any other
ideas.

On 3/5/19, Santhosh Kumar  wrote:
> Bytes
>
> On Tue, Mar 5, 2019 at 9:28 PM John Dale  wrote:
>
>> 1000-1500 MB or KB?
>>
>> On 3/4/19, Santhosh Kumar  wrote:
>> > As per the documentation,
>> >
>> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig
>> >
>> > this connector supports maxPostSize, by default the limit is set to 2MB
>> >
>> > On Tue, Mar 5, 2019 at 5:09 AM John Dale  wrote:
>> >
>> >> Does anyone know if this connector supports maxPostSize parameter?
>> >>
>> >> On 3/4/19, Santhosh Kumar  wrote:
>> >> > Hi,
>> >> >
>> >> > We have a tomcat instance which is http2 enabled and it needs to
>> >> > serve
>> >> > large number of requests using multiplexing, so we have configured
>> >> > our
>> >> > instance as follows,
>> >> >
>> >> > > >> > sslImplementationName="org.apache.tomcat.util.net
>> >> .openssl.OpenSSLImplementation"
>> >> > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
>> >> >  maxThreads="5" SSLEnabled="true"
>> >> >
>> >>
>> compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>> >> >  compression="on" minSpareThreads="25"
>> >> > noCompressionUserAgents="gozilla, traviata" scheme="https"
>> >> > secure="true"
>> >> > keystoreFile="conf/myfile.keystore" keystorePass="password"
>> >> >  socket.appReadBufSize="81920"
>> >> > socket.appWriteBufSize="81920" socket.rxBufSize="251880"
>> >> > socket.txBufSize="438000">
>> >> > > >> >maxConcurrentStreamExecution="200"
>> >> > maxConcurrentStreams="200"
>> >> > className="org.apache.coyote.http2.Http2Protocol"/>
>> >> >   
>> >> >
>> >> > This instance mainly serves concurrent POST request which will have
>> >> payload
>> >> > of size, approx 1000-1500, which can be verified by tomcat logs
>> >> >
>> >> > org.apache.coyote.http2.Http2Parser.validateFrame Connection [0],
>> >> > Stream
>> >> > [19], Frame type [DATA], Flags [1], Payload size [*1195*]
>> >> >
>> >> > We tested our server with the help of h2load as follows,
>> >> >
>> >> > h2load -n100 -c1 -m100 https://localhost:9191/ -d
>> >> > '/agentRequest.txt'
>> >> >
>> >> > We are getting this error as follows,
>> >> >
>> >> >
>> >> > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch
>> >> > Connection
>> >> [0]
>> >> >  java.io.IOException: Unable to unwrap data, invalid status
>> >> > [BUFFER_OVERFLOW]
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1041)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
>> >> > at
>> >> > java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
>> >> > at
>> >> > java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
>> >> > at
>> >> > java.base/sun.nio.ch
>> >>
>> .UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:552)
>> >> > at
>> >> > java.base/sun.nio.ch
>> >>
>> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
>> >> > at
>> >> > java.base/sun.nio.ch
>> >>
>> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1027)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .SecureNio2Channel.read(SecureNio2Channel.java:1067)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >>
>> .Nio2Endpoint$Nio2SocketWrapper$VectoredIOCompletionHandler.completed(Nio2Endpoint.java:1153)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:1026)
>> >> > at
>> >> > org.apache.tomcat.util.net
>> >> .SocketWrapperBase.read(SocketWrapperBase.java:1012)
>> >> > at
>> >> >
>> >>
>> org.apache.coyote.http2.Http2AsyncParser.readFrame(Http2AsyncParser.java:61)
>> >> > at
>> >> > org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:69)
>> >> > at
>> >> >
>> >>
>> org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:322)
>> >> > at
>> >> >
>> >>
>> org.apache.coyote.http2.Http2AsyncUpgradeHandler.upgradeDispatch(Http2AsyncUpgradeHandler.java:37)
>> >> > at
>> >> >
>> >>
>> 

Re: Http/2 : Tomcat NIO2 fails on large number of POST request with payload

2019-03-05 Thread Santhosh Kumar
Bytes

On Tue, Mar 5, 2019 at 9:28 PM John Dale  wrote:

> 1000-1500 MB or KB?
>
> On 3/4/19, Santhosh Kumar  wrote:
> > As per the documentation,
> >
> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig
> >
> > this connector supports maxPostSize, by default the limit is set to 2MB
> >
> > On Tue, Mar 5, 2019 at 5:09 AM John Dale  wrote:
> >
> >> Does anyone know if this connector supports maxPostSize parameter?
> >>
> >> On 3/4/19, Santhosh Kumar  wrote:
> >> > Hi,
> >> >
> >> > We have a tomcat instance which is http2 enabled and it needs to serve
> >> > large number of requests using multiplexing, so we have configured our
> >> > instance as follows,
> >> >
> >> >  >> > sslImplementationName="org.apache.tomcat.util.net
> >> .openssl.OpenSSLImplementation"
> >> > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
> >> >  maxThreads="5" SSLEnabled="true"
> >> >
> >>
> compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
> >> >  compression="on" minSpareThreads="25"
> >> > noCompressionUserAgents="gozilla, traviata" scheme="https"
> >> > secure="true"
> >> > keystoreFile="conf/myfile.keystore" keystorePass="password"
> >> >  socket.appReadBufSize="81920"
> >> > socket.appWriteBufSize="81920" socket.rxBufSize="251880"
> >> > socket.txBufSize="438000">
> >> >  >> >maxConcurrentStreamExecution="200"
> >> > maxConcurrentStreams="200"
> >> > className="org.apache.coyote.http2.Http2Protocol"/>
> >> >   
> >> >
> >> > This instance mainly serves concurrent POST request which will have
> >> payload
> >> > of size, approx 1000-1500, which can be verified by tomcat logs
> >> >
> >> > org.apache.coyote.http2.Http2Parser.validateFrame Connection [0],
> >> > Stream
> >> > [19], Frame type [DATA], Flags [1], Payload size [*1195*]
> >> >
> >> > We tested our server with the help of h2load as follows,
> >> >
> >> > h2load -n100 -c1 -m100 https://localhost:9191/ -d '/agentRequest.txt'
> >> >
> >> > We are getting this error as follows,
> >> >
> >> >
> >> > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Connection
> >> [0]
> >> >  java.io.IOException: Unable to unwrap data, invalid status
> >> > [BUFFER_OVERFLOW]
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1041)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
> >> > at
> >> > java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
> >> > at java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
> >> > at
> >> > java.base/sun.nio.ch
> >>
> .UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:552)
> >> > at
> >> > java.base/sun.nio.ch
> >>
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
> >> > at
> >> > java.base/sun.nio.ch
> >>
> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1027)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SecureNio2Channel.read(SecureNio2Channel.java:1067)
> >> > at
> >> > org.apache.tomcat.util.net
> >>
> .Nio2Endpoint$Nio2SocketWrapper$VectoredIOCompletionHandler.completed(Nio2Endpoint.java:1153)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:1026)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SocketWrapperBase.read(SocketWrapperBase.java:1012)
> >> > at
> >> >
> >>
> org.apache.coyote.http2.Http2AsyncParser.readFrame(Http2AsyncParser.java:61)
> >> > at
> >> > org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:69)
> >> > at
> >> >
> >>
> org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:322)
> >> > at
> >> >
> >>
> org.apache.coyote.http2.Http2AsyncUpgradeHandler.upgradeDispatch(Http2AsyncUpgradeHandler.java:37)
> >> > at
> >> >
> >>
> org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
> >> > at
> >> >
> >>
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
> >> > at
> >> >
> >>
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1769)
> >> > at
> >> > org.apache.tomcat.util.net
> >> .SocketProcessorBase.run(SocketProcessorBase.java:49)
> >> > at
> >> 

Re: Http/2 : Tomcat NIO2 fails on large number of POST request with payload

2019-03-05 Thread John Dale
1000-1500 MB or KB?

On 3/4/19, Santhosh Kumar  wrote:
> As per the documentation,
> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig
>
> this connector supports maxPostSize, by default the limit is set to 2MB
>
> On Tue, Mar 5, 2019 at 5:09 AM John Dale  wrote:
>
>> Does anyone know if this connector supports maxPostSize parameter?
>>
>> On 3/4/19, Santhosh Kumar  wrote:
>> > Hi,
>> >
>> > We have a tomcat instance which is http2 enabled and it needs to serve
>> > large number of requests using multiplexing, so we have configured our
>> > instance as follows,
>> >
>> > > > sslImplementationName="org.apache.tomcat.util.net
>> .openssl.OpenSSLImplementation"
>> > protocol="org.apache.coyote.http11.Http11Nio2Protocol"
>> >  maxThreads="5" SSLEnabled="true"
>> >
>> compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>> >  compression="on" minSpareThreads="25"
>> > noCompressionUserAgents="gozilla, traviata" scheme="https"
>> > secure="true"
>> > keystoreFile="conf/myfile.keystore" keystorePass="password"
>> >  socket.appReadBufSize="81920"
>> > socket.appWriteBufSize="81920" socket.rxBufSize="251880"
>> > socket.txBufSize="438000">
>> > > >maxConcurrentStreamExecution="200"
>> > maxConcurrentStreams="200"
>> > className="org.apache.coyote.http2.Http2Protocol"/>
>> >   
>> >
>> > This instance mainly serves concurrent POST request which will have
>> payload
>> > of size, approx 1000-1500, which can be verified by tomcat logs
>> >
>> > org.apache.coyote.http2.Http2Parser.validateFrame Connection [0],
>> > Stream
>> > [19], Frame type [DATA], Flags [1], Payload size [*1195*]
>> >
>> > We tested our server with the help of h2load as follows,
>> >
>> > h2load -n100 -c1 -m100 https://localhost:9191/ -d '/agentRequest.txt'
>> >
>> > We are getting this error as follows,
>> >
>> >
>> > org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Connection
>> [0]
>> >  java.io.IOException: Unable to unwrap data, invalid status
>> > [BUFFER_OVERFLOW]
>> > at
>> > org.apache.tomcat.util.net
>> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1041)
>> > at
>> > org.apache.tomcat.util.net
>> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
>> > at
>> > java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
>> > at java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
>> > at
>> > java.base/sun.nio.ch
>> .UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:552)
>> > at
>> > java.base/sun.nio.ch
>> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
>> > at
>> > java.base/sun.nio.ch
>> .AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
>> > at
>> > org.apache.tomcat.util.net
>> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1027)
>> > at
>> > org.apache.tomcat.util.net
>> .SecureNio2Channel$2.completed(SecureNio2Channel.java:1000)
>> > at
>> > org.apache.tomcat.util.net
>> .SecureNio2Channel.read(SecureNio2Channel.java:1067)
>> > at
>> > org.apache.tomcat.util.net
>> .Nio2Endpoint$Nio2SocketWrapper$VectoredIOCompletionHandler.completed(Nio2Endpoint.java:1153)
>> > at
>> > org.apache.tomcat.util.net
>> .Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:1026)
>> > at
>> > org.apache.tomcat.util.net
>> .SocketWrapperBase.read(SocketWrapperBase.java:1012)
>> > at
>> >
>> org.apache.coyote.http2.Http2AsyncParser.readFrame(Http2AsyncParser.java:61)
>> > at
>> > org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:69)
>> > at
>> >
>> org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:322)
>> > at
>> >
>> org.apache.coyote.http2.Http2AsyncUpgradeHandler.upgradeDispatch(Http2AsyncUpgradeHandler.java:37)
>> > at
>> >
>> org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
>> > at
>> >
>> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
>> > at
>> >
>> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
>> > at
>> > org.apache.tomcat.util.net
>> .Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1769)
>> > at
>> > org.apache.tomcat.util.net
>> .SocketProcessorBase.run(SocketProcessorBase.java:49)
>> > at
>> > org.apache.tomcat.util.net
>> .AbstractEndpoint.processSocket(AbstractEndpoint.java:1048)
>> > at
>> > org.apache.tomcat.util.net
>> .SecureNio2Channel$HandshakeWriteCompletionHandler.completed(SecureNio2Channel.java:116)
>> > at
>> > org.apache.tomcat.util.net
>> 

Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working good with HTTP

2019-03-05 Thread John Dale
Which log file are you looking at?  /logs/catalina.out?

On 3/5/19, youness.dakk...@bnpparibasfortis.com
 wrote:
> We only use tomcat log files but we don't find relevant information on it as
> we don't received an error messages but just a blank page.
> --> is there a way to have more detailed logging  ?
>
> I think it's a matter of config parameter to limit the number of connections
> but we need first to have a clea view of the behaviour from logging..
>
> No the timeout is set it up to 60min but the error can come every minute
>
> What is the best practice to configure the tomcat in a more efficient way ?
>
>
> Do you want the HTTPS config we have ? from Tomcat configuration JAVA tab ?
>
>
> -Original Message-
> From: John Dale [mailto:jcdw...@gmail.com]
> Sent: Monday, March 04, 2019 6:45 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working
> good with HTTP
>
> We need some more information .. what are you using to log?
>
> Do you wait to see if there will be a timeout, after which something
> more meaningful might appear in the logs?
>
> Memory/resource leak would be my guess.  Uses all the threads, none of
> which seem to be properly reclaimed, so it eventually just hangs
> waiting for a processing thread.
>
> Need more info.
>
> Hey gang - are there any known issues like this?
>
> On 3/4/19, youness.dakk...@bnpparibasfortis.com
>  wrote:
>> Dear,
>>
>> We are facing instability on our BI platform due to Tomcat.
>>
>> We have our https url working but sometimes, we get a blank page and stay
>> like that for several time, in the meantime if we use the url without
>> HTTPS
>> as HTTP it works.
>>
>> The only fix we apply know is to restart the tomcat but this is not a
>> solution...
>>
>> So, the issue is related to HTTPS, can you help us to tackle this problem
>> and find the root cause ? and better logging ?
>>
>> ==
>> BNP Paribas Fortis disclaimer:
>> http://www.bnpparibasfortis.com/e-mail-disclaimer.html
>>
>> BNP Paribas Fortis privacy policy:
>> https://www.bnpparibasfortis.com/footer-pages/privacy-policy
>>
>> ==
>>
>
> -
> 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 8.5.13 - random issue with HTTPS (blank page) - working good with HTTP

2019-03-05 Thread youness.dakk...@bnpparibasfortis.com
Hello everyone,

Here the tomcat config file from our Application BI:

HTTPS:443 --> NOT OK sometime ( blank page/hanging) maybe limit of session 
achieved and waiting new available connections
=
<
Connector port="443" 
maxHttpHeaderSize="65536" 
protocol="HTTP/1.1" 
maxThreads="250" 
SSLEnabled="true" 
minSpareThreads="25" 
maxSpareThreads="75" 
enableLookups="false" 
disableUploadTimeout="true" 
acceptCount="200" debug="0" 
scheme="https" 
secure="true" 
clientAuth="false" 
sslProtocol="TLS" 
sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" 
keystorePass="XX" 
keystoreFile="XX" 
keyAlias="XXX" 
ciphers="TLS_RSA_WITH_AES_128_CBC_SHA" 
URIEncoding="UTF-8"
/>

HTTP:8080 --> OK even when HTTPS hanging

<
Connector port="8080" 
maxHttpHeaderSize="65536" 
protocol="HTTP/1.1" 
connectionTimeout="2" 
redirectPort="443" 
compression="on" 
URIEncoding="UTF-8" 
compressionMinSize="2048" n
oCompressionUserAgents="gozilla, traviata" 
compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,text/json,application/javascript,application/json"
/>

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, March 04, 2019 6:57 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working 
good with HTTP

On 04/03/2019 17:28, youness.dakk...@bnpparibasfortis.com wrote:
> Dear,
> 
> We are facing instability on our BI platform due to Tomcat.
> 
> We have our https url working but sometimes, we get a blank page and stay 
> like that for several time, in the meantime if we use the url without HTTPS 
> as HTTP it works.
> 
> The only fix we apply know is to restart the tomcat but this is not a 
> solution...
> 
> So, the issue is related to HTTPS, can you help us to tackle this problem and 
> find the root cause ? and better logging ?

Which connector are you using?

Any error messages in the logs?

Upgrade to the latest 8.5.x release and retest.

Mark

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

==
BNP Paribas Fortis disclaimer:
http://www.bnpparibasfortis.com/e-mail-disclaimer.html
 
BNP Paribas Fortis privacy policy:
https://www.bnpparibasfortis.com/footer-pages/privacy-policy
 
==


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



Re: Get startTime of coyoteRequest object from RequestFacade

2019-03-05 Thread Helena Carbajo
 >I can think of a couple of other ways of doing this but what problem are
>you trying to solve?

I need it in order to calculate the time requests spend in the queue since
the arrive at the server until a thread process them. I haven't seen any
other parameter to make this calculation.

Helena

El mar., 5 mar. 2019 a las 15:25, Mark Thomas () escribió:

> I can think of a couple of other ways of doing this but what problem are
> you trying to solve?
>
> Mark
>
>
> On 05/03/2019 13:35, Helena Carbajo wrote:
> > Hi!
> > I'd like to get the startTime field of a request. The problem is that
> what
> > I get is a RequestFacade, which has the
> > org.apache.catalina.connector.Request object that holds the
> > org.apache.coyote.Request object. Yet, the catalina.connector.Request is
> a
> > protected field, and doesn't have a getter method either. I also tried to
> > create subclass from RequestFacade but still need the
> > org.apache.catalina.connector.Request for the constractor. So far, the
> only
> > solution I've found is using reflection:
> >
> > f = request.getClass().getDeclaredField("request");
> > f.setAccessible(true);
> > realRequest = (org.apache.catalina.connector.Request)
> > f.get(request);
> > this.coyote_request = realRequest.getCoyoteRequest();
> > return this.coyote_request.getStartTime();
> >
> > However, I don't think this is a good practice, so is there any way to
> get
> > this field or to expose it?
> > Thank you!
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Get startTime of coyoteRequest object from RequestFacade

2019-03-05 Thread Mark Thomas
I can think of a couple of other ways of doing this but what problem are
you trying to solve?

Mark


On 05/03/2019 13:35, Helena Carbajo wrote:
> Hi!
> I'd like to get the startTime field of a request. The problem is that what
> I get is a RequestFacade, which has the
> org.apache.catalina.connector.Request object that holds the
> org.apache.coyote.Request object. Yet, the catalina.connector.Request is a
> protected field, and doesn't have a getter method either. I also tried to
> create subclass from RequestFacade but still need the
> org.apache.catalina.connector.Request for the constractor. So far, the only
> solution I've found is using reflection:
> 
> f = request.getClass().getDeclaredField("request");
> f.setAccessible(true);
> realRequest = (org.apache.catalina.connector.Request)
> f.get(request);
> this.coyote_request = realRequest.getCoyoteRequest();
> return this.coyote_request.getStartTime();
> 
> However, I don't think this is a good practice, so is there any way to get
> this field or to expose it?
> Thank you!
> 


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



Get startTime of coyoteRequest object from RequestFacade

2019-03-05 Thread Helena Carbajo
Hi!
I'd like to get the startTime field of a request. The problem is that what
I get is a RequestFacade, which has the
org.apache.catalina.connector.Request object that holds the
org.apache.coyote.Request object. Yet, the catalina.connector.Request is a
protected field, and doesn't have a getter method either. I also tried to
create subclass from RequestFacade but still need the
org.apache.catalina.connector.Request for the constractor. So far, the only
solution I've found is using reflection:

f = request.getClass().getDeclaredField("request");
f.setAccessible(true);
realRequest = (org.apache.catalina.connector.Request)
f.get(request);
this.coyote_request = realRequest.getCoyoteRequest();
return this.coyote_request.getStartTime();

However, I don't think this is a good practice, so is there any way to get
this field or to expose it?
Thank you!


RE: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working good with HTTP

2019-03-05 Thread youness.dakk...@bnpparibasfortis.com
We only use tomcat log files but we don't find relevant information on it as we 
don't received an error messages but just a blank page.
--> is there a way to have more detailed logging  ? 

I think it's a matter of config parameter to limit the number of connections 
but we need first to have a clea view of the behaviour from logging..

No the timeout is set it up to 60min but the error can come every minute

What is the best practice to configure the tomcat in a more efficient way ? 

Do you want the HTTPS config we have ? from Tomcat configuration JAVA tab ?


-Original Message-
From: John Dale [mailto:jcdw...@gmail.com] 
Sent: Monday, March 04, 2019 6:45 PM
To: Tomcat Users List
Subject: Re: Tomcat 8.5.13 - random issue with HTTPS (blank page) - working 
good with HTTP

We need some more information .. what are you using to log?

Do you wait to see if there will be a timeout, after which something
more meaningful might appear in the logs?

Memory/resource leak would be my guess.  Uses all the threads, none of
which seem to be properly reclaimed, so it eventually just hangs
waiting for a processing thread.

Need more info.

Hey gang - are there any known issues like this?

On 3/4/19, youness.dakk...@bnpparibasfortis.com
 wrote:
> Dear,
>
> We are facing instability on our BI platform due to Tomcat.
>
> We have our https url working but sometimes, we get a blank page and stay
> like that for several time, in the meantime if we use the url without HTTPS
> as HTTP it works.
>
> The only fix we apply know is to restart the tomcat but this is not a
> solution...
>
> So, the issue is related to HTTPS, can you help us to tackle this problem
> and find the root cause ? and better logging ?
>
> ==
> BNP Paribas Fortis disclaimer:
> http://www.bnpparibasfortis.com/e-mail-disclaimer.html
>
> BNP Paribas Fortis privacy policy:
> https://www.bnpparibasfortis.com/footer-pages/privacy-policy
>
> ==
>

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



Re: I'm not able to get acces server status Apache Tomcat/9.0.16

2019-03-05 Thread Olaf Kock


On 04.03.19 19:06, ITMex wrote:
> Hi everyone, I'm running Apache Tomcat/9.0.16 over CentOS 7 so far is
> okay, but I'm not able to get acces to "server status, Manager App and
> Host Manager" menus, even from localhost I got the following message:
>
>
> HTTP Status 404 – Not Found

Did you deploy the manager app? (check your tomcat's webapps directory)
Are you connecting directly to your Tomcat, or to a local reverse proxy
(e.g. Apache httpd or nginx)?

Also, you'd not "even" get access from localhost, but "only", according
to the standard configuration for the manager app, if it is deployed.


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



Re: Http insecure headers

2019-03-05 Thread Peter@Kreuser-Online
Nitin,

sorry for my late reply.


> Am 27.02.2019 um 17:01 schrieb Nitin Kadam :
> 
> Hello ,
> 
> We dint have any reverse proxy in middle layers and we have added filters in 
> web.config only, Please find attached snaps of same.
> i am new to tomcat so didnt able to understand all terms.
> 

Well your added filter will not help, if there is already code in place.
To find a possible configuration you may check on your webapp’s web.xml 
(located in the WEB-INF directory). But that all depends on the webapp...
Is this application developed by you/your company or somebody else? You may 
need help from the developer.

Best regards

Peter

>> On Wed, Feb 27, 2019 at 9:20 PM logo  wrote:
>>  
>> 
>> Hello Nitin, 
>> 
>> Am 27.02.2019 16:34, schrieb Nitin Kadam: 
>> 
>> > Hello Team, 
>> > 
>> > I have added below given filter and restarted tomcat service still it 
>> > shows Cache Control as private. 
>> > Please help me on same.
>> 
>> Pictures are stripped off the mailing list. so better send us text logs.
>> 
>> 
>> Nevertheless I told you before, the Cache-Control header may come from
>> your webapp. So you have to check the web.xml of the app for a possible
>> filter. Maybe it's also in the framework or the servlets itself. What is
>> happening if you request a resource from another context?
>> If it is set in the app, then possibly nothing in tomcat will be able to
>> remove it from the response (maybe a reverse proxy like apache or
>> nginx). 
>> 
>> Hope this helps. 
>> 
>> Peter 
>> 
>> > On Wed, Feb 27, 2019 at 2:54 PM logo  wrote: 
>> > 
>> >> Hi Nitin,
>> >> 
>> >> Am 27.02.2019 10:11, schrieb Nitin Kadam:
>> >>> Sorry for typo in earlier email, i was saying about ExpiresFilter only
>> >>> 
>> >>> so how do i add this filter and failter mapping , Do i need to add
>> >>> both in existing httpHeaderSecurity
>> >>> 
>> >>> 
>> >>> 
>> >>> ExpiresFilter
>> >>> 
>> >>> org.apache.catalina.filters.ExpiresFilter
>> >>> 
>> >>> ExpiresByType image
>> >>> access plus 10 days
>> >>> 
>> >>> 
>> >>> ExpiresByType text/css
>> >>> access plus 10 hours
>> >>> 
>> >>> 
>> >>> ExpiresByType application/javascript
>> >>> access plus 10 minutes
>> >>> 
>> >>> 
>> >>> 
>> >>> ExpiresDefault
>> >>> access plus 0 seconds
>> >>> 
>> >> 
>> >> this is an extra entry. I don't know if you should really put this in 
>> >> the global web.xml or rather in your applications web.xml. Maybe Mark 
>> >> can let us know more about possible consequences?
>> >> 
>> >> Add the ... AND the !!!
>> >> 
>> >> Peter
>> >> 
>> >>> 
>> >>> 
>> >>> On Wed, Feb 27, 2019 at 1:59 PM logo  wrote:
>> >>> 
>>  Hello Nitin,
>>  
>>  Am 27.02.2019 08:52, schrieb Nitin Kadam:
>> > Hello,
>> >
>> >
>> >
>> > How can i change "Cache Control -private: to "Cache-Control: nostore"
>> >
>> > i searched and found that need to add express filters in web config but
>> > not
>> > sure on where to add in filters.
>> >
>> > can you please guide me on same?
>> >
>>  
>>  as far as I can tell, that Header is already set by your application -
>>  Tomcat will not set it by default. Not to "private" for sure.
>>  So it may be necessary to change that in your config, maybe even code.
>>  
>>  Usually you would have to implement a CacheControl filter like the one
>>  mentioned here at stackoverflow
>>  https://stackoverflow.com/questions/2876250/tomcat-cache-control [1]
>>  
>>  I don't know if the new ExpiresFilter will let you set the
>>  Cache-Control-Header to that necessary value (other than max-age=0).
>>  
>>  From my experience and the long history of many different browsers 
>>  using
>>  different headers, the one header will maybe solve a vulnscan issue 
>>  but
>>  not the compatibility with "all" browsers.
>>  
>>  Peter
>>  
>>  
>> >
>> > On Wed, Feb 20, 2019 at 3:28 AM Peter@Kreuser-Online
>> > 
>> > wrote:
>> >
>> >> Hi Nitin,
>> >>
>> >> Per se this can be done by enabling the
>> >> org.apache.catalina.filters.HttpHeaderSecurityFilter
>> >> in the global or your webapp's web.xml
>> >>
>> >> For CSP you should write your own Filter.
>> >>
>> >> Beware though that Content Security Policy is nothing that can be
>> >> enabled
>> >> without application knowhow, the right settings for your needs and
>> >> intensive testing. You may really break inline Javascript in your
>> >> pages
>> >> (css too).
>> >>
>> >> Please check out the great websites of Scott Helme on the Headers
>> >> https://Securityheaders.io [2] or
>> >> https://scotthelme.co.uk/csp-cheat-sheet/ [3]
>> >>
>> >>
>> >> Peter
>> >>
>> >> > Am 19.02.2019 um 19:13 schrieb Nitin Kadam > >:
>> >> >
>> >> > Hello Team
>> >> >
>> >> > Need help to enable below security headers in Apache tomcat 7.0.79
>> >> > Operating