The Except CT automation tool is very useful, but this time we found a timeout setting problem when using the autossh script.
As we all know, spawn is the command we want to execute, and then we will give a bunch of screen outputs for CT. If the output matches our CT, we will send a command to simulate user input.
However, there is a timeout setting for the output information of the waiting command in the wait CT. The default value is 10 seconds. This feature prevents dead-end commands. Once this timeout is reached and there is still no screen output, the code in the secondary CT script will be executed. Or if the response code of timeout is defined in the response CT script, the code will be executed.
OK. During this autossh operation, the hosts table has not been configured for the two machines, so SSH is very slow. It takes more than 10 seconds to wait for the keyword password, therefore, the script sends the password to the input stream in advance, which causes the Fail CT script to fail to be executed.
It is very simple to solve this problem. The simplest way is to define at the beginning of the CT script:
Set timeout-1 -- no timeout
Set timeout xx -- set the specific timeout time (seconds)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.