Solved

rsync: error starting client-server protocol message

Posted on 2010-08-30
23
2,064 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
Comment Utility
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
Comment Utility
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
Comment Utility
Just checking that the "::" on your command line is intentional ?
0
 
LVL 3

Expert Comment

by:gfdos
Comment Utility
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
Comment Utility
Using two colons indicates you are using the native rsync protocol and ports only.
0
 
LVL 20

Expert Comment

by:woolnoir
Comment Utility
does the secrets file at both sides have the correct contents ?
0
 

Author Comment

by:joshnya1
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:joshnya1
Comment Utility
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
Comment Utility
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
Comment Utility
How do I tell which service is bound to port 873?  
0
 
LVL 20

Expert Comment

by:woolnoir
Comment Utility
>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
Comment Utility
here are the netstat outputs.  don't see anything unusual do you?
tacnetstat.txt
stpcnetstat.txt
0
 

Author Comment

by:joshnya1
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
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
Comment Utility
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
Comment Utility
Never did find a good answer. We don't have the Linux servers anymore now.
0
 

Author Closing Comment

by:joshnya1
Comment Utility
There were no answers.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now