Skip Menu |

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

Report information
The Basics
Id: 88904
Status: rejected
Priority: 0/
Queue: Net-SSH2

People
Owner: Nobody in particular
Requestors: rajendra.jasathy [...] igate.com
Cc:
AdminCc:

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



Subject: Please Help - Perl Net::SSH2 issue
Date: Mon, 23 Sep 2013 10:37:19 +0000
To: "bug-Net-SSH2 [...] rt.cpan.org" <bug-Net-SSH2 [...] rt.cpan.org>
From: Rajendra Jasathy <rajendra.jasathy [...] igate.com>
Hi, Good morning, hope you are doing good. I am struck with a Perl Net::SSH2 issue, and looking desperately for some direction, please help. I am using Perl Net::SSH2 for communication with a device. I have created a small package with a function that instantiate Net::SSH2 object, calls its "connect, auth_password, then create channel (channel, blocking, process (shell), PRINT, READLINE, close) and then disconnect", and return response to calling module. I am using only the methods provided by Perl Net::SSH2 module. To have some generalization I am loading this as a plugin via another module that uses Module::Pluggable. I tested the loading of the plugin, and execution of commands in a sample script and it works fine. I created a small tool (using CPAN framework) which uses above connection module as follows; NetSSH2 plugin (exports run function) Module1 (plugins; NetSSH2, RPC, Telnet, Serial, .....), it first checks the plugin's name, check if the plugin is available (if connection is successful...) RunnerScript ( Contains Obj1), Obj1 (contains Obj2, Obj3), Obj2 (calls Module1 to return desired plugin, and then holds the plugin package name), calls plugin run method directly as and when required. Obj3 (calls plugin run method via Obj2) Now when I use my NetSSH2 plugin in above structure I am facing following issues: a. Ist command executed by Obj3 via plugin's run method succeed, but after that READLINE (one that reads channel for input data), while polling throws "Net::SSH2::poll: can't translate event 'in'".On little debugging I found Net::SSH2 has a private variable (my %Event) that is populated when the package is loaded for the first time, it stores macros/call to Perl xtensions. During the first call the poll is able to access this %Event properly but later during subsequent calls this variable is corrupted/uninitialized and holds garbage values, so the above error. I am nowhere making any direct call / or use of any of Net::SSH2 internal variables so as to corrupt it or uninitialized. Can you please provide some direction how to go about this, I googled but could not find any help. My environment details as follows; Perl version => 5.12.4 OS => Windows 7 enterprise Net:SSH2 => version 'Net-SSH2-0.33_512.tar' installed using 'Net-SSH2.ppd' Regards Rajendra ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Information contained and transmitted by this e-mail is confidential and proprietary to iGATE and its affiliates and is intended for use only by the recipient. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or mailadmin@igate.com <mailto:mailadmin@igate.com>. iGATE does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of iGATE. iGATE is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While iGATE has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening an attachment. To know more about iGATE please visit www.igate.com <http://www.igate.com>. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This bug report is old and convoluted and lacks any sample code that would allow us to reproduce the problem so I am closing it.