When trying to run the command line it is failing with (5) Command Line result upload error.
Action Plan
- The error code 5 - Command-Line result upload error" is usually seen with the permission issues with User ID / Password.
-
- Check whether --login , --password and –-serverUrl are entered correctly.
- Check whether the user has changed the password for the login to HL whether the user was able to login and upload results previously.
- Check whether the account is locked.
-
- Check whether there is any proxy involved. If proxy is there user needs to pass the proxy parameters to the command line so that it can reach Highlight server through the proxy. An example can be found in the Command Line readme. Below is the sample command line with proxy
--------------------------------------
Special configuration for proxy server
--------------------------------------
Using a proxy server for upload.
Proxy with no password :
-Dhttps.proxyHost=<your proxy host>
-Dhttps.proxyPort=<your proxy port>
If a password is requested for proxy add the following additional parameter
-Dhttps.proxyUser=<user>
-Dhttps.proxyPassword=<password>
java -Dhttps.proxyHost=your proxy host -Dhttps.proxyPort=your proxy port -Dhttps.proxyUser=user -Dhttps.proxyPassword=password -jar HighlightAutomation.jar --workingDir "C:\highlight-myproject" --sourceDir "C:\myproject\src" --login xxx --password xxxx - Confirm whether the TLS version used is supported by Highlight. Check in the logs for messages like javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake Check the log, to find out the TLS version used
"ClientHello": {
"client version" : "TLSv1.2",
"supported_versions (43)": {
"versions": [TLSv1.3]
}, Configure Jenkins to use the TLS version used by Highlight or edit the command to correct the TLS version used. To find out the TLS version used by Highlight-
-
- Open highlight URL in chrome browser and open developer tools.
- Go to security tab and in connection details we can determine the version of TLS that is being used.
- Match the TLS format in command line and check if upload works.
-
-
- Check if there are any errors such as UTF-8 "\xE7" does not map to Unicode at perl/FileList.pm line XX and/or ERROR highlight: No header can be extracted to patch framework files (if all the code is not properly encoded) related to encoding which was not readable by Highlight. Please refer CAST HIGHLIGHT - Results Upload - CLI - UTF-8 "\xE7" does not map to Unicode at perl/FileList.pm line xx
- If NoAnalysis messages are seen in logs it means there are no results hence upload has failed.
-
- Check if there is a Result.zip post the analysis completion. If yes, please try to upload it manually for that application.
- Check whether code is not accessible due to some permission issues.
-
- Use the latest version of the CLI. As the platform evolves (new features, new api endpoints, etc.), the command line also uses some of these functionalities.
Related Articles
CAST HIGHLIGHT - CLI - Error Codes
CAST HIGHLIGHT - CLI - Command Line analysis error
CAST HIGHLIGHT - CLI - Docker - Results Upload - Upload failed with code 5 when using Docker
CAST HIGHLIGHT - CLI - ERROR: Failed to fetch company with id when using --basicAuth
Highlight Automated Code Scan (Command Line)
Tickets
29229, 37307, 36849, 40904
Comments