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

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

    Details

    • Similar Issues:

      Description

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

        Attachments

          Issue Links

            Activity

            nkorotysh Nick Korotysh created issue -
            Hide
            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.

            Show
            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 made changes -
            Field Original Value New Value
            Summary cli doesn't work HTTP two-way remoting does not work (jenkins-cli.jar without JNLP)
            Hide
            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).

            Show
            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).
            Hide
            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?

            Show
            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?
            Hide
            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

            Show
            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
            Hide
            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

            Show
            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
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3036

            Result = SUCCESS

            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3036 Result = SUCCESS
            olivergondza Oliver Gond┼ża made changes -
            Labels cli console exception jenkins 1.532.2-fixed cli console exception jenkins
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - What was the actual cause of the regression? JENKINS-18366 ?
            jglick Jesse Glick made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ]
            Hide
            habbie Peter van Dijk added a comment -

            Yes - see git bisect mention in an earlier comment.

            Show
            habbie Peter van Dijk added a comment - Yes - see git bisect mention in an earlier comment.
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-18366 [ JENKINS-18366 ]
            Hide
            sstack S Stack added a comment -

            Solaris 10

            Show
            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
            sstack S Stack made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - @sstack the fix is in 1.540 (and will be in 1.532.2).
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            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?

            Show
            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?
            Hide
            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
            
            Show
            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
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - @sstack might be a different bug, best to file separately (link to this one).
            Hide
            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

            Show
            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 made changes -
            Link This issue is related to JENKINS-23232 [ JENKINS-23232 ]
            Hide
            mr_dfuse Nico Mommaerts added a comment -

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

            Show
            mr_dfuse Nico Mommaerts added a comment - Same problem on 1.554.3. Is there a separate bug filed or not?
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is duplicated by JENKINS-21209 [ JENKINS-21209 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 151650 ] JNJira + In-Review [ 194026 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: