IBM Support

75 ways to demystify DB2: #15: On Linux, DB2 instance is not automatically starting upon system reboot

Technical Blog Post


Abstract

75 ways to demystify DB2: #15: On Linux, DB2 instance is not automatically starting upon system reboot

Body

Recently worked on an issue with DB2 Fault Monitor (FM) process failing to start on a Linux RHEL 6 platform. After following the steps in the technical note below:

/support/pages/node/340447

the DB2 Fault Monitor process was failing with the following message :

# su - db2inst1
$ . ./sqllib/db2profile
$ db2fm -s -S
Gcf module 'fault monitor' is INSTALLED PROPERLY but NOT ALIVE
Gcf module '/opt/IBM/DB2/lib64/libdb2gcf.so' is INSTALLED PROPERLY but NOT ALIVE

 

As a result, the DB2 instance will not automatically start upon a system reboot. 

Below are tips you can follow to verify you are working with the proper environment in order to resolve the problem : 

  1. If you are on a Linux RHEL 6 or 7 platform, the /etc/inittab has been deprecated as mentioned in the link above.
  2. Verify the /etc/init/db2fmcd.conf exist with the proper permissions, owner and group. For example :   
    $  ls -l /etc/init
    total 72
    -rw-r--r--  1 root root  446 Feb 23 22:11 db2fmcd.conf
  3. Verify the db2fmcd.conf contains the proper entry :              

    #####################################################################
    # DB2 fault monitor
    # Starts fmcd
    # Note: any customizations to this file will be lost the next time this is updated
     
    description 'Fault Monitor is the DB2 database facility that monitors DB2 database manager instances, and restarting any instance that exits prematurely.'
    version 'DB2 v10.5.0.2'
     
    start on stopped rc RUNLEVEL=[2345]
    stop on starting rc RUNLEVEL=[016]
     
    console output
    respawn
    respawn limit 10 120
     
     
    exec /opt/IBM/DB2/bin/db2fmcd
     
    ############################################################################
  4. As instance onwner, verify the global registry field StartAtBoot is set to 1.  
    $ db2greg -getinstrec instancename='db2inst1'
    Retrieved record:
       Service      = |DB2|
       Version      = |10.5.0.2|
       InstanceName = |db2inst1|
       InstancePath = |/home/db2inst1/sqllib|
       Usage        = |N/A|
       StartAtBoot  = 1
       Maintenance  = 0
       InstallPath  = |/opt/IBM/DB2|
       RemoteProf   = |N/A|
       Comment      = |N/A|

  5. As root, verify the registry variable DB2AUTOSTART=YES
    $ $DB2DIR/instance/db2iset -i db2inst1 -all

    [i] DB2_USE_ALTERNATE_PAGE_CLEANING=ON
    [i] DB2_INLIST_TO_NLJN=YES
    [i] DB2_REDUCED_OPTIMIZATION=YES
    [i] AUTOSTART=YES
    [i] DB2COMM=TCPIP
    [i] DB2AUTOSTART=YES
    [g] DB2SYSTEM=sdatas5t
    [g] DB2INSTDEF=db2inst1

    Note: $DB2DIR is the path on which DB2 is installed.
  6. Ensure the Linux reboot is set to "normal". If its set to "firstboot", Linux will just run utilities configured for first boot.

  7. As root, verify if exec /opt/IBM/DB2/bin/db2fmcd command can successfully start the service. If the service does not start, involve Linux Technical support to find out why the service is not starting.

[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11141198