solidDB Help : Samples : HotStandby sample : Watchdog sample application : Failure situations and watchdog actions : Communication links with the primary server from both the secondary server and the watchdog are down
  
Communication links with the primary server from both the secondary server and the watchdog are down
Scenario
The connections to the primary server from the watchdog and the secondary server are broken.
Symptoms
The watchdog poll of the primary server fails. The secondary server and primary server have lost their connections to each other; therefore the secondary server is in SECONDARY ALONE state, and the primary server is in PRIMARY UNCERTAIN state.
Note If the AutoPrimaryAlone parameter is set to Yes in solid.ini, the primary server switches to PRIMARY ALONE rather than PRIMARY UNCERTAIN and continues to accept transactions.
Remedy
For the watchdog to continue monitoring the primary server, switch the secondary server to be the new primary server and set the new primary server to PRIMARY ALONE state. When the network connections are recovered, switch the original primary server to be the secondary server and synchronize the servers.
 
Description
Illustration
When the servers cannot connect to each other, Server #1 switches to PRIMARY UNCERTAIN state and Server #2 to SECONDARY ALONE state.
The diagram is described in the first column of the row
Because the watchdog cannot connect to Server #1, the watchdog concludes that Server #1 is not available and switches Server #2 to PRIMARY ALONE state by using the command:
ADMIN COMMAND 'hsb set primary alone';
Applications switch from Server #1 to Server #2 and Server #2 saves transaction details in the log to send to Server #1.
Note If the transaction log on Server #2 fills up before the network connection is fixed, you might have to switch Server #2 to STANDALONE state.
Important Both servers are in a PRIMARY role. If a program or an administrator intervention switched Server #1 from PRIMARY UNCERTAIN to state PRIMARY ALONE state, then there would be two active primary servers, both of which could be accepting transactions, and the differences would not be resolvable.
The diagram is described in the first column of the row
The administrator fixes the network connections.
The watchdog determines the states of the two servers by using the command:
ADMIN COMMAND 'hsb state';
The watchdog then switches Server #1 to SECONDARY ALONE by using the command:
ADMIN COMMAND 'hsb switch secondary';
The diagram is described in the first column of the row
The watchdog instructs Server #2 to connect to Server #1 by using the command:
ADMIN COMMAND 'hsb connect';
Server #1 reads the transaction log from Server #2.
Note If you switched Server #2 to STANDALONE state, you must copy the database from Server #2 to Server #1 before you reconnect the servers, see Synchronizing primary and secondary servers for details.
The diagram is described in the first column of the row
Further scenarios where communication links with the primary server from both watchdog and the secondary server are down
If an application receives error message 10047 or 14537 from the new primary server:
Try to connect to the original secondary server to check if the server is now the primary server.
If the original secondary server is not the current primary server, re-execute the transaction with the original primary server in PRIMARY ALONE state.
Go up to
Failure situations and watchdog actions