IBM Support

Message Referencing return code 126 or 127 and alarmprogram.sh in your online.log File

Troubleshooting


Problem

You observe messages in your online.log file referencing alarmprogram.sh and with return code 126 or 127. What do they mean?

Symptom

Messages printed to your Informix Server online.log file reference alarmprogram.sh and a return code of 126 or 127. Examples:

06:45:09 Process exited with return code 126: /bin/sh /bin/sh -c /IDS/1170uc7/etc/alarmprogram.sh 2 23 "Logical Log 12 Complete, timestamp: 0xd3d56." "Logical Log 12 Complete, timestamp: 0xd3d56." "" 23001

20:01:55 Process exited with return code 127: /bin/sh /bin/sh -c /usr/informix/etc/alarmprogram.sh 2 18 "Log Backup completed: 9." "Logical Log 9 - Backup Completed" "" 18001

Cause

The return codes are bourne and korn shell return codes. Their meanings:

  • 126....not an executable
  • 127....command not found

The Informix Server attempts to execute the script pointed to by the ALARMPROGRAM configuration program, using the korn shell, when events occur that are important to the server. If the call fails the server writes a message to the server log file describing the call. The events themselves may be failures or successes. Return code 126 is printed when the server cannot execute the script referenced by ALARMPROGRAM. Return code 127 is printed when the server cannot find the script.

Resolving The Problem

Confirm that the alarm script designated by ALARMPROGRAM is correctly referenced by the configured path and confirm that it is executable. By default, alarmprogram.sh uses the korn shell (ksh). If the return code is 126, confirm that the korn shell is installed and located in /bin (/bin/ksh).

Note: If the korn shell is not installed, and the default shell is bash, you may want to change "#! /bin/ksh" at the top of alarmprogram.sh to "#! /bin/bash" as an alternative to installing the korn shell.

Related Information

[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF027","label":"Solaris"}],"Version":"11.5;11.7;12.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
16 June 2018

UID

swg21635728