1833144 Members
3010 Online
110051 Solutions
New Discussion

Re: rsync problems

 
Tim D Fulford
Honored Contributor

rsync problems

I'm trying to set up a test mirror using rsync. I'm trying to use the socket option to avoid equivalences. The option that utilises equivalences works fine.

so my server has the following /etc/rsyncd.conf
syslog facility = local5
secrets file = /etc/rsync.secrets
[fulfordt]
path = /export/home/fulfordt
comment = Tims Home dir
uid = root
gid = sys

my inetd.conf file contains
rsync stream tcp nowait root /opt/rsync/bin/rsync rsyncd --daemon

the rsync port is in the /etc/services & is 873/tcp.

I know there MUST be some comms as when I do
rsync ::
BOTH the server & client return the module name [fulfordt]

I've fiddled it quite a bit so this is just a potted history

HELLLP

Tim
-
14 REPLIES 14
Tim D Fulford
Honored Contributor

Re: rsync problems

I forgot the error codes

rsync: connection unexpectedly closed (24 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(151)

Tim
-
kish_1
Valued Contributor

Re: rsync problems

try like this way

rsync --port=11678 -avz domain-hp.com::HPUX-depots/
share the power of the knowledge
Tim D Fulford
Honored Contributor

Re: rsync problems

This did not help.

I changed the port to 11678 on both the client & server machines. No there seems to be an authentication problem when running from the client

rsync: failed to connect to a180tst3: Connection refused
rsync error: error in socket IO (code 10) at clientserver.c(89)

The same problem when running from the server.!!!

Any more

Tim
-
kish_1
Valued Contributor

Re: rsync problems

Tim,
please go throgh the sample rsyncd.conf in client side
[DEFAULT_IN]
path = /home/username/recv
comment = Directory that you want to recieve files into
hosts allow = 110.112.17.0/255.255.0.0
read only = false
exclude = .protect
list = true

you need to specify the IP address on both side


share the power of the knowledge
Tim D Fulford
Honored Contributor

Re: rsync problems

babu

AHGH.... Does this mean I also need to have a deamon process running on the client side?

I will try Monday... & assign points appropriately

Tim

-
Tim D Fulford
Honored Contributor

Re: rsync problems

babu

Couldn't get it to go!!!!

SERVER: (a180tst3)
/etc/rsyncd.conf (rw-r--r-- root sys)
syslog facility = local5
secrets file = /etc/rsync.secrets
[fulfordt]
path = /export/home/fulfordt
comment = Tims Home dir
hosts allow = 193.164.192.208,193.164.192.202,127.0.0.1
read only = false
exclude .protect
list = true
uid = root
gid = sys

/etc/rsync.secrets (r-------- root sys)
root:

/etc/inetd.conf (r--r--r-- root sys)
:
rsync stream tcp nowait root /opt/rsync/bin/rsync rsyncd --daemon

/etc/services (r--r--r-- root sys)
rsync 873/tcp
[ & I've also tried 11678]

CLIENT:
/etc/rsyncd.conf (rw-r--r-- root sys)
syslog facility = local5
secrets file = /etc/rsync.secrets
[fulfordt]
path = /export/home/fulfordt
comment = Replica of Tims dir
hosts allow = 193.164.192.202,193.164.192.208,127.0.0.1
read only = false
exclude = .protect
list = true
uid = root
gid = sys

/etc/rsync.secrets (r-------- root sys)
root:

When I do
# rsync -avz --delete [--port=11678] a180tst3::fulfordt .
Either port 873 or 11678 I get the error message
rsync: connection unexpectedly closed (24 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(151)

IF I get the wrong port I get
rsync: failed to connect to a180tst3: Connection refused
rsync error: error in socket IO (code 10) at clientserver.c(89)

Even if I try to do server-server I get same error messages.

Tim
-
kish_1
Valued Contributor

Re: rsync problems

can you just try following setup and try is working use the same port 873
example like

gid = bin
uid = bin
use chroot = yes

[test]
path = /
comment = directory that you want to send files from
read only = true
hosts allow = 193.164.192.0/255.255.255.0 127.0.0.1/31 logfile=var/log/rsync_log.log
log format="%o %h [%a] %m (%u) %f %l"
list=true



share the power of the knowledge
Tim D Fulford
Honored Contributor

Re: rsync problems

babu

same error code, no joy...
rsync: connection unexpectedly closed (24 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(151)

I have just noticed that it generates a core file in the source/server directory

what core
core:
$ PATHCH/11.00:PHCO_16039 Jul 28 1998 16:05:28 $
$ PATCH/11.00:PHCO_19491 Aug 9 1999 09:53:07 $
SMART_BIND
92453-07 dld dld dld.sl B.11.13 990903

Tim

-
kish_1
Valued Contributor

Re: rsync problems

I think we are going out of way, can you go for a trace o/p, am not sure will help something, but we get some idea where is failing.if you do not have ,you can download it from following link http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.3/

tusc -f -l -p -E -o /tmp/tusc.out command line


best of luck

share the power of the knowledge
Tim D Fulford
Honored Contributor

Re: rsync problems

yer tis lots of gobbledygook

Tim
-
Christian Mansfield
New Member

Re: rsync problems

Tim -
Were you able to arrive at a resolution to this problem?

We are encountering the same error:
rsync: connection unexpectedly closed (12 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)


thanks
Joel
Tim D Fulford
Honored Contributor

Re: rsync problems

yep no change. The whole idea has gone stale now. We simply rcp files 'round, which I "hate". I know I could use rsync for this but the "experts" feel it adds nothing to the rcp method.

Many thanks for your interest though.

Tim
-
Christian Mansfield
New Member

Re: rsync problems

Tim -
Thanks for the reply. I was able to get it working. Here's what I did just in case anyone else runs into similar problems. I had three problems in my rsyncd.conf file -
1 - incorrect gid
2 - invalid log file location (directory didn't exist)
2 - need to add the parameter read only = false

see the following link:
http://rsync.samba.org/fom-serve/cache/191.html

getting lazy in my age ;)

Joel
Tim D Fulford
Honored Contributor

Re: rsync problems

Joel

Thanks again for the interest. I've tried putting in
read only = false
AND
read only = no

Both to no effect. I know something must be happening as when I use
rsync -avz --delete host:/export/home/fulfordt .
This works, but using the "modules" fails!! I have to say I'm really not too sure how the modules work!

Tim
-