The SAS® Metadata Server might fail to start when a metadata repository file is locked


The SAS Metadata Server might fail to start when the ./MetadataServer.sh -start script is invoked. In order to determine the cause of the failure, you should review the SAS Metadata Server's log files. The log files are located in the SAS-configuration-directory/Lev1/SASMeta/MetadataServer/Logs directory by default.

In this scenario, the SAS Metadata Server's log file shows messages similar to the following:

The SAS Metadata Server I/O subsystem has returned error message '         ERROR: A lock is not available for I0000001.METAIMDB.DATA.'.  Contact the SAS Metadata Server administrator for assistance. The Repository Manager could not be accessed as specified because the I/O subsystem returned error message '         ERROR: A lock is not available for I0000001.METAIMDB.DATA.'.

The message might show the process ID (PID) of the process that is holding the file locks:

The SAS Metadata Server I/O subsystem has returned error message '         ERROR: A lock is not available for I0000001.METAIMDB.DATA.  ERROR: Lock held by process <PID>.'.  Contact the SAS Metadata Server administrator for assistance. The Repository Manager could not be accessed as specified because the I/O subsystem returned error message '         ERROR: A lock is not available for I0000001.METAIMDB.DATA.  ERROR: Lock held by process <PID>.'. An error occurred while attempting to Initialize the Repository Manager.

To work around the problem, select the option that best fits your situation from the list below:

  1. At a command prompt, change directories to SAS-configuration-directory/Lev1/SASMeta/.
  2. Use system commands to create a backup of the MetadataServer directory and all subdirectories. For example, under UNIX, you could use the following: $ tar cf MetadataServer.tar MetadataServer
  3. Move the entire MetadataServer directory containing the locked file to save it. For example, under UNIX, you could use the following:  $ mv MetadataServer MetadataServer.save
  4. Restore the files from the backup taken in step 2, which unlocks all of the previously locked files. For example, under Unix, you could use the following: $ tar xf MetadataServer.tar
  5. ​​​​​​Start the metadata server normally: $ ./MetadataServer.sh -start
  6. Start the rest of the SAS processes in the deployment.