"Connection reset by peer" withing a rsyncd strace log

thomas veymont thomas.veymont at gmail.com
Tue Mar 15 10:09:39 MDT 2011


hello,

running an rsyncd server I get the following into the
error log when trying to sync on a module :

(...)
Mar 15 15:32:44 xxxxxx rsyncd[5202]: building file list
Mar 15 15:34:55 xxxxxxxxx rsyncd[5202]: rsync: writefd_unbuffered
failed to write 4092 bytes to socket [sender]: Connection reset by
peer (104)
Mar 15 15:34:55 xxxxxxxxxx rsyncd[5202]: rsync error: error in rsync
protocol data stream (code 12) at io.c(1530) [sender=3.0.7]
Mar 15 15:35:59 xxxxxxxxxxx rsyncd[4221]: rsync error: received
SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(543) [Receiver=3.0.7]

on the remote client side, I get :

(...)
receiving file list ... done
data/mseed/2010/327/ZZ.UV02.dat
(...)
[receiver] io timeout after 60 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(140)
[receiver=3.0.7]
rsync: connection unexpectedly closed (1098874 bytes received so far)
[generator]
rsync error: error in rsync protocol data stream (code 12) at
io.c(601) [generator=3.0.7]

Running the server with strace I get the following :

(...)
[pid  5202] select(7, NULL, [6], [6], {30, 0}) = 1 (out [6], left {30, 0})
[pid  5202] write(6,
"\270\376\346\377Q\377\206\377i\377\262\377\304\377\325\0\240\0\252\0
\0\215\1B\0\374\0013\1&\0"..., 4092) = 4092
[pid  5202] time(NULL)                  = 1300203295
[pid  5202] select(7, NULL, [6], [6], {30, 0}) = 1 (out [6], left {30, 0})
[pid  5202] write(6, "\374\17\0\7", 4)  = 4
[pid  5202] time(NULL)                  = 1300203295
[pid  5202] select(7, NULL, [6], [6], {30, 0}) = 1 (out [6], left {30, 0})
[pid  5202] write(6,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4092) = 4092
[pid  5202] time(NULL)                  = 1300203295
[pid  5202] select(7, NULL, [6], [6], {30, 0}) = 1 (out [6], left {30, 0})
[pid  5202] write(6, "\374\17\0\7", 4)  = 4
[pid  5202] time(NULL)                  = 1300203295
[pid  5202] select(7, NULL, [6], [6], {30, 0}) = 1 (out [6], left {30, 0})
[pid  5202] write(6,
"\210\1\36\1.\1\263\1\377\1\361\1\271\1\310\1\340\1\256\1<\0012\1:\0\313\0\300\0\222\0"...,
4092) = -1 ECONNRESET (Connection reset by peer)
[pid  5202] time(NULL)                  = 1300203295
[pid  5202] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file
or directory)
[pid  5202] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file
or directory)
[pid  5202] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file
or directory)
[pid  5202] send(3, "<28>Mar 15 15:34:55 rsyncd[5202]"..., 138,
MSG_NOSIGNAL) = 138
[pid  5202] rt_sigaction(SIGUSR1, {0x1, [], 0}, NULL, 8) = 0
[pid  5202] rt_sigaction(SIGUSR2, {0x1, [], 0}, NULL, 8) = 0
[pid  5202] time(NULL)                  = 1300203295
[pid  5202] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file
or directory)
[pid  5202] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file
or directory)
[pid  5202] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file
or directory)
[pid  5202] send(3, "<28>Mar 15 15:34:55 rsyncd[5202]"..., 122,
MSG_NOSIGNAL) = 122
[pid  5202] gettimeofday({1300203295, 654492}, NULL) = 0
[pid  5202] select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
[pid  5202] gettimeofday({1300203295, 751079}, NULL) = 0
[pid  5202] select(0, NULL, NULL, NULL, {0, 4000}) = 0 (Timeout)
[pid  5202] gettimeofday({1300203295, 755009}, NULL) = 0
[pid  5202] exit_group(12)              = ?
Process 5202 detached
<... select resumed> )                  = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---

########

rsync server and client are both 3.0.7.
The problem happens nearly each time, but does not happen with others
modules and clients.

I mention that I do have a "/etc/localtime" file on the server : the
corresponding message
is happening because of chrooting.
Anyway, the problem seems to be located on the ECONNRESET line, isn't
it ? I mention
that my IP network seems okay, this is why I don't understand the
"Connection reset by peer" message.

thanks for any idea or suggestion (or confirmation this is a network
problem, not a rsync problem ;-)
Tom


More information about the rsync mailing list