应用或保存配置时Jenkins失败

时间:2015-02-10 08:45:48

标签: jenkins

詹金斯诉。更改作业配置(授权矩阵)后的1.598应用或保存失败,并显示以下错误:

Stack trace
javax.servlet.ServletException: This page expects a form submission but had only {}
         at org.kohsuke.stapler.RequestImpl.getSubmittedForm(RequestImpl.java:906)
         at hudson.model.Job.doConfigSubmit(Job.java:1180)
         at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:785)
         at sun.reflect.GeneratedMethodAccessor1091.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:483)
         at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
         at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)

1 个答案:

答案 0 :(得分:1)

完整调用堆栈实际上包含对tomcat connector Http11Nio2Protocol的引用。

    ...
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
                                vvvvvvvvvvvvvvvvvv
    at org.apache.coyote.http11.Http11Nio2Protocol$Http11ConnectionHandler.process(Http11Nio2Protocol.java:176)
                                ^^^^^^^^^^^^^^^^^^
    at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1093)
    at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1052)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

当Jenkins由Tomcat8(使用JDK7或JDK8) Http11Nio2Protocol管理时,似乎有一个大小限制会触发使用SSL的连接器的异常。

但只需将连接器更改为Http11NioProtocol即可使该限制消失。

这有效:

<Connector port="9443" protocol="org.apache.coyote.http11.Http11NioProtocol"
           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
           keystoreFile="D:/CI/jdk-7u65-windows-x64/jre/lib/security/cacerts" 
           keystorePass="xxx" keystoreType="JKS" 
           clientAuth="false" URIEncoding="UTF-8" keyAlias="yyy" />

那是Http11NioProtocol,而不是Http11Nio2Protocol