Enabling cluster membership of Eclipse Amlen servers in a high availability pair by using REST Administration APIs

You can enable cluster membership of Eclipse Amlen servers in a high availability (HA) pair by using REST Administration APIs.

System administrators can enable cluster membership of Eclipse Amlen servers in an HA pair by using REST Administration APIs, or by using the Amlen WebUI. For more information about using the Amlen WebUI to enable cluster membership of servers in an HA pair, see Enabling cluster membership of Eclipse Amlen servers in a high availability pair.

In this scenario, Server A is the primary node and Server B is the standby node in the HA pair.

  1. Optional: Eclipse Amlen supports user provided TLS credentials for Clustering. Providing the credentials prior to adding a server to a cluster is recommended to avoid migrating the cluster. See Clustering: User Provided TLS Credentials.
  2. Configure cluster membership values that relate to addresses and ports on Server B. Do not enable cluster membership on Server B.
    Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
    http://<admin-endpoint-IP:Port>/ima/v1/configuration/
    Ensure that you specify the following ClusterMembership object configuration data in the payload of the POST method:
    • "ControlAddress": of Server B.
    • "MessagingAddress": of Server B.
    Ensure that you also include any other cluster membership configuration parameters that you need so that Server B and Server A can identify and connect to the other members of the cluster, for example, if Server A is using external addresses or ports. For more information about configuring cluster membership on a server, see Configuring cluster membership by using REST Administration APIs.
    Note:

    You cannot update the values for the following parameters on a Standby server:

    • ClusterName
    • EnableClusterMembership
    • DiscoveryServerList
  3. Configure and enable cluster membership on Server A.
    Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
    http://<admin-endpoint-IP:Port>/ima/v1/configuration/
    Ensure that you specify the following ClusterMembership object configuration data in the payload of the POST method:
    • "EnableClusterMembership": true
    • The same value for "ClusterName": as that specified in the cluster membership configuration of Server B.
    • "ControlAddress": of Server A.
    • "MessagingAddress": of Server A.
    Ensure that you also include any other cluster membership configuration parameters that you need so that Server B and Server A can identify and connect to the other members of the cluster, for example, if Server B is using external addresses or ports. For more information about configuring cluster membership on a server, see Configuring cluster membership by using REST Administration APIs.
  4. Restart both servers. Restart Server B first.

    Use the Eclipse Amlen REST API POST method on each server with the following Eclipse Amlen configuration URI:

    http://<admin-endpoint-IP:port>/ima/v1/service/restart

    Provide object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    { "Service": "Server" }
    
  5. After your servers have restarted, verify the status of your servers.
    If either server is in maintenance mode, repeat step 4.

    On each server, use the Eclipse Amlen REST API GET method with the following URI:

    http://<admin-endpoint-IP:Port>/ima/v1/service/status

    1. Check the status information that is returned for Server A to verify that:
      • Server A is running.
      • The status of the HA service status is Active
      • The value of NewRole is PRIMARY
      • The status of the cluster is Active and the server is connected to other servers in the cluster.
      Excerpt from an example response to the REST API GET method for Server A status:
      {
      "Version":"v1",
      "Server": {  
        "Name": "ServerA.mycompany.com:9089",   
        "UID": "PgOSgS1k",  
        "Status": "Running",
        "State": 1,
        "StateDescription": "Running (production)",
        "ServerTime": "2016-04-15T13:55:01.614Z",
        "UpTimeSeconds": 1604,
        "UpTimeDescription": "0 days 0 hours 26 minutes 44 seconds",
        "Version": "2.0 20160414-1500",
        "ErrorCode": 0,
        "ErrorMessage": ""
      },
      "HighAvailability": {
        "Status": "Active",
        "Enabled": true,
        "Group": "MyHAGroup",
        "NewRole": "PRIMARY",
        "OldRole": "PRIMARY",
        "ActiveNodes": 2,
        "SyncNodes": 2,
        "PrimaryLastTime": "2016-04-15T14:05:22Z",
        "PctSyncCompletion": -1,
        "ReasonCode": 0,
        "RemoteServerName": "ServerB.myCompany.com:9089"
      },
      "Cluster": {
        "Status": "Active",
        "Name": "MyCluster",
        "Enabled": true,
        "ConnectedServers": 2,
        "DisconnectedServers": 0
      
    2. Check the status information that is returned for Server B to verify that:
      • Server B is running.
      • The status of the HA service status is Active
      • The value of NewRole is STANDBY
      • The status of the cluster is Standby and the server is not connected to other servers in the cluster.
      Excerpt from an example response to the REST API GET method for Server B status:
      {
      "Version":"v1",
      "Server": {  
        "Name": "ServerB.myCompany.com:9089",
        "UID": "PgOSgS1k",
        "Status": "Running",
        "State": 10,
        "StateDescription": "Standby",
        "ServerTime": "2016-04-15T14:05:52.850Z",
        "UpTimeSeconds": 1608,
        "UpTimeDescription": "0 days 0 hours 26 minutes 48 seconds",
        "Version": "2.0 20160414-1500",
        "ErrorCode": 0,
        "ErrorMessage": ""
      },
      "HighAvailability": {
        "Status": "Active",
        "Enabled": true,
        "Group": "MyHAGroup",
        "NewRole": "STANDBY",
        "OldRole": "UNSYNC",
        "ActiveNodes": 2,
        "SyncNodes": 2,
        "PrimaryLastTime": "",
        "PctSyncCompletion": -1,
        "ReasonCode": 0,
        "RemoteServerName": "ServerA.myCompany.com:9089"
      },
      "Cluster": {
        "Status": "Standby",
        "Name": "MyCluster",
        "Enabled": true,
        "ConnectedServers": 0,
        "DisconnectedServers": 0
      
  6. Force a failover operation to verify that Server B is correctly configured to work with the cluster.
    You can force a failover operation by restarting Server A.
    Use the Eclipse Amlen REST API POST method with the following URI:
    http://<admin-endpoint-IP:port>/ima/v1/service/restart

    Provide configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:

    
    {    
      "Service": "Server"
    }
  7. Verify the status of your servers after the failover.
    On each server, use the Eclipse Amlen REST API GET method with the following URI:

    http://<admin-endpoint-IP:Port>/ima/v1/service/status

    1. Check the status information that is returned for Server A to verify that:
      • Server A is running as the standby server.
      • The status of the HA service status is Active
      • The value of NewRole is STANDBY
      • The status of the cluster is Standby and the server is not connected to other servers in the cluster.
      Excerpt from an example response to the REST API GET method for Server A status:
      {
      "Version":"v1",
      "Server": {  
        "Name": "ServerA.myCompany.com:9089",
        "UID": "PgOSgS1k",
        "Status": "Running",
        "State": 10,
        "StateDescription": "Standby",
        "ServerTime": "2016-04-15T14:05:52.850Z",
        "UpTimeSeconds": 360,
        "UpTimeDescription": "0 days 0 hours 6 minutes 0 seconds",
        "Version": "2.0 20160414-1500",
        "ErrorCode": 0,
        "ErrorMessage": ""
      },
      "HighAvailability": {
        "Status": "Active",
        "Enabled": true,
        "Group": "MyHAGroup",
        "NewRole": "STANDBY",
        "OldRole": "UNSYNC",
        "ActiveNodes": 2,
        "SyncNodes": 2,
        "PrimaryLastTime": "",
        "PctSyncCompletion": -1,
        "ReasonCode": 0,
        "RemoteServerName": "ServerB.myCompany.com:9089"
      },
      "Cluster": {
        "Status": "Standby",
        "Name": "MyCluster",
        "Enabled": true,
        "ConnectedServers": 0,
        "DisconnectedServers": 0
          }
      
    2. Check the status information that is returned for Server B to verify that:
      • Server B is running.
      • The status of the HA service is Active
      • The value of NewRole is PRIMARY
      • The status of the cluster is Active and the cluster is connected to other servers in the cluster.
      Excerpt from an example response to the REST API GET method for Server B status:
      {
      "Version":"v1",
      "Server": {  
        "Name": "ServerB.mycompany.com:9089",
        "UID": "PgOSgS1k",
        "Status": "Running",
        "State": 1,
        "StateDescription": "Running (production)",
        "ServerTime": "2016-04-15T13:55:01.614Z",
        "UpTimeSeconds": 1714,
        "UpTimeDescription": "0 days 0 hours 29 minutes 54 seconds",
        "Version": "2.0 20160414-1500",
        "ErrorCode": 0,
        "ErrorMessage": ""
      },
        "HighAvailability": {
        "Status": "Active",
        "Enabled": true,
        "Group": "MyHAGroup",
        "NewRole": "PRIMARY",
        "OldRole": "STANDBY",
        "ActiveNodes": 2,
        "SyncNodes": 2,
        "PrimaryLastTime": "2016-04-15T14:25:01Z",
        "PctSyncCompletion": -1,
        "ReasonCode": 0,
        "RemoteServerName": "ServerA.myCompany.com:9089"
      },
      "Cluster": {
        "Status": "Active",
        "Name": "MyCluster",
        "Enabled": true,
        "ConnectedServers": 2,
        "DisconnectedServers": 0