perlundq/yajsync

Support for MaxOS X rsync

Closed this issue · 5 comments

On MacOS X, I'm trying to run:

rsync ~/tmp/test rsync://127.0.0.1:14415/Uploads

I'm getting back an error and this message on server side:

déc. 28, 2015 7:37:39 PM com.github.perlundq.yajsync.client.YajSyncServer$8 call
GRAVE: 
com.github.perlundq.yajsync.session.RsyncProtocolException: Unsupported protocol version: @RSYNCD: 29
    at com.github.perlundq.yajsync.session.SessionConfig.receivePeerVersion(SessionConfig.java:174)
    at com.github.perlundq.yajsync.session.SessionConfig.exchangeProtocolVersion(SessionConfig.java:93)
    at com.github.perlundq.yajsync.session.ServerSessionConfig.handshake(ServerSessionConfig.java:100)
    at com.github.perlundq.yajsync.RsyncServer.serve(RsyncServer.java:95)
    at com.github.perlundq.yajsync.client.YajSyncServer$8.call(YajSyncServer.java:221)
    at com.github.perlundq.yajsync.client.YajSyncServer$8.call(YajSyncServer.java:198)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Is MacOS supported?

Thanks!

yajsync supports only rsync protocol version 30.0, and it seems like the default rsync in OS X is pretty old (check with rsync --version). It's pretty messy to add support for older versions of the protocol in yajsync. I suggest installing rsync with homebrew http://brew.sh/, see for example: http://zaiste.net/2012/07/brand_new_rsync_for_osx/. Hopefully that version uses procotol >= 30

Seems like it's not :( But thanks for the idea. I should have think about brew!

$ rsync --version
rsync  version 2.6.9  protocol version 29
Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
              inplace, IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

I also tried:

rsync --port=14415 ~/tmp/test rsync://127.0.0.1:14415/Uploads --protocol=30

But it also fails:

déc. 29, 2015 8:40:03 AM com.github.perlundq.yajsync.client.YajSyncServer$8 call
GRAVE: 
com.github.perlundq.yajsync.session.RsyncProtocolException: Unsupported protocol version: @RSYNCD: 30
    at com.github.perlundq.yajsync.session.SessionConfig.receivePeerVersion(SessionConfig.java:174)
    at com.github.perlundq.yajsync.session.SessionConfig.exchangeProtocolVersion(SessionConfig.java:93)
    at com.github.perlundq.yajsync.session.ServerSessionConfig.handshake(ServerSessionConfig.java:100)
    at com.github.perlundq.yajsync.RsyncServer.serve(RsyncServer.java:95)
    at com.github.perlundq.yajsync.client.YajSyncServer$8.call(YajSyncServer.java:221)
    at com.github.perlundq.yajsync.client.YajSyncServer$8.call(YajSyncServer.java:198)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

2.6.9 is really old, are you sure you are using the homebrew version of rsync there?

Anyway, regarding forcing protocol 30, it seems like 2.6.9 and earlier sent the version string as an integer, and this should definitely be handled by yajsync without throwing an exception (although 2.6.9 only supports version 29 so this invocation would not work anyway).

Hmmm. Good catch. Incorrect path!
Closing as it's fixable by upgrading rsync on MacOS.

Thanks!