homepage Welcome to WebmasterWorld Guest from 54.196.196.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
How to trouble-shoot rsync?
No log file + no idea where to start
AlexK




msg:908531
 7:19 pm on Jan 8, 2005 (gmt 0)

Port forwarding (ssh) from Windows XP -> RedHat 8, and trying to use rsync across both.

The port forwarding works fine (substituted :80 for :873 and a browser set to 127.0.0.1:8730 on my winXP-box brought up the site index page).

The XP command-line msg is:
opening tcp connection to 127.0.0.1 port 8730
rsync: connection unexpectedly closed (0 bytes received so far) [sender]

The only Linux msg I can find is:
# tail /var/log/secure
Jan 8 17:01:42 xinetd[11650]: START: rsync pid=11653 from=(localhost)
Jan 8 17:01:42 xinetd[11653]: FAIL: rsync address from=(localhost)

Mine eyes are now red & bleary from searching web pages, but without result.

So, does anyone know, how can I find out why--and at what point--rsync chocked?

 

john316




msg:908532
 7:34 pm on Jan 8, 2005 (gmt 0)

Do you have any spaces in the destination address?

It doesnt like /volume/c/my stuff

try

/volume/c/mystuff

Of course you will also have to rename the destination directory.

AlexK




msg:908533
 4:02 am on Jan 9, 2005 (gmt 0)

john316:
Do you have any spaces in the destination address?

None, neither on the client winXP box (src) nor server (dest).

The point is: what steps can I take to trouble-shoot this problem? The command line uses ---progress -vvvvv to trace it there, but there is nothing in the linux log, so no means of knowing at what point it stalled.

I have only spent a week full-time on this... Jehosephat!

john316




msg:908534
 4:32 am on Jan 9, 2005 (gmt 0)

Are you trying to back up a remote server?

rsync -avz -e ssh user@whatever.com:/remotedirectory/ /where/you/backup/locally

Works for me.

AlexK




msg:908535
 9:20 am on Jan 9, 2005 (gmt 0)

Are you trying to back up a remote server?

rsync -avz -e ssh user@whatever.com:/remotedirectory/ /where/you/backup/locally


I know that you are trying to help, but I do *not* need advice on the rsync command line. Believe me, after a week I`m pretty good at it now.

I need help on the steps that I can take to troubleshoot rsync on my server (when calling it from home) in the absence of any diagnostic info. There is something wrong with the configuration (my best guess, but who knows?)

py9jmas




msg:908536
 10:49 am on Jan 9, 2005 (gmt 0)

Are you running rsync as a daemon? Why are you using ssh port forwarding? Rsync can use ssh as the transport instead of rsh, and does by default in newer versions.

If you are running rsync as a daemon, try starting the daemon with the --no-detach option so it stays attached to the terminal. Any errors/warning should then appear on the terminal.

I do *not* need advice on the rsync command line

Telling us what command you're using might be helpful.

AlexK




msg:908537
 4:36 am on Jan 10, 2005 (gmt 0)

py9jmas:
Are you running rsync as a daemon?

If you mean as a stand-alone daemon on the server responding to external requests on port 873, no.

Why are you using ssh port forwarding?

It is the recommended way for XP (AFAIK the reason is Firewall problems) (rsync is cwRsync [itefix.no], and I`m following the format of a batch file provided). Remember, the port-forwarding is working. This is the only success that I have had so far!

Rsync can use ssh as the transport instead of rsh, and does by default in newer versions.

The ssh bundled with cwRsync (and Cygwin) is well known for it`s instability on Windows. I have been using PuTTY [chiark.greenend.org.uk] for almost 2 years, and it has proven rock-solid so far. Both XP + Linux rsync (& PuTTY) are latest versions (2.6.3).

I *did* try --rsh="<PuTTY command>", also without success, also without any means of finding out *why* it failed.

If you are running rsync as a daemon, try starting the daemon with the --no-detach option so it stays attached to the terminal. Any errors/warning should then appear on the terminal.

That is helpful.

Telling us what command you're using might be helpful.

rsync -atzn . rsync://root@127.0.0.1:8730/path/on/server --progress -vvvvv

I have a feeling that that will *not* be helpful, but what do I know? Remember, my request was for troubleshooting assistance with rsync on the server. When I know *why* it fails I can do something about it. Hopefully.

Thanks for the attempts to help so far.

AlexK




msg:908538
 6:05 am on Jan 10, 2005 (gmt 0)

AlexK:
Port forwarding (ssh) from Windows XP -> RedHat 8, and trying to use rsync across both.

py9jmas:
If you are running rsync as a daemon, try starting the daemon with the --no-detach option so it stays attached to the terminal. Any errors/warning should then appear on the terminal.

That is helpful.

Well, I *thought* it was helpful, then re-read the man page:

--no-detach:
... This option has no effect if rsync is run from inetd or sshd.

Thanks for trying.

AlexK




msg:908539
 12:03 pm on Jan 10, 2005 (gmt 0)

Well, I got my answer by making a mistake!

The 'Tunnel' command, as inspired by the supplied Windows batch file, had the following format:
start "SSH tunnel" /MIN plink -v -L %LocalHost%:%LocalPort%:%RemoteHost%:%RemotePort% -T -N %RemoteUser%@%PuTTYSession%

The important part here was the `-T -N` (no pseudo-terminal, no remote command). Whilst wildly trying different combinations I knocked off the -N and, out-of-the-blue, started receiving back error messages from the server:

rsync -atzn . rsync://root@127.0.0.1:8730:/path/on/server --progress -vvvvv
opening tcp connection to 127.0.0.1 port 8730
@ERROR: Unknown module 'path'
(Client) Protocol versions: remote=28, negotiated=28
rsync: connection unexpectedly closed (0 bytes received so far) [sender]

I`ve never been so happy to receive an error msg! A rapidly-created module in rsyncd.conf + new command line:
rsync -atzn . rsync://root@127.0.0.1:8730:module/new/path/on/server --progress -vvvvv
...
(vast numbers of lines from the server)

Phew! Only a full-time week to sort it. Now it was working I re-added the `-N`, and it still worked fine (it was only stopping the error msgs coming back).

There are still questions:

    an ssh-launched rsync is not supposed to read rsyncd.conf - how come it does?
    an ssh-launched rsync is not supposed to be launched by xinetd - how come it is?

...and so on. But now I can fine-tune. The Samba people *really* need to get their documentation sorted.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved