Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only sync when launch after upgrade to 10.15.1 #587

Closed
erichuang1994 opened this issue Dec 13, 2019 · 12 comments · Fixed by #615
Closed

Only sync when launch after upgrade to 10.15.1 #587

erichuang1994 opened this issue Dec 13, 2019 · 12 comments · Fixed by #615

Comments

@erichuang1994
Copy link

No description provided.

@nikbrain
Copy link

have the same problem

@motoronik
Copy link

motoronik commented Dec 18, 2019

I have too this problem. Files are synchronized once, after running lsyncd.
I think the problem with inotify, because in the logs I see it.

sudo lsyncd PATH_TO_CONF

Log file: lsyncd.log


Wed Dec 18 15:01:43 2019 Normal: --- Startup, daemonizing ---
Wed Dec 18 15:01:43 2019 Normal: recursive startup rsync: PATH_TO_PROJECT_1 -> PATH_TO_REMOTE_MACHINE
.idea
.git
Wed Dec 18 15:01:44 2019 Normal: Startup of "/Users/r.nikolin/Projects/billing/" finished: 0


Log file: lsyncd.status


Lsyncd status report at Wed Dec 18 14:59:07 2019

Sync1 source=PATH_TO_PROJECT_1
There are 0 delays
Filtering:
nothing.

Inotify watching 0 directories


@stygiansabyss
Copy link

I have been seeing the same thing. I am using ssh to handle this, but i see the same thing in the status log with nothing being watched. I have yet to find anything that has made any change whatsoever.

@AleksShirokov
Copy link

Have the same problem as well right after updating to 10.15.3 (Catalina).

Tried a bunch of things including giving rsync , lsyncd access to File System, removing all filtering options, changing target directories. Nothing worked

@lightAfire
Copy link

has the same problem

@axkibe
Copy link
Collaborator

axkibe commented Mar 13, 2020

Honestly I dropped OSX support for quite a while now. Sorry. If someone wants to do this, he or she has to fork this project.

@axkibe axkibe closed this as completed Mar 13, 2020
@stef1205
Copy link

I noticed that 10.15.3 is adding "/System/Volumes/Data" as prefix to the path returned by fsevents.

So this issue can be fixed by removing this prefix in fsevents.c / handle_event

Works fine in 10.15 after that

@danieljl
Copy link

Hi @stef1205, can you share the changes you made?

@stef1205
Copy link

stef1205 commented Jun 12, 2020 via email

@DylanFouche
Copy link

DylanFouche commented Sep 1, 2020

Hey @stef1205 (or @danieljl ) could you please make these changes public? I am facing the same issue as I'm sure many people are. Alternatively, if you share the changes with me, I'd be happy to open a pull request.

@DylanFouche
Copy link

Note: I managed to resolve this issue on 10.15.6 without touching source code by simply prepending "/System/Volumes/Data/" to the source path defined in my config file.

@stef1205
Copy link

stef1205 commented Sep 3, 2020

Hello Dylan,

My solution was to get rid of "/System/Volumes/Data" in fsevents.c:

if (etype) {
	if (!path) {
		printlogf(L, "Error", "Internal fail, fsevents, no path.");
		exit(-1);
	}
	if (isdir < 0) {
		printlogf(L, "Error", "Internal fail, fsevents, neither dir nor file.");
		exit(-1);
	}
	load_runner_func(L, "fsEventsEvent");
	lua_pushstring(L, etype);
	lua_pushboolean(L, isdir);
	l_now(L);
	if (!strncmp( path, "/System/Volumes/Data", 20)) {
		path += 20;
	}
	lua_pushstring(L, path);
	if (trg) {
		if ( !strncmp( trg, "/System/Volumes/Data", 20 )) {
			trg += 20;
		}
		lua_pushstring(L, trg);
	} else {
		lua_pushnil(L);
	}

 	if (lua_pcall(L, 5, 0, -7)) {
		exit(-1); // ERRNO
	}
	lua_pop(L, 1);
}

}

ajdavis added a commit to ajdavis/lsyncd that referenced this issue Sep 25, 2020
Apparently, beginning with macOS 10.15 Catalina, fsevent paths are prefixed
with "/System/Volumes/Data". Remove it to restore event notification feature
on macOS.

Fixes lsyncd#587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants