Controlling the Failover Manager service
========================================

Each node in a Failover Manager cluster hosts a Failover Manager agent
that is controlled by a service script. By default, the service script
expects to find:

- A configuration file named ``efm.properties`` that contains the
  properties used by the Failover Manager service. Each node of a
  replication scenario must contain a properties file that provides
  information about the node.

- A cluster members file named ``efm.nodes`` that contains a list of the
  cluster members. Each node of a replication scenario must contain a
  cluster members list.

If you’re running multiple clusters on a single node, you need to
manually create configuration files with cluster-specific names and
modify the service script for the corresponding clusters.

The commands that control the Failover Manager service are platform
specific.

Using the systemctl utility on RHEL/Rocky Linux/AlmaLinux 8.x or later
----------------------------------------------------------------------

On RHEL/Rocky Linux/AlmaLinux 8.x or later, Failover Manager runs as a
Linux service named (by default) ``edb-efm-5.<x>.service`` that is
located in ``/usr/lib/systemd/system`` . Each database cluster monitored
by Failover Manager runs a copy of the service on each node of the
replication cluster.

Use the following systemctl commands to control a Failover Manager agent
that resides on a RHEL/Rocky Linux/AlmaLinux 8.x or later host:

``systemctl start edb-efm-5.<x>``

The ``start`` command starts the Failover Manager agent on the current
node. The local Failover Manager agent monitors the local database and
communicates with Failover Manager on the other nodes. You can start the
nodes in a Failover Manager cluster in any order. This command must be
invoked by root.

``systemctl stop edb-efm-5.<x>``

Stop the Failover Manager on the current node. This command must be
invoked by root.

``systemctl status edb-efm-5.<x>``

The ``status`` command returns the status of the Failover Manager agent
on which it is invoked. You can invoke the status command on any node to
instruct Failover Manager to return status and server startup
information.

.. code:: text

   [root@ONE ~]}> systemctl status edb-efm-5.2
   ● edb-efm-5.2.service - EnterpriseDB Failover Manager 5.2
        Loaded: loaded (/usr/lib/systemd/system/edb-efm-5.2.service; disabled; preset: disabled)
        Active: active (running) since Mon 2025-11-24 16:00:08 UTC; 10s ago
       Process: 11755 ExecStart=/bin/bash -c /usr/edb/efm-5.2/bin/runefm.sh start ${CLUSTER} (code=exited, status=0/SUCCESS)
      Main PID: 11837 (java)
         Tasks: 46 (limit: 79998)
        Memory: 195.6M
           CPU: 2.989s
        CGroup: /docker/7ce08d0a35648d9156b56ef27a1bfced6af013a3e174f756681612002ac85961/system.slice/edb-efm-5.2.service
                └─11837 /usr/lib/jvm/java-11-openjdk-11.0.25.0.9-7.el9.aarch64/bin/java -cp /usr/edb/efm-5.2/lib/EFM-5.2.jar -Xmx128m com.enterprisedb.efm.main.ServiceCommand __int_start /etc/edb/efm-5.2/efm.properties

   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 -------------------------------------------------------------------
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Checking shared properties with node2-51572(node2)
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Getting remote database addresses to check.
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Addresses to check after adding standbys: [node2-51572(node2), node3-8868(node3), node4-56220(node4)]
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Testing remote database connections.
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Checking host node2 for address: node2-51572(node2)
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Checking host node3 for address: node3-8868(node3)
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Checking host node4 for address: node4-56220(node4)
   Nov 24 16:00:08 node1 bash[11820]: 2025-11-24 16:00:08 Now monitoring database.
   Nov 24 16:00:08 node1 systemd[1]: Started EnterpriseDB Failover Manager 5.2.
