PDA

View Full Version : rsync help


SiteWorksUser
01-09-2008, 11:54 AM
I have setup an rsync daemon and it is running. But, I am not able to connect to it form local desktop systems (win/linux). If I try to connect from the same server running the daemon, it works.

For e.g., getting the module list doesn't work.


C:\rsync>rsync --port=1983 64.27.0.243::
rsync: failed to connect to 64.27.0.243: Connection timed out (116)
rsync error: error in socket IO (code 10) at clientserver.c(104) [receiver=2.6.9]


Even if I remove the --port=1983 (which is required), the error returned is same as above. I don't see any entries for the connect attempts for these on the rsync daemon log, so guessing it doesn't even gets to the server.

I initially thought the firewall was blocking under windows, but I tested it with a live linux boot cd (damn small linux) and the error returned is same.

Can somebody run the above command and let me know the result?

Thanks.


PS: I am just a novice with rsync.

SiteWorksUser
01-11-2008, 09:11 AM
Anybody???

IWorx-Socheat
01-11-2008, 09:37 AM
Is it possible the server 64.27.0.243 has port 1983 firewalled as well, preventing incoming connections?

SiteWorksUser
01-15-2008, 10:16 PM
Yes, that was the reason. My host as opened up that port on the firewall and it finally works now. :)

Thanks socheat.

SiteWorksUser
01-15-2008, 10:18 PM
One more problem. I am not able to authenticate with the module. If I remove the authenticatin (auth users =) for the module then I could get the files.

C:\rsync>rsync --port=1983 64.27.0.243::just
@ERROR: auth failed on module just
rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiver=2.6.9]

I have assigned the password (just1234) to the RSYNC_PASSWORD environment variable on the desktop.


The secrets file on server looks like this:

xxx:xxxx
xxx:xxxx
jus:just1234

And the module on the conf file is like this:

[just]
path = /home/xxxxx/just
list = true
auth users = xxx, xxxxxxx, jus
strict modes = false
secrets file = /home/xxxxx/rsyncd.secrets


Any help?
Thanks.

SiteWorksUser
01-15-2008, 10:47 PM
This is on the rsyncd.log.

2008/01/15 20:06:40 [8287] auth failed on module just from UNKNOWN (xxx.xxx.xxx.xxx): unauthorized user


But I read in the rsync documentation that

The usernames do not need to exist on the local system. The usernames may also contain shell wildcard characters.



PS: BTW, it is not asking for any username. It only asks for a password (if password is not passed via ENV var). Anything worng here?

WebXtrA
01-17-2008, 09:23 PM
Is rsync installed on the remote system?

SiteWorksUser
01-18-2008, 07:44 PM
rsync daemon runs on the server 64.27.0.243 (probably the server was down until now). I have put the rsync daemon on the .bash_profile and so it has started and running now.


This works.

C:\rsync>rsync --port=1983 64.27.0.243::
just
C:\rsync>



But, this doesn't

rsync --port=1983 64.27.0.243::just
Password:just1234
@ERROR: auth failed on module just
rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiver=2.6.9]


If I have the password on the RSYNC_PASSWORD env variable, it doesn't ask for password but the error is same. And if I try to pass it via --password-file, it says permission denied.

Any clue what might be the cause?

And, thanks for WebXtra.


PS: normally it would ask for the user name or not? The rsync.exe 2.6.9 I have (cwRsync) doesn't ask me.

WebXtrA
01-18-2008, 09:01 PM
Well for linux I know it never asks for an user name, it just takes the same user name as you are logged in as on this system (other system is the remote system) and asks for a password.

In linux you would connect like this to rsync everything to the map where you are in on this system:
rsync -va user@123.456.789.1:/map/to/rsync/from/* ./


And, thanks for WebXtra.

glad I could help.

SiteWorksUser
01-19-2008, 05:22 AM
rsync -va user@123.456.789.1:/map/to/rsync/from/* ./

It's the user@ part that I missed, and it now works.


C:\rsync>set rsync_password=just1234
C:\rsync>rsync --port=1983 jus@64.27.0.243::just
drwxrwsr-x 4096 2008/01/15 11:56:37 .
-rw-rw-r-- 15 2008/01/15 11:56:37 just.txt


glad I could help.
And, thanks once again.