Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25378

java.lang.IllegalStateException: "Form too large ... >200000"

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Labels:
      None
    • Environment:
      Jenkins 1.565.3, Configuration Slicing Plugin 1.38.3, Java jdk1.7.0_71, Starting the war with java -jar jenkins.war
    • Similar Issues:

      Description

      It seems, that my 100 jobs are more than the configuration slicing plugin can stand. If I want to configure jobs (even if just one job would be affected) I get the following error.

      Stack trace
      
      javax.servlet.ServletException: java.lang.IllegalStateException: Form too large 268785>200000
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:783)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
      	at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
      	at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:636)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      	at org.eclipse.jetty.server.Server.handle(Server.java:370)
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalStateException: Form too large 268785>200000
      	at org.eclipse.jetty.server.Request.extractParameters(Request.java:352)
      	at org.eclipse.jetty.server.Request.getParameter(Request.java:790)
      	at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:184)
      	at org.kohsuke.stapler.RequestImpl.getSubmittedForm(RequestImpl.java:869)
      	at configurationslicing.ConfigurationSlicing$SliceExecutor.doSliceconfigSubmit(ConfigurationSlicing.java:178)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
      	... 67 more
      

        Attachments

          Activity

          Hide
          ericduell Eric Düll added a comment -

          Weird is, that the configuration form does not only list my 100 jobs, but also its modules

          e.g. jobname = myproject_c-w

          myproject_c-w
          myproject_c-w/com.test.package:myproject-api
          myproject_c-w/com.test.package:myproject-assemblies
          myproject_c-w/com.test.package:myproject-batch-scenario
          myproject_c-w/com.test.package:myproject-batch-example-batch
          myproject_c-w/com.test.package:myproject-batch-example-business
          myproject_c-w/com.test.package:myproject-integration-parent
          myproject_c-w/com.test.package:myproject-spring-batch-processing
          myproject_c-w/com.test.package:myproject-ui-wicket
          myproject_c-w/com.test.package:myproject--common
          myproject_c-w/com.test.package:simple-app-spring-batch-parent
          myproject_c-w/com.test.package:batchplatform-parent
          

          ... and sadly that is one of my jobs with the smallest amount of modules. Removing the modules from the list would help.
          http://server.local:8081/jenkins/slicing/logrotationdays/

          >> 1_906 lines with jobs and its modules
          >> 117_517 characters

          Show
          ericduell Eric Düll added a comment - Weird is, that the configuration form does not only list my 100 jobs, but also its modules e.g. jobname = myproject_c-w myproject_c-w myproject_c-w/com.test. package :myproject-api myproject_c-w/com.test. package :myproject-assemblies myproject_c-w/com.test. package :myproject-batch-scenario myproject_c-w/com.test. package :myproject-batch-example-batch myproject_c-w/com.test. package :myproject-batch-example-business myproject_c-w/com.test. package :myproject-integration-parent myproject_c-w/com.test. package :myproject-spring-batch-processing myproject_c-w/com.test. package :myproject-ui-wicket myproject_c-w/com.test. package :myproject--common myproject_c-w/com.test. package :simple-app-spring-batch-parent myproject_c-w/com.test. package :batchplatform-parent ... and sadly that is one of my jobs with the smallest amount of modules. Removing the modules from the list would help. http://server.local:8081/jenkins/slicing/logrotationdays/ >> 1_906 lines with jobs and its modules >> 117_517 characters
          Hide
          danielbeck Daniel Beck added a comment -

          Duplicates the first page of Google search results for "form too large".

          Show
          danielbeck Daniel Beck added a comment - Duplicates the first page of Google search results for "form too large".
          Hide
          ericduell Eric Düll added a comment -

          Sorry, but I don't get yours or mwebbers point. The first page of the Google job results led me to here, opening an issue for the configuration slicing plugin as requested.

          In https://issues.jenkins-ci.org/browse/JENKINS-20327 you said that this issue is not a core problem but a problem of the job configuration slicing plugin. The next suggestion of mwebber was: (16/Okt/14 3:26 PM) @marco, you should open a separate issue for the job config slicing plugin (this issue is for the core problem). Also, if you read the comments above, you will find a workaround.

          And just to remeber: I do not have millions of jobs. I just have 100. Why does the configuration slicing plugin lists all the modules of a job at all? The unnecessary listing of modules causes this problem. From my point of view this issue is not fixed at all, I just have a workaroud and it would be great if you could reopen it or at least create a follow up issue.

          Show
          ericduell Eric Düll added a comment - Sorry, but I don't get yours or mwebbers point. The first page of the Google job results led me to here, opening an issue for the configuration slicing plugin as requested. In https://issues.jenkins-ci.org/browse/JENKINS-20327 you said that this issue is not a core problem but a problem of the job configuration slicing plugin. The next suggestion of mwebber was: (16/Okt/14 3:26 PM) @marco, you should open a separate issue for the job config slicing plugin (this issue is for the core problem). Also, if you read the comments above, you will find a workaround. And just to remeber: I do not have millions of jobs. I just have 100. Why does the configuration slicing plugin lists all the modules of a job at all? The unnecessary listing of modules causes this problem. From my point of view this issue is not fixed at all, I just have a workaroud and it would be great if you could reopen it or at least create a follow up issue.
          Hide
          danielbeck Daniel Beck added a comment -

          In https://issues.jenkins-ci.org/browse/JENKINS-20327 you said that this issue is not a core problem but a problem of the job configuration slicing plugin.

          To clarify, I meant that Marco's comment did not refer to the issue the other report was about (moving the goal posts after a change was committed isn't useful); not necessarily that it's a bug in JCS.

          Why does the configuration slicing plugin lists all the modules of a job at all?

          This should have been fixed in 1.37.1, released over a year ago. Looks like JENKINS-18455 was reopened because of this, and it's tracked there.


          The problem is that the plugin sends huge forms by design (that's how the UI works) if there are many projects, and current Winstone-Jetty doesn't like that. If that is what this report is about, then please reopen (and clarify that in the issue description). A redesigned form may help here.

          But since the plugin has no control over embedded Winstone-Jetty, it cannot increase the limit on its own. (And FWIW, that is already being discussed in https://github.com/jenkinsci/winstone/pull/20 so maybe this is soon obsolete anyway)

          To just get rid of the problem (one instance's DoS protection breaks another instance's config forms), you can set the System property as described in the other issue reports.

          Show
          danielbeck Daniel Beck added a comment - In https://issues.jenkins-ci.org/browse/JENKINS-20327 you said that this issue is not a core problem but a problem of the job configuration slicing plugin. To clarify, I meant that Marco's comment did not refer to the issue the other report was about (moving the goal posts after a change was committed isn't useful); not necessarily that it's a bug in JCS. Why does the configuration slicing plugin lists all the modules of a job at all? This should have been fixed in 1.37.1, released over a year ago. Looks like JENKINS-18455 was reopened because of this, and it's tracked there. The problem is that the plugin sends huge forms by design (that's how the UI works) if there are many projects, and current Winstone-Jetty doesn't like that. If that is what this report is about, then please reopen (and clarify that in the issue description). A redesigned form may help here. But since the plugin has no control over embedded Winstone-Jetty, it cannot increase the limit on its own. (And FWIW, that is already being discussed in https://github.com/jenkinsci/winstone/pull/20 so maybe this is soon obsolete anyway) To just get rid of the problem (one instance's DoS protection breaks another instance's config forms), you can set the System property as described in the other issue reports.

            People

            • Assignee:
              mdonohue mdonohue
              Reporter:
              ericduell Eric Düll
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: