Jenkins ssh slave断开连接以使任务继续执行
Jenkins ssh slave disconnect to make the task continue perform
我在 mac 从机上有一个 iOS 存档作业,有时需要很长时间 30 分钟
问题是ssh长连接经常断开导致任务失败
现在我想问一下我应该怎么做才能避免这个问题?我正在寻找的是当长连接断开但任务继续执行时。
我该怎么办?
添加 keepAlive 选项是 feature request since 2014
作为建议的解决方法,此工单包括:
- Change the
/etc/ssh/ssh_config
by appending the following line to the end of this file. This tells the ssh client to send nop
command periodically to avoid the ssh connection being disconnected.
The unit of 80 is seconds. You may tune this parameter based on your network condition.
ServerAliveInterval 80
- In the Jenkins slave configuration page, change the Launch method to "
Launch slave via execution of command on the Master
". See the Jenkins built-in help for more details.
So far, I haven't see any issues in this configuration. Hope this helps.
另请参阅“Remoting issues / SSH slaves”。
我在 mac 从机上有一个 iOS 存档作业,有时需要很长时间 30 分钟 问题是ssh长连接经常断开导致任务失败
现在我想问一下我应该怎么做才能避免这个问题?我正在寻找的是当长连接断开但任务继续执行时。 我该怎么办?
添加 keepAlive 选项是 feature request since 2014
作为建议的解决方法,此工单包括:
- Change the
/etc/ssh/ssh_config
by appending the following line to the end of this file. This tells the ssh client to sendnop
command periodically to avoid the ssh connection being disconnected.
The unit of 80 is seconds. You may tune this parameter based on your network condition.
ServerAliveInterval 80
- In the Jenkins slave configuration page, change the Launch method to "
Launch slave via execution of command on the Master
". See the Jenkins built-in help for more details.So far, I haven't see any issues in this configuration. Hope this helps.
另请参阅“Remoting issues / SSH slaves”。