Configuring failover for Enterprise Edition
Browse through the following topics to configure failover instance in Enterprise Edition setup:
Failover configuration of Admin servers
Follow the steps given below to configure failover for Admin servers:
Note: Following steps are for configuring failover with MS SQL as common backend database. For PostgreSQL as backend DB, follow the steps mentioned here.
1. Configuring Primary server
- Install Applications Manager in Primary server. While configuring the database backend, make sure you select the database as MSSQL and give the DB name (By default, it is AMDB) and port number.
- Once the installation is complete, start the primary server.
2. Configuring Secondary/Failover server
- Install Applications Manager in Secondary server. While configuring the database backend, make sure you select the database as MS SQL and specify the same DB name, port number as in Step 1. Make sure to give the same SQL server's hostname, DB name, port as that of the Primary server.
- Once the installation is complete, start the secondary server.
Upon completing the above steps, the Secondary server will be connected to the MS SQL database and will listen to the Primary server. However, the installation will not be started completely as the Primary is already up and running.
You can verify whether the failover setup is configured properly with the help of logs generated from Applications Manager. Click here to view sample output
Note:
- You can also choose to retain the Primary server as the preferred server choice in failover setup by specifying the value for the key am.failover.preferredstandby as true in AMServer.properties file (available under <Applications Manager Home>/conf/ directory). Doing this will signal the secondary server to go into standby mode whenever the primary server becomes available. However, make sure to save the file and then restart Application Manager for the changes to take effect.
- In case you are facing issues in primary and secondary failover communication or server IP change, stop both primary and secondary servers. Then connect to the backend database and execute the following query: TRUNCATE TABLE BEFAILOVER
After executing the above query, start the primary server first and then proceed to start the secondary server.
Failover configuration of Managed servers
Follow the steps given below to configure failover for Managed servers:
Note: Following steps are for configuring failover with MS SQL as common backend database. For PostgreSQL as backend DB, follow the steps mentioned here and then proceed to Step 3 directly. Make sure to start the secondary/failover server only after implementing the instructions specified in Step 3.
1. Configuring Primary server
- Install Applications Manager in Primary server. While configuring the database backend, make sure you select the database as MS SQL and specify the DB name (By default, it is AMDB) and port number.
- Once the installation is complete, start the primary server.
2. Configuring Secondary/Failover server
- Install Applications Manager in Secondary server. While configuring the database backend, make sure you select the database as MS SQL and specify the same DB name, port number as in Step 1. Make sure to give the same SQL Server's hostname, DB name, port as that of the Primary server.
3. Configuring Secondary/Failover instance in Admin console
Follow the steps given below to configure secondary/failover instance of Managed servers, in Admin console:
- Navigate to the Managed servers list by clicking the Managed Servers link in the top left corner.
- Edit the required Primary Managed server for which the failover is to be configured.
- Enable the Failover Server Details option and specify the Host Name, Web Server Port and SSL Port information of the secondary/Failover server for that Managed server.
- After entering the required details, click Update.
Once it is saved, proceed to start the Secondary/Failover server instance.
![](/products/applications_manager/help/images/apm-failover/configuring-managed-server-failover.png)
Upon completing the above steps, the Secondary server will be connected to the MS SQL database and will listen to the Primary server. However, the installation will not be started completely as the Primary is already up and running.
You can verify whether the failover setup is configured properly with the help of logs generated from Applications Manager. Click here to view sample output
Note:
- You can also choose to retain the Primary server as the preferred server choice in failover setup by specifying the value for the key am.failover.preferredstandby as true in AMServer.properties file (available under <Applications Manager Home>/conf/ directory). Doing this will signal the secondary server to go into standby mode whenever the primary server becomes available. However, make sure to save the file and then restart Application Manager for the changes to take effect.
- In case you are facing issues in primary and secondary failover communication or server IP change, stop both primary and secondary servers. Then connect to the backend database and execute the following query: TRUNCATE TABLE BEFAILOVER
After executing the above query, start the primary server first and then proceed to start the secondary server.