Unison cannot connect in Ubuntu 11.04

Asked by Alan Jordan

Under Ubuntu 11.04, my Desktop and Laptop PCs cannot connect when trying to run a Unison Profile; a Message "Contacting Server...." appears, and just sits there, whereas I expect to be asked for the other PC's User Password after a short delay. Unison worked fine under Ubuntu 10.10. I can confirm that under Ubuntu 11.04, either PC can log-in to the other when running an SSH Session in a Terminal. Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu unison Edit question
Assignee:
No assignee Edit question
Solved by:
mycae
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

Can you provide thecontents of your *.prf files in the .unison folder in your home directory?

To do this, open nautilus, enable show hidden files, then paste the prf file contents here.

You may wish to redact any data that you consider private.

Revision history for this message
Alan Jordan (adjordan) said :
#2

/home/alan/.unison/Gnucash.prf
/home/alan/.unison/MVA.prf
/home/alan/.unison/Secure.prf

Note - by looking at the Related Bugs, I've managed to run Unison in a Terminal, and can confirm that these Profiles run OK, but still fail when run in the Unison GUI.

Revision history for this message
mycae (mycae) said :
#3

We need the *contents* of these files -- not the names.

Also, if you have got it working in a terminal session, an example session would be good too, so we can compare.

Revision history for this message
Alan Jordan (adjordan) said :
#4

One example is of a Profile is:-

root = /media/truecrypt1/Gnucash
root = ssh://192.168.1.3//media/truecrypt1/Gnucash

The following is the IDENTICAL Profile running in a Text Session:

