EC2 Plugin terminates windows instance right after connecting when using ssh.

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      collapseBuild Executor Status
      Oct 07, 2019 10:54:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: Launching instance: i-0b3686cd8938dd562
      Oct 07, 2019 10:54:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: bootstrap()
      Oct 07, 2019 10:54:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: Getting keypair...
      Oct 07, 2019 10:54:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: Using private key jenkins-builder (SHA-1 fingerprint f3:b6:14:0d:dd:ef:5e:4a:30:e8:3e:47:6f:30:46:f4:b6:dc:8a:b0)
      Oct 07, 2019 10:54:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: Authenticating as cluj
      Oct 07, 2019 10:54:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.233 on port 22, with timeout 10000.
      Oct 07, 2019 10:54:35 AM hudson.plugins.ec2.EC2Cloud
      INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
      Oct 07, 2019 10:54:35 AM hudson.plugins.ec2.EC2Cloud
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 07, 2019 10:54:40 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.233 on port 22, with timeout 10000.
      Oct 07, 2019 10:54:50 AM hudson.plugins.ec2.EC2Cloud
      INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
      Oct 07, 2019 10:54:50 AM hudson.plugins.ec2.EC2Cloud
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 07, 2019 10:54:55 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.233 on port 22, with timeout 10000.
      Oct 07, 2019 10:55:05 AM hudson.plugins.ec2.EC2Cloud
      INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
      Oct 07, 2019 10:55:05 AM hudson.plugins.ec2.EC2Cloud
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 07, 2019 10:55:10 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.233 on port 22, with timeout 10000.
      Oct 07, 2019 10:55:20 AM hudson.plugins.ec2.EC2Cloud
      INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
      Oct 07, 2019 10:55:20 AM hudson.plugins.ec2.EC2Cloud
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 07, 2019 10:55:25 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.233 on port 22, with timeout 10000.
      Oct 07, 2019 10:55:27 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connected via SSH.
      Oct 07, 2019 10:55:27 AM hudson.plugins.ec2.EC2Cloud
      INFO: connect fresh as root
      Oct 07, 2019 10:55:28 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.233 on port 22, with timeout 10000.
      Oct 07, 2019 10:55:28 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connected via SSH.
      Oct 07, 2019 10:55:29 AM hudson.plugins.ec2.EC2Cloud
      INFO: Creating tmp directory (/tmp) if it does not exist
      The syntax of the command is incorrect.
      Oct 07, 2019 10:55:29 AM hudson.plugins.ec2.EC2Cloud
      INFO: Verifying: java -fullversion
      java full version "1.8.0_131-b11"
      Oct 07, 2019 10:55:31 AM hudson.plugins.ec2.EC2Cloud
      INFO: Verifying: which scp
      /usr/bin/scp
      Oct 07, 2019 10:55:32 AM hudson.plugins.ec2.EC2Cloud
      INFO: Copying remoting.jar to: /tmp
      Oct 07, 2019 10:55:33 AM hudson.plugins.ec2.EC2Cloud
      INFO: Launching remoting agent (via Trilead SSH2 Connection):  java  -jar /tmp/remoting.jar -workDir C:\Users\cluj
      HTTP ERROR 404Problem accessing /computer/EC2%20(Itiviti%20AWS)%20-%20Windows%20Jenkins%20node%20autoconnecting%20to%20deb-jenkins-prd%20using%20Swarm%20plugin%20(i-0b3686cd8938dd562)/logText/progressiveHtml. Reason:    Not Found
      Powered by Jetty:// 9.4.z-SNAPSHOT
      

      When trying to set up the connection between AWS & Jenkins windows nodes via ssh, the node gets immediately terminated after connecting via ssh. Please find attached the Jenkins AWS Configuration.

       

       

      EDIT

      **I've downgraded to version 1.43 and the node is not terminated anymore, but I get:

      INFO: Waiting for SSH to come up. Sleeping 5.
      INFO: Waiting for SSH to come up. Sleeping 5.
      Oct 08, 2019 6:55:11 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.193 on port 22, with timeout 10000.
      Oct 08, 2019 6:55:12 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connected via SSH.
      Oct 08, 2019 6:55:12 AM hudson.plugins.ec2.EC2Cloud
      INFO: connect fresh as root
      Oct 08, 2019 6:55:12 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connecting to 10.230.0.193 on port 22, with timeout 10000.
      Oct 08, 2019 6:55:13 AM hudson.plugins.ec2.EC2Cloud
      INFO: Connected via SSH.
      Oct 08, 2019 6:55:14 AM hudson.plugins.ec2.EC2Cloud
      INFO: Creating tmp directory (/tmp) if it does not existThe syntax of the command is incorrect.
      Oct 08, 2019 6:55:14 AM hudson.plugins.ec2.EC2Cloud
      INFO: Verifying: java -fullversionjava full version "1.8.0_131-b11"
      Oct 08, 2019 6:55:17 AM hudson.plugins.ec2.EC2CloudINFO: Verifying: which scp/usr/bin/scp
      Oct 08, 2019 6:55:19 AM hudson.plugins.ec2.EC2Cloud
      INFO: Copying slave.jar to: /tmp
      Oct 08, 2019 6:55:20 AM hudson.plugins.ec2.EC2Cloud
      INFO: Launching slave agent (via SSH client process): ssh -o StrictHostKeyChecking=no -i /tmp/ec2_527682778172280023.pem cluj@10.230.0.193 -p 22  java  -jar /tmp/slave.jar[10/08/19 06:55:20] Launching agent$ ssh -o StrictHostKeyChecking=no -i /tmp/ec2_527682778172280023.pem cluj@10.230.0.193 -p 22  java  -jar /tmp/slave.jarWarning: Permanently added '10.230.0.193' (ECDSA) to the list of known hosts.
      Error: Unable to access jarfile /tmp/slave.jar
      ERROR: Unable to launch the agent for EC2 (Itiviti AWS) - AWS Windows Node (i-0d24e1b4cc97b791d)
      java.io.EOFException: unexpected stream termination at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:415) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:360) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:431) at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:153) at hudson.plugins.ec2.ssh.EC2UnixLauncher.launchScript(EC2UnixLauncher.java:234) at hudson.plugins.ec2.EC2ComputerLauncher.launch(EC2ComputerLauncher.java:48) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:294) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
      ERROR: Process terminated with exit code 1
      

       

        1. Capture.PNG
          37 kB
          George Cimpoies
        2. Capture2.PNG
          48 kB
          George Cimpoies
        3. Capture3.PNG
          39 kB
          George Cimpoies

            Assignee:
            FABRIZIO MANFREDI
            Reporter:
            George Cimpoies
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: