Our symptom here was that the mailbox in question would begin to migrate, but then would stall at some point in the process, and would not progress beyond that point.
The customer in question had been able to migrate many other mailboxes to Exchange Online, even while the mailbox in question would not progress beyond the sticking point.
The Move Report for the user was showing the following error:
FailureSide : Source
InnerException : CommunicationException: Server returned an invalid SOAP Fault. Please see InnerException for more details. --> Unexpected end of file. Following elements are not closed: MessageData, InnerException, MailboxReplicationServiceFault, Detail, Fault, Body, Envelope. Line 1, position 65537.
Looking at the output of the Exchange Move Request Statistics (using information from Get-MoveRequestStatistics firstname.lastname@example.org -IncludeReport -DiagnosticInfo verbose), we were able to see the following:
The last entry before the failure:
25/05/2018 14:34:38 [EXCHSERVER] Stage: LoadingMessages. Percent complete: 20.
And then the failure:
25/05/2018 14:40:40 [EXCHSERVER] Transient error CommunicationErrorTransientException has occurred.
To see if we could get some kind of idea of what was going on with the on-premises server at the time, we took a look at the IIS logs from the server and found the error:
2018-05-25 14:40:39 192.168.2.201 POST /EWS/mrsproxy.svc &CorrelationID=<empty>;&ClientId=XXXXXXXXXXXXXXXX&cafeReqId=53ea14e3-cac9-42cb-a82f-a15889e233ae; 443 Domain\SVC_E1_MSXEP 184.108.40.206 - - 500 0 0 61
Http 500 is an "Internal Server Error". So, we have some kind of failure occurring on prem with this mailbox, and the info returned is not able to be interpreted properly when the MRS gets it in Exchange Online, so we get the "generic" 'unexpected end of file' error.
We then proceeded to do ExTRA tracing of the MRS component on the On-Prem Exchange server to get a better idea of what was going on there, and what we found was that there was a timeout occurring.
The solution here was to go into the C:\Program Files\Microsoft\Exchange Server\V15\Bin folder, and edit the MSExchangeMailboxReplication.exe.config file.
Open the file in any text editor (notepad or Notepad++ are fine) and find DataImportTimeout. You should find it under the MRSProxyConfiguration section near the end of the file.
We want to change the value from the default of 00:05:00 (5 minutes) to a value in the range to 10-30 minutes (10 minimum). We went with 20 minutes, or "00:20:00" and then saved the change to the file.
After the file is saved, we restarted the Microsoft Exchange Mailbox Replication service so that the change takes effect.
After that, the mailbox was able to be moved successfully.