Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH launch method is not working #56

Open
jikuja opened this issue Sep 3, 2020 · 1 comment
Open

SSH launch method is not working #56

jikuja opened this issue Sep 3, 2020 · 1 comment

Comments

@jikuja
Copy link

jikuja commented Sep 3, 2020

I jusr tried and SSH launch method is not working. I get following log:

2020-09-03 13:08:03.789+0000 [id=91]	INFO	c.m.j.c.aci.AciCloud$1#call: Add ACI node: aci-t89l3
2020-09-03 13:08:03.938+0000 [id=91]	INFO	c.m.j.c.a.AciCleanTask$DeploymentRegistrar#registerDeployment: AzureAciCleanUpTask: registerDeployment: Registering deployment aci-bscm7tx9 in myJenkinsAgentGroup
2020-09-03 13:08:04.648+0000 [id=91]	INFO	o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2020-09-03 13:08:06.085+0000 [id=91]	INFO	c.m.j.c.aci.AciService#createDeployment: Waiting for deployment aci-bscm7tx9
2020-09-03 13:09:27.096+0000 [id=91]	INFO	c.m.j.c.aci.AciService#createDeployment: Deployment aci-bscm7tx9 succeed
2020-09-03 13:09:27.628+0000 [id=91]	INFO	o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2020-09-03 13:09:29.257+0000 [id=106]	INFO	c.m.j.c.remote.SSHLauncher#launch: SSHLauncher: Start to connect node aci-t89l3 : 51.145.191.189 via SSH
2020-09-03 13:09:30.676+0000 [id=106]	INFO	c.m.j.c.remote.SSHLauncher#launch: SSHLauncher: Copy slave.jar to remote host successfully
2020-09-03 13:09:31.318+0000 [id=106]	INFO	c.m.j.c.remote.SSHLauncher#launch: SSHLauncher: launching agent failed
2020-09-03 13:09:31.338+0000 [id=91]	WARNING	c.m.j.c.aci.AciCloud$1#call: AciCloud: Provision agent aci-t89l3 failed: java.lang.InterruptedException: java.io.EOFException: unexpected stream termination
2020-09-03 13:09:32.019+0000 [id=113]	INFO	o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2020-09-03 13:09:33.577+0000 [id=106]	INFO	c.m.j.c.aci.AciService#deleteAciContainerGroup: Delete ACI Container Group: aci-t89l3 successfully
2020-09-03 13:09:33.651+0000 [id=48]	WARNING	hudson.slaves.NodeProvisioner#lambda$update$6: Unexpected exception encountered while provisioning agent aci
java.lang.InterruptedException: java.io.EOFException: unexpected stream termination
	at com.microsoft.jenkins.containeragents.remote.SSHLauncher.launch(SSHLauncher.java:121)
	at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:296)
Caused: java.util.concurrent.ExecutionException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at com.microsoft.jenkins.containeragents.aci.AciCloud$1.call(AciCloud.java:115)
Caused: java.lang.Exception
	at com.microsoft.jenkins.containeragents.aci.AciCloud$1.call(AciCloud.java:140)
	at com.microsoft.jenkins.containeragents.aci.AciCloud$1.call(AciCloud.java:80)
	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)
2020-09-03 13:09:33.653+0000 [id=48]	WARNING	c.m.j.c.aci.AciCloud#canProvision: Cannot provision: template for label aci is not available now, because it failed to provision last time.
2020-09-03 13:09:43.617+0000 [id=43]	INFO	c.m.j.c.aci.AciCloud#provision: Start ACI container for label aci workLoad 1
2020-09-03 13:09:43.617+0000 [id=43]	INFO	c.m.j.c.aci.AciCloud#provision: Using ACI Container template: aci
2020-09-03 13:09:43.617+0000 [id=43]	INFO	h.s.NodeProvisioner$StandardStrategyImpl#apply: Started provisioning aci from Aci with 1 executors. Remaining excess workload: 0
2020-09-03 13:09:43.619+0000 [id=91]	INFO	c.m.j.c.aci.AciCloud$1#call: Add ACI node: aci-t41sn

Looks like plugin uploads slave.jar successfully but then fail when calling computer.setChannel in SSHLauncher in line 103.

Running brand new LTS installation:

  • Jenkins: 2.235.5
  • All plugins at latest version.

I will try 2.60.3 or with #53 at some point later.

Sidenote:
I noticed that code has pattern of catching exceptions and rethrowing them without passing original exception as cause or printing the original exception. This makes debugging really hard.

@st0rmi
Copy link

st0rmi commented Oct 12, 2020

I appear to have had the same issue. Apparently this is caused by the plugin invoking the agent using 'java' without specifying the absolute path. This does not work with the default jenkins/ssh-slave Docker image, because the java executable is not in the PATH. I've hotfixed this by creating my own image where I create a symlink to the java binary in /usr/local/bin/.

I believe that this should be fixed in the default Docker image(s) by adding java and any other potentially used executables to the PATH.

Edit:
I also agree on the exception handling. The exception that is being thrown provides no clue as to what is actually the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants