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

Linux slaves are not starting anymore after upgrade to 1.40 of ec2-plugin

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • ec2-plugin
    • None
    • Master and slave are on Amazon Linux, Jenkins 2.144 and ec2-plugin on 1.40

    Description

      The change below has introduced a major bug:
      https://github.com/jenkinsci/ec2-plugin/pull/276

      Now slaves are not starting anymore on Linux.
      The problem relies on changing the command from:
      java -jar /tmp/slave.jar to cd /tmp && java -jar slave.jar.

      SSH needs the command to be escaped when using &&.
      Please read https://unix.stackexchange.com/questions/80821/why-does-cd-command-not-work-via-ssh.

      Another solution could potentially be run different commands for linux / windows (if that's possible). Or otherwise we need to find something that works for both.

      More details can be found in comments here:
      https://github.com/jenkinsci/ec2-plugin/pull/276

      Reverting back to 1.39 has solved the issue.

      Attachments

        Issue Links

          Activity

            Version 1.40.1 has been release, should appear shortly in the update center.

            A couple of questions :

            • what is the JDK/JRE used in the slave ?
            • is localdir  in the PATH ? 
            thoulen FABRIZIO MANFREDI added a comment - Version 1.40.1 has been release, should appear shortly in the update center. A couple of questions : what is the JDK/JRE used in the slave ? is localdir  in the PATH ? 
            michelzanini Michel Zanini added a comment -

            I can confirm that the 1.41-SNAPSHOT above has worked for me. Now I can try the released version.

            Java version:

            java version "1.8.0_181"
            Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
            Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
            

            PATH:

            /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/opt/java/bin:/home/developer/.local/bin:/home/developer/bin
            
            michelzanini Michel Zanini added a comment - I can confirm that the 1.41-SNAPSHOT above has worked for me. Now I can try the released version. Java version: java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) PATH: /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/opt/java/bin:/home/developer/.local/bin:/home/developer/bin
            michelzanini Michel Zanini added a comment -

            The released 1.40.1 also works here. Thanks for this! I think we can close this issue.

            michelzanini Michel Zanini added a comment - The released 1.40.1 also works here. Thanks for this! I think we can close this issue.
            michelzanini Michel Zanini added a comment -

            New 1.40.1 release fixes this - the commit causing the issue was reverted

            michelzanini Michel Zanini added a comment - New 1.40.1 release fixes this - the commit causing the issue was reverted

            thanks

            I will continue to investigate, probably I will contact you again for testing the proper fix.

            thoulen FABRIZIO MANFREDI added a comment - thanks I will continue to investigate, probably I will contact you again for testing the proper fix.

            People

              thoulen FABRIZIO MANFREDI
              michelzanini Michel Zanini
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: