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'
Symtoms:
- 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)
Env:
- 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.
Any insight?
Thanks in advance,
|