ManageEngine® Applications Manager Enterprise Edition - Failover Support | ||
Follow the steps below to implement failover support in ManageEngine Applications Manager:
The setup involves a primary Applications Manager, a secondary Applications Manager and a common database. The primary and secondary Applications Manager refer to the common database only. While the primary Applications Manager talks with the database, the secondary Applications Manager simply listens to the database. If the primary server goes down, the secondary server takes over. Afterwards, the initial primary server is restarted and it starts functioning as a secondary server.
Let us assume we are going to set up three nodes - node1, node2
and node3.
Applications Manager: node1, node2
PostgreSQL Database: node3
STEP 1 - Install PGSQL database Server in node3 and make sure PGSQL Server is started in node3.
Download Applications Manager from our Website. Postgres is bundled with the product and we recommend that you use the bundled software.
Steps to setup remote Postgres DB Server:
Install Applications Manager as you would normally do on the remote server where you need to run the DB. Install as Professional Edition as we are only going to use the DB on this installation. (In windows right click and run the installer as "Run as Administrator" Same should be followed when working with command prompt. The Label of command prompt window should read "Administrator")
Start this installation once and then stop it.
Go to windows services and make sure the ManageEngine Applications Manager service is stopped.
From Applications Manager server open an Administrator command prompt window.Go to..\Appmanager_home\ folder and run below command: shutdownApplicationsManager.bat -force
Repeat the above command to ensure that all processes are stopped.
In windows open a command prompt window and go to ..\Appmanager_home\bin folder and run uninstallservice.bat to remove the ManageEngine Applications Manager windows service. We do not need it here as it is going to be DB Server.
Changes in pg_hba.conf file:
Open pg_hba.conf under ../Appmanager_home/working/pgsql/data/amdb folder.
Under # IPv4 local connections change Address 127.0.0.1/32 to 0.0.0.0/0. (This will allow connections to be made to this PGSQL DB from remote servers.)
Changes in postgresql.conf:
Open postgresql.conf in Appmanager_home/working/pgsql/data/amdb folder:
Uncomment the line listen_addresses and replace localhost with *
In Windows go to \AppManager11\working\bin folder from command prompt and run the "register_pgdbservice.bat" script. This will install PGSQL as Windows Service.
You may now go to Windows Services and start the ApplicationsManager_Posgresql service and the PGSQL DB server should be ready for connections.
In Linux you can go to /ManageEngine/AppManager11/working folder and run sh./bin/startPGSQL.sh & and the PGSQL DB server should be ready for connections.
STEP 2 - Install Applications Manager in node 1.
Install Applications Manager as you would normally do on the remote server. Start this installation at least once and stop it as follows:
In windows services and make sure the ManageEngine Applications Manager service is stopped.
From Applications aMnager server open an Administrator command prompt window.
Go to..\Appmanager_home\ folder and run the following command: shutdownApplicationsManager.bat -force.
Repeat the above command to ensure that all processes are stopped.
Open the Appmanager_home/conf/AMServer.properties file in word-pad and update below entries and save it.
am.dbserver.type=pgsql
am.db.port=15432 -->(Port number can be confirmed from the \AppManager11\working\pgsql\data\amdb\postgres_ext.conf file of the PGSQL DB Server you installed.)
am.dbport.check=false
Update the database_params.conf file shown in below 2 locations.They are identical files.Only change you have to make is for the jdbc URL as shown below. Update the hostname and port of the remote server running your PGSQL DB here.
Url jdbc:postgresql://paulp0558:15432/amdbdontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
Update the same for database_params.conf file located in below 2 locations:
..\AppManager11\working\conf\PGSQL
..\AppManager11\working\conf\
Now you may start Applications Manager from Windows Services.It will be connected to the PGSQL running on the remote server.This will act as the primary server. Check in the Appmanager_home\logs\wrapper.log.
In Linux you can start and track the startup process as follows:
nohup sh startApplicationsManager.sh &
Press ENTER
tail -f nohup.out
STEP 3- Install Applications Manager in node2. This will act as Secondary server.
Install Applications Manager as you would normally do on the remote server. Start this installation at least once and stop it as follows:
In windows services and make sure the ManageEngine Applications Manager service is stopped.
From Applications Manager server open an Administrator command prompt window.
Go to..\Appmanager_home\ folder
and run following command: shutdownApplicationsManager.bat -force
Repeat the above command to ensure that all processes are stopped.
Open the Appmanager_home/conf/AMServer.properties file in word-pad and update below entries and save it.
am.dbserver.type=pgsql
am.db.port=15432 -->(Port number can be confirmed from the
\AppManager11\working\pgsql\data\amdb\postgres_ext.conf file of the PGSQL DB Server you installed.)
am.dbport.check=false
Update the database_params.conf file shown in below 2 locations.They are identical files.Only change you have to make is for the jdbc URL as shown below.
Update the hostname and port of the remote server running your PGSQL DB here.
Url jdbc:postgresql://paulp0558:15432/amdbdontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
Update the same for database_params.conf file located in below 2 locations:
..\AppManager11\working\conf\PGSQL
..\AppManager11\working\conf\
Now you may start Applications Manager from Windows Services. This installation will not start completely as the Primary is already up and running. It will start and will listen to the Primary Server. The same can be confirmed from the Appmanager_home\logs\wrapper.log.
Note
In Linux you can start and track the startup process as follows:
|
Sample Nohup Output
INFO | jvm 1 | 2013/08/05 01:00:06 | Checking for the availablity of the Primary Server in the Database. Found an Note: Above steps need to be implemented for each installation in the Enterprise setup for failover. |
Enterprise Edition - Failover Support |
Easy Upgrade |