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

on Linux, cells-sync can't be started using an absolute or $PATH command-line #48

Open
jqueuniet opened this issue Oct 20, 2022 · 3 comments

Comments

@jqueuniet
Copy link

Apparently, cells-sync tries to guess its own absolute path to execute a second process and fails to do it properly in some cases. Only a relative path command seems to work as expected for me.

using $PATH:

❯ cells-sync start
2022-10-20T08:22:44.307+0200	INFO	profiler	Exposing debug profiles for process 15545 on port 6060

2022-10-20T08:22:44.307+0200	INFO	update.service	Starting Updater Service
2022-10-20T08:22:44.307+0200	INFO	sync-task	Starting Sync Service
2022-10-20T08:22:44.307+0200	INFO	scanner	Use 'quit' or Ctrl+C to exit, type 'resync', 'dry', 'loop' to control syncs, 'pause' or 'resume'
2022-10-20T08:22:44.307+0200	INFO	systray	Starting sub-process with args systray --url http://localhost:3636
2022-10-20T08:22:44.307+0200	INFO	http-server	Starting HttpServer on localhost:3636
2022-10-20T08:22:44.308+0200	ERROR	systray	Error on sub process : fork/exec /home/johann/cells-sync: no such file or directory
2022-10-20T08:22:44.309+0200	INFO	systray	Starting sub-process with args systray --url http://localhost:3636
2022-10-20T08:22:44.309+0200	INFO	supervisor	cells-sync: Failed service '&control.SpawnedService{name:"systray", args:[]string{"systray", "--url", "http://localhost:3636"}, cancel:(context.CancelFunc)(nil), logCtx:(*context.valueCtx)(0xc0000d12f0)}' (1.000000 failures of 5.000000), restarting: true, error: fork/exec /home/johann/cells-sync: no such file or directory, stacktrace: goroutine 69 [running]:
github.com/thejerf/suture.(*Supervisor).runService.func1.1()
	/home/teamcity/go/pkg/mod/github.com/thejerf/[email protected]+incompatible/supervisor.go:636 +0x85
panic({0x1184040, 0xc0000d15c0})
	/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/pydio/cells-sync/control.(*SpawnedService).Serve(0xc0001eb940)
	/opt/teamcity/agent/work/8ededc074aff6ace/src/cells-sync/control/spawned-service.go:65 +0x3f6
github.com/thejerf/suture.(*Supervisor).runService.func1()
	/home/teamcity/go/pkg/mod/github.com/thejerf/[email protected]+incompatible/supervisor.go:643 +0xaf
created by github.com/thejerf/suture.(*Supervisor).runService
	/home/teamcity/go/pkg/mod/github.com/thejerf/[email protected]+incompatible/supervisor.go:631 +0xa5

using an absolute path:

❯ /usr/local/bin/cells-sync start
2022-10-20T08:27:48.700+0200	INFO	update.service	Starting Updater Service
2022-10-20T08:27:48.700+0200	INFO	sync-task	Starting Sync Service
2022-10-20T08:27:48.700+0200	INFO	scanner	Use 'quit' or Ctrl+C to exit, type 'resync', 'dry', 'loop' to control syncs, 'pause' or 'resume'
2022-10-20T08:27:48.700+0200	INFO	systray	Starting sub-process with args systray --url http://localhost:3636
2022-10-20T08:27:48.700+0200	INFO	profiler	Exposing debug profiles for process 15752 on port 6060

2022-10-20T08:27:48.700+0200	INFO	http-server	Starting HttpServer on localhost:3636
2022-10-20T08:27:48.700+0200	ERROR	systray	Error on sub process : fork/exec /home/johann/usr/local/bin/cells-sync: no such file or directory
2022-10-20T08:27:48.700+0200	INFO	sync-task	fs:///home/johann/Cells is now connected
2022-10-20T08:27:48.700+0200	INFO	supervisor	cells-sync: Failed service '&control.SpawnedService{name:"systray", args:[]string{"systray", "--url", "http://localhost:3636"}, cancel:(context.CancelFunc)(nil), logCtx:(*context.valueCtx)(0xc00074f1d0)}' (1.000000 failures of 5.000000), restarting: true, error: fork/exec /home/johann/usr/local/bin/cells-sync: no such file or directory, stacktrace: goroutine 94 [running]:
github.com/thejerf/suture.(*Supervisor).runService.func1.1()
	/home/teamcity/go/pkg/mod/github.com/thejerf/[email protected]+incompatible/supervisor.go:636 +0x85
panic({0x1184040, 0xc000670810})
	/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/pydio/cells-sync/control.(*SpawnedService).Serve(0xc0007581c0)
	/opt/teamcity/agent/work/8ededc074aff6ace/src/cells-sync/control/spawned-service.go:65 +0x3f6
github.com/thejerf/suture.(*Supervisor).runService.func1()
	/home/teamcity/go/pkg/mod/github.com/thejerf/[email protected]+incompatible/supervisor.go:643 +0xaf
created by github.com/thejerf/suture.(*Supervisor).runService
	/home/teamcity/go/pkg/mod/github.com/thejerf/[email protected]+incompatible/supervisor.go:631 +0xa5

using a relative command

❯ ../../../usr/local/bin/cells-sync start
2022-10-20T08:30:45.309+0200	INFO	scanner	Use 'quit' or Ctrl+C to exit, type 'resync', 'dry', 'loop' to control syncs, 'pause' or 'resume'
2022-10-20T08:30:45.309+0200	INFO	update.service	Starting Updater Service
2022-10-20T08:30:45.309+0200	INFO	sync-task	Starting Sync Service
2022-10-20T08:30:45.310+0200	INFO	systray	Starting sub-process with args systray --url http://localhost:3636
2022-10-20T08:30:45.309+0200	INFO	http-server	Starting HttpServer on localhost:3636
2022-10-20T08:30:45.309+0200	INFO	profiler	Exposing debug profiles for process 16037 on port 6060

2022-10-20T08:30:45.310+0200	INFO	sync-task	fs:///home/johann/Cells is now connected
2022-10-20T08:30:45.383+0200	INFO	systray	2022-10-20T08:30:45.383+0200	INFO	systray	Opened WS Connection

Observed using both bash and fish.

@jqueuniet
Copy link
Author

Forgot to mention, this behavior happens using both cells-sync 0.9.2 and 0.9.3-dev.202210191531

@jqueuniet
Copy link
Author

Similar issue when starting the GUI from the systray, but even the earlier relative command does not work there.

❯ ../../../usr/local/bin/cells-sync start
[...]
2022-10-20T23:27:40.887+0200	INFO	systray	2022-10-20T23:27:40.887+0200	ERROR	systray	Error while starting WebView - Opening in browser instead: fork/exec /home/johann/usr/local/bin/cells-sync: no such file or directory

Only thing that works at this point is to cwd to the cells-sync directory and execute it using a local relative command.

❯ cd /usr/local/bin/

/usr/local/bin🔒
❯ ./cells-sync start
[...]

@MnlPhlp
Copy link

MnlPhlp commented Oct 21, 2022

I have the same problem.

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

No branches or pull requests

2 participants