When PreLinked or PostLinked process(es) fail
search cancel

When PreLinked or PostLinked process(es) fail

book

Article ID: 227416

calendar_today

Updated On:

Products

CA Harvest Software Change Manager

Issue/Introduction

When the process being executed fails, and the Output Log shows:

"The PostLinked process(es) failed..."

or

"The PreLinked process(es) failed...", finding the root cause of the problem can be a challenge. 

Here is an example error message:

---------- Begin  <Promote to Test>  Process ---------------
I00020017: The package <PACKAGE_NAME> has been promoted to Test.
I00020015: The process execution completed successfully. The package count is: 1.
E03020134: couldn't delete the folder! at c:\Scripts\TestCheckout.pl line 21..
E03020516: Execution of server UDP program perl c:\Scripts\TestCheckout.pl SampleProject Development has failed. Exit code: 255.
S10060051: The PostLinked process(es) failed for parent process: Promote to Test.
E03060019: Process Execute failed. Process Name: Promote to Test.
---------- End  <Promote to Test>  Process ---------------

If you see check in succeed followed by a pause the above log may not be shown.

This can still indicate that the PostLink process is failing.

Environment

Releases : 14.0 and 14.5

Component : CA HARVEST SCM CORE FUNCTIONALITY/PROCESS AUTOMATION

Resolution

In situations like this, a UDP (User Defined Process) is involved.  Often UDPs are configured to run a custom command or script.  The exact custom command or script that failed is included in the text of the error message.  Look for the line that starts with the error code "E03020516:".  In the above example, here it is:

E03020516: Execution of server UDP program perl c:\Scripts\TestCheckout.pl SampleProject Development has failed. Exit code: 255.

If you delete "E03020516: Execution of server UDP program" from the beginning of that line, and everything after "has failed", what remains is the exact command that the UDP was trying to run. 

E03020516: Execution of server UDP program perl c:\Scripts\TestCheckout.pl SampleProject Development has failed. Exit code: 255.

In most cases, the same command should run successfully from a command prompt window on the broker machine.

In the above example, when running the command from a command prompt window, the result is:

C:\Users\Administrator>perl c:\Scripts\TestCheckout.pl SampleProject Development
couldn't delete the folder! at c:\Scripts\TestCheckout.pl line 21.

This shows us the exact problem that is happening with the command.  If the command involves a custom-created script, such as a Perl script, Java program, or shell script, the resolution will be found by debugging the script or program involved.  Depending on the type of program or script involved, some programming expertise might be needed to accomplish this.

Additional Information

In some cases, the script may have problems and still succeed.  For example,

---------- Begin  <Promote and Copy to Staging>  Process ---------------
I00020017: The package <package name> has been promoted to Staging.
I00020015: The process execution completed successfully. The package count is: 1.
I00020133: No Server selected to copy files. Contact SCM Administrator..
I00060052: Copy Files execution was successful.
---------- End  <Promote and Copy to Staging>  Process ---------------

In this case you will not see the message expained above about "Execution of server UDP program ... has failed.  Instead, the last line says "execution was successful".  An error was encountered in the script but it did not return an error code. 

To find the problem we will need to login to the Administrator Tool, navigate to the Project, State, and Process on the Lifecycles tab, right click and select "Properties".

On the Properties window, examine the pre-link and post-link scripts to determine which one produced the message.  In the above example, the highlighted message is the one of interest.  Locate the UDP scripts and search within the files for this message, then trace back in the script to determine what caused it.  This will let you know what needs to be done to correct the problem.