简体   繁体   中英

How to change Jenkins/Jetty max header size

running a Jenkins server with the embedded Jetty, I get errors regarding too big headers in the Jenkins log:

Feb 15, 2017 3:18:15 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: header full: java.lang.ArrayIndexOutOfBoundsException: 8192

I'd like to increase the Jetty max header size but can't find how to do it, in the case of a Jenkins... I can't find any Jetty config file and don't know if I can set the limit on the Jenkins command line (and what would be the name of the variable to define).

How to achieve this?

If using the built-in Jetty found in the self-running jenkins.war, you cannot adjust that value.

You can only adjust the maximum number of parameters.

--maxParamCount=N   = set the max number of parameters allowed in a form submission to protect
                      against hash DoS attack (oCERT #2011-003). Default is 10000.

Either deploy the war to a full blown container which you can then adjust the value, or change how you use Jenkins to not send excessive URI or HTTP headers (such as using POST vs GET).

To adjust the Jetty 9 header buffer maximum size, you'd adjust the requestHeaderSize in the HttpConfiguration for the ServerConnector that you want that new setting to exist in.

将此参数添加到jenkins配置中:

JENKINS_ARGS="--requestHeaderSize=258140"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM