I am trying to open a telnet connection, execute some command, and terminate the connection. I need it to run around 1000 times. The script runs fine for some number of attempts [ say around 23 - 25 ]. Then, I get the following error:
"pattern match read eof at perlscript.pl line 23"
The line 23 corresponds to the code
$tn->waitfor('/Password: /i')
.
After this error, if I try to open the telnet connection manually, I get an error:
"Service and queue are full. Please come back later"
I guess I get that first error "pattern match read eof" because the telnet connection is terminating because of the "Service and queue are full" error.
I was trying to debug more into the issue and when I checked the logs, I came across this error:
2012 08 08 10:27:46 EDT: Exception occured:
java.lang.NullPointerException
at dtw.telnetd.net.Connection.close(Connection.java)
at dtw.telnetd.net.ConnectionManager.cleanupBroken(ConnectionManager.java)
at dtw.telnetd.net.ConnectionManager.run(ConnectionManager.java)
Any idea on what could be causing this Exception?