RE: JAVA -tomcat- Request header is too large

2023-12-12 Thread Amit Pande
Thank you, Chris.

Right now, we're on 9.x line. But this is a very important and useful field for 
debugging which we should be aware of.

Thanks,
Amit

-Original Message-
From: Christopher Schultz  
Sent: Monday, December 11, 2023 2:02 PM
To: users@tomcat.apache.org
Subject: Re: JAVA -tomcat- Request header is too large


CAUTION: This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you believe this is a phishing email, use the Report to 
Cybersecurity icon in Outlook.



Amit,

On 12/11/23 11:32, Amit Pande wrote:
> Mark, Chris,
>
> What request ID we're referring to here? Perhaps, I missed some documentation?
>
> How do we enable it?

Request-id is available in Tomcat 11.0 and 10.1 at the moment. Are you using 
either of those?

I'm not seeing any documentation in the AccessLogValve for reporting that value 
anywhere...

-chris

> -Original Message-
> From: Mark Thomas 
> Sent: Monday, December 11, 2023 3:06 AM
> To: users@tomcat.apache.org
> Subject: Re: JAVA -tomcat- Request header is too large
>
>
> CAUTION: This email originated from outside the organization. Do not click 
> links or open attachments unless you recognize the sender and know the 
> content is safe. If you believe this is a phishing email, use the Report to 
> Cybersecurity icon in Outlook.
>
>
>
> On 08/12/2023 22:01, Christopher Schultz wrote:
>
> 
>
>> Are request-ids always allocated, or only if they are "enabled"?
>
> Always allocated.
>
>> I think adding the request-id to this exception detail message might 
>> be helpful, even if the request-id hasn't been enabled in the access-log.
>>
>> WDYT?
>
> Good point. More widely, we should probably be adding the request ID to every 
> request related error message.
>
> 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
>

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



Re: JAVA -tomcat- Request header is too large

2023-12-11 Thread Christopher Schultz

Amit,

On 12/11/23 11:32, Amit Pande wrote:

Mark, Chris,

What request ID we're referring to here? Perhaps, I missed some documentation?

How do we enable it?


Request-id is available in Tomcat 11.0 and 10.1 at the moment. Are you 
using either of those?


I'm not seeing any documentation in the AccessLogValve for reporting 
that value anywhere...


-chris


-Original Message-
From: Mark Thomas 
Sent: Monday, December 11, 2023 3:06 AM
To: users@tomcat.apache.org
Subject: Re: JAVA -tomcat- Request header is too large


CAUTION: This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you believe this is a phishing email, use the Report to 
Cybersecurity icon in Outlook.



On 08/12/2023 22:01, Christopher Schultz wrote:




Are request-ids always allocated, or only if they are "enabled"?


Always allocated.


I think adding the request-id to this exception detail message might
be helpful, even if the request-id hasn't been enabled in the access-log.

WDYT?


Good point. More widely, we should probably be adding the request ID to every 
request related error message.

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



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



RE: JAVA -tomcat- Request header is too large

2023-12-11 Thread Amit Pande
Mark, Chris,

What request ID we're referring to here? Perhaps, I missed some documentation?

How do we enable it? 

Thanks,
Amit

-Original Message-
From: Mark Thomas  
Sent: Monday, December 11, 2023 3:06 AM
To: users@tomcat.apache.org
Subject: Re: JAVA -tomcat- Request header is too large


CAUTION: This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you believe this is a phishing email, use the Report to 
Cybersecurity icon in Outlook.



On 08/12/2023 22:01, Christopher Schultz wrote:



> Are request-ids always allocated, or only if they are "enabled"?

Always allocated.

> I think adding the request-id to this exception detail message might 
> be helpful, even if the request-id hasn't been enabled in the access-log.
>
> WDYT?

Good point. More widely, we should probably be adding the request ID to every 
request related error message.

Mark

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



Re: JAVA -tomcat- Request header is too large

2023-12-11 Thread Mark Thomas

On 08/12/2023 22:01, Christopher Schultz wrote:




Are request-ids always allocated, or only if they are "enabled"?


Always allocated.

I think adding the request-id to this exception detail message might be 
helpful, even if the request-id hasn't been enabled in the access-log.


WDYT?


Good point. More widely, we should probably be adding the request ID to 
every request related error message.


Mark

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



Re: JAVA -tomcat- Request header is too large

2023-12-08 Thread Christopher Schultz

Mark,

On 12/8/23 06:50, Mark Thomas wrote:

On 08/12/2023 09:27, Ivano Luberti wrote:


Il 07/12/2023 17:51, Mark Thomas ha scritto:

On 07/12/2023 15:37, Ivano Luberti wrote:

Hi, since a few days these errors started showing in my log files:

