Technical Notes, Zetadocs

FIX: Zetadocs Expenses Connector won't start after upgrading

ZTN6020

This Zetadocs technical note applies to:

  • Zetadocs Expenses Connector

Symptom

When trying to start the Zetadocs Expenses Connector service for your Business Central or NAV on-premise instance, the service fails to start with the following error in the connector log "Service unable to initialize due to connectivity error" or "Service cannot be started. The handle is invalid".

This will prevent any reports being exported from Zetadocs Expenses into Business Central/NAV.

Cause

In some rare circumstances, upgrading the connector or related components can result in the existing Zetadocs.Approval.Connector.Service.exe.config file for the Zetadocs Expenses Connector being overwritten or modified, resulting in entries being duplicated and preventing the connector service from being able start.  

Resolution

In order to determine how the Zetadocs Expenses Connector .config file may have been affected, debug logging will need to be enabled for the connector, this can be done by following this technote: ZTN6013.

Once debug logging is enabled in the .config file, reproduce the issue and obtain the Zetadocs.Expenses.Connector.log, open the file and it will report exactly why the service is failing. The below passage from an example connector log higlights this. 
 

“Monitor Service     28/04/2022 11:50:35.383       Verbose   3                  ConnectorService.Core_Error                   Stopping service due to fatal error.

Monitor Service       28/04/2022 11:50:39.743       Verbose   4                  ConnectorService.OnStart       Initializing core connector

Monitor Service       28/04/2022 11:50:39.821       Informational           4                  ConnectorService.OnStart       Service unable to initialize due to connectivity error: The element <transport> may only appear once in this section. (C:\Program Files (x86)\Zetadocs Expenses Connector\Zetadocs.Approval.Connector.Service.exe.Config line 108)

An instance seen by Equisys previously is the <transport> section being duplicated, the below example shows the transport section and type duplicated as well as highlighting what line the offending entry is on (recommended to use notepad++ when navigating to the offending line).

Things to spot: Line, Section and clientCredentialType

If the error you are experiencing is referencing the <transport> section, you can go ahead and remove the line with the credential type that is not required as it’s the offending entry. Once completed, save the .config file, and start the connector.

If the passage is referring to a different section to the <transport> or If you are still experiencing issues beyond this, please reach out to support@equisys.com quoting the technote number ZTN6020

Status

This behaviour is handled by the resolutions detailed above.

Last updated: 24th May 2022 (MT/JC) 

Keywords:  Unable export extension connector stopped