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

HTTP two-way remoting does not work (jenkins-cli.jar without JNLP)

    XMLWordPrintable

Details

    Description

      any cli command fails with exception. output attached. this output produced by create-job ommand, help command produces same.

      Attachments

        Issue Links

          Activity

            habbie Peter van Dijk added a comment - - edited

            I have narrowed this down to 1.535 and up; 1.534 is fine. This issue only occurs when "TCP port for JNLP slave agents" is set to Disabled.

            My best guess is that the "two simultaneous HTTP connections" fallback for the CLI connection was broken with the introduction of Jetty8 in 1.535.

            From the jenkins-cli output (similar to 2.log), one can with some effort decode the server side backtrace:

            java.io.IOException: Protocol violation: Unexpected single newline character in chunk size
                 at hudson.util.ChunkedInputStream.getChunkSizeFromInputStream(ChunkedInputStream.java:246)
                 at hudson.util.ChunkedInputStream.nextChunk(ChunkedInputStream.java:197)
                 at hudson.util.ChunkedInputStream.read(ChunkedInputStream.java:120)
                 ...
            

            For the original submitter: you can workaround by re-enabling the JNLP port.

            habbie Peter van Dijk added a comment - - edited I have narrowed this down to 1.535 and up; 1.534 is fine. This issue only occurs when "TCP port for JNLP slave agents" is set to Disabled. My best guess is that the "two simultaneous HTTP connections" fallback for the CLI connection was broken with the introduction of Jetty8 in 1.535. From the jenkins-cli output (similar to 2.log), one can with some effort decode the server side backtrace: java.io.IOException: Protocol violation: Unexpected single newline character in chunk size at hudson.util.ChunkedInputStream.getChunkSizeFromInputStream(ChunkedInputStream.java:246) at hudson.util.ChunkedInputStream.nextChunk(ChunkedInputStream.java:197) at hudson.util.ChunkedInputStream.read(ChunkedInputStream.java:120) ... For the original submitter: you can workaround by re-enabling the JNLP port.

            git bisect narrows this down to [b19f4650d7cc146e28398a33ad0625d46991e27f] [FIXED JENKINS-18366] Winstone is now powered by Jetty

            (as I expected).

            habbie Peter van Dijk added a comment - git bisect narrows this down to [b19f4650d7cc146e28398a33ad0625d46991e27f] [FIXED JENKINS-18366] Winstone is now powered by Jetty (as I expected).

            revision 99ccd7f7228ae2f846642f23f81ceb1725f61af6 again changes the behaviour - from the error situation described above to "No X-Jenkins-CLI2-Port among [X-Jenkins, null, X-Hudson, Content-Length, Expires, Set-Cookie, X-SSH-Endpoint, Server, Cache-Control, X-Hudson-Theme, X-Instance-Identity, X-Jenkins-Session, Content-Type]", apparently (implicitly?) deprecating non-JNLP CLI usage. Is this intentional?

            habbie Peter van Dijk added a comment - revision 99ccd7f7228ae2f846642f23f81ceb1725f61af6 again changes the behaviour - from the error situation described above to "No X-Jenkins-CLI2-Port among [X-Jenkins, null, X-Hudson, Content-Length, Expires, Set-Cookie, X-SSH-Endpoint, Server, Cache-Control, X-Hudson-Theme, X-Instance-Identity, X-Jenkins-Session, Content-Type] ", apparently (implicitly?) deprecating non-JNLP CLI usage. Is this intentional?

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            test/src/test/groovy/hudson/cli/CLIActionTest.groovy
            http://jenkins-ci.org/commit/jenkins/1b6ba71f9cf8ef037d7ff6522105622eff2c1f5a
            Log:
            JENKINS-20128 reproduced the problem

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: test/src/test/groovy/hudson/cli/CLIActionTest.groovy http://jenkins-ci.org/commit/jenkins/1b6ba71f9cf8ef037d7ff6522105622eff2c1f5a Log: JENKINS-20128 reproduced the problem

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            core/src/main/java/hudson/cli/CLIAction.java
            http://jenkins-ci.org/commit/jenkins/9f1796e3ea8034e4a45d63e706b1c087b8f7f2e8
            Log:
            [FIXED JENKINS-20128]

            CLI hits "/cli", so the server needs to respond to this endpoint.

            Compare: https://github.com/jenkinsci/jenkins/compare/cab3d5daa7d8...9f1796e3ea80

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/CLIAction.java http://jenkins-ci.org/commit/jenkins/9f1796e3ea8034e4a45d63e706b1c087b8f7f2e8 Log: [FIXED JENKINS-20128] CLI hits "/cli", so the server needs to respond to this endpoint. Compare: https://github.com/jenkinsci/jenkins/compare/cab3d5daa7d8...9f1796e3ea80
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3036

            Result = SUCCESS

            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3036 Result = SUCCESS
            jglick Jesse Glick added a comment -

            What was the actual cause of the regression? JENKINS-18366?

            jglick Jesse Glick added a comment - What was the actual cause of the regression? JENKINS-18366 ?

            Yes - see git bisect mention in an earlier comment.

            habbie Peter van Dijk added a comment - Yes - see git bisect mention in an earlier comment.
            sstack S Stack added a comment -

            Solaris 10

            sstack S Stack added a comment - Solaris 10 CLI times out for any command beginning at 1.535 Last working version for CLI was Jenkins 1.534 Please see https://issues.jenkins-ci.org/browse/JENKINS-18366?focusedCommentId=193633&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-193633
            jglick Jesse Glick added a comment -

            @sstack the fix is in 1.540 (and will be in 1.532.2).

            jglick Jesse Glick added a comment - @sstack the fix is in 1.540 (and will be in 1.532.2).
            thesamet Nadav Samet added a comment - - edited

            I am still seeing "Protocol violation: Unexpected single newline character in chunk size' 0x0a" on Jenkins 1.549. Can you re-open?

            thesamet Nadav Samet added a comment - - edited I am still seeing "Protocol violation: Unexpected single newline character in chunk size' 0x0a" on Jenkins 1.549. Can you re-open?
            sstack S Stack added a comment - - edited

            @Jesse, 1.540 CLI is broken on Solaris.

            Feb 3, 2014 7:13:41 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run
            SEVERE: I/O error in channel Chunked connection to http://host.net:8080/cli
            hudson.remoting.DiagnosedStreamCorruptionException
            
            sstack S Stack added a comment - - edited @Jesse, 1.540 CLI is broken on Solaris. Feb 3, 2014 7:13:41 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run SEVERE: I/O error in channel Chunked connection to http://host.net:8080/cli hudson.remoting.DiagnosedStreamCorruptionException
            jglick Jesse Glick added a comment -

            @sstack might be a different bug, best to file separately (link to this one).

            jglick Jesse Glick added a comment - @sstack might be a different bug, best to file separately (link to this one).
            ashokm Ashok Manji added a comment - - edited

            @sstack - did you file a separate bug on this? I am also seeing this with v1.554.1 and the issue was not present when we were on v1.534

            ashokm Ashok Manji added a comment - - edited @sstack - did you file a separate bug on this? I am also seeing this with v1.554.1 and the issue was not present when we were on v1.534

            Same problem on 1.554.3. Is there a separate bug filed or not?

            mr_dfuse Nico Mommaerts added a comment - Same problem on 1.554.3. Is there a separate bug filed or not?

            People

              kohsuke Kohsuke Kawaguchi
              nkorotysh Nick Korotysh
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: