0 votes

We are experiencing issues with mailbox moves failing between AD sites.

If we use the Exchange Move Mailbox task, it works fine for small mailboxes (under 30MB). Once the mailbox size goes over say 40-50MB we start seeing failures. There is no error in Adaxes, however eventually in the EventLog on the Adaxes server Windows Application Event log, we see Event 1008, Exchange Migration error with text:

The move-mailbox task for mailbox 'TestUser, Adaxes' failed.
Error: Failed to copy messages to the destination mailbox store with error: The operation was cancelled.

This happens every time with the larger mailboxes (not that 50MB is large anymore) and generally happens anywhere from 10 to 30 minutes after the move starts.

I cannot find anywhere in Adaxes that the failure is logged, nor do I see any events logged on the Exchange servers in question.

by (710 points)
0

Found this in the Exchange Event logs on the Adaxes server... note the Pipeline has been stopped.... (server/domain names have been changed.)

[10/30/2013 11:59:46 AM] [0] Searching objects "Mailserver1\BOIsg\BOIdb" of type "MailboxDatabase" under the root "$null".
[10/30/2013 11:59:46 AM] [0] Previous operation run on domain controller 'DC.domainname.com'.
[10/30/2013 11:59:46 AM] [0] Searching objects "domainname.com/Darigold Users/Adaxes_Test/TestUser, Adaxes" of type "ADUser" under the root "$null".
[10/30/2013 11:59:47 AM] [0] Previous operation run on global catalog server 'DC.domainname.com'.
[10/30/2013 11:59:47 AM] [0] Processing object "domainname.com/Darigold Users/Adaxes_Test/TestUser, Adaxes".
[10/30/2013 11:59:47 AM] [0] Searching objects "Mailserver2" of type "Server" under the root "$null".
[10/30/2013 11:59:47 AM] [0] Previous operation run on domain controller 'DC.domainname.com'.
[10/30/2013 11:59:47 AM] [0] Searching objects "Mailserver2\DIFailoverTest_Recovery\DIFailoverTestDB_RecoveryDB" of type "MailboxDatabase" under the root "$null".
[10/30/2013 11:59:47 AM] [0] Previous operation run on domain controller 'DC.domainname.com'.
[10/30/2013 11:59:47 AM] [0] Ending processing.
[10/30/2013 11:59:47 AM] [0] [adtestu] The operation has started.
[10/30/2013 11:59:47 AM] [0] [adtestu] Approving object.
[10/30/2013 11:59:47 AM] [0] [adtestu] Trying to open mailbox:
szServerLegacyDN: /o=Darigold/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=Mailserver2
szUserLegacyDN: /o=Darigold/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=adtestu
szServer: Mailserver2.domainname.com
[10/30/2013 11:59:47 AM] [0] [adtestu] Open mailbox succeeded.
[10/30/2013 11:59:47 AM] [0] [adtestu] The operation has finished.
[10/30/2013 11:59:47 AM] [0] Searching objects "domainname.com/Darigold Users/Adaxes_Test/TestUser, Adaxes" of type "ADUser" under the root "$null".
[10/30/2013 11:59:47 AM] [0] Previous operation run on global catalog server 'DC.domainname.com'.
[10/30/2013 11:59:47 AM] [0] [adtestu] The operation has started.
[10/30/2013 11:59:47 AM] [0] [adtestu] Approving object.
[10/30/2013 11:59:48 AM] [0] [adtestu] Opening source mailbox.
[10/30/2013 11:59:48 AM] [0] [adtestu] Trying to open mailbox:
szServerLegacyDN: /o=Darigold/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=Mailserver2
szUserLegacyDN: /o=Darigold/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=adtestu
szServer: Mailserver2.domainname.com
[10/30/2013 11:59:48 AM] [0] [adtestu] Open mailbox succeeded.
[10/30/2013 11:59:48 AM] [0] [adtestu] Trying to lock mailbox:
szServer: Mailserver2.domainname.com
pguidMdb: {5FB04003-2A6B-4B87-83F8-39F2C02F737B}
pguidMailbox: {E205C646-A636-42ED-ACE6-971984AD5B82}
[10/30/2013 11:59:58 AM] [0] [adtestu] Mailbox was locked successfully.
[10/30/2013 11:59:58 AM] [0] [adtestu] Preparing mailbox to be moved.
[10/30/2013 11:59:58 AM] [0] [adtestu] Copying basic mailbox information from source mailbox:
szServerSrc: Mailserver2.domainname.com
szServerDest: Mailserver1.domainname.com
pguidMdbSrc: {5FB04003-2A6B-4B87-83F8-39F2C02F737B}
pguidMdbDest: {706BCFE2-7790-41FE-A71C-E44A93C2A1C3}
pguidMailbox: {E205C646-A636-42ED-ACE6-971984AD5B82}
[10/30/2013 11:59:58 AM] [0] [adtestu] Basic mailbox information was copied successfully.
[10/30/2013 11:59:58 AM] [0] [adtestu] Opening destination mailbox.
[10/30/2013 11:59:58 AM] [0] [adtestu] Trying to open mailbox:
szServerLegacyDN: /o=Darigold/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=Mailserver1
szUserLegacyDN: /o=Darigold/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=adtestu
szServer: Mailserver1.domainname.com
[10/30/2013 11:59:58 AM] [0] [adtestu] Open mailbox succeeded.
[10/30/2013 11:59:58 AM] [0] [adtestu] Trying to lock mailbox:
szServer: Mailserver1.domainname.com
pguidMdb: {706BCFE2-7790-41FE-A71C-E44A93C2A1C3}
pguidMailbox: {E205C646-A636-42ED-ACE6-971984AD5B82}
[10/30/2013 11:59:58 AM] [0] [adtestu] Mailbox was locked successfully.
[10/30/2013 11:59:58 AM] [0] [adtestu] Moving messages.
[10/30/2013 12:29:45 PM] [0] [adtestu] Deleting mailbox from mailbox database:
szServer: Mailserver1.domainname.com
pguidMdb: {706BCFE2-7790-41FE-A71C-E44A93C2A1C3}
pguidMailbox: {E205C646-A636-42ED-ACE6-971984AD5B82}
[10/30/2013 12:29:45 PM] [0] [ERROR] An unexpected error occurred when reporting progress: The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [adtestu] Mailbox '{E205C646-A636-42ED-ACE6-971984AD5B82}' was deleted successfully.
[10/30/2013 12:29:45 PM] [0] [ERROR] An unexpected error occurred when reporting progress: The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [adtestu] Trying to unlock mailbox:
szServer: Mailserver2.domainname.com
pguidMdb: {5FB04003-2A6B-4B87-83F8-39F2C02F737B}
pguidMailbox: {E205C646-A636-42ED-ACE6-971984AD5B82}
[10/30/2013 12:29:45 PM] [0] [ERROR] An unexpected error occurred when reporting progress: The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [adtestu] Mailbox was unlocked successfully.
[10/30/2013 12:29:45 PM] [0] [ERROR] An unexpected error occurred when reporting progress: The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] Error was found for TestUser, Adaxes (Adaxes.TestUser@darigold.com) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error: The operation was cancelled., error code: -1056749164
[10/30/2013 12:29:45 PM] [0] [ERROR] An unexpected error occurred when reporting error: The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [adtestu] The operation has finished.
[10/30/2013 12:29:45 PM] [0] [ERROR] The mailbox has been moved, but an unexpected error occurred while trying to apply policies or clean source mailbox: The pipeline has been stopped.
[10/30/2013 12:29:45 PM] [0] [ERROR] The pipeline has been stopped.

1 Answer

0 votes
by (216k points)

Hello,

This occurs because the time limit set for performing the command in Adaxes is exceeded when moving large mailboxes. To quickly workaround the issue, you can increase the limit manually. In our next version, we'll remove the limit.

To increase the limit:

  1. Open the folder that your Adaxes service is installed to, which is C:\Program Files\Softerra\Adaxes 3\Service\ by default.
  2. Locate the file named Softerra.Adaxes.Service.exe.Config and open it with any text editor.
  3. Find the following prameter: maxCommandExecutionTimeSec="900". It specifies the limit (in seconds) for the command. Increase the limit to whatever time you need.
  4. Save the file.
  5. Restart Adaxes service.
0

Thank you very much, that seems to have done the trick.

I have two follow up questions though.

1. is there any way for the initiator to get an email or notification when the move is complete?

2. is there any way to increase the timeout period for other scripts or processes? For example, we have a script that exports a mailbox to a .pst file which will also time out on large mailboxes, or we have another script to delete or move user file directories but they are moving between sites and large amount of data and after 10 minutes they time out.

0

Hello,

1. Yes, you can automatically send an an e-mail to the initiator with the help of a Business Rule and a Scheduled Task. You can create a Business Rule triggered After Moving the Exchange mailbox for the User. In the Business Rule, you can set a certain property of the user's account to the username of the initiator. It will serve as a flag indicating that the user's mailbox is being moved and will also store the initiator to be able to email the initiator later. For this purpose, you can use one of Adaxes virtual properties that can store text values, for example, CustomAttributeText1. Such virtual properties are not stored in AD, but you can use them as any other property of directory objects.

A Scheduled Task will check the mailbox move status of all the mailboxes for which the property is set. Once the status changes to Completed or any of the statuses stating the mailbox move status failed, the Scheduled Task will send an e-mail notification stating the status. It will also clear the virtual property not to process the mailbox any more.

