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.
- 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.
-
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:
Ensure that you specify the following ClusterMembership object configuration data in the payload of the POST method:http://<admin-endpoint-IP:Port>/ima/v1/configuration/
"ControlAddress":
of Server B."MessagingAddress":
of Server B.
Note:You cannot update the values for the following parameters on a Standby server:
ClusterName
EnableClusterMembership
DiscoveryServerList
-
Configure and enable cluster membership on Server A.
Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
Ensure that you specify the following ClusterMembership object configuration data in the payload of the POST method:http://<admin-endpoint-IP:Port>/ima/v1/configuration/
"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.
-
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" }
-
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
-
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
isPRIMARY
- The status of the cluster is
Active
and the server is connected to other servers in the cluster.
{ "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
-
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
isSTANDBY
- The status of the cluster is
Standby
and the server is not connected to other servers in the cluster.
{ "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
-
Check the status information that is returned for Server A to verify that:
-
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" }
-
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
-
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
isSTANDBY
- The status of the cluster is
Standby
and the server is not connected to other servers in the cluster.
{ "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 }
-
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
isPRIMARY
- The status of the cluster is
Active
and the cluster is connected to other servers in the cluster.
{ "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
-
Check the status information that is returned for Server A to verify that: