When running the Control-M/Server Upgrade / Migration export, the following error is seen:  "Failed to extract agents from DB to files"

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:

    Control-M/Server for UNIX and Microsoft Windows Upgrade Toolkit



    PROBLEM:

     

    - Reviewing the export logs shows messages like the following:

      
    [Tue 07/15/14 10:29:24]: Handle Agents data [Tue 07/15/14 10:29:24]: Failed to extract agents from DB to files [Tue 07/15/14 10:29:24]: ExportData aborted [Tue 07/15/2014 10:29:24] exportdata ended with rc 1 [Tue 07/15/2014 10:29:24] perform export ended with status 1 [Tue 07/15/2014 10:29:24] run_export_command_line: return code: 1 [Tue 07/15/2014 10:29:24] export definition failed [Tue 07/15/2014 10:29:24] exit controller with 1... [Tue 07/15/2014 10:29:24] ---------Controller ENDED [Tue 07/15/2014 10:29:24] Returned from controller with 1 [Tue 07/15/2014 10:29:24] END STEP NOT OK: EXPORT
      

    - The 'restore_agents_into_files.pl' log shows the error:

      
    clean_files started clean directory /opt/controlm/ctm_server/data/AGSTAT content started clean directory /opt/controlm/ctm_server/data/AGSTAT content ended successfully clean directory /opt/controlm/ctm_server/data/AGSTAT_RJX content started clean directory /opt/controlm/ctm_server/data/AGSTAT_RJX content ended successfully clean directory /opt/controlm/ctm_server/data/AGPRM content started clean directory /opt/controlm/ctm_server/data/AGPRM content ended successfully delete AGDEFS file clean_files ended successfully Export tables to /opt/controlm/ctm_server/tmp exec_sql started exec_sql ended successfully Export tables to /opt/controlm/ctm_server/tmp ended succesfully handle_agprm_files started get_concurrent_sessions started get_concurrent_sessions returns 256 MAX_CONCURRENT_SESSIONS value 256 handle_agprm_files Handle node AGDEFS write_to_file:/opt/controlm/ctm_server/data/AGDEFS/AGDEFS started write_to_file:/opt/controlm/ctm_server/data/AGDEFS/AGDEFS ended successfully ... Handle node write_to_file:/opt/controlm/ctm_server/data/AGPRM/ started Failed to open file /opt/controlm/ctm_server/data/AGPRM/ for writing:Is a directory Failed to write file /opt/controlm/ctm_server/data/AGPRM/ Exit with status 3

     


    CAUSE:

    Control-M/Agent in CMR_NODES and CMS_AGPRMS database tables does not have a valid or empty phy_nodeid value


    SOLUTION:

     

    - CMR_NODES and CMS_AGPRM database tables need to have a valid phys_nodeid value for each of the Control-M/Agents.
    - If there are special characters, nulls, or blanks in this column then it will cause the export to fail

    Solution:
    - It is recommended to first shutdown the source Control-M/Server and back it up with the command: ctm_backup_bcp

      

    1. Check the CMR_NODES table for valid values:
    - Login as the Control-M/Server user and run the command: SQL
    - Run the following query:
      select * from CMR_NODES where nodeid <> phys_nodeid;
    - Update the rows that are not equal or use the SQL with the following update:
      update CMR_NODES set phys_nodeid = nodeid;

      


    2. Check the CMS_AGPRM table for valid values:
    - Login as the Control-M/Server user and run the command: SQL
    - Run the following query:
      select * from CMS_AGPRM where nodeid <> phys_nodeid;
    - Update the rows that are not equal or use the SQL:
      update CMS_AGPRM set phys_nodeid = nodeid;

       3. Delete improper Control-M/Agent definition
    - Navigate to the <Control-M/Server Home>/upgrade or upgrade_export directory
    -
    Open the Go to the CMR_NODES.dat file
    - Check if you see any entries that contain
       an unprintable "LF" special character which creates a new line.  
      - If found, delete this Control-M/Agent from the old environment:
      ctm_menu > Agent Status > Delete Agent Platform Entry
    - If this Control-M/Agent is required, do add it again

    4. Restart the Upgrade export step.
     
      
      

     

     


    Article Number:

    000079534


    Article Type:

    Solutions to a Product Problem



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