Conjur - Error when installing Synchronizer - Exception calling "Substring" with "2" argument(s): "startIndex cannot be larger than length of string
96
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 15:58 PM
Symptom
Sometimes the Vault Conjur Synchronizer install will fail with the following error:
[ERROR] System.Management.Automation.MethodInvocationException: Exception calling "Substring" with "2" argument(s): "startIndex cannot be larger than length of string.
Parameter name: startIndex" ---> System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring(Int32 startIndex, Int32 length)
at CallSite.Target(Closure , CallSite , Object , Object , Object )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Parameter name: startIndex" ---> System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring(Int32 startIndex, Int32 length)
at CallSite.Target(Closure , CallSite , Object , Object , Object )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Environment
12.0
- Happens with Vault Conjur Synchronizer version 12.1.1
- Will happen if you try to install the Vault Conjur Synchronizer from a remote machine (i.e. when you are not running it from the actual server it is being installed on)
- Will happen if the IE on the target windows server has never been used
Cause
Happens because the IE on the target machine has never been used.
When you open the IE for the first time, it asks you to configure the options for the first time (see attached image for reference). Once this is done, you will be able to use the IE. But unless you do that, the installation will fail with the following powershell error:
“The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer’s first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.”
The Synchronizer log does not expose this error, but shows the one stated above instead.
Resolution
There are two ways to solve this issue:
- If you are indeed deploying the Vault Conjur Synchronizer from a remote machine, you can apply the following registry entry to the Synchronizer server before you start the Synchronizer installation:
"HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main" -Name "DisableFirstRunCustomize" -Value 2
- If you wish to handle it on the Synchronizer Windows server itself, please perform the following steps:
- Go to that machine
- Open the IE
- Complete the initial IE settings step (see attached image for reference)
- Install the Synchronizer