06-Dec-2023 07:39:56.082 INFO [http-nio-8080-exec-5826] 
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP 
request header
 Note: further occurrences of HTTP request parsing errors will be 
logged at DEBUG level.

    java.lang.IllegalArgumentException: Request header is too large
        at 
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:790)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:975)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:604)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:750)


I know I can increase the tolerated header size using sometjing like 
this:


... />


Bu my question is how can i debug the issue?

For example: how can i find the page requested when the exception 
was raised?


Match the timestamp in the logs with the timestamp in the access logs 
of the associated 400 response.


Mark


Thank you Mark.

Finding the exception in log files led me to think there was noting in 
the access log.


Is there any way to log the header content so I can find what is 
causing the issue?


You can try enabling debug logging for 
org.apache.coyote.http11.Http11InputBuffer


Are request-ids always allocated, or only if they are "enabled"?

I think adding the request-id to this exception detail message might be 
helpful, even if the request-id hasn't been enabled in the access-log.


WDYT?

-chris

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



Re: JAVA -tomcat- Request header is too large

2023-12-08 Thread Mark Thomas

On 08/12/2023 09:27, Ivano Luberti wrote:


Il 07/12/2023 17:51, Mark Thomas ha scritto:

On 07/12/2023 15:37, Ivano Luberti wrote:

Hi, since a few days these errors started showing in my log files:

06-Dec-2023 07:39:56.082 INFO [http-nio-8080-exec-5826] 
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP 
request header
 Note: further occurrences of HTTP request parsing errors will be 
logged at DEBUG level.

    java.lang.IllegalArgumentException: Request header is too large
        at 
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:790)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:975)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:604)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:750)


I know I can increase the tolerated header size using sometjing like 
this:


... />


Bu my question is how can i debug the issue?

For example: how can i find the page requested when the exception was 
raised?


Match the timestamp in the logs with the timestamp in the access logs 
of the associated 400 response.


Mark


Thank you Mark.

Finding the exception in log files led me to think there was noting in 
the access log.


Is there any way to log the header content so I can find what is causing 
the issue?


You can try enabling debug logging for 
org.apache.coyote.http11.Http11InputBuffer


Mark

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



Re: JAVA -tomcat- Request header is too large

2023-12-08 Thread Ivano Luberti


Il 07/12/2023 17:51, Mark Thomas ha scritto:

On 07/12/2023 15:37, Ivano Luberti wrote:

Hi, since a few days these errors started showing in my log files:

06-Dec-2023 07:39:56.082 INFO [http-nio-8080-exec-5826] 
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP 
request header
 Note: further occurrences of HTTP request parsing errors will be 
logged at DEBUG level.

    java.lang.IllegalArgumentException: Request header is too large
        at 
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:790)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:975)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:604)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:750)


I know I can increase the tolerated header size using sometjing like 
this:


... />


Bu my question is how can i debug the issue?

For example: how can i find the page requested when the exception was 
raised?


Match the timestamp in the logs with the timestamp in the access logs 
of the associated 400 response.


Mark


Thank you Mark.

Finding the exception in log files led me to think there was noting in 
the access log.


Is there any way to log the header content so I can find what is causing 
the issue?



--

Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno 
2003 n. 196

per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa 



dott. Ivano Mario Luberti

Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa

tel.: +39 050/580959 | fax: +39 050/8932061

web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/


Re: JAVA -tomcat- Request header is too large

2023-12-07 Thread Mark Thomas

On 07/12/2023 15:37, Ivano Luberti wrote:

Hi, since a few days these errors started showing in my log files:

06-Dec-2023 07:39:56.082 INFO [http-nio-8080-exec-5826] 
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP 
request header
 Note: further occurrences of HTTP request parsing errors will be 
logged at DEBUG level.

    java.lang.IllegalArgumentException: Request header is too large
        at 
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:790)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:975)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:604)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:750)


I know I can increase the tolerated header size using sometjing like this:



Bu my question is how can i debug the issue?

For example: how can i find the page requested when the exception was 
raised?


Match the timestamp in the logs with the timestamp in the access logs of 
the associated 400 response.


Mark

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



JAVA -tomcat- Request header is too large

2023-12-07 Thread Ivano Luberti

Hi, since a few days these errors started showing in my log files:

06-Dec-2023 07:39:56.082 INFO [http-nio-8080-exec-5826] 
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP 
request header
 Note: further occurrences of HTTP request parsing errors will be 
logged at DEBUG level.

    java.lang.IllegalArgumentException: Request header is too large
        at 
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:790)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:975)
        at 
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:604)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:750)


I know I can increase the tolerated header size using sometjing like this:



Bu my question is how can i debug the issue?

For example: how can i find the page requested when the exception was 
raised?





--

Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno 
2003 n. 196

per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa 



dott. Ivano Mario Luberti

Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa

tel.: +39 050/580959 | fax: +39 050/8932061

web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/