Friday, March 15, 2013

Creating a new Exchange Server 2010 Edge Subscription throws the error: “Object reference not set to an instance of an object.”

A client gave me a call earlier today to look into an issue where their organization would be able to send emails outbound but could not receive from external internet recipients.  After logging into their environment and reviewing the Exchange Server 2010 servers, I noticed that inbound mail was queuing up on their Edge transport server.  Browsing through the event logs was difficult as the consultant who deployed this Exchange environment left multiple certificates on the servers, did not properly remove the an old Exchange 2003 from the organization and also left an orphaned Exchange 2010 mailbox server object.  Needless to say it was a mess and difficult to determine what the issue was because it was working with the orphaned objects.

In any case, I narrowed the issue down to a problem with the subscription for the Edge transport server so I went ahead and logged onto the Hub Transport server to remove the subscriptions and recreate them to see if that would fix the problem but what I noticed was that while I was able to delete them, I could not recreate them because the following error would be thrown:

Edge Subscription



Object reference not set to an instance of an object.


An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.

Exchange Management Shell command attempted:

New-EdgeSubscription -FileData '<Binary Data>' -Site 'DOMAIN.NET/Configuration/Sites/Network' -CreateInternetSendConnector $true -CreateInboundSendConnector $true


The additional information provided are as follows:

Unexpected error [0x780A5833] while executing command ‘New-EdgeSubscriptoin -FileData ‘<Binary Data>’ -Site
-CreateInternetSendConnector $true -CreateInboundSendConnector $true’.

   at Microsoft.Exchange.Configuration.MonadDataProvider.MonadPipelineProxy.ClosePipeline(MonadAsyncResult asyncResult)

   at Microsoft.Exchange.Configuration.MonadDataProvider.MonadPipelineProxy.InternalEndInvoke(IAsyncResult results)

   at Microsoft.PowerShell.HostingTools.PipelineProxyBase.EndInvoke(IAsyncResult results)

   at Microsoft.Exchange.Configuration.MonadDataProvider.MonadCommand.EndExecute(MonadAsyncResult asyncResult)

   at Microsoft.Exchange.Configuration.MonadDataProvider.MonadCommand.Execute(WorkUnit[] workUnits)

   at Microsoft.Exchange.Management.SystemManager.WinForms.SingleTaskDataHandler.OnSaveData()

  at Microsoft.Exchange.Management.SystemManager.WinForms.SingleTaskDataHandler.OnSaveData(CommandInteractionHandler interactionHandler)

   at Microsoft.Exchange.Management.SystemManager.WinForms.DataHandler.Save(CommandInteractionHandler interactionHandler)

   at Microsoft.Exchange.Management.SystemManager.WinForms.MonadSaveTask.Run(Object interactionHandler, DataRow row, DataObjectStore store)

   at Microsoft.Exchange.Management.SystemManager.WinForms.SaverTaskProfile.Run(CommandInteractionHandler interactionHandler, DataRow row, DataObjectStore store)

   at Microsoft.Exchange.Management.SystemManager.WinForms.MonadCommandExecutionContext.Execute(TaskProfileBase profile, DataRow row, DataObjectStore store)

   at Microsoft.Exchange.Management.SystemManager.WinForms.AutomatedDataHandler.OnSaveData(CommandInteractionHandler interactionHandler)

   at Microsoft.Exchange.Management.SystemManager.WinForms.DataHandler.Save(CommandInteractionHandler interactionHandler)

   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Object reference not set to an instance of an object.

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewEdgeSubscription.FindAnyHubServer()

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewEdgeSubscription.ProvisionEdgeServerObject()

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewEdgeSubscription.CompleteSubscription()

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewEdgeSubscription.InternalProcessRecord()

   at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()

The details to the error provided weren’t all that useful when browsing through the internet as I could not find anything semi related to my problem so after a few hours of troubleshooting and trying the following without any luck:

  • Create a subscription for the first Edge transport server (we have 2) and complete the subscription on first hub transport server (we have 2)
  • Create a subscription for the second Edge transport server and complete the subscription on second hub transport server
  • Removed the Edge subscription still left on the Edge server with Get-EdgeSubscription and Remove-EdgeSubscription
  • Disabling Forefront Security for Exchange

… I decided that it was time to open up a ticket with Microsoft.  The engineer checked various items asking about the orphaned servers shown from the cmdlet:

Get-ExchangeServer | fl name, server*, site


… and eventually opened up ADSIedit and reviewed the orphaned Exchange Server 2010 object that no longer existed in the configuration container.  As he browsed through the attributes, he noticed that the msExchServerSite attribute was not yet:


He went ahead and copied the value for that attribute from another Exchange server object that was still in production, pasted it in:


… then tried to recreate the Edge subscription and this time it worked:



I’m sure this is a pretty isolated case and not many administrators may come across it but I hope if someone else does then this post will at least point them in the right direction.

As for this environment, I’ve already told the client I’ll be doing some cleanup for them over the weekend to get rid of the orphaned objects.


Anonymous said...

Thank you for documenting this, it was a godsend.

Exactly the same situation with an orphaned server thanks to a previous admin. You've saved me a lot of hassle on a Sunday night!


Anonymous said...

Thanks a lot for the Blog.
We were kind of desprate and we have a lot of sites so it was not obvious to us.

Your Solution worked perfectly.