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

"Response header too large" when notifying master of new git commit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      After notifying a commit via git/notifyCommit this exception appears in the logs

      2017-09-15 07:22:20.265+0000 [id=1986]  INFO    j.p.g.GitSCMSource$ListenerImpl#onNotifyCommit: Triggering the indexing of FOLDER » SUBFOLDER » multibranch-pipeline-job as a result of event from XX.XX.XX.XX ⇒ https:/jenkins:8080/git/notifyCommit
      2017-09-15 07:22:20.269+0000 [id=1986]  WARNING o.e.jetty.util.log.JavaUtilLog#warn: Commit failed
      java.nio.BufferOverflowException
          at java.nio.Buffer.nextPutIndex(Buffer.java:521)
          at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:169)
          at org.eclipse.jetty.http.HttpGenerator.putSanitisedValue(HttpGenerator.java:1066)
          at org.eclipse.jetty.http.HttpGenerator.putTo(HttpGenerator.java:1088)
          at org.eclipse.jetty.http.HttpGenerator.generateHeaders(HttpGenerator.java:705)
          at org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:387)
      Caused: java.io.IOException: Response header too large
          at org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:402)
          at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:655)
          at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)
          at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)
          at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:471)
          at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:763)
          at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)
          at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)
          at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)
          at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:355)
          at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:167)
          at org.eclipse.jetty.server.Iso88591HttpWriter.write(Iso88591HttpWriter.java:70)
          at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:71)
          at java.io.PrintWriter.write(PrintWriter.java:456)
          at java.io.PrintWriter.write(PrintWriter.java:473)
          at java.io.PrintWriter.print(PrintWriter.java:603)
          at java.io.PrintWriter.println(PrintWriter.java:739)
          at hudson.plugins.git.GitStatus$JenkinsAbstractProjectListener$PollingScheduledResponseContributor.writeBody(GitStatus.java:531)
          at hudson.plugins.git.GitStatus$ResponseContributor.writeBody(GitStatus.java:225)
          at hudson.plugins.git.GitStatus$1.generateResponse(GitStatus.java:174)
          at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:124)
          at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:69)
          at org.kohsuke.stapler.Function.renderResponse(Function.java:136)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:119)
          at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
          at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
          at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          at javax.servlet.http.HttpServlet.service(HttpServlet.jav
         ...
      

      This issue seems to be very similar to JENKINS-38720, reported for the Mercurial plugin.

      I'm raising this for the git plugin.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Seems like having too many projects triggered their polling may cause this. How many projects use the repository in question?

            Show
            danielbeck Daniel Beck added a comment - Seems like having too many projects triggered their polling may cause this. How many projects use the repository in question?
            Hide
            besmerd Daniel Besmer added a comment -

            Unfortunately the repo is used in a lot of jobs (~1500) but only a few of them have the build trigger enabled. I've increased the buffer size for jetty temporarily and see a lot of entries like the one below before the actual error message:

            Sep 19, 2017 5:08:07 PM hudson.plugins.git.GitStatus$JenkinsAbstractProjectListener onNotifyCommit
            INFO: no trigger, or post-commit hooks disabled, on Folder » Folder » Folder » Folder » Job

            Show
            besmerd Daniel Besmer added a comment - Unfortunately the repo is used in a lot of jobs (~1500) but only a few of them have the build trigger enabled. I've increased the buffer size for jetty temporarily and see a lot of entries like the one below before the actual error message: Sep 19, 2017 5:08:07 PM hudson.plugins.git.GitStatus$JenkinsAbstractProjectListener onNotifyCommit INFO: no trigger, or post-commit hooks disabled, on Folder » Folder » Folder » Folder » Job
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-39402 was previously fixed in core. The fix here would likely be similar.

            Show
            jglick Jesse Glick added a comment - JENKINS-39402 was previously fixed in core. The fix here would likely be similar.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/main/java/hudson/plugins/git/GitStatus.java
            src/test/java/hudson/plugins/git/GitStatusTest.java
            http://jenkins-ci.org/commit/git-plugin/35745f2e3f81252840cb47b276068e033fc4bef5
            Log:
            Merge pull request #532 from dwnusbaum/JENKINS-46929

            JENKINS-46929 Limit number of projects added to response headers

            Compare: https://github.com/jenkinsci/git-plugin/compare/815a0159f3c8...35745f2e3f81

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/GitStatus.java src/test/java/hudson/plugins/git/GitStatusTest.java http://jenkins-ci.org/commit/git-plugin/35745f2e3f81252840cb47b276068e033fc4bef5 Log: Merge pull request #532 from dwnusbaum/ JENKINS-46929 JENKINS-46929 Limit number of projects added to response headers Compare: https://github.com/jenkinsci/git-plugin/compare/815a0159f3c8...35745f2e3f81
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git plugin 3.6.0

            Show
            markewaite Mark Waite added a comment - Fixed in git plugin 3.6.0

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                dariver Darío Villadiego
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: