Control-M/Server start_ctm command fails with message "Another instance of this script is running now, or may have previously ended abnormally" when there is a missing row on CMR_RESOURCELOCK table

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    Control-M/Server for UNIX and Microsoft Windows


    COMPONENT:

    Control-M/Server for UNIX and Microsoft Windows


    APPLIES TO:

    All versions of Control-M/Server for UNIX and Microsoft Windows



    PROBLEM:

    Control-M/Server fails to start, and the following message is displayed:

    Another instance of this script is running now, or may have previously ended abnormally. Wait a few minutes and try rerunning this script.
    If you still get this message, and no other instance of this script is currently running, run the following SQL command manually, and retry:
    "update CMR_RESOURCELOCK set LASTEND='0' where RESOURCE_NAME='server_started' and RESOURCE_TYPE=7"


    CAUSE:

    Missing rows on table CMR_RESOURCELOCK or missing bmcperl or BMCINSTALL directory


    SOLUTION:

    Do run the following procedure to resolve this error:
    Note the provided examples are for Oracle and Postgres databases.

    Missing rows on table CMR_RESOURCELOCK

    1. Connect to the Control-M/Server database using the command "SQL" then run the following query:
    select count(*) from CMR_RESOURCELOCK where RESOURCE_NAME='server_started';

    2. If no record is returned, run the following SQL insert command to insert the missing record into the CMR_RESOURCELOCK table:
    insert into CMR_RESOURCELOCK (resource_name,resource_type,lastend) values ('server_started','7','0');
    commit;

    3. If one record is returned, run the following SQL command to verify what value is set for the "lastend" column for this record in the CMR_RESOURCELOCK table:
    select resource_name, resource_type, lastend from  CMR_RESOURCELOCK;

    If the "lastend" value is not "0", set it as follows:
    update CMR_RESOURCELOCK set lastend=0 where resource_name='server_started';
    commit;

    4. Confirm that the row was successfully inserted:
    select count(*) from CMR_RESOURCELOCK where RESOURCE_NAME='server_started';

    The command will return one record

    5. Exit from the SQL prompt and run the following commands to reinitialize and start Control-M Server:
    init_prflag
    start_ctm

    Missing bmcperl or BMCINSTALL directory
    1. Navigate to the Control-M/Server Administrator Account Home directory

    2. Verify that the bmcperl and BMCINSTALL directory is available with 750 permission

    3. If not, do restore these directory from backup
        Note: If the directories is replaced from another installation, do ensure that the contents of all files under these directories contains the correct information.

    Additional Information:
    Note: In environments based in AIX Operating system, it was found an issue where the steps above does not resolve the problem if the script running the startup/shutdown of Control-M/Server for UNIX and Microsoft Windows does not contain the right header, please make sure next steps are implemented
     

       
    1. Navigate to the directory ~/ctm_server/scripts/
    2.  
    3. Save a backup copy of the script: cp start_ctm start_ctm.orig
    4.  
    5. Edit the script: vi start_ctm
    6.  
    7. Remove the first empty line: the script must start with the characters "#!/bin/sh" in the first line
    8.  
    9. Save the file and exit

     


    Article Number:

    000136338


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles