If the id value used internally for the monitors crosses the server id value specified in Settings -> Support -> Installation Information -> Server Id - Managed server, then you will get the following alert in Admin server:
For existing Managed servers
ID range for AM_ManagedObject table is out of allocated range,thereby EE Sync has been disabled for this Managed Server in Admin Server. Please contact our support team with the logs/SIF to resolve this issue.
While adding new Managed server
The server Id does not match with the resource Id of the managed server.Kindly contact for details.
Initial troubleshooting:
- Share the output of these queries from the Managed servers having issue and following query output from all Managed server in the Admin server.
- Select min(RESOURCEID),max(RESOURCEID) from AM_ManagedObject;
- Once you get the response from us for the above query outputs, implement the necessary prerequisites and proceed with the steps.
Supported from Applications Manager version : 16510
Prerequisites:
- Take the database backup of both Admin and Managed servers that have the issue using the steps specified in this link.
- Schedule a maximum downtime of 4 to 5 hours for the Managed server that has the issue and the Admin server.
- If fail-over setup has been configured, shutdown Applications Manager fail-over setup service also.
- Shutdown Applications manager service for Managed server first and then Admin server service before running the migration script.
For windows: - Open Command prompt with administrator permission.
- Navigate to <ApplicationsManager_Home> folder.
- Run the command: shutdownApplicationsManager.bat -force.
For Linux: - Open Command prompt with administrator permission.
- Navigate to <ApplicationsManager_Home> folder.
- Run the command: sh shutdownApplicationsManager.sh -force
Steps to be performed in the Managed server to Migrate to a new server id:
- Check the maximum managed server id that exists in the Admin Server from the Admin Server web client as shown below:
Go to Applications Manager Managed server installed machine.
- Open command prompt with Administrator privileges and navigate to <ApplicationsManager_Home>/working/bin folder.
- Run the migration script with new server id as the param. New server id should be the one value incremented from maximum server id found in step 1.
For Windows: migrateId.bat <new server id>
For Linux: sh migrateId.sh <new server id> - Once the script executes successfully, open AMServer.properties file in <ApplicationsManager_Home>/conf folder and update the following key value:
am.server.startresidrange = <old server id>+10000000
to
am.server.startresidrange =<new server id>+10000000
Example:
Consider: old server id = 2, new server id = 4
Then, you will need to update the AMServer.properties file as shown below:
am.server.startresidrange = 20000000
to
am.server.startresidrange = 40000000
6. Start the Applications Manager's Managed server service.
7. You will now need to copy the Migration id mapping the data from Managed server to the Admin server.
8.
Run the following query from the Managed server to copy the data into a CSV file.
PGSQL: Connect to database using command prompt [refer this link] and run the query
copy NEW_SERVERID_MAPPING to '<ApplicationsManager_Home>/filename.csv' with delimiter ','
MSSQL: Connect through SQL Management studio and run the query
Select * from NEW_SERVERID_MAPPING. - Save the output as the csv file.
Steps to be performed in the Admin server to migrate managed server data to new server id:
- Go to Applications Manager Admin server installed machine.
- Copy the CSV file generated in Managed server to the Admin server installed directory.
- Run the following query in the Admin server database to copy data from the CSV file to the database.
PGSQL: Connect to database using command prompt [refer link] and run the queries - ALTER TABLE NEW_SERVERID_MAPPING ADD COLUMN MigrationID BIGINT;
- Copy NEW_SERVERID_MAPPING from '<ApplicationsManager_Home>/filename.csv' with delimiter ',';
MSSQL: Connect throught SQL Management studio and run the queries
- ALTER TABLE NEW_SERVERID_MAPPING ADD COLUMN MigrationID BIGINT;
- Bulk Insert NEW_SERVERID_MAPPING from '<ApplicationsManager_Home>/filename.csv' with (FieldTerminator=",",Rowterminator="\n");
NOTE: If Applications Manager and MSSQL database server are in different machines, then copy the CSV file to MS SQL server machine and give that absolute path in above query to execute. 4. Open command prompt with Administrator privileges and navigate to <ApplicationsManager_Home>/working/bin folder.
5. Run the migration script with managed server's old id and new id as param as shown below:
For Windows: migrateId.bat <Managed server old server id> <Managed server new server id>
For Linux: sh migrateId.sh <Managed server old server id> <Managed server new server id>
Example: Consider: old server id = 2, new server id = 4
Then you will need to run the script as shown below:
For Windows: migrateId.bat 2 4
For Linux: sh migrateId.sh 2 4
6. Once migration script has executed, Start the Applications Manager Admin server service.
In case of any failure during migration or if the product is not getting started after migration, generate and share the
Support Information file with us to check the logs.