GeoSync - Invalid object name error during manual sync

Version 1

    Verified Product Versions

    Environment Manager 10.1

    Introduction

    After configuring GeoSync, when attempting to manually run a sync through the console an error may be thrown indicating an 'Invalid Object Name'.

    GeoSync-error.png

    UserName [DOMAIN\user]

    Invalid object name '//AppSense/EM/PS/SyncCommandInitiatorService'.

    Server stack trace:

      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

      at PersonalizationObjects.ProfileManagementServer.IProfileManagement.GeoSync_ExecuteGeoSyncCommand(GeoCommand command)

     

    Detail

    During the database creation/upgrade process the GeoSync Service broker objects are created.  This will occur regardless of whether GeoSync is configured.  During the upgrade/creation process the database schema may have completed successfully, however a secondary script to create the Service Broker objects may have silently failed and one or more objects may not have been created.  Thus causing the error above.

    The Service Broker objects are located in the database and the screenshot below shows the location of the services and the expected location of the missing service.

    GeoSync-Broker-MissingService.png

    Solution

    Should the following error be encountered then the solution is to manually run the SQL commands on the database to recreate the Service Broker objects.  The following SQL script will attempt to recreate all objects, so if any exists already a message will be encountered indicating it already exists.

    The following script has been tested and ran against a 10.1 FR4 database.  Should this be encountered on later version then please raise a case with Ivanti Support.

       create queue dbo.SyncCommandQueue
        go
    
        create message type [//AppSense/EM/PS/SyncCommand]
            validation = well_formed_xml;
        go
    
        create message type [//AppSense/EM/PS/SyncCommandReply]
            validation = well_formed_xml;
        go
    
        create contract [//AppSense/EM/PS/SyncCommandContract]
              ([//AppSense/EM/PS/SyncCommand] sent by initiator,
               [//AppSense/EM/PS/SyncCommandReply]  sent by target)
        go
    
        create service [//AppSense/EM/PS/SyncCommandService]
            on queue dbo.SyncCommandQueue([//AppSense/EM/PS/SyncCommandContract])
    
        go
    
        create queue dbo.SyncCommandInitiatorQueue
        go
    
    
        create service [//AppSense/EM/PS/SyncCommandInitiatorService]
            on queue dbo.SyncCommandInitiatorQueue
    
        go
    

     

    Under certain circumstances the account running the script may not have the correct right to complete the execution.

    In which case the following exception will be thrown:-

    GeoSync-SQLerror.png

    In which case the above script needs to be modified to the following

     

    CREATE SERVICE [//AppSense/EM/PS/SyncCommandService]  
    AUTHORIZATION [dbo]
    ON QUEUE [dbo].[SyncCommandQueue] ([//AppSense/EM/PS/SyncCommandContract])
    GO
    
    CREATE SERVICE [//AppSense/EM/PS/SyncCommandInitiatorService]  
    AUTHORIZATION [dbo]
    ON QUEUE [dbo].[SyncCommandInitiatorQueue] 
    GO