Welcome to WebmasterWorld Guest from 54.159.246.164

Forum Moderators: bakedjake

Message Too Old, No Replies

How to trouble-shoot rsync?

No log file + no idea where to start

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

WebmasterWorld Senior Member 10+ Year Member



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?

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

WebmasterWorld Senior Member 10+ Year Member



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.

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

WebmasterWorld Senior Member 10+ Year Member



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!

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

WebmasterWorld Senior Member 10+ Year Member



Are you trying to back up a remote server?

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

Works for me.

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

WebmasterWorld Senior Member 10+ Year Member



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?)

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

10+ Year Member



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.
4:36 am on Jan 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.

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

WebmasterWorld Senior Member 10+ Year Member



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.

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

WebmasterWorld Senior Member 10+ Year Member



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.