rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using SSH : sys.stdin.read(n) non-blocking issue?


From: EricZolf
Subject: Re: Using SSH : sys.stdin.read(n) non-blocking issue?
Date: Sat, 16 Oct 2021 12:40:16 +0000


Hi,
On 15 October 2021 00:02:04 UTC, Simon Defayette <simon.defayette@gmail.com> 
wrote:
>I then downloaded python on the windows 2019 server and run commands that I
>saw from Eric Zolf seen here:
>https://github.com/rdiff-backup/rdiff-backup/issues/393
>
>>>> import subprocess
>>>> process = subprocess.Popen("ssh -C my_user@[my_server_ip] rdiff-backup
>--server", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
>>>> process.communicate()
>
>and after some testing and some tweaks I may have seen that
>self.inpipe.read in _get(self) located in connection.py is non-blocking.  I
>think this is an issue since it will raise an exception right away if there
>are no bytes available.
>
>  def _get(self):
>        """Read an object from the pipe and return (req_num, value)"""
>        header_string = self.inpipe.read(9)
>        if not len(header_string) == 9:
>            raise ConnectionReadError("Truncated header string (problem "
>                                      "probably originated remotely)")
>
>Can someone confirm this?

No, and I have doubts, all cases of connection issues of this kind so far have 
been brought down to a system setup issue.

I mean, does the command `ssh -C my_user@[my_server_ip] rdiff-backup --server` 
if called from the command line? Do you have rdiff- backup 32 or 64 bits? Did 
you check the Windows FAQ?

KR, Eric
>
>Thanks,
>Simon Defayette



reply via email to

[Prev in Thread] Current Thread [Next in Thread]