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

EC2 slave fails to create if "scp" is not installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      See this log:

      From: https://serverfault.com/questions/880623/jenkins-ec2-plugin-http-error-404/882851#882851

      {{Oct 27, 2017 1:26:31 PM null
      FINEST: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is still pending/launching, waiting 5s
      Oct 27, 2017 1:26:36 PM null
      FINEST: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is still pending/launching, waiting 5s
      Oct 27, 2017 1:26:41 PM null
      FINEST: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is still pending/launching, waiting 5s
      Oct 27, 2017 1:26:46 PM null
      FINER: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is ready
      Oct 27, 2017 1:26:46 PM null
      INFO: Launching instance: i-0f8aa5fb0ab29164f
      Oct 27, 2017 1:26:46 PM null
      INFO: bootstrap()
      Oct 27, 2017 1:26:46 PM null
      INFO: Getting keypair...
      Oct 27, 2017 1:26:46 PM null
      INFO: Using key: jenkins-slave
      d5:dd:51:ac:8b:b3:bf:1b:6f:b4:b1:86:5b:26:14:1e:e0:47:25:72
      ----BEGIN RSA PRIVATE KEY----
      MIIEowIBAAKCAQEAoxetaNHULbsbqsThxUSxxxxxxxxxxxxxxxxxxxxxxxxxx
      ga2jnJaFOG4M/Fnes9ZzHclz7eflwliFZnhIUJldlSBZ2bvAqdp
      Oct 27, 2017 1:26:46 PM null
      INFO: Authenticating as ec2-user
      Oct 27, 2017 1:26:46 PM null
      INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
      Oct 27, 2017 1:26:47 PM null
      INFO: Failed to connect via ssh: There was a problem while connecting to 10.0.2.51:22
      Oct 27, 2017 1:26:47 PM null
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 27, 2017 1:26:52 PM null
      INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
      Oct 27, 2017 1:26:52 PM null
      INFO: Failed to connect via ssh: There was a problem while connecting to 10.0.2.51:22
      Oct 27, 2017 1:26:52 PM null
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 27, 2017 1:26:57 PM null
      INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
      Oct 27, 2017 1:26:57 PM null
      INFO: Failed to connect via ssh: There was a problem while connecting to 10.0.2.51:22
      Oct 27, 2017 1:26:57 PM null
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 27, 2017 1:27:02 PM null
      INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
      Oct 27, 2017 1:27:03 PM null
      INFO: Connected via SSH.
      Oct 27, 2017 1:27:03 PM null
      INFO: connect fresh as root
      Oct 27, 2017 1:27:03 PM null
      INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
      Oct 27, 2017 1:27:03 PM null
      INFO: Connected via SSH.
      Oct 27, 2017 1:27:03 PM null
      INFO: Creating tmp directory (/tmp) if it does not exist
      Oct 27, 2017 1:27:03 PM null
      INFO: Verifying that java exists
      java full version "1.7.0_151-mockbuild_2017_08_09_21_42-b00"
      Oct 27, 2017 1:27:03 PM null
      INFO: Copying slave.jar
      Oct 27, 2017 1:27:03 PM null
      INFO: Launching slave agent (via Trilead SSH2 Connection): java -jar /tmp/slave.jar

      HTTP ERROR 404

      Problem accessing /computer/jenkins-slave%20(i-0f8aa5fb0ab29164f)/logText/progressiveHtml. Reason:

      Not Found
      Powered by Jetty:// 9.4.z-SNAPSHOT}}

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: francisu
          Path:
          src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
          http://jenkins-ci.org/commit/ec2-plugin/2ec666e207dadc68907b2ad1b1284f4f2bd83d1b
          Log:
          Merge remote-tracking branch 'remotes/origin/master' into JENKINS-48182

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/c122a4b8ba74...2ec666e207da

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: francisu Path: src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java http://jenkins-ci.org/commit/ec2-plugin/2ec666e207dadc68907b2ad1b1284f4f2bd83d1b Log: Merge remote-tracking branch 'remotes/origin/master' into JENKINS-48182 Compare: https://github.com/jenkinsci/ec2-plugin/compare/c122a4b8ba74...2ec666e207da
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Francis Upton IV
          Path:
          src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
          http://jenkins-ci.org/commit/ec2-plugin/fd172822632ddb36ddd16e7e5102e68e8b156215
          Log:
          JENKINS-48182 EC2 slave fails to create if "scp" is not installed (#246)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton IV Path: src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java http://jenkins-ci.org/commit/ec2-plugin/fd172822632ddb36ddd16e7e5102e68e8b156215 Log: JENKINS-48182 EC2 slave fails to create if "scp" is not installed (#246)
          Hide
          deanpearce Dean Pearce added a comment -

          I am still running into this issue despite it being marked as fixed. I am running the latest EC2 Plugin (1.38) on the latest LTS Jenkins (2.89.2). After upgrading I re-created the Cloud configuration as some other articles suggested. The EC2 instance is terminated and the log ends in this 404 error.

           

          --> Installing Docker Compose
            % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                           Dload  Upload   Total   Spent    Left  Speed
          
            0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
          100   617    0   617    0     0   3449      0 --:--:-- --:--:-- --:--:--  3466
          
          100 8649k  100 8649k    0     0  19.5M      0 --:--:-- --:--:-- --:--:-- 19.5M
          --> Starting Docker
          Starting cgconfig service: [  OK  ]
          
          
          Starting docker:	.[  OK  ]
          
          
          --> Done!
          
          Dec 15, 2017 5:44:55 PM null
          INFO: Verifying that java exists
          java full version "1.7.0_151-mockbuild_2017_08_09_21_42-b00"
          Dec 15, 2017 5:44:56 PM null
          INFO: Copying slave.jar
          Dec 15, 2017 5:44:56 PM null
          INFO: Launching slave agent (via Trilead SSH2 Connection):  java  -jar /tmp/slave.jar
          
          
          
          
          
          
          HTTP ERROR 404
          
          
          
          Problem accessing /computer/jenkins-build-node%20(i-0f2917a783ab440e0)/logText/progressiveHtml. Reason:
          
          
              Not Found
          
          Powered by Jetty:// 9.4.z-SNAPSHOT
          Show
          deanpearce Dean Pearce added a comment - I am still running into this issue despite it being marked as fixed. I am running the latest EC2 Plugin (1.38) on the latest LTS Jenkins (2.89.2). After upgrading I re-created the Cloud configuration as some other articles suggested. The EC2 instance is terminated and the log ends in this 404 error.   --> Installing Docker Compose % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 617 0 617 0 0 3449 0 --:--:-- --:--:-- --:--:-- 3466 100 8649k 100 8649k 0 0 19.5M 0 --:--:-- --:--:-- --:--:-- 19.5M --> Starting Docker Starting cgconfig service: [ OK ] Starting docker: .[ OK ] --> Done! Dec 15, 2017 5:44:55 PM null INFO: Verifying that java exists java full version "1.7.0_151-mockbuild_2017_08_09_21_42-b00" Dec 15, 2017 5:44:56 PM null INFO: Copying slave.jar Dec 15, 2017 5:44:56 PM null INFO: Launching slave agent (via Trilead SSH2 Connection): java -jar /tmp/slave.jar HTTP ERROR 404 Problem accessing /computer/jenkins-build-node%20(i-0f2917a783ab440e0)/logText/progressiveHtml. Reason: Not Found Powered by Jetty: // 9.4.z-SNAPSHOT
          Hide
          deanpearce Dean Pearce added a comment - - edited

          Actually, the problem was a stock Amazon EC2 image was running OpenJDK7 which seems to be incompatible with the slave.jar package. I had to run the following as part of my init script to get the slave to connect.

           

          sudo yum install -y java-1.8.0
          sudo yum remove -y java-1.7.0-openjdk
          Show
          deanpearce Dean Pearce added a comment - - edited Actually, the problem was a stock Amazon EC2 image was running OpenJDK7 which seems to be incompatible with the slave.jar package. I had to run the following as part of my init script to get the slave to connect.   sudo yum install -y java-1.8.0 sudo yum remove -y java-1.7.0-openjdk

            People

            Assignee:
            francisu Francis Upton
            Reporter:
            francisu Francis Upton
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: