Top
Systemwalker Software Configuration Manager Operator's Guide
Systemwalker

4.2.6 Pre-execution script error check

A "pre-execution script error check" task occurs when a pre-execution script has been registered and settings have been configured to terminate processing when an error occurs. For scripts, "0" is handled as normal termination, whereas values other than "0" are handled as errors. Refer to "4.2.6.1 Pre-execution and Post-execution Scripts" for information on pre-execution scripts.

If a "pre-execution script error check" task occurs, a log will be output to the Details field in the Pre-execution script error check tab window, indicating the type of error that has occurred.

Refer to the "returnCode" information. The following table shows the expected values and their meaning:

Keyword

returnCode

Meaning

executeCommand<Script path>

Other than 0

Logs are output using the following format:

Example:

<2012-04-17 16:25:09>:executeCommand

["C:/Fujitsu/Systemwalker/SWCFMGA/var/process/75974/pre_script.bat"]

message: The operation component was successful.

command_stdout:

command_stderr:

command_rcode:1

returnCode:1

The value of "command_rcode" is the return value output by the script.

If the value of "command_rcode" is other than "0", this will be treated as an error.

Check the script by referring to the return value.

All

189

If one of the following values has been output for "message", this means that the connection for network communications with the business server has failed.

[LinkExpRBA] CategoryCode: 50

[LinkExpRBA] ErrorCode: 80

[Actions]

Check the following items:

  • The file transfer infrastructure may not have been set up on the business server. Check whether the file transfer infrastructure has been set up.

  • The business server may have stopped. Check the operational status of the business server.

  • The file transfer infrastructure may not be running on the business server. Start the file transfer infrastructure.

    [Windows]

    Restart the "Systemwalker File Transfer Library Control" service.

    [Linux]

    Execute the following command:

    # service FJSVlnkbs start

  • There may be an error with the IP address of the business server that is specified in the "hosts" file. Check the IP address specified in the "hosts" file.

  • If the remote server is a PC server with a TCP/IP connection, the number of connection requests on the business server may have exceeded the maximum number of requests that can be simultaneously processed by WinSock.

  • The connection may have been blocked by a firewall on the communication path.

  • If the business server is running Windows, the connection may have been blocked by security settings such as the Windows firewall.

  • If the situation still does not change even after you have taken the appropriate action and then retried the processing, collect investigation data using the problem investigation data collection command (swcfmg_collectinfo), and then contact Fujitsu technical support.

If one of the following values has been output for "message" or "server_check_result", this means that a timeout has occurred during communications with the business server.

[LinkExpRBA] CategoryCode: 50

[LinkExpRBA] ErrorCode: 60

[Actions]

The following are the possible causes of the problem:

  • The business server may be stopped.

  • The business server may have slowed down.

  • The network may be under high load.

Check these possible causes and then try again.

If the situation still does not change despite the retry attempt, collect investigation data using the problem investigation data collection command (swcfmg_collectinfo), and then contact Fujitsu technical support.

If one of the following values has been output for "message", this means that a timeout has occurred during communications with the business server.

[LinkExpRBA] CategoryCode: 50

[LinkExpRBA] ErrorCode: 60

[Actions]

The following are the possible causes of the problem:

  • The business server may be stopped.

  • The business server may have slowed down.

  • The network may be under high load.

Check these possible causes and then try again.

If the situation still does not change despite the retry attempt, collect investigation data using the problem investigation data collection command (swcfmg_collectinfo), and then contact Fujitsu technical support.

Other

Collect investigation data using the problem investigation data collection command (swcfmg_collectinfo), and then contact Fujitsu technical support.

Make Choice panel

When the Retry button is clicked, the script will be executed again.

When the Continue button is clicked, the error will be ignored and processing will continue.

When the Cancel button is clicked, patch distribution/application processing will terminate.

4.2.6.1 Pre-execution and Post-execution Scripts

It is possible to register process scripts on business servers before or after patch distribution or application is executed.

In order to apply Fujitsu middleware patches, a script specifying the application processing must be created and then registered as a post-execution script.

Example of creating a script that applies a Fujitsu middleware patch

The commands for the UpdateAdvisor (middleware) are used to apply Fujitsu middleware patches.

The following example shows a post-execution script that is executed after Fujitsu middleware patches are applied.

The path to the folder where distributed patches are stored is automatically set to the "DISTRIBUTE_PATCH_PATH" environment variable. The path to the folder where patches are stored is different for each distribution. All of the patches that have been distributed to this folder will be applied.

Example:

[Windows]

"C:\Program Files (x86)\Fujitsu\UpdateAdvisor\UpdateAdvisorMW\uam" add -s -d %DISTRIBUTE_PATCH_PATH%

[Linux]

/opt/FJSVfupde/bin/uam add -s -d $DISTRIBUTE_PATCH_PATH

To apply multiple patches, enter additional lines to the script above for each patch.

Refer to "Applying Updates (Using uam add)" in the UpdateAdvisor (middleware) help for information on the commands for the UpdateAdvisor (middleware).


The sample file for the script for applying Fujitsu middleware patches is stored in the following directory.

Copy the file from this directory, and edit the file as required before using it.

Both of the script files for Windows and Linux are stored on the admin server, while only either of them is stored on business servers according to the operating system used.

File location
  • Admin server

    [Windows]

    <Systemwalker Software Configuration Manager installation directory>\SWCFMGM\sample

    [Linux]

    /opt/FJSVcfmgm/sample

  • Business server

    [Windows]

    <Systemwalker Software Configuration Manager installation directory>\SWCFMGB\sample

    [Linux]

    /opt/FJSVcfmgb/sample

File names
  • For Windows: win_mw_patch.bat

  • For Linux: lin_mw_patch.sh

Notes on creating scripts

Example of log output when an error occurs

Errors with pre-execution and post-execution scripts are determined by taking "0" to indicate normal termination and values other than "0" to indicate errors.

If a script results in an error with a value other than "0", and Continue was not selected as the behavior for when script errors occur, then either a "pre-execution script error check" task or a "post-execution script error check" task will occur.

The following log can be checked in the Details section of the task tab:

Example:

<2012-04-16 16:23:24>:executeCommand["C:/Fujitsu/Systemwalker/SWCFMGA/var/process/65359/pre_script.bat"]
message:The operation component was successful.
command_stdout:
command_stderr:
command_rcode:1
returnCode:1

The value of "command_rcode" above is the return value output by the script.

Review the script, taking this value into consideration.

Example of script attachments

For "Patch distribution acceptance" and "Patch application acceptance" tasks, the registered scripts are attached as an attachment file.

An example is shown below.