Thursday, September 23, 2010

Exchange 2010: Every 10 minutes of Event ID 4: Task Test-OutlookConnectivity writing error when processing record…

Exchange 2010 CAS server had been screaming about this error every few minutes with the following event log.  Obviously Test-OutlookConnectivity couldn’t find the test mailbox.

Log Name:      Application
Source:        MSExchange Configuration Cmdlet - Management Console
Date:          9/22/2010 10:59:00 PM
Event ID:      4
Task Category: General
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      EXCHCAS1.company.com
Description:
(PID 8440, Thread 51) Task Test-OutlookConnectivity writing error when processing record of index 0. Error: Microsoft.Exchange.Monitoring.MailboxNotFoundException: Failed to find the mailbox. Mailbox = 'extest_defce2c7c5094@company.com'.
   at Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask.GetTestMailbox()
   at Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask.get_Identity()
   at Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask.InternalValidate()

I ran the Test-OutlookConnectivity manually and what do you know…it didn’t find the test mailbox.

[PS] C:\Windows\system32>Test-OutlookConnectivity -protocol http
Failed to find the mailbox. Mailbox = 'extest_defce2c7c5094@company.com'.
    + CategoryInfo          : OperationStopped: (Microsoft.Excha...onnectivityTask:TestOutlookConnectivityTask) [Test-   OutlookConnectivity], MailboxNotFoundException
    + FullyQualifiedErrorId : 2A7CA611,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask

Reading the documentation points out an script that creates test mailbox (New-TestCASConnectivityUser.PS1). I decided to run it to create the test user and mailbox.

[PS] C:\Windows\system32>cd 'C:\Program Files\Microsoft\Exchange Server\V14\Scripts'
[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\new-TestCasConnectivityUser.ps1
Please enter a temporary secure password for creating test users.  For security, the password will be changed regularly and automatically by the system.
Enter password: *********

Please either run the command on an Exchange Mailbox Server or pipe at least one mailbox server into this task.
For example:

  get-mailboxServer | new-TestCasConnectivityUser.ps1 [-UMDialPlan <dialplanname> -UMExtension <numDigitsInDialplan>]

or

  get-mailboxServer foo | new-TestCasConnectivityUser.ps1 [-UMDialPlan <dialplanname> -UMExtension <numDigitsInDialplan>]

You can um-enable the test user by running this command with the following optional parameters : [-UMDialPlan <dialplanname> -UMExtension <numDigitsInDialplan>] .Either None or Both must be present.

Alright it wants me to pipe it with mailbox server object. OK let’s do it.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>Get-MailboxServer | .\new-TestCasConnectivityUser.ps1
Please enter a temporary secure password for creating test users.  For security, the password will be changed regularly and automatically by the system.
Enter password: *********
Create test user on:  MBX1.company.com
Control-Break to quit or Enter to continue:
CreateTestUser : Mailbox could not be created. Verify that OU 'Users' exists and that password meets complexity requirements.
At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\new-TestCasConnectivityUser.ps1:227 char:27
+   $result = CreateTestUser <<<<  $exchangeServer $mailboxServer $securePassword $OrganizationalUnit $UMDialPlan $UMExtension
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

Create test user on:  MBX2.company.com
Control-Break to quit or Enter to continue:
CreateTestUser : Mailbox could not be created. Verify that OU 'Users' exists and that password meets complexity requirements.
At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\new-TestCasConnectivityUser.ps1:227 char:27
+   $result = CreateTestUser <<<<  $exchangeServer $mailboxServer $securePassword $OrganizationalUnit $UMDialPlan $UMExtension
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

 

Oh! Brother! this thing never ends. I typed the password complex enough, so it’s Users container. What’s this error message smoking. Every AD has an Users container by default. Damn! the error messages that doesn’t mean it says. I open the NewCASConnectivityUser.PS1 in Notepad and found $Organization variable and changed it to different OU name that created by me.  Time to run the script again.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>Get-MailboxServer | .\new-TestCasConnectivityUser.ps1
Please enter a temporary secure password for creating test users.  For security, the password will be changed regularly and automatically by the system.
Enter password: *********
Create test user on:  MBX1.company.com
Control-Break to quit or Enter to continue:
CreateTestUser : Mailbox could not be created. Verify that OU 'Testing' exists and that password meets complexity requirements.
At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\new-TestCasConnectivityUser.ps1:227 char:27
+   $result = CreateTestUser <<<<  $exchangeServer $mailboxServer $securePassword $OrganizationalUnit $UMDialPlan $UMExtension
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

Create test user on:  MBX2.company.com
Control-Break to quit or Enter to continue:
UserPrincipalName:  extest_defce2c7c5094@company.com
WARNING: The command completed successfully but no settings of 'corp.intusurg.com/Testing/extest_defce2c7c5094' have
been modified.

You can um-enable the test user by running this command with the following optional parameters : [-UMDialPlan <dialplann
ame> -UMExtension <numDigitsInDialplan>] .Either None or Both must be present.

 

It errored out in MBX1, because the god damn script (NewCASConnectivityUser.ps1) decided to create the test mailbox in Recovery Database. (O..My Sister!!!) New-Mailbox found next database to create mailbox is Recovery Database.

Log Name:      Application
Source:        MSExchange Configuration Cmdlet - Remote Management
Date:          9/22/2010 11:02:30 PM
Event ID:      5
Task Category: General
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CAS1.company.com
Description:
(PID 10512, Thread 79) Task New-Mailbox throwing terminating exception at stage Microsoft.Exchange.Management.Tasks.RecipientTaskException: US-RDB-1 is a recovery database. Mailboxes can't be enabled on a recovery database.. Exception: {4c3c1565-0697-4bb9-a2b4-120b5078ced1}

 

But it did created the test mailbox on another mailbox server (with no Recovery Database). Now I can run Test-OutlookConnectivity cmdlet successfully and my event log error stopped.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>Test-OutlookConnectivity -protocol http

ClientAccessServer             Mailbox       Database      Scenario       Result  Latency Error
                                                                                  (MS)
------------------             -------       --------      --------       ------  ------- -----
CAS1.COMPANY.com  COMPANY... US-DB3        Autodiscover: Web service r... Success 1185.62
CAS1.COMPANY.com  COMPANY... US-DB3        RFRI::GetReferral.             Success 2418.05
CAS1.COMPANY.com  COMPANY... US-DB3        NSPI::GetProfileDetails.       Success 2449.25
CAS1.COMPANY.com  COMPANY... US-DB3        Mailbox::Connect.              Success 2371.25
CAS1.COMPANY.com  COMPANY... US-DB3        Mailbox::Logon.                Success  280.81

Whew! Life is interesting…

No comments:

Post a Comment

Followers

hit counter