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

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

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

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

          Nick Korotysh created issue -

          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.

          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.
          Peter van Dijk made changes -
          Summary Original: cli doesn't work New: HTTP two-way remoting does not work (jenkins-cli.jar without JNLP)

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

          (as I expected).

          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?

          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/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/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/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3036

          Result = SUCCESS

          dogfood added a comment - Integrated in jenkins_main_trunk #3036 Result = SUCCESS
          Oliver Gondža made changes -
          Labels Original: cli console exception jenkins New: 1.532.2-fixed cli console exception jenkins

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

              Created:
              Updated:
              Resolved: