Jenkins配置节点报错
SSHLauncher{host='192.168.111.129', port=22, credentialsId='aa9fc1b1-ccc2-470f-a612-f20e32b55dea', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
[01/05/22 17:08:28] [SSH] Opening SSH connection to 192.168.111.129:22.
/root/.ssh/known_hosts [SSH] No Known Hosts file was found at /root/.ssh/known_hosts. Please ensure one is created at this path and that Jenkins can read it.
Key exchange was not finished, connection is closed.
SSH Connection failed with IOException: "Key exchange was not finished, connection is closed.", retrying in 15 seconds. There are 10 more retries left.
/root/.ssh/known_hosts [SSH] No Known Hosts file was found at /root/.ssh/known_hosts. Please ensure one is created at this path and that Jenkins can read it.
Key exchange was not finished, connection is closed.
SSH Connection failed with IOException: "Key exchange was not finished, connection is closed.", retrying in 15 seconds. There are 9 more retries left.
解决办法:
注意:要用登录slave节点的用户操作
cd ~ # 回到家目录
ssh-keygen # 三次回车
ssh 192.168.111.129 # Slave节点机的ip地址
cd .ssh/
chmod 700 known_hosts