[freeside] Net::SSH and File::Rsync issues

Randall Lucas rlucas at tercent.net
Tue Jul 15 14:02:03 PDT 2003


Hi Rick,

Have you checked to see that the SSH shell (or otherwise) isn't  
entering interactive mode and waiting for a pw and/or a "I don't  
recognize this host's signature" dialog?  Note that if you test out the  
ssh connection as one user, and run this program as another user (e.g.  
uid freeside), you may not catch the problem.  Try manually testing out  
your rsync and ssh as the user under which you're running this code.

R

On Tuesday, July 15, 2003, at 04:04 PM, Rick Harby wrote:

> 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
>
>  
>
> useFile::Rsync;
>
> useNet::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:
>
>  
>
> freeside25635 0.0 0.0    0   0 pts/0   Z   16:03  0:00 [ssh <defunct>]
>
> freeside25636 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 --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 4103 bytes
Desc: not available
Url : http://420.am/pipermail/freeside-users/attachments/20030715/432ddbfc/attachment.bin


More information about the freeside-users mailing list