group change causing failure

Joe Eiler jeiler at ciprico.com
Tue Oct 5 12:29:03 GMT 2004


Thanks for the response Wayne.

Here are the results of my tests based on your comments, I added some extra
carriage returns to hopefully make it easier to read.
The logs are at the bottom.  A 'ps -ef' shows rsync --daemon is still
running.

Joe

[root at Node30 root]#
[root at Node30 root]# /etc/init.d/xinetd status
xinetd is stopped
[root at Node30 root]#
[root at Node30 root]# ulimit -c unlimted
-bash: ulimit: unlimted: invalid number
[root at Node30 root]#
[root at Node30 root]# ulimit -c unlimited
[root at Node30 root]#
[root at Node30 root]# rsync --daemon
[root at Node30 root]#
[root at Node30 root]# ls -l /base/test1/testfile.txt
-rw-r--r--  1 root nobody 0 Oct  4 19:59 /base/test1/testfile.txt
[root at Node30 root]#
[root at Node30 root]# ls -l /base/bkup
total 0
drwxr-xr-x  2 root root 80 Oct  4 19:59 test1
[root at Node30 root]#
[root at Node30 root]# rsync -av localhost::rsync/test1 /base/bkup/
receiving file list ... rsync: connection unexpectedly closed (4 bytes
received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
[root at Node30 root]#
[root at Node30 root]# chgrp -R root /base/test1
[root at Node30 root]#
[root at Node30 root]# rsync -av localhost::rsync/test1 /base/bkup/
receiving file list ... done

sent 73 bytes  received 92 bytes  330.00 bytes/sec
total size is 0  speedup is 0.00
[root at Node30 root]#
[root at Node30 root]# chgrp -R nobody /base/test1
[root at Node30 root]#
[root at Node30 root]# rsync -avvv localhost::rsync/test1 /base/bkup/
opening tcp connection to localhost port 873
receiving file list ...
rsync: connection unexpectedly closed (4 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
_exit_cleanup(code=12, file=io.c, line=359): about to call exit(12)
[root at Node30 root]#
[root at Node30 root]# rsync -avvvvv localhost::rsync/test1 /base/bkup/
opening tcp connection to localhost port 873
(Client) Protocol versions: remote=28, negotiated=28
receiving file list ...
rsync: connection unexpectedly closed (4 bytes received so far) [receiver]
_exit_cleanup(code=12, file=io.c, line=359): entered
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
_exit_cleanup(code=12, file=io.c, line=359): about to call exit(12)
[root at Node30 root]#
[root at Node30 root]# chgrp -R root /base/test1
[root at Node30 root]#
[root at Node30 root]# rsync -avvvvv localhost::rsync/test1 /base/bkup/
opening tcp connection to localhost port 873
(Client) Protocol versions: remote=28, negotiated=28
receiving file list ...
recv_file_name(test1)
recv_file_name(test1/testfile.txt)
received 2 names
done
gid 0() maps to 0
[receiver] i=0 <NULL> <NULL> test1 mode=040755 len=80 uid=0 gid=0
[receiver] i=1 <NULL> test1 testfile.txt mode=0100644 len=0 uid=0 gid=0
recv_file_list done
get_local_name count=2 /base/bkup/
recv_files(2) starting
generator starting pid=23374 count=2
delta transmission enabled
recv_generator(test1,0)
recv_generator(test1/testfile.txt,1)
test1/testfile.txt is uptodate
generate_files phase=1
recv_files phase=1
generate_files phase=2
recv_generator(test1,0)
generate_files finished
recv_files finished

sent 77 bytes  received 92 bytes  338.00 bytes/sec
total size is 0  speedup is 0.00
_exit_cleanup(code=0, file=main.c, line=1146): entered
_exit_cleanup(code=0, file=main.c, line=1146): about to call exit(0)
[root at Node30 root]#
[root at Node30 root]#


And here are the logs after doing these tests
[root at Node30 root]# tail -15 /var/log/messages
Oct  4 20:00:59 localhost rsyncd[7840]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  4 20:03:29 localhost rsyncd[8297]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  4 20:03:29 localhost rsyncd[8297]: wrote 92 bytes  read 73 bytes  total
size 0
Oct  4 20:04:37 localhost rsyncd[8529]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  5 04:02:00 localhost logrotate: ALERT exited abnormally with [1]
Oct  5 06:06:12 localhost rsyncd[22781]: rsyncd version 2.6.3 starting,
listening on port 873
Oct  5 06:06:12 localhost rsyncd[22781]: unable to bind any inbound sockets
on port 873
Oct  5 06:06:12 localhost rsyncd[22781]: rsync error: error in socket IO
(code 10) at socket.c(448)
Oct  5 06:07:26 localhost rsyncd[23000]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  5 06:07:59 localhost rsyncd[23140]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  5 06:07:59 localhost rsyncd[23140]: wrote 92 bytes  read 73 bytes
total size 0
Oct  5 06:08:30 localhost rsyncd[23264]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  5 06:08:41 localhost rsyncd[23281]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  5 06:09:14 localhost rsyncd[23375]: rsync on rsync/test1 from
localhost.localdomain (127.0.0.1)
Oct  5 06:09:14 localhost rsyncd[23375]: wrote 92 bytes  read 77 bytes
total size 0
[root at Node30 root]#
[root at Node30 root]# tail /var/log/secure
Oct  4 17:36:34 localhost xinetd[904]: START: rsync pid=13146 from=127.0.0.1
Oct  4 19:02:41 localhost sshd[29054]: Accepted password for root from
172.30.10.200 port 35235 ssh2
Oct  4 19:03:33 localhost xinetd[904]: START: rsync pid=29283 from=127.0.0.1
Oct  4 19:19:41 localhost xinetd[904]: START: rsync pid=32300 from=127.0.0.1
Oct  4 19:20:16 localhost xinetd[32433]: START: rsync pid=32483
from=127.0.0.1
Oct  4 19:21:50 localhost xinetd[32757]: START: rsync pid=32761
from=127.0.0.1
Oct  4 19:22:08 localhost xinetd[32757]: START: rsync pid=367 from=127.0.0.1
Oct  4 19:22:40 localhost xinetd[32757]: START: rsync pid=464 from=127.0.0.1
Oct  4 19:22:48 localhost xinetd[32757]: START: rsync pid=481 from=127.0.0.1
Oct  4 19:56:54 localhost sshd[7047]: Accepted password for root from
172.30.10.200 port 35310 ssh2
[root at Node30 root]#


-----Original Message-----
From: Wayne Davison [mailto:wayned at samba.org]
Sent: Tuesday, October 05, 2004 12:37 AM
To: Joe Eiler
Cc: 'rsync at lists.samba.org'
Subject: Re: group change causing failure


On Mon, Oct 04, 2004 at 09:06:01PM -0500, Joe Eiler wrote:
> I just compiled 2.6.3 and am trying to get it to run on linux 2.6.8.1
> kernel with a more or less fedora core2 environment.

I've tested 2.6.3 under a debian sarge setup using a linux 2.6.8.1
kernel.  The only changes I made in your test case were to use inetd
instead of xinetd, and to use "nogroup" instead of "nobody" for the
group (which is a known difference between debian and fedora).  I
couldn't get rsync to fail.

So, you should first check for messages from rsyncd in your syslog to
see if rsync is exiting with an error or dying.  You migh also try
running the rsync daemon without using xinetd (just run rsync --daemon
on its own with the xinetd setup turned off).  If rsync is crashing, you
should enable core dumps (either "rsync --daemon" from a shell where you
have typed "ulimit -c unlimted", or put that command into a script that
runs "rsync --daemon" and run that script from xinetd).

..wayne..



More information about the rsync mailing list