bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
3.9k stars 225 forks source link

Filesync complains about lock files, but none are present #923

Closed Dirk23 closed 1 year ago

Dirk23 commented 1 year ago

I want to keep directories synchronized on my two Ubuntu 22.04 servers. For this I have installed and set up Unison. Unison is started as a service and monitors the file system changes for the configured path. When Unison is started and I create files or change existing ones, the sync fails. On Server1 I get the message

Unison 2.53.3 (ocaml 4.08.1) started propagating changes at 12:29:31.77 on 19 May 2023
[BGN] Updating file intranet/vbk/vbk-patientenportal/index.php from /var/www to //srv-web02//var/www
Shortcut: copied /var/www/intranet/vbk/vbk-patientenportal/index.php from local file /var/www/intranet/vbk/vbk-patientenportal/index.php
Failed [intranet/vbk/vbk-patientenportal/index.php]: Destination updated during synchronization
The contents of file intranet/vbk/vbk-patientenportal/index.php have been modified
Unison 2.53.3 (ocaml 4.08.1) finished propagating changes at 12:29:31.77 on 19 May 2023, 0.002 s
Synchronization incomplete at 12:29:31 (0 items transferred, 0 skipped, 1 failed)
  failed: intranet/vbk/vbk-patientportal/index.php

On server2 I get the message:

Unison 2.53.3 (ocaml 4.08.1) started propagating changes at 10:29:31.70 on 19 May 2023
[BGN] Updating file intranet/vbk/vbk-patientenportal/index.php from //srv-web01///var/www to /var/www
[END] Updating file intranet/vbk/vbk-patientenportal/index.php
Unison 2.53.3 (ocaml 4.08.1) finished propagating changes at 10:29:31.71 on 19 May 2023, 0.005 s
Fatal error: Warning: the archives are locked.
If no other instance of unison is running, the locks should be removed.
The file /root/.unison/lk80df57cede0edb4b16579f87260679a2 on host srv-web01 should be deleted
The file /root/.unison/lk2a866fded56a56050f6f880b2982b7a0 on host srv-web02 should be deleted
Please delete lock files as appropriate and try again.

But there are no lock files in the specified directories on either server.

The synchronization also fails in reverse.

Have I configured something wrong?

Greetings

Dirk

gdt commented 1 year ago

This sounds like a configuration / plan of operation issue rather than a bug. Please ask instead on the unison-users mailinglist instead; there are list instructions in the wiki page about reporting bugs (which is prominently linked from the top-level README).

When you post, please provide another level of detail, including whether you are using remote filesystems, vs ssh sync, whether /root is mounted to the same place on both servers, and whether you are running unison in the background on both systems or only one (hint: only one is almost certainly the right approach).