LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-17-2013, 06:54 PM   #1
jimyoo
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Rep: Reputation: 0
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,
 
Old 01-17-2013, 08:51 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Did you use autoexpect to create the script?

My wild guess may be that you need to add in some waits/pause to telnet.
 
Old 01-18-2013, 12:52 PM   #3
jimyoo
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
telnet fail getaddrinfo: localhost Name or service not known jijawm Linux - Server 1 10-21-2013 03:19 PM
Fail to telnet satimis Linux - Server 38 11-16-2008 10:02 AM
fail to telnet localhost 106 satimis Linux - Server 7 12-16-2007 12:53 PM
telnet - FAIL: telnet address from=15.8.29.14 gruell Linux - Software 1 06-28-2007 03:41 PM
Fail to telnet localhost 25 satimis Linux - Server 19 11-27-2006 09:43 AM


All times are GMT -5. The time now is 02:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration