ALARMPROGRAM modified on start up
Posted in 2023
Greg Bunting found logical logs not backed up on 14.10.FC2IE, with ALARMPROGRAM reverting to no_log.sh and ontape reporting backup aborted by client. Others suggested checking the environment and PATH. Solved: backup_filter.sh failed with permission denied because the .openssl directory under etc was owned by root; changing the owner to informix fixed it.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Stored Procedures & SPL, Server Administration, Logging & Checkpoints, Versions, Editions & End-of-Life
I've got an unusual problem with a 14.10.FC2IE site where on start up the ALARMPROGRAM is being modify from $INFORMIXDIR/etc/alarmprogram.sh to $INFORMIXDIR/etc/no_log.sh. This is resulting in the logical logs not being backed up automatically.
07:39:03 Onconfig parameter ALARMPROGRAM modified from /opt/informix/etc/no_log.sh to /opt/informix/etc/alarmprogram.sh.
# onstat -g cfg full ALARMPROGRAM
IBM Informix Dynamic Server Version 14.10.FC2IE -- On-Line -- Up 01:13:39 -- 4734960 KbytesConfiguration Parameter Info
id name type maxlen units rsvd tunable
133 ALARMPROGRAM CHAR 257 * *
default : $INFORMIXDIR/etc/no_log.sh
onconfig: /opt/informix/etc/alarmprogram.sh
current : /opt/informix/etc/alarmprogram.sh
Description:
Use the ALARMPROGRAM configuration parameter to display event alarms.
Has anyone come across this before or any ideas why this is happening?
Regards,
------------------------------
Greg Bunting
------------------------------
Greg:
I don't see the problem. The output you posted shows that the ALARMPROGRAM was changed to alarmprogram.sh and the onstat -g cfg clearly shows that that is the current setting. If this is an upgrade or new install, did you make the change to alarmprogam.sh to enable log backups:
BACKUPLOGS=Y
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Hi Art,
Yes, this is a tried and tested alarmprogram.sh with BACKUPLOGS=Y.
If I run '$INFORMIXDIR/etc/alarmprogram.sh 2 23' the logs are backed up.
If I do an 'onmode -l' the log file shows that the backup is aborted by client:
13:44:13 Logical Log 558 Complete, timestamp: 0x1745ec0e.
13:44:13 Logical Log 557 - Backup Started
13:44:13 Logical Log 557 - Backup Aborted
Aborted by client.
We are using ontape to back up to disk. The permissions on ontape look ok to me:
# ls -l /opt/informix/bin/ontape
-rwsr-sr-x. 1 root informix 6983232 Aug 20 2019 /opt/informix/bin/ontape
Thanks,
------------------------------Greg Bunting
------------------------------
When I see this behavior, it is normally because the environment (sometimes PATH) was not set correctly when Informix was started. I sometimes put commands at the start of alarmprogram.sh to output the environment to a file, and include something like "which ontape" to make sure that the backup command is found.
------------------------------
Mike Walker
xDB Systems, Inc
www.xdbsystems.com
------------------------------
Hello Greg, I think your device should have 660 permissions and owner and group should be informix Milan Rafaj Infrastructure Architects & Specialists Teamleader Kyndryl Consult +420 737 264 248
The sequence of messages you're describing indicates your alarmprogram.sh is getting called and is executing your ontape which then does attempt a log backup.
13:44:13 Logical Log 557 - Backup Started
13:44:13 Logical Log 557 - Backup Aborted
Aborted by client.
What would you get when running 'ontape -a' manually?
------------------------------
Andreas Legner
------------------------------
Greg:
As Mike said, it might be that the environment that oninit was started in was incomplete, possibly with a bad PATH. You can query sysmaster:sysenv to find out what the server's environment looks like:
> select * from sysenv where env_name in ('PATH','INFORMIXDIR','ONCONFIG');env_id 23
env_name INFORMIXDIR
env_value /opt/informix/infmx
env_id 40
env_name ONCONFIG
env_value onconfig.elendil
env_id 42
env_name PATH
env_value /opt/informix/infmx/bin:/home/informix/bin:/opt/informix/infmx/bin:/
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gam
es:/usr/local/games:/snap/bin
3 row(s) retrieved.
A bad setting for ONCONFIG is unlikely as the engine would not start up properly, but, those are the environment vars that I commonly check when something weird is happening.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Hi Art, This is what I get back from the query: env_id 23 env_name INFORMIXDIR env_value /opt/informix env_id 40 env_name ONCONFIG env_value onconfig.electra_1410ids env_id 42 env_name PATH env_value /opt/informix/bin:/opt/informix/extend/krakatoa/jre/bin:/usr/local/s bin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin Thanks, ------------------------------ Greg Bunting ------------------------------
Hi Andreas,
Where I run 'ontape -a' manually it completes successfully. Also when I run the alarm program ($INFORMIXDIR/etc/alarmprogram.sh 2 23) that completes as expected as well.
Regards,
------------------------------
Greg Bunting
------------------------------
Thanks everyone for your input with this. I have managed to find the issue by preventing the removal of the temporary mail files:
Logical Log 563 Complete, timestamp: 0x1773c7b4.
/opt/informix/bin/backup_filter.sh: line 1: cd: /opt/informix/etc/.openssl: Permission denied
function write_to_filter failed code -1 errno 0 'ontape -a -d' has been executed and returned CODE=0
It appears that the .openssl file had 'root' user ownership - changing this to be owned by 'informix' resolved the issue.
Thanks again.
------------------------------
Greg Bunting
------------------------------
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g