CAST HIGHLIGHT - CLI - Error code 5 - Command Line result upload error

When trying to run the command line it is failing with (5) Command Line result upload error.

Action Plan

  1. The error code 5  - Command-Line result upload error" is usually seen with the permission issues with User ID / Password.
      1.  Check whether  --login , --password and –-serverUrl are entered correctly.
      2.  Check whether the user has changed the password for the login to HL whether the user was able to login and upload results previously.
      3. Check whether the account is locked.
  2. 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

     

  3. 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
        1. Open highlight URL in chrome browser and open developer tools.
        2. Go to security tab and in connection details we can determine the version of TLS that is being used.
        3. Match the TLS format in command line and check if upload works.
  4. If you are getting messages like "ERROR AnalysisPipeline: Upload failed
    com.castsoftware.highlight.RTExceptionWithStatus: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" please check out the workarounds mentioned in
    CAST HIGHLIGHT - SSL - "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
  5. If there are errors like - Caused by: java.lang.Exception: Failed to upload file 'Java-2023_0018.CloudReady.csv' to application result id='6369' with company [name='xxxxx='000000'] and application [name='XXXX',id=1234], which helps in identifying the particular file and the application then try to upload the app manually and sees if it throws the error.
  6. 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
  7. If NoAnalysis messages are seen in logs it means there are no results hence upload has failed. 
      1. Check if there is a Result.zip post the analysis completion. If yes, please try to upload it manually for that application.
      2. Check whether code is not accessible due to some permission issues. 
  8. If you see errors like this in HL Automation log    2023-06-21 13:40:31,881 INFO  perl: out: Out of memory!  2023-06-21 13:40:31,881 INFO  perl: out: Out of memory! then the analysis ended with "out of memory" before it reached the upload stage. Then split the scan as recommended in the Getting Started Guide.
  9. If there are errors like --appendResult --skipSubmit failed with code 5 check whether you are using both --appendResult and --skipSubmit together in the command.  It is recommended to use --skipSubmit and scan the result first and then in the second scan use --appendResult. Both should not be used in the same command. One of the following should be the criteria 
    • if the source code is complete you should not use either flag
    • If it's the first set of files to upload then you should only use --skipSubmit
    • If it's the second set to upload then you should only use--appendResult
  10. If in the HL Automation log the error is Caused by: java.lang.IllegalArgumentException: Failed to fetch company with id='xxxxx' then follow CAST HIGHLIGHT - CLI - Error - Caused by: java.lang.IllegalArgumentException: Failed to fetch company with id='xxxxx'
  11. 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 - Error code 3 - Command Line techno discovery error

CAST HIGHLIGHT - CLI - Error code 4 - Command Line analysis error

CAST HIGHLIGHT - CLI - Error code 6 - Command Line source dir or output dir validation error

CAST HIGHLIGHT - Results Upload - Partial Upload of CSV files when Manual Upload was attempted

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

CAST HIGHLIGHT - CLI - Scan fails for an application with an error Failed to fetch company with id XXXSTDERR

CAST HIGHLIGHT - CLI - ERROR Failed to upload submission for application result id='XXXXXX' with company [name='XXX',id='XXXX'] and application [name='XXX',id=XXXXX] message: 400 highlight.server.client.campaignApplication.update.NoAnalysis

CAST HIGHLIGHT - Results Upload - CLI - UTF-8 "\xE7" does not map to Unicode at perl/FileList.pm line xx

Highlight Automated Code Scan (Command Line)

 

Tickets

29229, 37307, 36849, 40904, 43479, 41938, 42213, 44434, 44352

Have more questions? Submit a request

Comments

Powered by Zendesk