jenkins配置节点ssh方式报错

报错信息一:

DG_RUNTIME_DIR=/run/user/0
XDG_SESSION_ID=2062
_=/etc/bashrc
[06/27/21 22:59:28] [SSH] Starting sftp client.
[06/27/21 22:59:28] [SSH] Remote file system root  does not exist. Will try to create it...
java.io.IOException: Could not copy remoting.jar into '' on agent
	at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:738)
	at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:111)
	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:456)
	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:421)
	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)
Caused by: java.io.IOException: Failed to mkdir 
	at com.trilead.ssh2.jenkins.SFTPClient.mkdirs(SFTPClient.java:91)
	at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:695)
	... 7 more
Caused by: com.trilead.ssh2.SFTPException: No such file (SSH_FX_NO_SUCH_FILE: A reference was made to a file which does not exist.)
	at com.trilead.ssh2.SFTPv3Client.expectStatusOKMessage(SFTPv3Client.java:555)
	at com.trilead.ssh2.SFTPv3Client.mkdir(SFTPv3Client.java:955)
	at com.trilead.ssh2.jenkins.SFTPClient.mkdirs(SFTPClient.java:89)
	... 8 more
[06/27/21 22:59:28] Launch failed - cleaning up connection
[06/27/21 22:59:28] [SSH] Connection closed.

解决:

更改工作目录
在这里插入图片描述
在这里插入图片描述

报错信息二:

Checking Java version in the PATH
bash: java: command not found
Java is not in the PATH nor configured with the javaPath setting, Jenkins will try to guess where is Java, this guess will be removed in the future. :Launch agents via SSH
[06/27/21 23:20:22] [SSH] Checking java version of /tmp/jdk/bin/java
Couldn't figure out the Java version of /tmp/jdk/bin/java
bash: /tmp/jdk/bin/java: No such file or directory

[06/27/21 23:20:22] [SSH] Checking java version of java
Couldn't figure out the Java version of java
bash: java: command not found

[06/27/21 23:20:22] [SSH] Checking java version of /usr/bin/java
Couldn't figure out the Java version of /usr/bin/java
bash: /usr/bin/java: No such file or directory

[06/27/21 23:20:22] [SSH] Checking java version of /usr/java/default/bin/java
Couldn't figure out the Java version of /usr/java/default/bin/java
bash: /usr/java/default/bin/java: No such file or directory

[06/27/21 23:20:22] [SSH] Checking java version of /usr/java/latest/bin/java
Couldn't figure out the Java version of /usr/java/latest/bin/java
bash: /usr/java/latest/bin/java: No such file or directory

[06/27/21 23:20:22] [SSH] Checking java version of /usr/local/bin/java
Couldn't figure out the Java version of /usr/local/bin/java
bash: /usr/local/bin/java: No such file or directory

[06/27/21 23:20:22] [SSH] Checking java version of /usr/local/java/bin/java
Couldn't figure out the Java version of /usr/local/java/bin/java
bash: /usr/local/java/bin/java: No such file or directory

java.io.IOException: Java not found on hudson.slaves.SlaveComputer@384ad09b. Install Java 8 or Java 11 on the Agent.
	at hudson.plugins.sshslaves.JavaVersionChecker.resolveJava(JavaVersionChecker.java:84)
	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:453)
	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:421)
	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)
[06/27/21 23:20:22] Launch failed - cleaning up connection
[06/27/21 23:20:22] [SSH] Connection closed.

原因:

节点机器上没有安装java

报错信息三:

jenkins启动报Unsupported major.minor version 52.0

原因:节点安装的java版本过低

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值