In some instances, you may find it necessary to manually release locks that the Deployment Template scripts have put in the EAC on a particular component.
Different types
of locks can appear in your Guided Search implementation. The first type of lock is a
Windows file system lock. For example, if you have Windows Explorer open at the
data\forge_output
location and the baseline update
tries to clean up that folder, it will fail due to
explore.exe
holding on to the directory lock. To
release file system locks, make sure that no processes and users have related
folders (or files within those folders) open. (UNIX does not put exclusive
system locks on files.)
Other types of locks that you may encounter are locks (or EAC flags)
that are put into the EAC by the Deployment Template
baseline_update
script,
partial_update
scripts, or other scripts. The default
lock is called
update_lock
. It is created by the following line in
the Deployment Template script:
LockManager.acquireLock("update_lock")
If the running Deployment Template script breaks halfway through its
execution due to an unhandled exception, or is manually interrupted by a user
pressing
Ctrl-C
while it is running, the lock remains set
within the EAC.
For example, you may see the following exception error in the Deployment Template logs:
[10.17.09 06:52:09] SEVERE: Caught an exception while invoking method 'run' on object 'BaselineUpdate'. Releasing locks. Caused by java.lang.reflect.InvocationTargetException ... [10.17.09 06:52:09] INFO: Released lock 'update_lock'.
While there can be other causes for this exception, it typically results from a failure to release locks on the Dgraph.
To release the lock on a component within the EAC, run the following commands:
Using the
eaccmd
tool, run the following command to obtain a list of all outstanding flags in the application. You may want to review these flags before running theremove-all-flags
command.list-flags --app application_name
Run the following commands from the command line, or using the
eaccmd
tool:Option Description From the command line: Go to the .
directory.<AppDir>
/control/Run the following Deployment Template command:
On Windows:
.\runcommand.bat LockManager releaseLock update_lock
On UNIX:
./runcommand.sh LockManager releaseLock update_lock
Using the eaccmd
tool:Windows:
eaccmd.bat remove-all-flags -app
<your application>
UNIX:
eaccmd.sh remove-all-flags -app
<your application>
The LockManager is internally using EAC flagging functionality, so the
remove-all-flags
function ofeaccmd
effectively cleans the Deployment Template locks.This releases the locks in the EAC.