Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id:
107222
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
bogenstaetter [...] gmx.de
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: KeepLive is not working
Date: Mon, 21 Sep 2015 18:38:41 +0200
To: bug-Net-SSH2@rt.cpan.org
From: Bogenstätter Marcus <bogenstaetter@gmx.de>
Dear maintainers, I have tested the latest development version 0.54_02 for the new methods keepalive_*. It seems as if the new methods are not really doing anything, I have traced the network packets using wireshark. The environment that I have tested against: Windows 8 64 Bit This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2012, Larry Wall Binary build 1603 [296746] provided by ActiveState http://www.ActiveState.com Built Mar 13 2013 11:29:21 I only got it compiled with perls up to 5.18. The code I was using: my $ssh2 = $self->{ssh2conn}; [...] $ssh2->connect($host,$port); [...] $ssh2->auth_password($user,$self->{key}); # for ssh auth method 'password' [...] $ssh2->keepalive_config(1,30); my $chan=$ssh2->channel(); if ($ssh2->error or !$chan) { $self->logError(); return ( undef, undef); } $chan->shell(); [...] Or maybe I am doing something wrong? Any suggestions are very welcome! Kind regards, Bogi
Subject: Re: [rt.cpan.org #107222] KeepLive is not working
Date: Wed, 23 Sep 2015 06:34:18 +0000 (UTC)
To: "bug-Net-SSH2@rt.cpan.org" <bug-Net-SSH2@rt.cpan.org>
From: Salvador Fandino <sfandino@yahoo.com>
Show quoted text
----- Original Message -----
> From: "bogenstaetter@gmx.de via RT" <bug-Net-SSH2@rt.cpan.org> > To: > Cc: > Sent: Monday, September 21, 2015 6:39 PM > Subject: [rt.cpan.org #107222] KeepLive is not working > > Mon Sep 21 12:38:57 2015: Request 107222 was acted upon. > Transaction: Ticket created by bogenstaetter@gmx.de > Queue: Net-SSH2 > Subject: KeepLive is not working > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: bogenstaetter@gmx.de > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107222 > > > > Dear maintainers, > I have tested the latest development version 0.54_02 for the new methods > keepalive_*. > > It seems as if the new methods are not really doing anything, I have > traced the network packets using wireshark. > > The environment that I have tested against: > Windows 8 64 Bit > This is perl 5, version 16, subversion 3 (v5.16.3) built for > MSWin32-x86-multi-thread > (with 1 registered patch, see perl -V for more detail) > Copyright 1987-2012, Larry Wall > Binary build 1603 [296746] provided by ActiveState > http://www.ActiveState.com > Built Mar 13 2013 11:29:21 > > I only got it compiled with perls up to 5.18. > > The code I was using: > my $ssh2 = $self->{ssh2conn}; > [...] > $ssh2->connect($host,$port); > [...] > $ssh2->auth_password($user,$self->{key}); # for ssh auth method > 'password' > [...] > $ssh2->keepalive_config(1,30); > my $chan=$ssh2->channel(); > if ($ssh2->error or !$chan) { > $self->logError(); > return ( undef, undef); > } > $chan->shell(); > [...] >
> Or maybe I am doing something wrong?
You have to explicitly call send_keepalive periodically. In any case, note than the underlaying implementation of send_keepalive in libssh2 is buggy and may corrupt the SSH connection when called in non-blocking mode.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.