728x90

Problem(Abstract)

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.


http://www-01.ibm.com/support/docview.wss?uid=swg21635728


728x90

+ Recent posts