Skip Menu |

This queue is for tickets about the Net-Appliance-Session CPAN distribution.

Report information
The Basics
Id: 74567
Status: resolved
Priority: 0/
Queue: Net-Appliance-Session

People
Owner: Nobody in particular
Requestors: joerg.roth [...] id.uzh.ch
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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 --------------------------------------------------------------------
Hi Jörg, On Tue Jan 31 11:01:41 2012, joerg.roth@id.uzh.ch wrote: Show quoted text
> 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
Thanks for this report, and sorry for taking a little time to respond. I've just released a new version of both Net::Appliance::Session and its support module Net::CLI::Interact, which hopefully fixes this bogus error. Instead, the die() message will be the output of the underlying transport, so you should have a more meaningful error message to handle in your code. Thanks once again. regards, oliver.