Net::SFTP / Net::SSH::W32Perl strange debug messages?
Net::SFTP / Net::SSH::W32Perl strange debug messages?
am 13.08.2006 17:06:13 von trsaunders
I'm trying to use Net::SFTP under windows, and have got it working
fine, apart from these very annoying debug(?) messages it keeps
printing to stdout:
IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 118
Connected to SFTP
The code i'm using to connect:
$args{warn} = 0;
$args{debug} = 0;
$args{user} = $params{username};
$args{password} = $params{password};
### have to manually pass paramaters as hash keys differ
$sftp = Net::SFTP->new($params{host}, %args);
I've tried looking through the SFTP & SSH code, but I cannot work out
where on earth these messages are coming from. has anyone got any idea?
Re: Net::SFTP / Net::SSH::W32Perl strange debug messages?
am 14.08.2006 08:35:04 von Sisyphus
wrote in message
news:1155481573.474888.261510@i42g2000cwa.googlegroups.com.. .
> I'm trying to use Net::SFTP under windows, and have got it working
> fine, apart from these very annoying debug(?) messages it keeps
> printing to stdout:
>
> IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
> IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
> IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 118
> Connected to SFTP
>
..
..
>
> I've tried looking through the SFTP & SSH code, but I cannot work out
> where on earth these messages are coming from. has anyone got any idea?
>
Judging by the messages, it looks like they are being generated by the code
at line 295 of SSH2.pm, and by the code at lines 110 and 118 of Channel.pm.
What are those specific lines of code ? (Probably best to give us a few
lines either side, for context.)
------------------------
D:\pscrpt>type try.pl
warn "IO::Socket::INET";
D:\pscrpt>perl try.pl
IO::Socket::INET at try.pl line 1.
-----------------------
Cheers,
Rob
Re: Net::SFTP / Net::SSH::W32Perl strange debug messages?
am 14.08.2006 10:44:56 von trsaunders
Sisyphus wrote:
> wrote in message
> news:1155481573.474888.261510@i42g2000cwa.googlegroups.com.. .
> > I'm trying to use Net::SFTP under windows, and have got it working
> > fine, apart from these very annoying debug(?) messages it keeps
> > printing to stdout:
> >
> > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
> > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
> > IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 118
> > Connected to SFTP
> >
> .
> .
> >
> > I've tried looking through the SFTP & SSH code, but I cannot work out
> > where on earth these messages are coming from. has anyone got any idea?
> >
>
> Judging by the messages, it looks like they are being generated by the code
> at line 295 of SSH2.pm, and by the code at lines 110 and 118 of Channel.pm.
>
> What are those specific lines of code ? (Probably best to give us a few
> lines either side, for context.)
>
> ------------------------
> D:\pscrpt>type try.pl
> warn "IO::Socket::INET";
> D:\pscrpt>perl try.pl
> IO::Socket::INET at try.pl line 1.
> -----------------------
>
> Cheers,
> Rob
SSH2.pm:
$cmgr->process_output_packets;
my $rb = $select_class->new;
my $wb = $select_class->new;
$rb->add($ssh->sock); ##### line
295 of SSH2.pm
$cmgr->prepare_channels($rb, $wb);
#last unless $cmgr->any_open_channels;
my $oc = grep { defined } @{ $cmgr->{channels} };
last unless $oc > 1;
Channel.pm:
my $c = shift;
my($rb, $wb) = @_;
if ($c->{rfd} && $c->{istate} == CHAN_INPUT_OPEN && ### line
110
$c->{remote_window} > 0 &&
$c->{input}->length < $c->{remote_window}) {
$rb->add($c->{rfd});
}
if ($c->{wfd} &&
$c->{ostate} == CHAN_OUTPUT_OPEN ||
$c->{ostate} == CHAN_OUTPUT_WAIT_DRAIN) {
if ($c->{output}->length > 0) {
#### line 118
$wb->add($c->{wfd});
}
elsif ($c->{ostate} == CHAN_OUTPUT_WAIT_DRAIN &&
$c->{extended}->length == 0) {
$c->obuf_empty;
}
I can't see anything on those lines which could cause this!
Re: Net::SFTP / Net::SSH::W32Perl strange debug messages?
am 14.08.2006 11:09:51 von Sisyphus
wrote in message
..
..
> > > I've tried looking through the SFTP & SSH code, but I cannot work out
> > > where on earth these messages are coming from. has anyone got any
idea?
> > >
> >
> > Judging by the messages, it looks like they are being generated by the
code
> > at line 295 of SSH2.pm, and by the code at lines 110 and 118 of
Channel.pm.
> >
> > What are those specific lines of code ?
..
..
> SSH2.pm:
..
..
> $rb->add($ssh->sock); ##### line>
295 of SSH2.pm
..
..
> Channel.pm:
..
..
> if ($c->{rfd} && $c->{istate} == CHAN_INPUT_OPEN && ### line 110
..
..
> #### line 118
..
..>
> I can't see anything on those lines which could cause this!
>
Neither can I.
Just check that the SSH2.pm you've quoted is, in fact, located at
C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm and that the Channel.pm you've quoted
is located at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm.
That being so, all I can say is "Beats me, too" :-)
Cheers,
Rob
Re: Net::SFTP / Net::SSH::W32Perl strange debug messages?
am 18.08.2006 11:54:49 von anno4000
wrote in comp.lang.perl.modules:
>
> Sisyphus wrote:
>
> > wrote in message
> > news:1155481573.474888.261510@i42g2000cwa.googlegroups.com.. .
> > > I'm trying to use Net::SFTP under windows, and have got it working
> > > fine, apart from these very annoying debug(?) messages it keeps
> > > printing to stdout:
> > >
> > > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > > IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
> > > IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295
> > > IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 110
> > > IO::String at C:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 118
> > > Connected to SFTP
> > >
> > .
> > .
> > >
> > > I've tried looking through the SFTP & SSH code, but I cannot work out
> > > where on earth these messages are coming from. has anyone got any idea?
> > >
> >
> > Judging by the messages, it looks like they are being generated by the code
> > at line 295 of SSH2.pm, and by the code at lines 110 and 118 of Channel.pm.
> >
> > What are those specific lines of code ? (Probably best to give us a few
> > lines either side, for context.)
> >
> > ------------------------
> > D:\pscrpt>type try.pl
> > warn "IO::Socket::INET";
> > D:\pscrpt>perl try.pl
> > IO::Socket::INET at try.pl line 1.
> > -----------------------
> >
> > Cheers,
> > Rob
> SSH2.pm:
>
> $cmgr->process_output_packets;
>
> my $rb = $select_class->new;
> my $wb = $select_class->new;
> $rb->add($ssh->sock); ##### line
> 295 of SSH2.pm
> $cmgr->prepare_channels($rb, $wb);
>
> #last unless $cmgr->any_open_channels;
> my $oc = grep { defined } @{ $cmgr->{channels} };
> last unless $oc > 1;
>
> Channel.pm:
>
> my $c = shift;
> my($rb, $wb) = @_;
> if ($c->{rfd} && $c->{istate} == CHAN_INPUT_OPEN && ### line
> 110
> $c->{remote_window} > 0 &&
> $c->{input}->length < $c->{remote_window}) {
> $rb->add($c->{rfd});
> }
> if ($c->{wfd} &&
> $c->{ostate} == CHAN_OUTPUT_OPEN ||
> $c->{ostate} == CHAN_OUTPUT_WAIT_DRAIN) {
> if ($c->{output}->length > 0) {
> #### line 118
> $wb->add($c->{wfd});
> }
> elsif ($c->{ostate} == CHAN_OUTPUT_WAIT_DRAIN &&
> $c->{extended}->length == 0) {
> $c->obuf_empty;
> }
>
> I can't see anything on those lines which could cause this!
They could be messages from Carp::carp further down the call chain.
Also, line 110 of Channel.pm is the first line of a multiline if-
condition. The cause could be located in the continuation lines.
I'd look at the code of the ->add() method (wherever that's located).
->add() appears in both line 295 of SSH2.pm and the condition starting
at line 110 of Channel.pm.
Anno