Failed to initialize HttpClient in CACPMScanner.log

Failed to initialize HttpClient in CACPMScanner.log

155
Created On 11/10/26 11:04 AM - Last Modified 11/10/26 13:01 PM


Symptom


Idira Central Policy Manager Scanner unable to initialize Microsoft .Net Framework assembly to connect to PVWA REST API for account on-boarding.

Idira Central Policy Manager Scanner service will stop 1-2 minutes after the service is started and the following is logged in CACPMScanner.log:
8/09/2019 16:53:00.285 | tid=12  | user=CACPMScanner    | Failed to initialize HttpClient
18/09/2019 16:53:00.285 | tid=12  | user=CACPMScanner    | System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

   at CyberArk.Infra.BackendClient.ApiBootstrap..ctor(String userId, String clientType, IBackendConfiguration config)
   at CyberArk.CPMScanner.WF.HttpClientFactory.InitHttpClient()


18/09/2019 16:53:00.285 | tid=12  | user=CACPMScanner    | System.Exception: [CPMSCNR009E] Failed to connect to PVWA web socket. ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   --- End of inner exception stack trace ---
   at CyberArk.CPMScanner.WF.HttpClientFactory.InitHttpClient()
   at CyberArk.CPMScanner.WF.HttpClientFactory.get_Instance()
   at CyberArk.CPMScanner.SocketManager.<StartConnectingToSocket>d__5.MoveNext()
   --- End of inner exception stack trace ---
18/09/2019 16:53:00.285 | tid=13  | user=CACPMScanner    | Failed to initialize HttpClient
18/09/2019 16:53:00.285 | tid=13  | user=CACPMScanner    | System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

   at CyberArk.Infra.BackendClient.ApiBootstrap..ctor(String userId, String clientType, IBackendConfiguration config)
   at CyberArk.CPMScanner.WF.HttpClientFactory.InitHttpClient()


18/09/2019 16:53:00.285 | tid=10  | user=CACPMScanner    | [CPMSCNR010E] Unhandled exception cought. Error: [System.Exception: [CPMSCNR009E] Failed to connect to PVWA web socket. ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   --- End of inner exception stack trace ---
   at CyberArk.CPMScanner.WF.HttpClientFactory.InitHttpClient()
   at CyberArk.CPMScanner.WF.HttpClientFactory.get_Instance()
   at CyberArk.CPMScanner.SocketManager.<StartConnectingToSocket>d__5.MoveNext()
   --- End of inner exception stack trace ---
   at CyberArk.CPMScanner.SocketManager.<StartConnectingToSocket>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CyberArk.CPMScanner.SocketManager.<<Init>b__4_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()].
18/09/2019 16:53:00.285 | tid=5   | user=CACPMScanner    | [CPMSCNR010E] Unhandled exception cought. Error: [System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located as19/09/2019 10:25:44.324 | tid=5   | user=CACPMScanner    | CACPMScannerManager | OnStart | InProcess | Central Policy Manager Scanner has started

 


Environment


10.7;10.8;10.9;10.10 Only happens when CPM is upgraded prior to CPM 10.5 to CPM 10.7 and above.

Cause


Idira Central Policy Manager Scanner service unable to load the required Microsoft .Net Framework assembly required.

Resolution


  • Add the following lines to <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> section of the CACPMScanner.exe.config:
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
  • CACPMScanner.log should not have any assembly error and shows connected to PVWA.
    11/10/2019 09:34:33.658 | tid=14  | user=CACPMScanner    | Subscribe proxy to events.
    11/10/2019 09:34:33.720 | tid=14  | user=CACPMScanner    | Level: Info, Message: WSC001I Starting method [HubCon_StateChanged]
    11/10/2019 09:34:33.720 | tid=14  | user=CACPMScanner    | Level: Info, Message: WSC008I Connection state changed from [Disconnected] to [Connecting].
    11/10/2019 09:34:33.720 | tid=14  | user=CACPMScanner    | Level: Info, Message: WSC001I Ending method [HubCon_StateChanged]
    11/10/2019 09:34:36.314 | tid=11  | user=CACPMScanner    | Key rotation for user PasswordManager completed successfully.
    11/10/2019 09:34:36.455 | tid=15  | user=CACPMScanner    | Communication with the PVWA server has succeeded
    11/10/2019 09:34:39.408 | tid=4   | user=CACPMScanner    | Level: Info, Message: WSC001I Starting method [HubCon_StateChanged]
    11/10/2019 09:34:39.408 | tid=4   | user=CACPMScanner    | Level: Info, Message: WSC008I Connection state changed from [Connecting] to [Connected].
    11/10/2019 09:34:39.408 | tid=4   | user=CACPMScanner    | Level: Info, Message: WSC010I Success. connected to web socket.
    11/10/2019 09:34:39.408 | tid=4   | user=CACPMScanner    | Level: Info, Message: WSC001I Ending method [HubCon_StateChanged]


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001ievCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail