简体   繁体   中英

Jenkins fail when apply or save configuration

On Jenkins ver. 1.598 after changing job configuration (authorization matrix) apply or save failed with this error:

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)

The full call stack actually includes a reference to the 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)

When Jenkins is managed by Tomcat8 (with a JDK7 or JDK8) and Http11Nio2Protocol , there seems to be a size limit which triggers that exception for a connector using SSL.

But simply changing the connector to Http11NioProtocol makes that limitation disappear.

This works:

<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" />

That is Http11NioProtocol , not Http11Nio2Protocol .

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