Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2460
  • Last Modified:

rsync: error starting client-server protocol message

Hello -- I have two SUSE 9 servers and I'm trying to replicate some files between them using rsync.  

Server A successfully replicates to B but when I issue the rsync command on B I first get prompted to enter a password and then I get this message below:  


@ERROR: auth failed on module data
rsync error: error starting client-server protocol (code 5) at main.c(1308) [receiver=2.6.8]


When server A replicates to B I am not prompted for a password.   I'm logged in as root to both servers and the root password is the same on both machines.  

So my question is #1)  Why am I getting prompted for my password on server B when rsync is issued and #2)  What is the cause of the message above?  

Here is the command that I'm issuing:
rsync -avzu --stats --delete 192.168.10.66::data /mnt/samba/data/
Here is my rsync.conf file:
uid = root
gid = root
read only = false
use chroot = no
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
hosts allow = 192.168.30.66, 192.168.10.66
user auth = rsyncuser,root,josh
#slp refresh = 300
secrets file = /etc/rsyncd.secrets
[data]
        path = /mnt/samba/data_tac
        comment = TAC RSYNC Data Share


0
joshnya1
Asked:
joshnya1
  • 12
  • 7
  • 4
1 Solution
 
woolnoirCommented:
Do you have key authentication setup in one direction ? this is probably why you arent prompted for the password in one direction and are in the other ?

I wrote this article http://www.experts-exchange.com/Apple/Networking/A_3551.html?sfQueryTermInfo=1+30+rsync about rsync backups (specially on a OSX server, but it will work for linux) - look specifically at the bit about key authentication, that should solve the issues your having with password - assuming you want to use key authentication ? let us know if not, and i can suggest fix's for the authentication error.
0
 
joshnya1Author Commented:
Thanks for the comment!   I would like to get back to the key authentication topic but for now, I'd like to find out why I'm getting the:
 rsync error: error starting client-server protocol (code 5) at main.c(1308) [receiver=2.6.8]
error.  

I'm quite positive I'm entering the password correctly when prompted.  
0
 
woolnoirCommented:
Just checking that the "::" on your command line is intentional ?
0
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
gfdosCommented:
That is a standard error message you get when rsync doesn't respond on the port rsync uses.
In this case Its probably because authentication failed and if you fix that it should make this go away, but it could also be that the port isnt going through because of a firewall or port forwarding in your environment.

0
 
joshnya1Author Commented:
Using two colons indicates you are using the native rsync protocol and ports only.
0
 
woolnoirCommented:
does the secrets file at both sides have the correct contents ?
0
 
joshnya1Author Commented:
I beleive so.  Here they are.  

A)
-rw-r-----  1 root root 29 Aug 25 12:07 /etc/rsyncd.secrets

cat /etc/rsyncd.secrets
josh:josh
rsyncuser:password


B)
-rw-r-----  1 root root 29 2010-08-25 14:07 /etc/rsyncd.secrets

cat /etc/rsyncd.secrets
josh:josh
rsyncuser:password
0
 
joshnya1Author Commented:
From the rsysc.log files.....

Can someone help interpret them for me and suggest a fix/solution?   I've identified in bold the particular interesting ones (to me) but I'm not sure if that is what's the root cause of my problem.  
 
2010/08/30 06:41:31 [7718] rsyncd version 2.6.8 starting, listening on port 873
2010/08/30 06:41:31 [7718] Unknown Parameter encountered: "user auth"
2010/08/30 06:41:31 [7718] IGNORING unknown parameter "user auth"
2010/08/30 06:41:31 [7718] rsyncd registering 6 services with slpd for -1 seconds:
2010/08/30 06:41:31 [7718] service:rsync://####.#######.local:873/notes
2010/08/30 06:41:31 [7718] service:rsync://####.#######.local:873/profiles
2010/08/30 06:41:31 [7718] service:rsync://####.#######.locall:873/users
2010/08/30 06:41:31 [7718] service:rsync://####.#######.locall:873/data
2010/08/30 06:41:31 [7718] service:rsync://####.#######.local:873/av_dat
2010/08/30 06:41:31 [7718] service:rsync://####.#######.local:873/all
2010/08/30 06:41:31 [7718] bind() failed: Address already in use (address-family 2)
2010/08/30 06:41:31 [7718] socket(10,1,6) failed: Address family not supported by protocol
2010/08/30 06:41:31 [7718] unable to bind any inbound sockets on port 873
2010/08/30 06:41:31 [7718] rsync error: error in socket IO (code 10) at socket.c(492) [receiver=2.6.8]
2010/08/30 07:01:34 [3758] rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(260) [receiver=2.6.8]
2010/08/30 07:01:34 [7774] Unknown Parameter encountered: "user auth"
2010/08/30 07:01:34 [7774] IGNORING unknown parameter "user auth"


0
 
woolnoirCommented:
do you have something else running on the port rsyncd uses ? a common issue is NFS D, try stopping NFS and restarting rsyncD on both machines.. see if that helps any.
0
 
woolnoirCommented:
you should be able to run a

netstat -a --inet --programs

to check whats running on what ports
0
 
woolnoirCommented:
doing a little more research, it seems we could be onto something. If you have a competing process (it could be xinetd sometimes) for the tcp port 873 then the rsyncd has issues starting. In that event it can manifest itself with the error youre seeing.

Try looking whats bound to port 873 on both machines and get back to us, i'd suspect it will be rsyncd on one machine - and something else on the other.
0
 
joshnya1Author Commented:
NFS is not running and....

netstat -a --inet | grep 873
returns nothing on either machine A or B. (rsync uses 873)




0
 
gfdosCommented:
what does the "clean" log file look like from the other side when you do a rsync that is successful?
0
 
joshnya1Author Commented:
How do I tell which service is bound to port 873?  
0
 
woolnoirCommented:
>How do I tell which service is bound to port 873?  

netstat -a --inet --programs

or check the xinetd.conf file.
0
 
joshnya1Author Commented:
here are the netstat outputs.  don't see anything unusual do you?
tacnetstat.txt
stpcnetstat.txt
0
 
joshnya1Author Commented:
I have the rsync working from B --> A now.   I recreatd a brand new secrets file and it started working.  

I'm still challenged for a password when manually running rsync from B --> A.   (Don't have to enter password from A ---> B.

Advice?
0
 
gfdosCommented:
you showed line:
2010/08/30 06:41:31 [7718] Unknown Parameter encountered: "user auth"
2010/08/30 06:41:31 [7718] IGNORING unknown parameter "user auth"

in the log file.... does the same line come up anymore? does that come up at all in the "clean" log file?
0
 
joshnya1Author Commented:

Yes, I still get prompted to enter a password manually.   Once I enter it, the connection begins to transfer the files and the log file reports with the two lines above.  

If I do an A --> B transfer, no password, no error and I can schedule the job so it fires off automatically.   Don't know why B --> A doesn't work automatically.

What can I look at?  
0
 
gfdosCommented:
so the "user auth" parameter is valid for one server but not for the other?

Check the config for that line on both servers.... is it identical?
Are you using two diferent versions of rsync?
0
 
joshnya1Author Commented:
Yes the rsync.conf file is the exact same on both sides.   Where else does the rsync authentication take place?
0
 
joshnya1Author Commented:
Never did find a good answer. We don't have the Linux servers anymore now.
0
 
joshnya1Author Commented:
There were no answers.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 12
  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now