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

sshd plugin v3.0.4 and later causes CLI "console" command to hang

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • other
    • None

      Steps to reproduce (success case first):

      • Run container with jenkins.war 2.332.1 only (no additional plugins), enable sshd plugin v3.0.3 (detached version for this war) and dependencies shown above.
      • One-time setup on initial install: Create first admin user. Add ssh public key to that user's config page. Configure Global Security page: set SSHD Port to fixed, portNumber. Create freestyle "test_job" with arbitrary stdout output and build it.
      • From local host shell (as first admin user):

           ssh -p portNumber local-hostname console test_job

                Console log of "test_job" (latest build) is output, then shell prompt returns.

      Then (failure case):

      • Stop container. Re-build it, adding any sshd plugin >= v3.0.4. (e.g., 3.228.v4c9f9e652c86), then run the container. Wait for "Jenkins is fully up and running" log message.
      • Repeat ssh command above. Console log of "test_job" is output, then no shell prompt returns; must Ctrl-C to terminate ssh command.

      Note: hang also occurs when running "java -jar jenkins-cli.jar ... console JOB" in a build step on a containerized Jenkins controller (run either by podman or by kubectl).

      P.S. Component set to "other" because "sshd" component is not defined.

          [JENKINS-68398] sshd plugin v3.0.4 and later causes CLI "console" command to hang

          This is a known issue which has been reported (and fixed) in sshd. We're just waiting for release of 2.9.0.

          Vincent Latombe added a comment - This is a known issue which has been reported (and fixed) in sshd. We're just waiting for release of 2.9.0.

          Stefan added a comment -

          still seen on sshd plugin version 3.237v883d165a_c1d3 (on jenkins 2.332.1), which uses org.apache.sshd library in version 2.8.0.

          jenkins sshd plugin 3.242va_db_9da_b_26a_c3 switches to mina-ssh-api-core plugin, which no longer seems to (directly?) use the org.apache.sshd library (ref adb9dab).

          Unfortunately, more recent versions of jenkins sshd plugin require a more recent jenkins 2.537. For our instance of jenkins 2.332.1 (which I cannot update yet due to a longer release process), I have built a private version of sshd plugin 3.237 with org.apache.sshd library in the most recent version 2.9.1.
          That private build solves this "hanging" issue for me.

          However, I am not sure whether more recent versions of sshd plugin also do fix this issue.

          Stefan added a comment - still seen on sshd plugin version 3.237v883d165a_c1d3 (on jenkins 2.332.1), which uses org.apache.sshd library in version 2.8.0. jenkins sshd plugin 3.242va_db_9da_b_26a_c3 switches to mina-ssh-api-core plugin, which no longer seems to (directly?) use the org.apache.sshd library (ref adb9dab). Unfortunately, more recent versions of jenkins sshd plugin require a more recent jenkins 2.537. For our instance of jenkins 2.332.1 (which I cannot update yet due to a longer release process), I have built a private version of sshd plugin 3.237 with org.apache.sshd library in the most recent version 2.9.1. That private build solves this "hanging" issue for me. However, I am not sure whether more recent versions of sshd plugin also do fix this issue.

            Unassigned Unassigned
            gdameron Gregg Dameron
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: