Here is my docker-sync file:
version: '2'
options:
verbose: true
syncs:
application-sync:
src: './yarn_web'
sync_excludes: ['tmp/cache', 'public/assets', '.git*', '.DS_Store', '._*', '.docker*', 'docker*yml', 'Dockerfile*', 'notes']
sync_userid: '1000'
When I run docker-sync start, then I exec into the container
docker exec -it application-sync bash
then I run ps afux, here is the result:
bash-4.3# ps afux
PID USER TIME COMMAND
1 root 0:01 {supervisord} /usr/bin/python /usr/bin/supervisord
42 root 0:00 bash
49 dockersy 0:00 unison -ignore=Name tmp/cache -ignore=Name public/assets
50 dockersy 0:00 /usr/local/bin/unison-fsmonitor
51 root 0:00 ps afux
bash-4.3# lsof -p 49
1 /usr/bin/python2.7 pipe:[59897]
1 /usr/bin/python2.7 pipe:[59898]
1 /usr/bin/python2.7 pipe:[59899]
1 /usr/bin/python2.7 /tmp/supervisord.log
1 /usr/bin/python2.7 socket:[59288]
1 /usr/bin/python2.7 pipe:[60115]
1 /usr/bin/python2.7 pipe:[60116]
1 /usr/bin/python2.7 /tmp/unison-stdout---supervisor-1CiXlF.log
1 /usr/bin/python2.7 /dev/urandom
42 /bin/bash /dev/pts/0
42 /bin/bash /dev/pts/0
42 /bin/bash /dev/pts/0
42 /bin/bash /dev/pts/0
bash-4.3# cat /tmp/unison-stdout---supervisor-1CiXlF.log
Contacting server...
Looking for changes
Warning: No archive files were found for these roots, whose canonical names are:
/host_sync
/app_sync
This can happen either
because this is the first time you have synchronized these roots,
or because you have upgraded Unison to a new version with a different
archive format.
Update detection may take a while on this run if the replicas are
large.
Unison will assume that the 'last synchronized state' of both replicas
was completely empty. This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.
If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations. See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.
Donations to the Unison project are gratefully accepted:
http://www.cis.upenn.edu/~bcpierce/unison
Reconciling changes
dir ----> .bundle
file ----> .byebug_history
file ----> .env
file ----> Gemfile
file ----> Gemfile.lock
file ----> README.md
file ----> Rakefile
dir ----> app
dir ----> bin
dir ----> config
file ----> config.ru
dir ----> db
dir ----> lib
dir ----> log
dir ----> public
dir ----> test
dir ----> tmp
dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:52:13.70 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:52:34.68 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:52:56.05 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:53:17.94 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:53:40.67 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:54:00.78 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:54:21.76 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
/app_sync folder stay empty, because it's owned by root, while the unison process started by dockersync user with uid 1000.
When I remove sync_userid: '1000' option, the sync worked, but all the files in /app_sync owned by root. My application container need those files owned by user with uid 1000 instead, because the rails app run as non-root user.
Suggestion:
@EugenMayer can the dockersync user use sudo to run unison, or can the /app_sync folder owned by dockersync user by default if sync_userid is set?
Right now, I manually chown the /app_sync folder to make it work.
ah, my bad. I will fix this. Sudo is not the right way, no
ok try
gem uninstall docker-sync
gem install docker-sync --version 0.4.1-beta1
On start, it should also pull the new image for unison:hostsync
And then things should work. Tested it on https://github.com/EugenMayer/docker-sync-boilerplate/tree/master/native_osx_with_user
I just tried 0.4.1-beta1 but it looks like the container won't start:
$ docker-sync --version
0.4.1-beta1
$ docker-sync start
ok Starting native_osx
ok php-oxfam-sync container not running
ok starting php-oxfam-sync container
command docker start php-oxfam-sync && docker exec php-oxfam-sync supervisorctl restart unison
ok starting initial sync of php-oxfam-sync
success Sync container started
success Starting Docker-Sync in the background
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
62d87efdd1a1 codekitchen/dinghy-http-proxy:2.5 "/app/docker-entry..." 9 minutes ago Up 9 minutes 80/tcp, 443/tcp, 19322/tcp, 0.0.0.0:19322->19322/udp dinghy_http_proxy
It didn't appear to pull a new image and there is no running container
@EugenMayer thanks, it's working. A small correction: gem install docker-sync --version 0.4.1-beta1
The only minor problems that I see is the unison process cannot write into /var/log/unison.log and when I run docker logs application-sync it only show this:
no user has uid 1000
Creating mailbox file: No such file or directory
/entrypoint.sh: ignoring /docker-entrypoint.d/*
/usr/lib/python2.7/site-packages/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2017-05-05 18:49:51,517 CRIT Supervisor running as root (no user in config file)
2017-05-05 18:49:51,518 WARN Included extra file "/etc/supervisor.conf.d/supervisor.daemon.conf" during parsing
2017-05-05 18:49:51,537 INFO RPC interface 'supervisor' initialized
2017-05-05 18:49:51,537 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-05-05 18:49:51,537 INFO supervisord started with pid 1
2017-05-05 18:49:51,896 INFO spawned: 'unison' with pid 23
2017-05-05 18:49:51,905 INFO waiting for unison to stop
2017-05-05 18:49:51,907 INFO stopped: unison (terminated by SIGTERM)
2017-05-05 18:49:51,915 INFO spawned: 'unison' with pid 24
2017-05-05 18:49:53,006 INFO success: unison entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
But no logs from unison process. I need to exec into container and see the content of stdout file:
bash-4.3# cat /tmp/unison-stdout---supervisor-1CiXlF.log
Contacting server...
Looking for changes
Warning: No archive files were found for these roots, whose canonical names are:
/host_sync
/app_sync
This can happen either
because this is the first time you have synchronized these roots,
or because you have upgraded Unison to a new version with a different
archive format.
Update detection may take a while on this run if the replicas are
large.
Unison will assume that the 'last synchronized state' of both replicas
was completely empty. This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.
If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations. See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.
Donations to the Unison project are gratefully accepted:
http://www.cis.upenn.edu/~bcpierce/unison
Reconciling changes
dir ----> .bundle
file ----> .byebug_history
file ----> .env
file ----> Gemfile
file ----> Gemfile.lock
file ----> README.md
file ----> Rakefile
dir ----> app
dir ----> bin
dir ----> config
file ----> config.ru
dir ----> db
dir ----> lib
dir ----> log
dir ----> public
dir ----> test
dir ----> tmp
dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:52:13.70 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:52:34.68 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:52:56.05 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:53:17.94 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:53:40.67 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:54:00.78 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
Reconciling changes
new dir ----> .bundle
new file ----> .byebug_history
new file ----> .env
new file ----> Gemfile
new file ----> Gemfile.lock
new file ----> README.md
new file ----> Rakefile
new dir ----> app
new dir ----> bin
new dir ----> config
new file ----> config.ru
new dir ----> db
new dir ----> lib
new dir ----> log
new dir ----> public
new dir ----> test
new dir ----> tmp
new dir ----> vendor
Propagating updates
UNISON 2.48.4 started propagating changes at 17:54:21.76 on 05 May 2017
Fatal error: Error in getLogch:
/var/log/unison.log: Permission denied
Fatal error: exception Util.Fatal("Error in getLogch:\n/var/log/unison.log: Permission denied")
Raised at file "/tmp/unison-2.48.4/src/ubase/util.ml", line 199, characters 6-17
Called from file "/tmp/unison-2.48.4/src/ubase/trace.ml", line 153, characters 13-23
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 826, characters 2-24
Called from file "/tmp/unison-2.48.4/src/uitext.ml", line 889, characters 6-23
Called from file "/tmp/unison-2.48.4/src/main.ml", line 241, characters 2-257
Called from file "/tmp/unison-2.48.4/src/linktext.ml", line 19, characters 18-40
Contacting server...
Looking for changes
When using unison strategy, I can see the unison logs in daemon.log file. This is only minor problems, so it's not top priority but best to have.
Thanks for quick fix for this issue.
@tanc I encounter the same issue and I had to remove the docker image first:
docker image rm eugenmayer/unison:hostsync
to force it pull the new image.
ah ok, the precondition does yet not exist. thank you @donnykurnia will fix it
@EugenMayer I have started my application. But the new file didn't synced into the application container. I add new file, but in the unison stdout nothing picked up. The new file is exists in /host_sync folder, but nothing changed in /app_sync folder. Can this caused by unison not running as root?
stdout after add new file:
docker exec application-sync tail /tmp/unison-stdout---supervisor-wPqH9a.log ∞ ∞
[END] Copying vendor
UNISON 2.48.4 finished propagating changes at 18:52:10.48 on 05 May 2017
Saving synchronizer state
Synchronization complete at 18:52:10 (18 items transferred, 0 skipped, 0 failed)
Looking for changes
Reconciling changes
Nothing to do: replicas have not changed since last sync.
Looking for changes
Reconciling changes
Nothing to do: replicas have not changed since last sync.
$ docker exec application-sync ls -alrt /host_sync
total 56
drwxr-xr-x 1 dockersy 50 306 Feb 22 14:36 public
-rw-r--r-- 1 dockersy 50 130 Feb 22 14:36 config.ru
-rw-r--r-- 1 dockersy 50 227 Feb 22 14:36 Rakefile
-rw-r--r-- 1 dockersy 50 374 Feb 22 14:36 README.md
drwxr-xr-x 1 dockersy 50 272 Feb 22 14:38 bin
drwxr-xr-x 1 dockersy 50 102 Feb 22 14:46 .bundle
drwxr-xr-x 1 dockersy 50 170 Feb 22 15:16 lib
drwxr-xr-x 1 dockersy 50 340 Mar 8 19:28 test
drwxr-xr-x 1 dockersy 50 408 Mar 15 16:46 app
drwxr-xr-x 1 dockersy 50 136 Mar 20 23:40 vendor
drwxr-xr-x 1 dockersy 50 238 Mar 26 20:02 tmp
drwxr-xr-x 1 dockersy 50 136 Mar 29 14:31 notes
-rw-r--r-- 1 dockersy 50 1422 Apr 11 13:17 .byebug_history
-rw-r--r-- 1 dockersy 50 213 Apr 25 21:59 .env
-rw-r--r-- 1 dockersy 50 497 Apr 26 11:40 .gitignore
-rw-r--r-- 1 dockersy 50 6148 Apr 26 12:36 .DS_Store
drwxr-xr-x 1 dockersy 50 476 May 4 13:18 config
drwxr-xr-x 1 dockersy 50 170 May 4 17:30 db
-rw-r--r-- 1 dockersy 50 2834 May 5 06:16 Gemfile
-rw-r--r-- 1 dockersy 50 8442 May 5 06:23 Gemfile.lock
drwxr-xr-x 1 dockersy 50 170 May 5 09:20 log
drwxr-xr-x 41 root root 4096 May 5 18:58 ..
drwxr-xr-x 1 dockersy 50 850 May 5 19:38 .
-rw-r--r-- 1 dockersy 50 2834 May 5 19:42 new-file
drwxr-xr-x 1 dockersy 50 510 May 5 19:44 .git
$ docker exec application-sync ls -alrt /app_sync
total 88
drwxr-xr-x 3 dockersy dockersy 4096 May 5 18:51 db
-rw-r--r-- 1 dockersy dockersy 130 May 5 18:51 config.ru
drwxr-xr-x 5 dockersy dockersy 4096 May 5 18:51 config
drwxr-xr-x 2 dockersy dockersy 4096 May 5 18:51 bin
drwxr-xr-x 12 dockersy dockersy 4096 May 5 18:51 app
-rw-r--r-- 1 dockersy dockersy 227 May 5 18:51 Rakefile
-rw-r--r-- 1 dockersy dockersy 374 May 5 18:51 README.md
-rw-r--r-- 1 dockersy dockersy 8442 May 5 18:51 Gemfile.lock
-rw-r--r-- 1 dockersy dockersy 2834 May 5 18:51 Gemfile
-rw-r--r-- 1 dockersy dockersy 213 May 5 18:51 .env
-rw-r--r-- 1 dockersy dockersy 1422 May 5 18:51 .byebug_history
drwxr-xr-x 2 dockersy dockersy 4096 May 5 18:51 .bundle
drwxr-xr-x 4 dockersy dockersy 4096 May 5 18:51 vendor
drwxr-xr-x 4 dockersy dockersy 4096 May 5 18:51 tmp
drwxr-xr-x 9 dockersy dockersy 4096 May 5 18:51 test
drwxr-xr-x 2 dockersy dockersy 4096 May 5 18:51 public
drwxr-xr-x 2 dockersy dockersy 4096 May 5 18:51 log
drwxr-xr-x 5 dockersy dockersy 4096 May 5 18:51 lib
drwxr-xr-x 13 dockersy root 4096 May 5 18:52 .
drwxr-xr-x 41 root root 4096 May 5 18:58 ..
@donnykurnia probably a different issue, please open a new issue for that. Thanks!
I just encountered that I have the same problem.
When using sync_userid in combination with default native_osx the sync_app folder remains empty, even after a docker-sync-stack clean. Even with the newest image.
When I switch to sync_strategy: 'unison' the sync works as expected.
@ad-on-is 0.4.1 should fix this problem. If not, stop docker-sync, clean, remove docker image, then start again
docker-sync stop
docker-sync clean
docker image rm eugenmayer/unison:hostsync
docker-sync -v # make sure the result is 0.4.1 or 0.4.2
docker-sync start
For debugging, avoid docker-sync-stack, just use docker-sync until the sync container works.
See how I debug the docker-sync in my comments above. The stdout filename will differ every time. Use lsof to see to which file the unison wrote it's stdout and see the content of that file. I hope you are familiar with docker exec and how docker works in general.
Actually since I released 0.4.2, this should get fixed automatically, does it
Most helpful comment
@tanc I encounter the same issue and I had to remove the docker image first:
docker image rm eugenmayer/unison:hostsyncto force it pull the new image.