I'm stumped. I've read the docs for Net::Telnet and searched tek-tips and google. The only thing I found that seems to be related to my problem was something in Russian and the translation didn't help.
Anyway.....
I've got a script that telnets to a remote piece of equipment, enters a command, and gets the response. Then it disconnects and prints the information.
The script works fine on equipment that requires a login, but we've got a few machines that don't require login and on these, the script doesn't work.
From a terminal window, I just telnet to the remote equipment, enter a command, and quit.
This is the command that's entered
When I try to do it through a script, it connects and then I get an error on the line that tries to enter the command. The telnet object errmsg is "write error: filehandle isn't open"
Here's the telnet object declaration:
The dump_log and input_log are empty, so I can't get any clues from them.
I'm using Perl with Net-Telnet-3.03 on a RH Linux 9 box. I'm trying to telnet into a Tellabs Titan 532 DCCS. The script works fine on a 532L DCCS.
_________
Rott Paws
...It's not a bug. It's an undocumented feature!!!
Anyway.....
I've got a script that telnets to a remote piece of equipment, enters a command, and gets the response. Then it disconnects and prints the information.
The script works fine on equipment that requires a login, but we've got a few machines that don't require login and on these, the script doesn't work.
From a terminal window, I just telnet to the remote equipment, enter a command, and quit.
Code:
[pmildenb@funbox2 cmdr]$ telnet 11.11.111.111 1111
Trying 11.11.111.111...
Connected to 11.11.111.111.
Escape character is '^]'.
UTL::QRY,CMAP 065!
Code:
M 12:42:04 01,00 4 UTL QRY CMAP 065 TODC---- TYPE DC104 4 LN MSG:
12218 00000 00000 00000 00000 00000 00000 12307
04207 00000 07011 00000 00000 00000 00000 00512
00000 00000 00000 00000 00000 09906 00000 00000 COMPL
telnet> quit
Connection closed.
When I try to do it through a script, it connects and then I get an error on the line that tries to enter the command. The telnet object errmsg is "write error: filehandle isn't open"
Here's the telnet object declaration:
Code:
$t = new Net::Telnet (Timeout => 10,
Binmode => 1,
Dump_Log => "dlog.txt",
Input_log=> "ilog.txt",
Host => "11.11.111.111",
Port => "1111",
Errmode => "return");
The dump_log and input_log are empty, so I can't get any clues from them.
I'm using Perl with Net-Telnet-3.03 on a RH Linux 9 box. I'm trying to telnet into a Tellabs Titan 532 DCCS. The script works fine on a 532L DCCS.
_________
Rott Paws
...It's not a bug. It's an undocumented feature!!!