Informix

 View Only
Expand all | Collapse all

ALARMPROGRAM modified on start up

  • 1.  ALARMPROGRAM modified on start up

    Posted Mon February 06, 2023 03:57 AM
    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 Kbytes

    Configuration 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
    ------------------------------


  • 2.  RE: ALARMPROGRAM modified on start up

    IBM Champion
    Posted Mon February 06, 2023 07:53 AM
    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
    ------------------------------



  • 3.  RE: ALARMPROGRAM modified on start up

    Posted Mon February 06, 2023 08:48 AM
    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
    ------------------------------



  • 4.  RE: ALARMPROGRAM modified on start up

    IBM Champion
    Posted Mon February 06, 2023 09:27 AM
    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
    ------------------------------



  • 5.  RE: ALARMPROGRAM modified on start up

    Posted Mon February 06, 2023 09:32 AM

    Hello Greg,

     

    I think your device should have 660 permissions and owner and group should be informix

     

    Obsah obrázku text, klipart  Popis byl vytvořen automaticky

    Milan Rafaj

    Infrastructure Architects & Specialists Teamleader

    Kyndryl Consult

    +420 737 264 248

     

     






  • 6.  RE: ALARMPROGRAM modified on start up

    IBM Champion
    Posted Mon February 06, 2023 10:30 AM
    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
    ------------------------------



  • 7.  RE: ALARMPROGRAM modified on start up

    Posted Tue February 07, 2023 03:02 AM
    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
    ------------------------------



  • 8.  RE: ALARMPROGRAM modified on start up

    IBM Champion
    Posted Mon February 06, 2023 12:04 PM
    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
    ------------------------------



  • 9.  RE: ALARMPROGRAM modified on start up

    Posted Tue February 07, 2023 03:00 AM
    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
    ------------------------------



  • 10.  RE: ALARMPROGRAM modified on start up

    Posted Tue February 07, 2023 03:36 AM
    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
    ------------------------------