Switching the master server on Linux systems
By default, server 0 (zero) is the master server. To switch the
master to another server, set the deployment option masterDatabaseServerID to
the other server ID as follows:
- From the
/opt/BESServer/bincommand prompt, start the command line:./iem login --server=servername:serverport --user=username --password=password - From the
/opt/BESServer/bincommand prompt, run the following command:./iem get admin/fields > /appo/switchmaster.xml - In the
/appo/switchmaster.xmlfile, add or edit the following keyword and its value:
to switch the master server to another master server:<Name>masterDatabaseServerID<Name> <Value>0</Value><?xml version="1.0" encoding="UTF-8"?> <BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd"> <AdminField Resource="http://9.87.126.68:52311/api/admin/field /masterDatabaseServerID"> <Name>masterDatabaseServerID</Name> <Value>3</Value> </AdminField> </BESAPI> - Upload the modified file by running the following command:
./iem post /appo/switchmaster.xml admin/fields
After the value has successfully replicated to the new server, it become the master server. If a server suffers a failure while it is the master, another server must be made the master server by direct manipulation of the ADMINFIELDS table in the database.