Tomcat and CLoudWatch
Is anyone successfully monitoring Tomcat JMX beans on Amazon CloudWatch? This shouldn't be that difficult. But we are hitting a brick wall. Can't get anything to work that is recommended on forums. Thx - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to upload Files larger than 2GB
Hi Mark, thanks for the reply. The mentioning of "Chunked" helped me solve the problem. Our perl based REST client clearly tried to send the file as one buffer. Fortunately changing that was on line of code. > > > > Then looking at the Tomcat configuration. The HTTP connector (working) > > looks like this: > > > > >connectionTimeout="2" > >maxPostSize="209715200" > >redirectPort="8443" /> > > > > Which makes me wonder why it works. It should bail out at 200 MB. > > That limit only applies to the automated processing of request bodies as > per section 3.1.1 of the Servlet 4.0 specification. > > If the application (or a library it uses) reads the request body > directly, there is no limit. The application is meant to provide > whatever limits it considers appropriate. > > Thanks for clarifying that. > I wonder if httpd/mod_jk is trying cache the entire request body before > forwarding. How is the request sent? With chunked-encoding or with a > content-length? Does switching to the other one help? > > Apparently with content-length. Changing to "chunked" solved it. Thanks again Martin -- -- Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de
Re: Tomcat 9 and FIPS-140
Oops...here's the article. https://docs.bmc.com/docs/sso81/configuring-an-external-tomcat-instance-for-fips-140-231147871.html This is not for BMC just straight Tomcat 9 on JDK8. On Tue, Aug 18, 2020 at 6:56 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Robert, > > On 8/18/20 16:19, Robert Hicks wrote: > > Is this article good for enabling FIPS-140 for Tomcat 9? > > [citation needed] > > - -chris > -BEGIN PGP SIGNATURE- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl88XHcACgkQHPApP6U8 > pFjw5Q/+PXzrigAURYaMW8OtPDMWoc1PnGiClAN6e6uiCkhHBIoXbcZe+LCckRVe > VmvjxNPjWIgf/Vu9LYxHpsw/OnmUj/hbBFshOTFf9/943Y+We0NDZOJV2ojsvBz+ > 8j4PcJnlN6RJrr64dt03J/aBf/ptuAaMB+Ir7sPHCAYcEm0946mSXzv5GOAP6MRy > bwQWqkXBzXew98cR+4g+6B64X9jFmIeo9Jmw1w7nlc3c8lbMyfs5Et2beNYTGVS/ > 7BDhRKiX+W57WnVyhtDlwNdFWUaJ/rny3bv14xoaav/UwBz9AlbFc8aZCkPVYtSV > SN+df6pAR458xEWNhnq31Gi3Sff14fBlIQNlPI7yjiprNl/FxJ7s2DEeQS+XzUv0 > lGH/JEqxTkTYD80CM2etZp9c5cXbfDV5OyKtZuba1qNIcf52tnjUmc9nJELKV2Vc > ofCQT6a1MGwkwRuMTAFB9CERforfUwA/yZN9hU4FjPczHeEMcLN4pdiPCoROIE+M > Pd0W5xo/47pRG3Xzy8VtTKpIMafVZd0e+nYDvEHO7+kKRYUSpnaLPP49dXR+3fLW > ZuiskDpYhrcWEz5sWlXKD3mvGRv9cWfKTTotmQUQoS17acLHaBoS99ynXG2AIi0f > kola3Gu/UjB00Dnw9j6VW7+8s2dy87y0X4wWJqRgD1A8YBie2Ok= > =wFJ1 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: How to upload Files larger than 2GB
On 19/08/2020 10:58, Martin Knoblauch wrote: > Hi, > > our customer has the following setup: > > Apache/HTTPD(2.4.43)->mod_jk(1.2.48)->Tomcat(9.0.12). > > The application hosted by Tomcat has a REST interface that allows file > upload using POST requests. The problem now is that we get a 500 response > when we try to upload files larger than 2 GB. But this happens only when > using the full path from Apache to Tomcat. When we try the upload directly > via the Tomcat HTTP port all is good > > This leaves me with the question where the problem is. Is it the Tomcat AJP > part, is it mod_jk or is it HTTPD? From the logs I have the impression the > file never appears on the Tomcat side. What logs? If the request reached Tomcat it should appear in the access log and a Tomcat generated 500 response should result in a stack trace in the logs. The mod_jk log will also confirm what is and is not sent to Tomcat. > So I found the LimitRequestBody directive for HTTPD. But the description > leaves me wondering. It says "This directive specifies the number of bytes > from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a > request body." Means "unlimited" really no limit, or is it 2GB. Anyway, I > set it to 0 with no success. > > Then looking at the Tomcat configuration. The HTTP connector (working) > looks like this: > > connectionTimeout="2" >maxPostSize="209715200" >redirectPort="8443" /> > > Which makes me wonder why it works. It should bail out at 200 MB. That limit only applies to the automated processing of request bodies as per section 3.1.1 of the Servlet 4.0 specification. If the application (or a library it uses) reads the request body directly, there is no limit. The application is meant to provide whatever limits it considers appropriate. > The AJP > connector looks like: > > connectionTimeout="60" > maxPostSize="2097152" > maxThreads="300" > minSpareThreads="10" > redirectPort="8443" /> > > I upped the maxPostSize to 20GB, but it did not help. Same as for HTTP above. > Any advice is highly welcome. Just not > > - Don't use HTTP for uploading large files. It is the mechanism the > application offers > - Don't allow upload of large files. Unfortunately it is a valid use-case. Confirm with the mod_jk log whether the request is sent to Tomcat. I wonder if httpd/mod_jk is trying cache the entire request body before forwarding. How is the request sent? With chunked-encoding or with a content-length? Does switching to the other one help? You might need to take a look at the mod_jk (or httpd) source to see how request bodies are handled. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat mod_jk rpm-build for CentOS-8 - exit with error.
@Klaus Trachtler: Managed to build mod_jk RPM for CentOS8. See https://gist.github.com/robertoschwald/3317b4d777f44260fef86c5059955ffc
How to upload Files larger than 2GB
Hi, our customer has the following setup: Apache/HTTPD(2.4.43)->mod_jk(1.2.48)->Tomcat(9.0.12). The application hosted by Tomcat has a REST interface that allows file upload using POST requests. The problem now is that we get a 500 response when we try to upload files larger than 2 GB. But this happens only when using the full path from Apache to Tomcat. When we try the upload directly via the Tomcat HTTP port all is good This leaves me with the question where the problem is. Is it the Tomcat AJP part, is it mod_jk or is it HTTPD? From the logs I have the impression the file never appears on the Tomcat side. So I found the LimitRequestBody directive for HTTPD. But the description leaves me wondering. It says "This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body." Means "unlimited" really no limit, or is it 2GB. Anyway, I set it to 0 with no success. Then looking at the Tomcat configuration. The HTTP connector (working) looks like this: Which makes me wonder why it works. It should bail out at 200 MB. The AJP connector looks like: I upped the maxPostSize to 20GB, but it did not help. Any advice is highly welcome. Just not - Don't use HTTP for uploading large files. It is the mechanism the application offers - Don't allow upload of large files. Unfortunately it is a valid use-case. Thanks in advance Martin -- -- Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de