简体   繁体   English

如何更改Jenkins / Jetty最大标题大小

[英]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: 在嵌入式Jetty上运行Jenkins服务器时,我收到有关Jenkins日志中太大标题的错误:

Feb 15, 2017 3:18:15 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: header full: java.lang.ArrayIndexOutOfBoundsException: 8192 2017年2月15日,下午3:18:15 org.eclipse.jetty.util.log.JavaUtilLog警告:标头已满: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). 我想增加Jetty的最大标头大小,但在詹金斯的情况下却找不到方法...我找不到任何Jetty配置文件,也不知道我是否可以设置限制在Jenkins命令行上(以及要定义的变量的名称是什么)。

How to achieve this? 如何实现呢?

If using the built-in Jetty found in the self-running jenkins.war, you cannot adjust that value. 如果使用在自运行的jenkins.war中找到的内置Jetty,则无法调整该值。

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). 您可以将战争部署到一个完整的容器中,然后可以调整其值,或者更改使用Jenkins的方式以不发送过多的URI或HTTP标头(例如使用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. 要调整Jetty 9标头缓冲区的最大大小,请在HttpConfiguration为希望存在新设置的ServerConnector调整requestHeaderSize

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

JENKINS_ARGS="--requestHeaderSize=258140"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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