You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start docker-sync for the first time after I run docker, I got following error:
docker-sync start
ok Starting native_osx for sync my-project-sync
ok my-project-sync container not running
ok starting my-project-sync container
command docker start my-project-sync && docker exec my-project-sync supervisorctl restart unison
my-project-sync
unix:///tmp/supervisor.sock no such file
/Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/lib/docker-sync/sync_strategy/native_osx.rb:105:in `start_container': Start failed (RuntimeError)
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/lib/docker-sync/sync_process.rb:105:in `start_container'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/lib/docker-sync/sync_manager.rb:103:in `block in start_container'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/lib/docker-sync/sync_manager.rb:102:in `each'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/lib/docker-sync/sync_manager.rb:102:in `start_container'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/tasks/sync/sync.thor:181:in `daemonize'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/tasks/sync/sync.thor:47:in `start'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /Users/martin/.local/share/gem/ruby/2.6.0/gems/docker-sync-1.0.5/bin/docker-sync:14:in `<top (required)>'
from /usr/local/bin/docker-sync:23:in `load'
from /usr/local/bin/docker-sync:23:in `<main>'
Problem explained
In https://github.com/EugenMayer/docker-sync/blob/main/lib/docker-sync/sync_strategy/native_osx.rb file is executed command docker start product-catalog-sync && docker exec product-catalog-sync supervisorctl restart unison. Because the first command in not fully completed inside docker, supervisor service is not running and execution of second command docker exec product-catalog-sync supervisorctl restart unison fails, afterwards docker-sync command fails. When I execute this commands separately via terminal with the same conditions (docker is freshly started and nothing is running inside docker), everything works ok.
Possible solution
Put some delay in between this two commands or create a routine to detect, that supervisor service is fully started.
A PR would be great. I would suggest to wait for the lock file to exist for X time (maybe check every 3s, 15 times) and then, if it still does not exist, bail out
igronus
pushed a commit
to igronus/docker-sync
that referenced
this issue
Oct 22, 2024
Problem
When I start
docker-sync
for the first time after I run docker, I got following error:Problem explained
In
https://github.com/EugenMayer/docker-sync/blob/main/lib/docker-sync/sync_strategy/native_osx.rb
file is executed commanddocker start product-catalog-sync && docker exec product-catalog-sync supervisorctl restart unison
. Because the first command in not fully completed inside docker, supervisor service is not running and execution of second commanddocker exec product-catalog-sync supervisorctl restart unison
fails, afterwards docker-sync command fails. When I execute this commands separately via terminal with the same conditions (docker is freshly started and nothing is running inside docker), everything works ok.Possible solution
Put some delay in between this two commands or create a routine to detect, that supervisor service is fully started.
Sync strategy
native_osx
your docker-sync.yml
OS
Monterey 12.6.3, docker-sync 1.0.5, docker 4.16.2, docker engine 20.10.22, docker file sharing implementation: gRPC FUSE
The text was updated successfully, but these errors were encountered: