Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Why am I getting the message, "EFM Lock file for cluster efm has been removed"?
EDB Failover Manager creates a file named <cluster name>.lock at the location mentioned in the lock.dir property (the default is /var/lock/efm-<version> in efm.properties) to avoid starting multiple agents for the same cluster on the same node, otherwise they would be competing for the same resources (ports, files, etc).
By default it would be named efm.lock. Removing this lock file results in the message EFM Lock file for cluster <cluster name> has been removed.
Here’s how we end up with this message:
1) Start the EFM agent for cluster "efm":
[root@hostname efm-3.2]# service efm-3.2 start Starting local efm-3.2 service: [ OK ]
2) When you try to start it the second time, it would give error as below:
[root@hostname efm-3.2]# service efm-3.2 start Starting local efm-3.2 service: [FAILED]
If we look in /var/log/efm-3.2/startup-efm.log, we find the following:
[ERROR] Unable to obtain lock file: /var/lock/efm-3.2/efm.lock Please make sure that you don't already have an agent running on this node for cluster 'efm'. If not, please manually delete the lock file and restart the agent.
If the lock file is deleted while the cluster is running, it won’t allow you to start another agent for same cluster, instead, you can see below message in the efm.log file:
Subject: [WARNING] EFM Lock file for cluster efm has been removed Body: EFM node: 193.268.56.169 Cluster name: efm Database name: edb VIP support: ENABLED Auto Failover: DISABLED
The lock file for cluster efm has been removed from: /var/lock/efm-3.2/efm.lock on node 193.268.56.169. This lock prevents multiple agents from monitoring the samecluster on the same node. Please restore this file to prevent accidentally starting another agent for cluster.
If the file is already deleted, it will not be possible to restore it. You need to stop/start the EFM agent.
Note that it is not recommended and also not a good practice to tamper with the default files generated by EFM.