Solved

rsync: error starting client-server protocol message

Posted on 2010-08-30
23
2,151 Views
Last Modified: 2012-05-10
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
Comment
Question by:joshnya1
  • 12
  • 7
  • 4
23 Comments
 
LVL 20

Expert Comment

by:woolnoir
ID: 33558098
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
 

Author Comment

by:joshnya1
ID: 33558220
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
 
LVL 20

Expert Comment

by:woolnoir
ID: 33558244
Just checking that the "::" on your command line is intentional ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:gfdos
ID: 33558536
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
 

Author Comment

by:joshnya1
ID: 33558593
Using two colons indicates you are using the native rsync protocol and ports only.
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 33558761
does the secrets file at both sides have the correct contents ?
0
 

Author Comment

by:joshnya1
ID: 33558798
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
 

Author Comment

by:joshnya1
ID: 33559117
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
 
LVL 20

Expert Comment

by:woolnoir
ID: 33559141
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
 
LVL 20

Expert Comment

by:woolnoir
ID: 33559182
you should be able to run a

netstat -a --inet --programs

to check whats running on what ports
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 33559200
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
 

Author Comment

by:joshnya1
ID: 33559275
NFS is not running and....

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




0
 
LVL 3

Expert Comment

by:gfdos
ID: 33559460
what does the "clean" log file look like from the other side when you do a rsync that is successful?
0
 

Author Comment

by:joshnya1
ID: 33560100
How do I tell which service is bound to port 873?  
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 33560703
>How do I tell which service is bound to port 873?  

netstat -a --inet --programs

or check the xinetd.conf file.
0
 

Author Comment

by:joshnya1
ID: 33560945
here are the netstat outputs.  don't see anything unusual do you?
tacnetstat.txt
stpcnetstat.txt
0
 

Author Comment

by:joshnya1
ID: 33561927
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
 
LVL 3

Expert Comment

by:gfdos
ID: 33562097
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
 

Author Comment

by:joshnya1
ID: 33562315

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
 
LVL 3

Expert Comment

by:gfdos
ID: 33562773
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
 

Author Comment

by:joshnya1
ID: 33562840
Yes the rsync.conf file is the exact same on both sides.   Where else does the rsync authentication take place?
0
 

Accepted Solution

by:
joshnya1 earned 0 total points
ID: 37697722
Never did find a good answer. We don't have the Linux servers anymore now.
0
 

Author Closing Comment

by:joshnya1
ID: 37713721
There were no answers.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question