Discussion:
Fatal error: Lost connection with the server [1 Attachment]
b***@yahoo.com
2014-02-27 19:13:49 UTC
Permalink
I'm using unison to synchronize two different machines "work" and "home" (by using a third machine, "server", that is visible both from "work" and "home").

I have unison 2.40.102 in all machines. I cannot remember having problems when using unison at home. However, at work, sometimes I experience the following issue:


Fatal error: Lost connection with the server



I'm not using a VPN, and the MTU of all the involved network cards is the same (1500). Today, it failed when trying to transfer the only file that differs. The file is under 10MB.


I'm attaching the output of "-debug all" (I removed the huge list lines referring to the part where unison looks for changes, since most there is only one file differing, and most probably it has nothing to do with the error). The error happens later, when I instruct unison to copy the file from "server" to "work".


Next you have the description of the machines:
"work" is Ubuntu 13.04 running inside VMware Player (running on top of Windows 7)
"home" is Mac OS X 10.9 using homebrew for installing unison
"server" is a POWER PC system running Red Hat Linux 6.4
Adrian Klaver
2014-02-27 20:12:34 UTC
Permalink
Post by b***@yahoo.com
I'm using unison to synchronize two different machines "work" and "home"
(by using a third machine, "server", that is visible both from "work"
and "home").
I have unison 2.40.102 in all machines. I cannot remember having
problems when using unison at home. However, at work, sometimes I
Fatal error: Lost connection with the server
I'm not using a VPN, and the MTU of all the involved network cards is
the same (1500). Today, it failed when trying to transfer the only file
that differs. The file is under 10MB.
I'm attaching the output of "-debug all" (I removed the huge list lines
referring to the part where unison looks for changes, since most there
is only one file differing, and most probably it has nothing to do with
the error). The error happens later, when I instruct unison to copy the
file from "server" to "work".
"work" is Ubuntu 13.04 running inside VMware Player (running on top of Windows 7)
"home" is Mac OS X 10.9 using homebrew for installing unison
"server" is a POWER PC system running Red Hat Linux 6.4
So where is the "server" located?

My suspicion is it is an SSH problem not a Unison one. I say this
because I use a similiar set up and saw the same issue when I was
hosting the "server" in the AWS East region(I am on the West coast of
US). At the same time I was having lost connections just doing a
straight SSH connection to the "server". I moved my server to US West
and the problems went away along with my the problems with the normal
SSH connections.
--
Adrian Klaver
***@aklaver.com
Adrian Klaver
2014-02-27 21:07:43 UTC
Permalink
The server is located in the same building as my work computer. I have
not experienced SSH problems. Using scp or rsync works without any problem.
Is there any way I can provide more data that helps to resolve this case?
You might want to take a look at the "server" system logs at the time
the connection was lost to see if there is anything revealing. The error
message is pretty plain "Fatal error: Lost connection with the server".
A lost connection can happen from either end, so you will need to look
at both ends.
--
Adrian Klaver
***@aklaver.com
w***@alum.mit.edu
2014-02-28 16:01:14 UTC
Permalink
You can get problems like this if some device (NATs are particularly
prone to it) drop a connection/NAT-mapping/whatever if no packets pass
for a certain length of time. You can avoid this (if your SSH is
new enough) by telling SSH to send keepalive packets (yuck):

~/.ssh/config:

Host freeze.ariadne.com freeze 24.34.72.61
ServerAliveInterval 60
Host localhost.localdomain localhost 127.0.0.1
ServerAliveInterval 60

Dale
Data Control Systems - Mike Elkevizth
2014-02-28 17:53:17 UTC
Permalink
You can also use the following argument when calling unison from the
command line to accomplish the same thing, but only when running unison.
-sshargs '-o ServerAliveInterval=60'

Mike E.
Post by w***@alum.mit.edu
You can get problems like this if some device (NATs are particularly
prone to it) drop a connection/NAT-mapping/whatever if no packets pass
for a certain length of time. You can avoid this (if your SSH is
Host freeze.ariadne.com freeze 24.34.72.61
ServerAliveInterval 60
Host localhost.localdomain localhost 127.0.0.1
ServerAliveInterval 60
Dale
Loading...