Net::SSH and File::Rsync issues

Rick Harby rharby at caarnet.com
Tue Jul 15 13:04:55 PDT 2003


Ivan,
  Any chance you could help me out on this one, I have Freeside
installed on a Linux Redhat 9 box, seems to work just fine, but the
exports seem to have problems. So I started looking into it, and it
seems that ssh hangs or goes defunct somehow. I wrote a test script
below as follow (well actually just took code out of an export for it):
 
#!/usr/bin/perl
 
use File::Rsync;
use Net::SSH qw(ssh);
 
$DEBUG = 1;
$prefix =
"/usr/local/etc/freeside/export.DBI\:Pg\:dbname\=freeside/bind/localhost
";
 
my $rsync = File::Rsync->new({
  rsh     => 'ssh',
});
 
$rsync->exec( (
        src     => "$prefix/",
        recursive       => 1,
        dest            => "root\@localhost:/var/named",
        exclude         => [qw( *.import named.conf.HEADER named.conf
)],
        ) ) or die "rsync to localhost failed: ". join(" / ",
$rsync->err);
 
ssh("root\@localhost", 'echo done >/tmp/done');
 
 
  This script just HANGS, but the interesting part is if I comment out
the rsync->exec command, the ssh command runs fine, OR if I comment out
the ssh command the rsync code works fine. If they are both in the
script, the rsync seems to run, but the ssh gets hung and looks like
this in the process list:
 
freeside 25635  0.0  0.0     0    0 pts/0    Z    16:03   0:00 [ssh
<defunct>]
freeside 25636  0.7  0.3  3468 1684 pts/0    S    16:03   0:00 ssh -T -o
BatchMode yes root at localhost echo done >/tmp/done
 
   ANY IDEAS? Thanks a lot.
 
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://420.am/pipermail/freeside-users/attachments/20030715/3f984120/attachment.html


More information about the freeside-users mailing list