Object reference not set to an instance of an object. When importing RGS config

By | October 13, 2018

Update: Looks like Microsoft has noted this issue in KB4458679 
You can install the January 2019 CU to resolve the issue.

So I recently ran into the error message “Object reference not set to an instance of an object” When attempting to import an RGS config for pool failover.

Well, that’s not a very helpful message. Running again with -Verbose gave me more info but still not the name of the object causing the issue.

VERBOSE: Update associations with queues…
VERBOSE: Using Application Database on "AUMELSQL.skype4badmin.com" with Failover Partner " " for Application Server
"2-ApplicationServer-1".
VERBOSE: Performing the operation "Import-CsRgsConfiguration" on target
"service:ApplicationServer:SfbFEPool02.skype4badmin.com/7195109b-6564-455a-80ab-d475d05b6a72".
VERBOSE: Handle audio files…
VERBOSE: Update associations with holiday sets…
VERBOSE: Update associations with managers…
Import-CsRgsConfiguration : Object reference not set to an instance of an object.
At line:1 char:1
Import-CsRgsConfiguration -Destination "service:ApplicationServer:SfbFePool02.sky… ~~~~~~~~~~~~~~~~
CategoryInfo : WriteError: (Microsoft.Rtc.R…lRgsDataContext:TransactionalRgsDataContext) [Import-CsRg
sConfiguration], NullReferenceException
FullyQualifiedErrorId : Microsoft.Rtc.Rgs.Management.ImportOcsRgConfigurationCmdlet

But what I can see is that last imported object is SFBFEpool02.skype4badmin.com/7195109b-6564-455a-80ab-d475d05b6a72″

Okay, we know the guid. Whats the actual queue?

Well, if we extract the RGS Config zip we can perform a search through all the files using Notepad++ under “Search > Find In Files…”

Notepad++ will then give us a list of matches for that GUID in the RGS config down the bottom. Clicking on them will take Notepad++ to the relevant section and file

Looking at the Workflow.xml file I can figure out the workflow name so I can go check it out in the RGS control panel.

Simply trying to open and save the workflow again shows that a queue the IVR targeted has been deleted. As this IVR wasn’t been used anymore I deleted it and re-exported the config using Export-CsRgsConfiguration otherwise it would just be a case of pointing it to a new queue instead.

Now the Config imports on the new Pool correctly. Hope this helps someone.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.