Error: Failed to start unison container in time
Error
when running docker-sync-stack start I always get Failed to start unison container in time error (see end of post for full log).
I tried to git clone the docker-sync-boilerplate to try and have the same issue with the unison boilerpate.
I tried to increase max_attempt as error says, but it doesn't seem to help.
Interesting note: On my project I get the same error, but when starting a second time the log says the unison container is already running, restarting, and then the same error happens:
docker-lereglement git:(master) ✗ docker-sync start
ok Starting unison for sync lr-web-sync
ok lr-web-sync container still running, restarting unison in container
[...]
Docker Driver
Docker version 17.09.0-ce, build afdb6d4
Sync strategy
unison
your docker-sync.yml
version: '2'
syncs:
lr-web-sync:
src: './le_reglement'
sync_excludes_type: 'none'
sync_excludes: [ 'Name .git', 'Path .idea', 'Path tmp', 'Path log' ]
sync_strategy: 'unison'
lr-bundle-sync:
src: './bundle'
sync_strategy: 'unison'
lr-static-sync:
src: '../static'
sync_strategy: 'unison'
OS
macOS High Sierra
copy paste of exact error
unison git:(master) docker-sync-stack start
note: You can also run docker-sync in the background with docker-sync start
ok Starting unison for sync appcode-unison-sync
ok appcode-unison-sync container not running
ok creating appcode-unison-sync container
command docker run -p '127.0.0.1::5000' -v appcode-unison-sync:/app_sync -e VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} -e UNISON_EXCLUDES="-ignore='Name ignored_folder' -ignore='Name .ignored_dot_folder'" --name appcode-unison-sync -d eugenmayer/unison
ok starting initial sync of appcode-unison-sync
command docker inspect --format='{{(index (index .NetworkSettings.Ports "5000/tcp") 0).HostPort}}' appcode-unison-sync
command unison -testserver /app_sync "socket://127.0.0.1:32772"
/Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_strategy/unison.rb:192:in `block in start_container': Failed to start unison container in time, try to increase max_attempt (currently 5) in your configuration. See https://github.com/EugenMayer/docker-sync/wiki/2.-Configuration for more informations (RuntimeError)
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_strategy/unison.rb:187:in `loop'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_strategy/unison.rb:187:in `start_container'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_strategy/unison.rb:38:in `run'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_process.rb:85:in `run'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_manager.rb:107:in `block in run'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_manager.rb:106:in `each'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/lib/docker-sync/sync_manager.rb:106:in `run'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/tasks/stack/stack.thor:46:in `start'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.1/bin/docker-sync-stack:15:in `<top (required)>'
from /usr/local/bin/docker-sync-stack:22:in `load'
from /usr/local/bin/docker-sync-stack:22:in `<main>'
@EugenMayer any idea?
no, this rings no bell - but i am not using unison for nearly one year and yet we did not have those reports from other users using unison. try search the issue queue probably
which sync strategy to you recommend instead?
@Jauny default, means native_osx
@Jauny I had the similar problem with unison strategy. But was solved by upgrading docker to Version 17.12.0-ce and docker sync version to 0.5.2.
thank you! I've migrated to using native_osx and this works for me!
On Thu, Dec 21, 2017 at 10:24 AM Rajat Arora [email protected] wrote:
@Jauny https://github.com/jauny I had the similar problem with unison strategy. But was solved by upgrading docker to Version 17.12.0-ce and docker sync version to 0.5.2.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EugenMayer/docker-sync/issues/508#issuecomment-353301192, or mute the thread https://github.com/notifications/unsubscribe-auth/ABo9AOMTV7_vT01_3WfjnL4DD9xGFRAIks5tCiPKgaJpZM4QxQiS .
i am closing this issue since upgrade to the latest versions seems to fix it. Thank you
I am getting this issue on windows after upgrading docker to 18.03.0-ce and docker-sync to 0.5.6
Update: This issue may be due to me having an outdated version of unison. I am update it once I install latest suggested version of unison.
Update 2: Upgrading unison & ocaml to specified versions fixed it.
you should look into docker-compose. Not sure docker-sync is still needed.
On Fri, Mar 30, 2018 at 4:23 PM Ankit Shah [email protected] wrote:
I am getting this issue on windows after upgrading docker to 18.03.0-ce and docker-sync to 0.5.6
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EugenMayer/docker-sync/issues/508#issuecomment-377534909, or mute the thread https://github.com/notifications/unsubscribe-auth/ABo9AI1POonQtgU7qKhjbKMJdSNCFfyFks5tjj_ngaJpZM4QxQiS .
@Jauny thanks for the suggestion. I will see if latest nfs changes have improved performance enough not to have to use docker-sync.
@akshah123 I have the same problem. Can you tell which version of unison and ocaml fixed the problem? My setup is:
ocaml 4.06.0 unison 2.51.2
@Olgagr it was just the versions your mentioned here. Basically I ensured my setup matched exactly to the docs here: https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html#installation-windows
That said, this was a while ago and I am not using this setup now so can't say if it will still work.
@akshah123 Thanks for the answer. I was trying to setup this on Windows Subsystem for Linux with docker deamon working on VM. The above error was because I needed to run docker-sync as sudo. However, then I had a problem as docker sync didn't see the deamon. Maybe, I have to setup something more for docker sync.