Please HELP: spawn telnet error in Expect 
Author Message
 Please HELP: spawn telnet error in Expect

I had written this email a couple of months ago and didn't receive any
response. Any help would be appreciated!

I am facing a problem with spawn telnet in TCL 8.0 with Expect 5.21 in
Win 2000 environment (666 MHz w/ 256 MB of RAM). I am trying to telnet
to a router 5000 times continuously. For some reason, telnet fails
after 1961 times. Just to make sure that nothing is wrong with the
router, I tried the same test in Sun Solaris Environment. The test
passed in Solaris (it was able to telnet 5000 times). But, it fails
after 1961th telnet every time in Win 2000 environment.
Below is the snapshot of the script. I got "case: Connected" 1961 times
and "case: timed out" for the rest of the times. I don't get any
spawnErrors. expect_out(buffer) is not defined on timeout. And
reproducing this error takes couple of hours since it has to telnet so
many times (any idea on how i can reproduce it faster?). The error only
occurs if i try to telnet more than 1961 times in ONE tcl process. Has
anyone seen this problem before? What could be going on?

Any ideas, alternatives, help will be appreciated.


p.s. the script:

if [catch {spawn telnet} spawnError] {
    puts "error: $spawnError"


sleep 2
expect {
    "connection refused" {
puts "case: connection refused"
    "unknown host" {
puts "case: unknown host"
    "Connection closed" {
puts "case: Connection closed"
    "Connected" {
puts "case: Connected"
    timeout {
puts "case: timed out"
puts "expect_out(buffer) is $expect_out(buffer)"


Sent via

Sun, 15 Jun 2003 01:01:22 GMT  
 Please HELP: spawn telnet error in Expect
I'm not sure what you wonna do, but I'm think the problem is not Win 2000...
it's a machine's problem... 1961 telnet sessions opened!!! Do you need more

Asier Burgoa Gonzlez

niac, Sistemas Informticos S.A.
+34 941 28 28 28

Sun, 15 Jun 2003 02:11:13 GMT  
 [ 2 post ] 

 Relevant Pages 

1. expect: nesting spawn tftp inside spawned telnet

2. using spawn socket instead of spawn telnet in expect

3. Spawn a telnet session from a spawned telnet session

4. Please help ssh spawn loop problem, expect crashing

5. expect fails to spawn telnet successfully

6. Tcl Expect leaks memory in spawning telnet session

7. Expect/How to determine if a telnet spawn failed

8. Cygnus Expect spawning gnu telnet client on NT

9. Expect: exiting Spawned telnet, ftp

10. Operations on log_file before end-of-expect (spawn telnet)-script

11. Help with Expect error - invalid spawn id

12. expect_after executes for spawn id 1 even if the corresponding expect executes for spawn id 2


Powered by phpBB® Forum Software