Re: Using SSH : sys.stdin.read(n) non-blocking issue?
EricZolf <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.rdiff-backup.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 15 October 2021 00:02:04 UTC, Simon Defayette <[email protected]> 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