telnet fail on a situation
Not sure if this can be a right forum for this question; let me know if there will be a better one.
The system is like this:
- 2 processes: 'A' and 'B'
- 'A' monitors 'B'
- when the system starts cronjob starts 'A' and 'A' starts 'B' -- (1)
- if 'B' dies 'A' re-starts 'B' -- (2)
- 'B' performs a task which calls a expect script to do 'telnet' with other devices (telnet servers)
- 'A' uses 'system()' to start 'B'
- for (1), telnet works fine
- for (2), telnet doesn't work fine <<<<< issue
- (wireshark analysis) telnet fails b/c 'B' doesn't respond to a device's first telnet data; it ACKs on TCP but no data after; so the expect script time-out
- if run 'B' from shell (instead of from 'A'): no problem
- if run expect from shell: no problem
- ssh (instead of telnet): no problem
- rebooting linux won't help
- this only happens on certain machines (with same linux)
- CentOS release 5.2 on VMware (ESXi 4.1)
- expect: 5.43.0
I have checked ENV and proc stats for (1) and (2) but haven't found a noticeable difference. Increasing ulimit and other resource won't help. 'A' & 'B' fd usage, for example, is not that big; ~20.
Thanks in advance,
Did you use autoexpect to create the script?
My wild guess may be that you need to add in some waits/pause to telnet.
Thanks for the input.
"waits/pause to telnet", do you mean timeout in expect? We use timeout in the script and I played with that value but it didn't help.
I am using a script someone else created so not sure if he used the tool; I doubt it though.
Goolged timeout options for telnet itself but it doesn't seem that telnet has that option.
|All times are GMT -5. The time now is 07:12 AM.|