1 |
Hi Steve, |
2 |
|
3 |
On 2020-06-30 20:35, Steve Freeman wrote: |
4 |
> I have a local gentoo repo mirror that has been running well for |
5 |
> years. It is essentially the same setup as described at |
6 |
> https://wiki.gentoo.org/wiki/Local_Mirror except that it runs on a |
7 |
> non-default port. |
8 |
|
9 |
I sadly cannot reproduce this on my systems with a similar setup. Could |
10 |
you attach the full rsyncd.conf file? Perhaps there's also custom |
11 |
settings in /etc/conf.d/rsyncd. |
12 |
|
13 |
> rsync: didn't get server startup line |
14 |
> [Receiver] _exit_cleanup(code=5, file=main.c, line=1777): entered |
15 |
> rsync error: error starting client-server protocol (code 5) at main.c(1777) [Receiver=3.2.0] |
16 |
> [Receiver] _exit_cleanup(code=5, file=main.c, line=1777): about to call exit(5) |
17 |
|
18 |
I've had a look in the code, and that particular message is only |
19 |
triggered in one place: |
20 |
|
21 |
if (!read_line_old(f_in, line, sizeof line, 0)) { |
22 |
rprintf(FERROR, "rsync: didn't get server startup line\n"); |
23 |
return -1; |
24 |
} |
25 |
|
26 |
read_line_old is described thusly: |
27 |
|
28 |
/* Read a line of up to bufsiz-1 characters into buf. Strips |
29 |
* the (required) trailing newline and all carriage returns. |
30 |
* Returns 1 for success; 0 for I/O error or truncation. */ |
31 |
int read_line_old(int fd, char *buf, size_t bufsiz, int eof_ok) |
32 |
|
33 |
> Running rsync as a non-daemon appears to work fine regardless of |
34 |
> server/client versions; it's only rsyncd that fails. |
35 |
> |
36 |
> With no useful logs or output, I'm finding this impossible to |
37 |
> diagnose. Does anyone have any ideas? |
38 |
|
39 |
I have no concrete ideas, but given that read_line_old seems to fail, |
40 |
maybe it's helpful checking out actual network traffic with wireshark or |
41 |
tcpdump. You could compare traffic between the working and the broken |
42 |
version. A simple capture filter of 'port 5873' should be enough. |
43 |
|
44 |
Since there really doesn't seem to be any better debug functionality |
45 |
(there's --debug, but it didn't really add anything for me), perhaps you |
46 |
could also build rsync with debug symbols and throw gdb at it. |
47 |
|
48 |
Finally, have you tried accessing the rsync endpoint manually without |
49 |
invoking 'emerge --sync'? Does the following also raise an error? |
50 |
|
51 |
rsync --port 5873 10.10.10.10:: |
52 |
|
53 |
If not, perhaps try syncing a single file manually. |
54 |
|
55 |
I also see that version 3.2.1 is in the tree now, could be worth a shot |
56 |
too. |
57 |
|
58 |
-- |
59 |
Wolf |