Troubleshooting
Problem
CDT Export from CLI Failing on SST (Self Service Tool) within a minute, the same config can be exported from the SST UI without issues.
Symptom
CDT export from the CLI fails on SST, the output from the CLI is 202 accepted as expected.
The process would be created normally on SST but it would fail within a minute.
Cause
The issue is casued by the preferences file (ydkprefs.xml) being created on a Windows machine, it will have a windows EOL (End Of Line). It will add "\r" at the end of each line like the logging below;
<SourceTargetPrefs>\r\n <SourceTargetPrefs>\r\n
The \r wouldn't be visible to us as we're editing the file so it was actually noticed later in logging.
This would cause error like the following;
BaseDeploymentAction - response for CreateExportCDTTaskRun run for exportConfigurationDataTekton is: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the object provided is unrecognized (must be of type TaskRun): couldn't get version/kind; json parse error: invalid character '\\r' in string literal ({\n \"apiVersion\": \"tekton.dev/ ...)","reason":"BadRequest","code":400}
Now logging can be fetched from graylogs by an IBMer but it shows the "\r" characters is what's causing this issue exporting from the CLI.
<SourceTargetPrefs>\r\n <SourceTargetPrefs>\r\n
The \r wouldn't be visible to us as we're editing the file so it was actually noticed later in logging.
This would cause error like the following;
BaseDeploymentAction - response for CreateExportCDTTaskRun run for exportConfigurationDataTekton is: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the object provided is unrecognized (must be of type TaskRun): couldn't get version/kind; json parse error: invalid character '\\r' in string literal ({\n \"apiVersion\": \"tekton.dev/ ...)","reason":"BadRequest","code":400}
Now logging can be fetched from graylogs by an IBMer but it shows the "\r" characters is what's causing this issue exporting from the CLI.
Environment
DEVELOPMENT
Diagnosing The Problem
The SST UI will remove the \r present in the file from a windows editing session so that's why it passes from the UI. The \r is not visible to us in the file that's what makes it tricky to diagnose, also there will be no error message from the CLI output once your export is created with windows line endings.
Resolving The Problem
What you can do if you are trying to export CDT using the CLI on a windows machine is to save the file with linux line endings.
notepad++ has the capability to save as linux line end.

This would remove the "\r" allowing the export config to pass.
Related Information
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"","label":""},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCNQHA","label":"Self Service"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
24 July 2024
UID
ibm17160481