Skip to main content
Delphix

Failure to add Windows host for SQL Server virtualization due to error: "Failed to set codepage to 65001 (UTF-8)" (KBA8124)

 

 

KBA

KBA# 8124

 

Issue

When adding a new Windows host as a target environment to the Delphix engine, a failure can occur during the configuration phase of the environment discovery or refresh job:

Add host "Windows_Target_Host".
Error
Failed to execute host configuration discovery for host "Windows_Target_Host": Parameter format not correct - /WINDOWS die : Error: Failed to set codepage to 65001 (UTF-8) At D:\Delphix\DelphixConnector\discovery\4201b39f-ced5-4c6f-cbf6-75cbf40cab4d-WINDOWS_HOST_ENVIRONMENT-13\ConfigurationDiscovery.ps1:26 char:9 + die "$($args[0])" + ~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,die .
Error Code
exception.host.windows.configuration_discovery.failed
Suggested Action
Correct the errors and try the operation again.

 

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

Resolution

To resolve this issue, the Windows path needs to be changed to the proper format for PowerShell API calls to find binaries. The Troubleshooting section has details on how to determine this is the issue. In this case the "chcp" binary (change code page) was not found due to the use of forward slashes "/" in the Windows system path for the profile of the Windows environment user.

The binary exists in the "C:\Windows\system32" directory. When the PATH was provided the issue can be seen:

C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;....

Make the change to the PATH by replacing the / characters with the back-slash: \. After the change is made, you may need to restart the DelphixConnector so new Delphix environment users can load the changed profile and utilize the PATH changes.

You can obtain the PATH from the windows host from the PowerShell console while logged in as the Delphix environment user specific to this Windows host:

PS C:\Users\delphix> $env:path
C:\Python27\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\PuTTY\;C:\Users\delphix\AppData\Local\Microsoft\WindowsApps;

To change the Path variable through the Windows user interface:

  1. Navigate to the Control Panel as the logged in Delphix environment user, and then click System:
    system.png
  2. From System, click Advanced system settings:
    system_icon.png
  3. In the System Properties window, click Environment Variables:
    advanced.png
  4. The Windows system directories are located in the System variables pane.  Click Edit to make changes:
    env_vars.png
  5. Edit directly or select the PATH item, for example, those with the forward-slashes /, click Edit, and then click OK to make the changes to the profile:
    edit_env.png

After this change you may need to restart DelphixConnector service to refresh the Delphix environment user connections so that the new PATH change(s) take effect.

 

 

Troubleshooting

You can run a simple test to verify if this is the problem. Important information comes from the error message:

Failed to execute host configuration discovery for host "Windows_Target_Host": Parameter format not correct - /WINDOWS die : Error: Failed to set codepage to 65001 (UTF-8) At D:\Delphix\DelphixConnector\discovery\4201b39f-ced5-4c6f-cbf6-75cbf40cab4d-WINDOWS_HOST_ENVIRONMENT-13\ConfigurationDiscovery.ps1

You can match the text of the error "Failed to set codepage to 65001 (UTF-8)" from the ConfigurationDiscovery.ps1 script indicated in the directory specified.  Here is the code snippet:

# Set the codepage to UTF-8, suppressing the command output that tells us the active code page

chcp $UTF8_CODEPAGE >$null

verifySuccess "Failed to set codepage to $UTF8_CODEPAGE (UTF-8)"

From the Windows host in question, login as the Delphix environment user, open PowerShell and execute this command to check the result:

PS C:\Program Files\Delphix\DelphixConnector\connector> chcp
Parameter format not correct - /windows

Here the message from the "chcp" failure matches what we find in the error message posted by Delphix:

Failed to execute host configuration discovery for host "Windows_Target_Host": Parameter format not correct - /WINDOWS

The case of the windows directory is arbitrary and reflects how the directory was defined during the Windows OS installation.

If you receive the similar "Parameter format not correct" message indicating a forward-slash on the Windows directory you are likely experiencing this issue.

 

 

 


Related Articles

The following articles may provide more information or related information to this article:

  • NA