Sync Errors to Synology NAS

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Sync Errors to Synology NAS Sun Apr 16, 2017 3:58 am • by ghickman
I have a Hazel rule set up to sync a local directory to an AFP share hosted on a Synology NAS that is producing errors recently (I think this is post upgrade to Sierra but I don't have any hard evidence of that).

I've created a new local folder ($HOME/docs-test), a new share on the NAS (/Volumes/DocsTest), and am even testing these on a different machine and still getting the same error.

The directory structure of docs-test looks like this:
Code: Select all
$ tree
.
└── foo
    ├── bar
    │   └── herp
    │       ├── derp
    │       │   └── finn
    │       └── foobar
    └── qux1


The Hazel rules are set up like so (based on the recipe here https://www.noodlesoft.com/forums/viewtopic.php?f=4&t=1593):

Image

The NAS share is set up to give my user full read/write permissions and AFP share is connected with the same credentials.

I get this in the logs:
Code: Select all
2017-04-16 08:13:34.960 hazelworker[3353] Processing folder docs-test
2017-04-16 08:13:34.960 hazelworker[3353] DEBUG: Pausing to wait for things to settle down.
2017-04-16 08:13:36.965 hazelworker[3353] DEBUG: Processing directories: (
    "/Users/george/docs-test"
)
2017-04-16 08:13:36.969 HazelHelper[2995] DEBUG: Checking events for path /Users/george/docs-test, folder docs-test
2017-04-16 08:13:36.970 hazelworker[3353] DEBUG: Received file event: {
    date = "2017-04-16 07:13:34 +0000";
    path = "<ComNoodlesoft_NoodlePathSet: 0x7f9978404a80>\n  /Users/george/docs-test : 18446744073709551615\n";
}
2017-04-16 08:13:36.970 hazelworker[3353] DEBUG: About to process directory /Users/george/docs-test
2017-04-16 08:13:36.973 hazelworker[3353] foo: Rule Sync to NAS matched.
2017-04-16 08:13:36.973 hazelworker[3353] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{dateModified >[cd] dateMatched OR (dateModified >[cd] dateMatched)}:{(sync:/Volumes/DocsTest,{
})}
2017-04-16 08:13:37.194 hazelworker[3353] DEBUG: == Sync output ==
cd++++++++++ foo/
>f++++++++++ foo/qux
cd++++++++++ foo/bar/
cd++++++++++ foo/bar/herp/
>f++++++++++ foo/bar/herp/foobar
cd++++++++++ foo/bar/herp/derp/
>f++++++++++ foo/bar/herp/derp/finn
rsync(3356,0x7fff9f2b73c0) malloc: *** error for object 0x7fac52401530: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
rsync: connection unexpectedly closed (74 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]

== End sync output ==
2017-04-16 08:13:37.195 hazelworker[3353] [Error] Could not sync file/folder: Could not sync file/folder at foo to /Volumes/DocsTest/foo.
2017-04-16 08:13:37.196 hazelworker[3353] Sync returned error status: 12
2017-04-16 08:13:37.196 hazelworker[3353] DEBUG: Tapping error retry sequence
2017-04-16 08:13:37.197 hazelworker[3353] DEBUG: Writing out DB file: /Users/george/docs-test
2017-04-16 08:13:37.197 hazelworker[3353] DEBUG: Directory /Users/george/docs-test processed in 0.227232 seconds
2017-04-16 08:13:37.200 HazelHelper[2995] DEBUG: Checking events for path /Users/george/docs-test, folder docs-test
2017-04-16 08:13:37.201 hazelworker[3353] DEBUG: Sleeping


It seems to me there's an error with rsync talking to the NAS, is this something I need to fix on the NAS? I've tried manually rsyncing local files to the AFP share without issue but I suspect I'm not fully recreating the rsync command you use.
ghickman
 
Posts: 2
Joined: Sun Apr 16, 2017 3:34 am

Re: Sync Errors to Synology NAS Mon Apr 17, 2017 10:44 am • by Mr_Noodle
Have you tried syncing that specific set of files manually? Also, try having Hazel sync those files to another local destination and see if it behaves any differently there.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Sync Errors to Synology NAS Sun Oct 08, 2017 9:06 am • by ghickman
Have you tried syncing that specific set of files manually?


Could you elaborate on what you mean by this? (I can copy them over via Finder to the AFP share, if that that helps) I've also tested this via an NFS share and it has the same error message.

try having Hazel sync those files to another local destination


I tried this with a folder on my local machine and it worked as expected.

Digging in further with my NAS it looks like rsync is transferring the files with the local username. While this is the same username label as I use on the NAS it isn't registered as the same user so the files end up with owner/group permissions of 501/20.

I currently have a working solution using Copy instead of Sync for anyone looking for a quick work around.
ghickman
 
Posts: 2
Joined: Sun Apr 16, 2017 3:34 am


Return to Support