Subject: | filehandle isn't open Message |
Date: | Tue, 31 Jan 2012 17:01:23 +0100 |
To: | bug-Net-Appliance-Session [...] rt.cpan.org |
From: | Joerg Roth <joerg.roth [...] id.uzh.ch> |
Hi Oliver,
I have updated to the newest Net::Applicance::Session-Module and i'm
working at the migration of my scripts. I actually try to do the
exception-handling for different error-cases like "no-dns-resolution",
"no-login-cause-networkdevice-is-down" etc. but all error-messages are
the same:
failed to execute command: write error: filehandle isn't open at
/usr/lib/perl5/site_perl/5.10.0/Net/CLI/Interact/Transport/Base/Unix.pm
line 24
My versions:
Net::Appliance::Session is up to date (3.113610).
Net::CLI::Interact is up to date (1.120042).
Moose is up to date (2.0401).
Net::Telnet is up to date (3.03).
Net::Telnet::Cisco is up to date (1.10).
OS:
SLES-11-SP1
Linux idlnxnw1 2.6.32.49-0.3-default #1 SMP 2011-12-02 11:28:04 +0100
x86_64 x86_64 x86_64 GNU/Linux
Perl:
This is perl, v5.10.0 built for x86_64-linux-thread-multi
Regards,
Jörg
My Script:
$NWCheck::session = Net::Appliance::Session->new({
host => "$hostname",
transport => 'SSH',
personality => "$os",
connect_options => {
opts => [
'-o', 'StrictHostKeyChecking no',
'-o', 'UserKnownHostsFile /dev/null',
],
},
});
$NWCheck::session->set_global_log_at('debug');
eval {
$NWCheck::session->connect({
username => 'user',
password => 'pass',
});
};
if ($@) {
print "failed to execute command: $@\n";
--
Jörg Roth
--------------------------------------------------------------------
Universitaet Zuerich http://www.id.uzh.ch
Informatikdienste (ID) joerg.roth@id.uzh.ch
IT-Infrastruktur / Netzwerk Tel. +41 44 6354590
Winterthurerstrasse 190 Fax. +41 44 6354505
CH-8057 Zuerich
--------------------------------------------------------------------