Legacy Knowledge Base
Published Sep. 10, 2025

How to determine the master node?

Written By

Orsolya Hegedus

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I am running a clustered environment, and I would like to know whether the node I am currently on is the master node.

Environment

  • DXP 7.0+

Resolution

  • Liferay doesn't have a fixed “master” node in the traditional sense. Instead, it uses a distributed architecture where nodes cooperate to handle requests.
    However, there are concepts of “master” and “slave” nodes in specific contexts, such as job scheduling or cluster management.
  • To check if a node is the master for job scheduling, you can use the following Groovy script (multiple options):
import com.liferay.portal.kernel.cluster.*;
out.println("** Master: "+ ClusterMasterExecutorUtil.isMaster());
out.println(com.liferay.portal.kernel.cluster.ClusterMasterExecutorUtil.isMaster());

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base