java - Request Entity Too Large (JasperServer / Apache / Tomcat) -


i following error when try access jasperreports server pages:

request entity large requested resource /jasperserver/olap/viewolap.html not allow request data requests, or amount of data provided in request exceeds capacity limit.

i checked apache log files , got following error in mod_jk.log

[thu nov 10 10:25:00 2016][8964:3876] [error] ajp_marshal_into_msgb::jk_ajp_common.c (517): failed appending query string of length 7417

i tried many different ways solve it.

i added maxhttpheadersize , max_packet_size attributes ajp connect of tomcat (server.xml):

<connector port="8010" protocol="ajp/1.3" connectiontimeout="20000" redirectport="8443" maxhttpheadersize="65536" max_packet_size="65536" /> 

also added limitrequestline, limitrequestbody, limitrequestfieldsize , limitrequestfields apache httpd.conf file (added end of file without virtualhost):

limitrequestline 65536 limitrequestbody 0 limitrequestfieldsize 65536 limitrequestfields 10000

i still getting error above.

i found suggestions add max_packet_size workers.properties of apache. if add attribute http 400 error , white page. that's why commented property in workers.properties:

#worker.jasper.max_packet_size=65536

i restarted services after changing configurations.

when access same pages via http-connector of tomcat (http://hostname:8081/jasperserver/..) works fine. when access via ajp-connector of apache (http://hostname/jasperserver/..) error. think there should problem ajp-connector.

apache: 2.4.12 jasperreports server: 6.2.1 apache tomcat version 8.0.14:

does have suggestion have solve issue?

i figured out problem.

the attribute in server.xml tomcat has packetsize , not max_packet_size

see documentation ajp connector

after renaming it, works fine.

here configurations:

tomcat server.xml:

connector port="8010" protocol="ajp/1.3" redirectport="8443" packetsize="65536"

apache workers.properties:

worker.jasper.max_packet_size=65536

if afterwards error:

request-uri long

the requested url's length exceeds capacity limit server.

you have set following attributes in apache httpd.conf file:

limitrequestline 65536 limitrequestbody 0 limitrequestfieldsize 65536 limitrequestfields 10000

i hope answer helps others too.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -