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

ec2 agents fail to connect without explicit remote FS root declaration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ec2-plugin, remoting
    • None
    • Jenkins 2.182
      ec2-plugin 1.44
      Linux master and agents
      Java 8

      After upgrading ec2 plugin to 1.44 (from 1.43) and Jenkins to 2.182 (from 2.181), EC2 agents failed to connect with an error from agent jar about workDir requiring an argument.
      The ec2 configuration I had did not specify any remote FS root (i.e. workDir). I had to explicitly declare the remote FS root for each ec2 pool I have to make them work again.

      Expected behavior: Empty remote FS root should default to what it used to default to (user home).

      2019-06-24 12:45:51.417+0000 [id=111]   INFO    hudson.plugins.ec2.EC2Cloud#log: Copying remoting.jar to: /tmp
      2019-06-24 12:45:51.683+0000 [id=27]    INFO    o.j.main.modules.sshd.SSHD#start: Started SSHD at port 2222
      2019-06-24 12:45:52.323+0000 [id=111]   INFO    hudson.plugins.ec2.EC2Cloud#log: Launching remoting agent (via SSH client process): ssh -o StrictHostKeyChecking=no -i /tmp/ec2_7971206362067266819.pem root@10.21.211.212 -p 22  java -Djava.awt.headless=true -jar /tmp/remoting.jar -workDir
      2019-06-24 12:45:52.998+0000 [id=111]   SEVERE  hudson.slaves.CommandLauncher#launch: Unable to launch the agent for EC2 (Jenkins) - AWS Agent (i-bleblehbleh)
      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:154)
              at hudson.plugins.ec2.ssh.EC2UnixLauncher.launchScript(EC2UnixLauncher.java:252)
              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:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

      Note that I attempted the same without ssh client process, and the result was the same.

            raihaan Raihaan Shouhell
            djan Can Yildiz
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: