Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Lost connection with the server Ubuntu 20.04 #334

Closed
kirarpit opened this issue Apr 23, 2020 · 10 comments
Closed

Fatal error: Lost connection with the server Ubuntu 20.04 #334

kirarpit opened this issue Apr 23, 2020 · 10 comments

Comments

@kirarpit
Copy link

kirarpit commented Apr 23, 2020

I just upgraded from Ubuntu 19.10 to Ubuntu 20.04 and met with the following error:

Unison failed: Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/build/unison-WhGSf0/unison-2.48.3/lwt/lwt.ml", line 135, characters 12-13
Called from file "list.ml", line 73, characters 12-15
Called from file "/build/unison-WhGSf0/unison-2.48.3/lwt/lwt.ml", line 31, characters 2-37
Called from file "/build/unison-WhGSf0/unison-2.48.3/lwt/lwt.ml", line 83, characters 17-46
Called from file "/build/unison-WhGSf0/unison-2.48.3/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40
Called from file "/build/unison-WhGSf0/unison-2.48.3/main.ml", line 202, characters 6-24
Called from file "/build/unison-WhGSf0/unison-2.48.3/main.ml", line 131, characters 4-9

Btw, it works fine when syncing folders locally but not remotely

@trallen
Copy link

trallen commented Apr 25, 2020

I have been experiencing this error as well, syncing between 19.10 (or older) and 20.04 machines.

Synchronising between a vanilla 19.10 instance and a vanilla 20.04 instance yields the message:
Fatal error: Fatal error during unmarshaling (input_value: ill-formed message),
possibly because client and server have been compiled with differentversions of the OCaml compiler.

Copying the unison binary from 19.10 to 20.04 and using -servercmd yields an almost-identical result as above; building a statically-linked binary from source on 19.10 and synchronising between the two identical statically-linked binaries also yields the same result:
Unison failed: Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/tmp/unison-2.48.4/lwt/lwt.ml", line 135, characters 6-13
Called from file "list.ml", line 85, characters 12-15
Called from file "/tmp/unison-2.48.4/lwt/lwt.ml", line 31, characters 2-37
Called from file "/tmp/unison-2.48.4/lwt/lwt.ml" (inlined), line 83, characters 17-46
Called from file "/tmp/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 55, characters 6-23
Called from file "/tmp/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40
Called from file "/tmp/unison-2.48.4/main.ml", line 202, characters 6-24
Called from file "/tmp/unison-2.48.4/main.ml", line 131, characters 4-9

It's very puzzling!

@igrep
Copy link

igrep commented Apr 27, 2020

Have you tried to clear archive files under ~/.unison? i.e. rm ~/.unison/ar*.
Ref: https://stackoverflow.com/questions/59181897/unison-fails-with-ill-formed-message-error-same-remote-local-versions

@trallen
Copy link

trallen commented Apr 27, 2020

Thanks for the suggestion! I had indeed tried that; unison re-runs archive detection, but fails before transferring any data. If there are no changes, the archive detection appears to complete successfully, but re-runs the full archive detection every subsequent run too; if there are changes, it finishes the update detection and then fails with the same error:

Warning: No archive files were found for these roots, whose canonical names are:
    xxxx
    //server//xxxx
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


Fatal error: Fatal error during unmarshaling (input_value: ill-formed message),
possibly because client and server have been compiled with differentversions of the OCaml compiler.

OR, in the case of two identical unison binaries, or a statically-linked binary on the updated side:

Warning: No archive files were found for these roots, whose canonical names are:
    xxxx
    //server//xxxx
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

Unison failed: Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/tmp/unison-2.48.4/lwt/lwt.ml", line 135, characters 6-13
Called from file "list.ml", line 85, characters 12-15
Called from file "/tmp/unison-2.48.4/lwt/lwt.ml", line 31, characters 2-37
Called from file "/tmp/unison-2.48.4/lwt/lwt.ml" (inlined), line 83, characters 17-46
Called from file "/tmp/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 55, characters 6-23
Called from file "/tmp/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40
Called from file "/tmp/unison-2.48.4/main.ml", line 202, characters 6-24
Called from file "/tmp/unison-2.48.4/main.ml", line 131, characters 4-9

@janw-me
Copy link

janw-me commented May 1, 2020

I also have the same problem I deleted the ~/.unison folder both on Ubuntu 20.04 and on the raspberry pi.
The pi does have version 2.48.3 and Ubuntu has 2.48.4

@kirarpit
Copy link
Author

kirarpit commented May 1, 2020

I was able to fix the issue by first purging Unison via apt-get and then reinstalling using the static files, unison-2.48.4-linux-i386-text-static.tar.gz, on both the systems. I hope that helps!

@htot
Copy link

htot commented May 12, 2020

This didn't work for me. I have unbuntu 18.04 on the server and 20.04 on the client.
I got the md5 static 64 bits: 7bc592b2acea3070301b580f71e27f9c version, but didn't purge anything. Instead I modified the prf to change the 'servercmd' to point to the new binary.

What am I missing?

@ceriottm
Copy link

I have an interesting - and puzzling - piece of evidence. NAS with unison running in a docker, which I do not want to touch. 28.48.4-4 from ubuntu 20.04 with another error related to it being compiled with a different OCaml version. So I installed the version from 19.10, 28.48.4-1, on two different machines that sync to the NAS. One of the two machines works, the other doesn't.

@htot
Copy link

htot commented May 14, 2020

I found the missing piece: I purge all installed unison packages on the (focal) desktop and installed the bionic package (unison-gtk_2.48.4-1ubuntu1_amd64.deb).

This is not enough by it self. I also had to remove the binary files under ~/.unison create since the upgrade to focal.

@ceriottm
Copy link

ceriottm commented May 14, 2020

Yes! that does it also on my setup. Everything works as intended now. What a pain, didn't realize that Ocam binaries are incompatible if the compiler changes.
Actually, one detail: no need to wipe completely the .unison folder and wait to regenerate the archives: seems that the culprits are the fpHASH files, removing those is enough to get sync to work again.

@gdt
Copy link
Collaborator

gdt commented Sep 14, 2020

This is basically #375 and #377.

@gdt gdt closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants