AS Sync .net framework errors

Hello,

 

I'm receiving the following error when running ad sync, sync does seem to work.

 

Any thoughts

 

sophos error.txt
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at SophosCloudADSyncUI.ApprovalForm.ApprovalForm_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
SophosCloudADSyncUI
    Assembly Version: 3.3.0.0
    Win32 Version: 3.3.40.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Sophos/Cloud/AD%20Sync/SophosCloudADSyncUI.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
SophosCloudADSyncLib
    Assembly Version: 3.3.0.0
    Win32 Version: 3.3.40.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Sophos/Cloud/AD%20Sync/SophosCloudADSyncLib.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.ServiceProcess
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------
System.ServiceModel
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
SMDiagnostics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.ServiceModel.Internals
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
----------------------------------------
System.IdentityModel
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


  • Hi  

    Could you please check under AD sync settings if there any filters applied? Also, check under C:\ProgramData\Sophos\Sophos Cloud AD Sync\Logs\  if you see any error. 

  • In reply to Shweta:

    I still get the error from the dotnetframework.

    When I choose continue it seems working.

     

    11:09:55.869 [Th 21] Sync finished without errors

     

    I will check if the automated sync works.

  • In reply to PepijnDeneut:

    Strange,

    I switched from a central user to an api user and now getting following errors:

     

    in the firewall I see nothing blocker

     

    2020-03-20.log
    11:21:00.079 	[Th 14] Adding an event handler
    11:21:00.079 	[Th 14] Subscribed an event handler
    11:21:01.264 	[Th 17] HTTP request to https://cloud.sophos.com/api/sessions error Forbidden: 
    11:21:01.264 	[Th 17] Check for MSI update failed. Reason: System.Net.Http.HttpRequestException ---> CommandLib.HttpRequestCommand+HttpStatusException: Exception of type 'CommandLib.HttpRequestCommand+HttpStatusException' was thrown.
       --- End of inner exception stack trace ---
       at CommandLib.HttpRequestCommand.EnsureSuccessStatusCodeResponseChecker.CheckResponse(HttpResponseMessage response)
       at CommandLib.HttpRequestCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.Command.BaseSyncExecute(Object runtimeArg, Command owner)
       at CommandLib.RetryableCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.Command.BaseSyncExecute(Object runtimeArg, Command owner)
       at SophosADSync.SophosCloudWebClient.MakeRequest(String address, HttpMethod method, Byte[] data, Dictionary`2 headers, Int32 maxRetries)
       at SophosADSync.SophosCloudWebClient.Authenticate(Boolean abortable)
       at SophosADSync.SophosCloudAPI..ctor(Command context, Credentials creds, TimeSpan timeout, LogWriter logWriter)
       at SophosADSync.CheckForMSIUpdateCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.SyncCommand.ExecuteRoutine(Object arg)
    11:22:53.377 	[Th 14] Request received to sync immediately
    11:22:53.377 	[Th 21] Changed state to Busy
    11:22:53.377 	[Th 21] Performing active directory synchronization using AD Sync version 3.3.40.0
    11:22:53.377 	[Th 21] Performing active directory synchronization using AD Sync version 3.3.40.0
    11:22:53.377 	[Th 21] Configuring secure Sophos Central connection
    11:22:54.563 	[Th 21] HTTP request to https://cloud.sophos.com/api/sessions error Forbidden: 
    11:22:54.563 	[Th 21] Failed active directory synchronization. Reason: System.Net.Http.HttpRequestException ---> CommandLib.HttpRequestCommand+HttpStatusException: Exception of type 'CommandLib.HttpRequestCommand+HttpStatusException' was thrown.
       --- End of inner exception stack trace ---
       at CommandLib.HttpRequestCommand.EnsureSuccessStatusCodeResponseChecker.CheckResponse(HttpResponseMessage response)
       at CommandLib.HttpRequestCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.Command.BaseSyncExecute(Object runtimeArg, Command owner)
       at CommandLib.RetryableCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.Command.BaseSyncExecute(Object runtimeArg, Command owner)
       at SophosADSync.SophosCloudWebClient.MakeRequest(String address, HttpMethod method, Byte[] data, Dictionary`2 headers, Int32 maxRetries)
       at SophosADSync.SophosCloudWebClient.Authenticate(Boolean abortable)
       at SophosADSync.SophosCloudAPI..ctor(Command context, Credentials creds, TimeSpan timeout, LogWriter logWriter)
       at SophosADSync.ADSyncCommand..ctor(ADSyncService service, EventRouter eventRouter)
       at SophosADSync.ChangeStateAndADSyncCommand.SyncExeImpl(Object runtimeArg)
    11:22:54.563 	[Th 21] Context for failure: ADSyncCommand=>RetryableCommand=>HttpRequestCommand(489)
    11:22:55.717 	[Th 21] HTTP request to https://cloud.sophos.com/api/sessions error Forbidden: 
    11:22:55.717 	[Th 21] Failed to write error condition back to Sophos Central: System.Net.Http.HttpRequestException ---> CommandLib.HttpRequestCommand+HttpStatusException: Exception of type 'CommandLib.HttpRequestCommand+HttpStatusException' was thrown.
       --- End of inner exception stack trace ---
       at CommandLib.HttpRequestCommand.EnsureSuccessStatusCodeResponseChecker.CheckResponse(HttpResponseMessage response)
       at CommandLib.HttpRequestCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.Command.BaseSyncExecute(Object runtimeArg, Command owner)
       at CommandLib.RetryableCommand.SyncExeImpl(Object runtimeArg)
       at CommandLib.Command.BaseSyncExecute(Object runtimeArg, Command owner)
       at SophosADSync.SophosCloudWebClient.MakeRequest(String address, HttpMethod method, Byte[] data, Dictionary`2 headers, Int32 maxRetries)
       at SophosADSync.SophosCloudWebClient.Authenticate(Boolean abortable)
       at SophosADSync.SophosCloudAPI..ctor(Command context, Credentials creds, TimeSpan timeout, LogWriter logWriter)
       at SophosADSync.SophosCloudAPI..ctor(Command context, LogWriter logWriter)
       at SophosADSync.ChangeStateAndADSyncCommand.SyncExeImpl(Object runtimeArg)
    11:22:55.717 	[Th 21] Changed state to Idle
    11:25:10.448 	[Th 3] Removing an event handler
    11:25:10.448 	[Th 3] Unsubscribed an event handler
    

  • In reply to PepijnDeneut:

    Hi  

    I'd request you to check the permission of the account you are using for the sync has the below rights:

    • Rights to logon as a service
    • Rights to interactive logon
    • Rights to log on as a batch
    • NTFS full permissions on C:\ProgramData\Sophos\Sophos Cloud AD Sync
    • Account need rights to read OU on DC that you want to sync

    Note: Every time you change the service account used for the Sophos AD sync service - the Active Directory Sync tool will need to be reconfigured.

  • In reply to Jasmin:

    Hi I will check.

    I didn't change the user for the service, but the user in the program (via api) instead of user.

  • In reply to PepijnDeneut:

    Hi  

    Thank you for the acknowledgement.

    Please let us know once you have checked all the things.

  • In reply to Jasmin:

    Hello,

     

    Just reinstalled the tool and it works.

    Nothing service or rights related.

  • In reply to PepijnDeneut:

    Hi  

    Glad that your issue has been resolved.