From robey at lag.net Tue Jan 16 11:16:34 2007 From: robey at lag.net (Robey Pointer) Date: Tue, 16 Jan 2007 11:16:34 -0800 Subject: [paramiko] closing SFTP connections In-Reply-To: <4585CCBA.4090408@rsp.com.au> References: <457CABFC.1060508@rsp.com.au> <4585CCBA.4090408@rsp.com.au> Message-ID: On 17 Dec 2006, at 15:03, Michael Gratton wrote: > Robey Pointer wrote: > >> Since all Channel and SFTPClient objects belong to a single >> Transport, if you close the Transport (or SSHClient), it should >> automatically close all of its channels. That will let you still >> have only one "close()" call. > > Yep, but should the transport also automatically close once all > channels > are closed? We are seeing this happen most times, but for something > like > 1 in 20 connections, if all channels are closed (we're only opening > one > per transport) the transport isn't closed. It shouldn't ever happen. You can close all channels but may still want to open another channel over the same transport, and that should work. robey From michael.gratton at rsp.com.au Wed Jan 17 16:07:58 2007 From: michael.gratton at rsp.com.au (Michael Gratton) Date: Thu, 18 Jan 2007 10:37:58 +1030 Subject: [paramiko] closing SFTP connections In-Reply-To: References: <457CABFC.1060508@rsp.com.au> <4585CCBA.4090408@rsp.com.au> Message-ID: <45AEBA5E.50703@rsp.com.au> Robey Pointer wrote: > > On 17 Dec 2006, at 15:03, Michael Gratton wrote: >> Yep, but should the transport also automatically close once all channels >> are closed? We are seeing this happen most times, but for something like >> 1 in 20 connections, if all channels are closed (we're only opening one >> per transport) the transport isn't closed. > > It shouldn't ever happen. You can close all channels but may still want > to open another channel over the same transport, and that should work. Oh! Okay, that's weird (the behaviour we're seeing, that is). It sounds pretty dumb, but we never were explicitly closing a transport. Channels that get opened were explicitly closed, but the transport never was. So during the course of this process running, a transport and channel would be opened, the channel used then closed and the reference to the transport lost. This would happen potentially multiple times during the course of one program execution. Usually the connection associated with the transport was closed - when the refcount for the transport got to 0 and it was GC'd, I assume. But sometimes the process would not exit after it completed - a symptom of this was a still-open connection that the process was constantly select()ing (from memory). Anyway, it's not a problem anymore as we're now explicitly closing the transport instances, but it seems like there might be some race or other condition when open transport instances are destroyed. Let me know if you want any more info. /Mike -- Michael Gratton -- Code Wrangler Rising Sun Pictures -- http://www.rsp.com.au/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature Url : http://www.lag.net/pipermail/paramiko/attachments/20070118/f10dbdce/attachment.pgp From bogus@does.not.exist.com Mon Jan 15 18:01:56 2007 From: bogus@does.not.exist.com () Date: Tue, 16 Jan 2007 02:01:56 -0000 Subject: No subject Message-ID: protocol than scp. -stephen On 5/8/07, Kane, Sean wrote: > > Does paramiko support remote server to remote server style transfers > like you might do via scp on the command line with this: > > scp kane at www.bob.com:/tmp/test.txt josh at www.google.com:/tmp/cool.txt > > or an even simpler: > > scp www.bob.com:/tmp/test.txt www.google.com:/tmp/cool.txt > > Thanks, > Sean > > ---- > Sean P. Kane - Service/Support Onsite Engineer V > VMS Operations Team - HP Digital Entertainment Services > sean.kane at hp.com - Vancouver, WA, USA > > > > _______________________________________________ > paramiko mailing list > paramiko at lag.net > http://mail.lag.net/mailman/listinfo/paramiko > ------=_Part_50453_23019387.1178646937562 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline From bogus@does.not.exist.com Mon Jan 15 18:01:56 2007 From: bogus@does.not.exist.com () Date: Tue, 16 Jan 2007 02:01:56 -0000 Subject: No subject Message-ID:

------=_Part_50453_23019387.1178646937562-- From bogus@does.not.exist.com Mon Jan 15 18:01:56 2007 From: bogus@does.not.exist.com () Date: Tue, 16 Jan 2007 02:01:56 -0000 Subject: No subject Message-ID: protocol than scp. -stephen On 5/8/07, Kane, Sean < sean.kane at hp.com > wrote: Does paramiko support remote server to remote server style transfers=20 like you might do via scp on the command line with this: scp kane at www.bob.com:/tmp/test.txt josh at www.google.com:/tmp/cool.txt or an even simpler: scp www.bob.com:/tmp/test.txt www.google.com:/tmp/cool.txt=20 Thanks, Sean ---- Sean P. Kane - Service/Support Onsite Engineer V VMS Operations Team - HP Digital Entertainment Services sean.kane at hp.com - Vancouver, WA, USA=20 _______________________________________________ paramiko mailing list paramiko at lag.net http://mail.lag.net/mailman/listinfo/paramiko=20 =20 ------_=_NextPart_001_01C7919A.6D4638EE Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

That was my initial observation as well, but I wanted to = double-check with folks who might know better, since that functionality would be very = useful to me at the moment.

 

Thanks,

Sean

 

 

----
Sean P. Kane        -
Service/Support Onsite Engineer V

VMS Operations Team - HP Digital Entertainment = Services
sean.kane at hp.com    - Vancouver, WA, = USA

 

From:= = harrells at google.com [mailto:harrells at google.com] On Behalf Of Stephen Lien = Harrell
Sent: Tuesday, May 08, 2007 10:56
To: Kane, Sean
Cc: paramiko at lag.net
Subject: Re: [paramiko] remote to remote = scp

 

From what I can = tell, paramiko only supports sftp, which is a different protocol than scp.

-stephen

On 5/8/07, Kane, = Sean < sean.kane at hp.com> = wrote:

Does paramiko support remote server to remote = server style transfers
like you might do via scp on the command line with this:

scp kane at www.bob.com:/tmp/test.txt josh at www.google.com:/tmp/cool.txt

or an even simpler:

scp www.bob.com:/tmp/test.txt www.google.com:/tmp/cool.txt

Thanks,
Sean

----
Sean P. Kane        - = Service/Support Onsite Engineer V
VMS Operations Team - HP Digital Entertainment Services
sean.kane at hp.com   &n= bsp;- Vancouver, WA, USA



_______________________________________________
paramiko mailing list
paramiko at lag.net
http://mail.lag.ne= t/mailman/listinfo/paramiko

 

------_=_NextPart_001_01C7919A.6D4638EE--