alan@Desktop:~$ unison Gnucash -ui text
Contacting server...
alan@192.168.1.3's password:
Connected [//Desktop//media/truecrypt1/Gnucash -> //Laptop//media/truecrypt1/Gnucash]
Looking for changes
  Waiting for changes from server
Reconciling changes

local Laptop
changed ----> Alan's Money/My Money [f] >
deleted ----> Alan's Money/My Money.20110413062717.log [f] >
deleted ----> Alan's Money/My Money.20110413062744.log [f] >
deleted ----> Alan's Money/My Money.20110414125100.log [f] >
deleted ----> Alan's Money/My Money.20110414125206.xac [f] >
deleted ----> Alan's Money/My Money.20110414125207.log [f] >
deleted ----> Alan's Money/My Money.20110415074034.log [f] >
deleted ----> Alan's Money/My Money.20110415074208.xac [f] >
deleted ----> Alan's Money/My Money.20110415074209.log [f] >
deleted ----> Alan's Money/My Money.20110415132349.log [f] >
deleted ----> Alan's Money/My Money.20110415132709.xac [f] >
deleted ----> Alan's Money/My Money.20110415132710.log [f] >
deleted ----> Alan's Money/My Money.20110416055018.log [f] >
deleted ----> Alan's Money/My Money.20110416055026.xac [f] >
deleted ----> Alan's Money/My Money.20110416055030.log [f] >
deleted ----> Alan's Money/My Money.20110416095510.log [f] >
deleted ----> Alan's Money/My Money.20110416101517.log [f] >
deleted ----> Alan's Money/My Money.20110416102130.xac [f] >
deleted ----> Alan's Money/My Money.20110416102131.log [f] >
deleted ----> Alan's Money/My Money.20110416102438.log [f] >
deleted ----> Alan's Money/My Money.20110417071836.xac [f] >
new file ----> Alan's Money/My Money.20110516120457.log [f] >
new file ----> Alan's Money/My Money.20110516120505.gnucash [f] >
new file ----> Alan's Money/My Money.20110516120506.log [f] >
new file ----> Alan's Money/My Money.20110516120646.log [f] >
new file ----> Alan's Money/My Money.20110516121253.gnucash [f] >
new file ----> Alan's Money/My Money.20110516121253.log [f] >
new file ----> Alan's Money/My Money.20110516121449.gnucash [f] >
new file ----> Alan's Money/My Money.20110516121450.log [f] >
changed ----> Mums Money/Mums Money [f] >
deleted ----> Mums Money/Mums Money.20110412062030.log [f] >
deleted ----> Mums Money/Mums Money.20110412062155.log [f] >
deleted ----> Mums Money/Mums Money.20110414125211.log [f] >
deleted ----> Mums Money/Mums Money.20110415074012.log [f] >
deleted ----> Mums Money/Mums Money.20110415074033.xac [f] >
deleted ----> Mums Money/Mums Money.20110415074034.log [f] >
deleted ----> Mums Money/Mums Money.20110416055036.log [f] >
new file ----> Mums Money/Mums Money.20110516120634.log [f] >
new file ----> Mums Money/Mums Money.20110516120641.gnucash [f] >
new file ----> Mums Money/Mums Money.20110516120642.log [f] >

Proceed with propagating updates? [] >
Unrecognized command '>': try again [type '?' for help]
Proceed with propagating updates? [] y
Propagating updates

UNISON 2.32.52 started propagating changes at 14:27:05 on 16 May 2011
[BGN] Updating file Alan's Money/My Money from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516120457.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516120505.gnucash from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516120506.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516120646.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516121253.gnucash from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516121253.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516121449.gnucash from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Alan's Money/My Money.20110516121450.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Updating file Mums Money/Mums Money from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Mums Money/Mums Money.20110516120634.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Mums Money/Mums Money.20110516120641.gnucash from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
[BGN] Copying Mums Money/Mums Money.20110516120642.log from /media/truecrypt1/Gnucash to //Laptop//media/truecrypt1/Gnucash
Shortcut: copying My Money.20110516120505.gnucash from local file Alan's Money/My Money
Shortcut: copying My Money.20110516120506.log from local file Mums Money/Mums Money.20110511183202.log
Shortcut: copying My Money.20110516121450.log from local file Mums Money/Mums Money.20110511183202.log
Shortcut: copying Mums Money.20110516120641.gnucash from local file Mums Money/Mums Money
Shortcut: copying Mums Money.20110516120642.log from local file .unison.My Money.20110516120506.log.bad819905eb868aa469ae1f846afa663.unison.tmp
[END] Copying Alan's Money/My Money.20110516121450.log
[END] Copying Alan's Money/My Money.20110516120506.log
[END] Copying Alan's Money/My Money.20110516120505.gnucash
[END] Copying Alan's Money/My Money.20110516120457.log
[END] Copying Alan's Money/My Money.20110516120646.log
[END] Copying Alan's Money/My Money.20110516121253.log
[END] Updating file Mums Money/Mums Money
[END] Copying Mums Money/Mums Money.20110516120642.log
[END] Copying Mums Money/Mums Money.20110516120641.gnucash
[END] Copying Mums Money/Mums Money.20110516120634.log
[END] Updating file Alan's Money/My Money
[END] Copying Alan's Money/My Money.20110516121253.gnucash
[END] Copying Alan's Money/My Money.20110516121449.gnucash
[BGN] Deleting Alan's Money/My Money.20110413062717.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110413062744.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110414125100.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110414125206.xac from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110414125207.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110415074034.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110415074208.xac from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110415074209.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110415132349.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110415132709.xac from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110415132710.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416055018.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416055026.xac from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416055030.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416095510.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416101517.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416102130.xac from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416102131.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110416102438.log from //Laptop//media/truecrypt1/Gnucash
[BGN] Deleting Alan's Money/My Money.20110417071836.xac from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110413062717.log
[BGN] Deleting Mums Money/Mums Money.20110412062030.log from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110413062744.log
[BGN] Deleting Mums Money/Mums Money.20110412062155.log from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110414125100.log
[BGN] Deleting Mums Money/Mums Money.20110414125211.log from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110414125206.xac
[BGN] Deleting Mums Money/Mums Money.20110415074012.log from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110414125207.log
[BGN] Deleting Mums Money/Mums Money.20110415074033.xac from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110415074034.log
[BGN] Deleting Mums Money/Mums Money.20110415074034.log from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110415074208.xac
[BGN] Deleting Mums Money/Mums Money.20110416055036.log from //Laptop//media/truecrypt1/Gnucash
[END] Deleting Alan's Money/My Money.20110415074209.log
[END] Deleting Alan's Money/My Money.20110415132349.log
[END] Deleting Alan's Money/My Money.20110415132709.xac
[END] Deleting Alan's Money/My Money.20110415132710.log
[END] Deleting Alan's Money/My Money.20110416055018.log
[END] Deleting Alan's Money/My Money.20110416055026.xac
[END] Deleting Alan's Money/My Money.20110416055030.log
[END] Deleting Alan's Money/My Money.20110416095510.log
[END] Deleting Alan's Money/My Money.20110416101517.log
[END] Deleting Alan's Money/My Money.20110416102130.xac
[END] Deleting Alan's Money/My Money.20110416102131.log
[END] Deleting Alan's Money/My Money.20110416102438.log
[END] Deleting Alan's Money/My Money.20110417071836.xac
[END] Deleting Mums Money/Mums Money.20110412062030.log
[END] Deleting Mums Money/Mums Money.20110412062155.log
[END] Deleting Mums Money/Mums Money.20110414125211.log
[END] Deleting Mums Money/Mums Money.20110415074012.log
[END] Deleting Mums Money/Mums Money.20110415074033.xac
[END] Deleting Mums Money/Mums Money.20110415074034.log
[END] Deleting Mums Money/Mums Money.20110416055036.log
UNISON 2.32.52 finished propagating changes at 14:27:05 on 16 May 2011

Saving synchronizer state
Synchronization complete at 14:27:05 (40 items transferred, 0 skipped, 0 failed)
alan@Desktop:~$

I hope this is what you need.

Revision history for this message
mycae (mycae) said :
#5

Im guessing here, as I cannot seem to reproduce your problem.

In the prf file quoted, change:

ssh://192.168.1.3//media/truecrypt1/Gnucash

to

ssh://alan@192.168.1.3//media/truecrypt1/Gnucash

Revision history for this message
Alan Jordan (adjordan) said :
#6

Changes made as requested, but Unison GUI still hangs showing Window "Connecting to Server".

I would refer "mycae" to the two related Bug Reports (see above), particularly #696706, where many people have confirmed this problem, which affects Ubuntu 11.04, but NOT previous versions of Ubuntu. The problem appears to be related to the fact that 'unison -ui graphic does not show password dialog' i.e. everything in Unison works, including SSH, but the Unison GUI fails to display the Password Dialog Window once the Server has responded, thus leaving the Window "Connecting to Server" continuously displayed.

Revision history for this message
mycae (mycae) said :
#7

If you have the patch, what is your question? You can just apply that patch!

Revision history for this message
Alan Jordan (adjordan) said :
#8

I did see something about a patch, but I'm afraid that it is completely beyond my technical abilities to apply such a thing. I have about 2.5 years experience with Ubuntu Linux, but i came from a Windows background, and the thing I like most about Ubuntu is the way more and more things can be done with GUIs, thus avoiding the need to do things with a Terminal. Besides, my real interest is in using Linux to run the Programs that I need to carry out the analyses I am interested in, not to become an expert on the interstices of Linux!

Revision history for this message
Best mycae (mycae) said :
#9

Well, unfortunately currently as it stands it is broken.

Looking at the posted bug report, a user "Jérôme Vouillon" has proposed a solution which involves deleting a single line of code from the program to make it run; a so-called "patch". I have not tested this patch myself as yet. This involves rebuilding the program, (a la here : http://www.moosechips.com/2008/09/ubuntu-rebuild-a-source-package/)
, and deleting the line " Unix.close slaveFd;" from line ~194 of terminal.ml in the downloaded code before you hit the "dpkg-buildpackage" command suggested on that moosechips site

 Another user "Ethan Bissett" (comment 18) has suggested that you can install an alternate version of Unison from the "debian" project -- this is where most ubuntu packages come from, their package has already fixed this version, but this has not been manually checked to work in ubuntu. Another users suggested using password-less public keys as a workaround; this can be a bit tricky to set up.

So your realistic options are:
1) Follow the build instructions on the moosechips site I linked
2) Uninstall the ubuntu version of unison-gtk and replace it with the debian version (http://packages.debian.org/wheezy/unison-gtk)
3) Set up your laptop and desktop to use passwordless public keys (http://usefulubuntu.blogspot.com/2009/03/passwordless-ssh.html)
4) Keep using the terminal

