Loading
Salesforce から送信されるメールは、承認済ドメインからのみとなります続きを読む

How to resolve "IllegalMonitorStateException: Current thread is not owner of the lock!"

公開日: Apr 2, 2025
解決策
Symptom
    mule_ee log for the node reports this error - 
ERROR 2021-05-03 21:28:02,586 [WrapperListener_start_runner] [event: ] org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer: Failed to deploy artifact [<APP-Name>]
org.mule.runtime.deployment.model.api.DeploymentException: Failed to deploy artifact [<APP-Name>]
Caused by: org.mule.runtime.api.exception.MuleRuntimeException: org.mule.runtime.deployment.model.api.DeploymentInitException: IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>
Caused by: org.mule.runtime.deployment.model.api.DeploymentInitException: IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>
Caused by: org.mule.runtime.core.api.config.ConfigurationException: Failed to invoke lifecycle phase "initialise" on object: com.mulesoft.mule.runtime.gw.deployment.ApiDeploymentCoreExtension$ExtensionInitialisation@2f46a979

Investigation:
- Enable Trace log level for hazelcast packages by following KB article (How to enable cluster verbose logging in Mule Runtime)
- Review mule_ee log
- For tracking entries in this case, Master Node of cluster is (nnn.nn.n.27) and Secondary Node is (nnn.nn.n.54)
- This log entry indicates the members that were detected and the Lock ID (uuid() after the Port# 5701) that is identified after restart of Node (nnn.nn.n.54):
INFO  2021-05-03 22:39:18,594 [hz.1.generic-operation.thread-0] [event: ] com.hazelcast.internal.cluster.ClusterService: [172.145.2.54]:5701 [2089105] [3.12] 
Members {size:2, ver:584} [
    Member [nnn.nn.n.27]:5701 - 5390bb22-42e3-4ede-b3b2-3d01d15d94aa
    Member [nnn.nn.n.54]:5701 - 9b6af8e3-6b41-4aed-b2b3-831e7308087a this
]
- Next you will find a log entry that provides information about the Lock ID that is stored in the Master Table of the cluster
WARN  2021-05-03 22:39:18,596 [hz.1.generic-operation.thread-0] [event: ] com.hazelcast.internal.partition.InternalPartitionService: [172.145.2.54]:5701 [2089105] [3.12] Following unknown addresses are found in partition table sent from master[[172.145.2.27]:5701]. (Probably they have recently joined or left the cluster.) {
    [172.145.2.54]:5701 - b4a0d691-a325-4229-9c36-7c1863ac4590
}
- From the above entry, you can identify the Lock ID's for Node nnn.nn.n.54 does not match
- That is the root cause of the error "Current thread is not owner of the lock!"

Resolution:
Note: This is valid for Cluster data stored In-Memory (and not to a Persistent Store)
- From Runtime Manager, choose Cluster and Delete the conflicting Node (In this case nnn.nn.n.54)
- The above action will cause a restart of the Node still member of the Cluster (In this case nnn.nn.n.27)
- Follow documented steps to Add the Server (https://docs.mulesoft.com/runtime-manager/cluster-add-srv)
- Check from Runtime Manager, the Node recently added shows a status of Connected. If this status does not change to started, only then manually start the Node
- Once the Node, shows a status of "Started", Update the Cluster to Add this Node
- Both Nodes are restarted and apps are deployed successfully
 
ナレッジ記事番号

001121430

 
読み込み中
Salesforce Help | Article