1

I have a file server running Raspbian and a workstation running Ubuntu MATE 16.04. I use Unison to keep my home directory in sync. I’ve set it up to use a SSH connection.

The workstation runs Unison 2.48; the server has multiple versions (including 2.48). I’ve successfully propagated a couple of changes from the workstation to the server that way.

Now I’ve changed a file on the server. Unison looks for changes and correctly suggests updating the local copy with the file from the server.

However, when I click Go, I get the following error:

Fatal error

Lost connection with the server.

Unison settings are as follows:

# Unison preferences
label = Home dir
root = /home/me
root = ssh://me@fileserver//srv/file/me
sshargs = -C
addversionno = true
dontchmod = true
perms = 0
path = Documents
path = Pictures

General configuration problems (missing Unison version on server, wrong path etc.) are unlikely as changes are being detected and I have synchronized data various times (always workstation to server). It’s just the server-to-workstation scenario that fails.

I decided to “sacrifice” my edits to the new file and chose to replace the server version with the outdated local one. Surprisingly, that sync run completed successfully—everything works unless there are changes on the server side.

What’s happening here?

  • 1
    I wonder if the problem could be with the underlying SSH connection. What do the following commands do? ssh me@fileserver head -c 100k /dev/urandom | wc -c and head -c 100k /dev/urandom | ssh me@fileserver wc -c – Gilles 'SO- stop being evil' Jan 15 '17 at 22:14
  • Both show 102400. That looks to me like the SSH connection isn’t the problem. – user149408 Jan 19 '17 at 23:47
1

I had the same issue but then with an vagrant environment and i already had installed unison on both side.

The fix was easy just vagrant halt and vagrant up fixed is for me

0

I think here is a solution:

NB- this is usually because the option PermitUserEnvironment in /etc/sshd_config is set to 'no' (for example, MacOSX ships with this set to NO). You should be able to set it to 'yes' and things will be golden. https://alliance.seas.upenn.edu/~bcpierce/wiki/?n=Main.UnisonFAQTroubleshooting

But only on my machine sshd_config is placed under /etc/ssh

  • The FAQ gives this as the reason for the connection failing completely. However, in my case the initial connection is successful—I can list changes, and even upload local changes—it is just pulling remote changes which fails. I’ll give it a try and report back. – user149408 Feb 20 '17 at 15:21
0

I had the exact same problem (with Mint 18.2 KDE Edition). I appears that the version of Unison compiled for this version of Linux Mint is the problem. Using the Unison from Debian repository solved the problem.

I downloaded the package "unison-gtk_2.48.3-1_amd64.deb" from Debian packages repository, and install the new binary by hand (extracting the files at the correct places) and using Debian alternative to let the Mint Unison and the Debian Unison co-exist. There may be a smarter way to install a Debian package on Mint, but this was a fast proof-of-concept.

0

We also had this problem - we found a solution that worked for us, which was to install Unison on the other end - reference: https://ubuntuforums.org/showthread.php?t=1733811

  • That’s the setup I had all along. Unison is installed on both ends, and the two installations are communicating over an SSH link. – user149408 Dec 6 '18 at 15:23
  • We suspect that your Fatal error is Unison failing on your server, due to the multiple versions, and because every action works except for propagating a changed file from the server; have you tried uninstalling all but the latest stable version of Unison, @user149408? Also, this question of yours is nearly two years old; are you still living with the problem? – Support 41As Dec 7 '18 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.