jenkins问题汇总1(jenkins连接slave失败)

1. ssh链接被拒绝

错误告警
ubuntuSSH Connection failed with IOException: "Connection refused (Connection refuse...
原因及解决

没有安装ssh
通过ps -axv | grep ssh 查看发现没有安装ssh,安装命令apt-get install ssh

2. 密码错误

错误告警
·SSH host key matches key seen previously for this host. Connection will be allowed.
ERROR: Failed to authenticate as root. Wrong password.
原因及解决

密码确实是对的,发现其他账号可以登录,切换成普通用户以后就OK了
ssh 使用root用户登录需要设置

sudo vi /etc/ssh/sshd_config

找到并用#注释掉这行:

PermitRootLogin prohibit-password

新建一行 添加:

PermitRootLogin yes

jenkins问题汇总1(jenkins连接slave失败)_第1张图片
重启服务

sudo service ssh restart

3. SSH

错误告警
Key exchange was not finished, connection is closed.
java.io.IOException: There was a problem while connecting to 192.168.1.107:22
原因及解决

切换成信任的策略
jenkins问题汇总1(jenkins连接slave失败)_第2张图片

4. 拷贝脚本/新建路径失败

错误告警
[SSH] Copying latest remoting.jar...
java.io.IOException: Could not copy remoting.jar into '/usr1/home' on agent

jenkins问题汇总1(jenkins连接slave失败)_第3张图片

主要原因

普通用户权限不够

5. java找不到

错误告警
Couldn't figure out the Java version of /usr1/home/jdk/bin/java bash: /usr1/
原因及解决

设置手动设置java路径
jenkins问题汇总1(jenkins连接slave失败)_第4张图片

你可能感兴趣的:(jenkins)