Please note that the people who read this forum are end users, like yourself; we cannot provide an update -- only canonical can do this; so the options that are going to have real results are above -- I cannot think of anything else. Perhaps others here might have some ideas.

Revision history for this message
Alan Jordan (adjordan) said :
#10

Thanks for that. I've had a quick look at your alternatives 1 - 3, and I think that these all look a bit "hairy" as far as I am concerned - whilst I am sure that it would be possible to get one or more of them to work, they are all taking me into uncharted waters where I feel uncomfortable.

Consequently, I think I'll stick with running Unison from a Terminal at present. Although this is a bit crude compared to the GUI, at least this allows me to do what I want to do; synchronise my Confidential Files between Encrypted Files on my Desktop and Laptop PCs (my non-Confidential Files are already synchronised using Ubuntu One). Presumably Canonical will eventually release a new fixed version of Unison via Update Manager, and I'll look out for this.

I'd like to say that one of the MANY advantages of Linux over Windows is access to Forums such as this where Experts devote their time to helping Users like myself with problems. I don't remember any help like this being available when I was running Windows!

Many thanks, and I think we'll consider this "Problem Solved" for the present.

Revision history for this message
Alan Jordan (adjordan) said :
#11

Thanks mycae, that solved my question.

Revision history for this message
Daniel Schury (surst) said :
#12

I think I know, what the problem could be. I noticed the same behaviour a few days ago. For me the problem was solved by configuring the server for authentification over public keys, not a password.

It seems like Unison GTK is not asking for the user password when trying to connect. If your start unison on the command line, you have to prompt your passwort and there it works.