If you are OK with such a solution, we will provide you with detailed instructions and a script that will be required for the Scheduled Task.

2. You cannot increase the time limit, but there is a workaround. In your Business Rule, Custom Command, Scheduled Task, you can create a separate PowerShell.exe process, and pass the script that you need to run as a parameter to PowerShell.exe. Since it will be a separate process, Adaxes will not control it, and the time limit will not apply. A drawback of this method is that you won't be able to view the warnings, errors or messages generated by the script. Also, you will not be able to update the Execution Log.

If such a solution is OK with you, here's a sample script that you can use as a guide. In the script, $scriptBlockToExecute specifies the actual script block that needs to be executed. Please remember, that in this script block, you need to escape all special characters used in PowerShell with a grave accent (`), such as $, @ etc.

The following script creates a separate PowerShell.exe process and passes a script to export the mailbox of the user, on which the script is executed, to a *.pst file located at \\server\ExportedMailboxes\%username%.pst, and exchangeserver.example.com specifies the fully qualified domain name (FQDN) of the Exchange server.

$scriptBlockToExecute = @"
& {
    `$session = New-PSSession -configurationname Microsoft.Exchange -connectionURI http://exchangeserver.example.com/PowerShell
    Import-PSSession `$session -DisableNameChecking
    New-MailboxExportRequest %username% -FilePath \\server\ExportedMailboxes\%username%.pst -Name "%username%"
    Remove-PSSession `$session
}
"@
$arguments = @("-noninteractive", "-noprofile", "-executionpolicy bypass", "-Command $scriptBlockToExecute", "> c:\1.txt")
$powershellPath = "$env:windir\syswow64\windowspowershell\v1.0\powershell.exe"   
$starProcessInfo = New-Object System.Diagnostics.ProcessStartInfo
$starProcessInfo.FileName = $powershellPath
$starProcessInfo.Arguments = $arguments
$starProcessInfo.WindowStyle = "Hidden"
$starProcessInfo.CreateNoWindow = $True
$process = [System.Diagnostics.Process]::Start($starProcessInfo)
$process.WaitForExit(540000) # Wait for 9 minutes
0

Thank you for your answer.

On the first question, anything would be better than no status report, so yes please provide the instructions and script.

On the second, this looks like a good work-around... I will work with and test this method and see if I can get it to work for our needs.

Thank you.

0

Hello,

OK, we've asked our script guys to write a script for you. We'll update this topic as soon as they come up with something.

0

Hello, I realize this post is a bit old, but I am finally finding time to look at this part of it. I am trying to execute the code you put in to create the separate PowerShell process that will run without a timeout... but even pasting in your exact code I get:

Exception calling "Start" with "1" argument(s): "The system cannot find the file specified"
You cannot call a method on a null-valued expression.

Changing the code within the script block makes no difference to the result.

Can you help?

0

Hello,

It looks like Windows cannot find the powershell.exe file. What version of Windows is installed on the computer where Adaxes is installed? Is it 32-bit or 64-bit?

0

32bit server 2008

0

The script is looking for the 64-bit version of Powershell :)

To remedy the issue, find the following line in the script:
$powershellPath = "$env:windir\syswow64\windowspowershell\v1.0\powershell.exe"

and replace it with:
$powershellPath = "$env:windir\system32\windowspowershell\v1.0\powershell.exe"

Related questions

0 votes
1 answer

Hi how can i bring back this screen? I clicked close now i cant find it.

asked Dec 2 by vagifazari (450 points)
0 votes
1 answer

Hello, we are in a migration phase from Exchange onPrem to Exchange Online. Since not all of our sites will be migrated at one time we are looking into a way to migrate ... an alerting / sending out a mail if the batch is not succesful? Thanks and KR Christian

asked Mar 21 by User0815 (50 points)
0 votes
1 answer

Hi All, I'm trying to use the powershell script provided here: https://www.adaxes.com/script-repository/move-mailbox-tofrom-microsoft-365-s579.htm Unfortuntately when executing ... credentials but I do not know why this error is happening. Thanks in advance

asked Aug 1, 2023 by curtisa (290 points)
0 votes
1 answer

Hi Team! I'm currently looking for a solution to create an exchange mailbox on-premise, sync it to Office 365 and assign the license in one business rule. I didn't ... solution from our side? Please let me know how to configure this. Best Regards Marco Jandl

asked Apr 6, 2022 by marco_jandl (60 points)
0 votes
0 answers

How does Adaxes connect to Exchange 2007? We are having problems managing Public Folders through remote powershell (adding the pssnapin). Was wondering if there was any other ... the snap in. Get-Mailbox $id -DomainController $dc works fine in remote sessions

asked Oct 15, 2014 by kjesoo (960 points)
3,588 questions
3,277 answers
8,303 comments
548,092 users