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:
- If the message indicates the PID of the process that is holding the lock, then use operating-system commands to stop or kill the process indicated. Then, start the SAS Metadata Server normally.
- If no PID appears in the error message, it most likely indicates that a file server is holding the lock and the local machine is unable to break it. Restart the file server machine to work around the issue.
- If no PID appears in the error message and the file server that is holding the lock cannot be restarted, then use the storage manager's options for releasing the locks on the storage appliance. Consult with your network or file-server administrators to complete this task. The locks that need to be released are held in files that are located in these directories:
SAS-configuration-directory/Lev1/SASMeta/MetadataServer/rposmgr
SAS-configuration-directory/Lev1/SASMeta/MetadataServer/MetadataRepositories/Foundation - If none of the above actions are successful in releasing the lock, then take the following steps on each affected metadata server machine:
- At a command prompt, change directories to SAS-configuration-directory/Lev1/SASMeta/.
- 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
- 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
- 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
- Start the metadata server normally: $ ./MetadataServer.sh -start
- Start the rest of the SAS processes in the deployment.