User is getting the Error Discovery child process failed with exit status 2 as shown below when trying to run the CAST Highlight scan in Jenkins with the below command.
java -jar /var/jenkins_home/Highlight-Automation-Command/HighlightAutomation.jar --analyzerDir /var/jenkins_home/Highlight-Automation-Command/perl --workingDir /home/jenkins/workspace/CASTIntegration --sourceDir /var/jenkins_home/Highlight-Automation-Command --login xxxx@castsoftware.com --password xxxx--applicationId xxxx--companyId xxx--serverUrl https://rpa.casthighlight.com
Command Line version : 5.1.24-RELEASE
Preparing analysis...
Preparation stage completed.
Analysing...
Start discovering
Discovery child process failed with exit status 2
[ERR3] HighlightAutomation --analyzerDir /var/jenkins_home/Highlight-Automation-Command/perl --workingDir /home/jenkins/workspace/CASTIntegration --sourceDir /var/jenkins_home/Highlight-Automation-Command --login xxxx@castsoftware.com --password xxxx--applicationId xxxx--companyId xxx--serverUrl https://rpa.casthighlight.com failed with code 3
java.lang.Exception: Discovery child process failed with exit status 2
Solution
The issue occurs because of the missing Perl libraries in the machine.
For Example if the user was using the Linux Env and the perl was already installed but the required Libraries were missing on the system.
To download the required Libraries use the below commands
$>yum -y install perl-Digest-SHA
$>yum -y install perl-JSON
$>yum -y install perl-XML-LibXML
Once the Libraries are installed execute the below command by adding a parameter --perlInstallDir which should worked fine
java -jar /var/jenkins_home/Highlight-Automation-Command/HighlightAutomation.jar --analyzerDir /var/jenkins_home/Highlight-Automation-Command/perl --perlInstallDir usr/bin/perl --workingDir /home/jenkins/workspace/CASTIntegration --sourceDir /var/jenkins_home/Highlight-Automation-Command --login xxxx@xxx.com --password xxx --applicationId xxx--companyId xxx --serverUrl https://rpa.casthighlight.com
Comments