Server Failure
Abnormal termination of a server that causes service issues can occur for many reasons. These issues can be minimized by creating clusters. This chapter describes the issues that may occur if a server terminates abnormally and how to handle them.
1. Abnormal Termination of Master Server (MASTER)
Even if MASTER terminates abnormally, managed servers (MS) can still run their services. If MASTER stops abnormally due to a hardware error, MSs on the faulty machine are likely to fail as well. However, abnormal termination of MASTER itself does not affect the services of MSs in the domain.
1.1. Lost Functionality When MASTER Terminates Abnormally
If MASTER terminates abnormally, managing the configuration and adding and modifying applications cannot be performed until MASTER restarts. After MASTER restarts and notifies the MSs, the MSs are managed by MASTER again.
Without being connected to MASTER, an MS cannot start using the configuration in MASTER. Instead, it must use the file in its local cache if it was able to connect to MASTER at least once to obtain the configuration file. It will use the copy in the local cache and then synchronize with MASTER when MASTER starts. If the MS and MASTER share the domain directory because they are on the same machine, the MS can use the configuration in MASTER even if MASTER is not running.
1.2. Failover through Domain Backup
Even if MASTER terminates abnormally, the services can still run but some functions cannot be used. MASTER should be restarted as soon as possible, but there are situations where MASTER cannot restart due to such problems as a hardware failure.
To prevent this, MASTER settings and applications must be backed up. MASTER can start in another machine by using the backed up settings and applications. However, to use the applications in the new machine, the JEUS_HOME path of the new machine must be the same as that of the existing machine.
The following are the methods for backing up MASTER settings and applications.
-
Automatically backing up MASTER settings and applications whenever MASTER starts
-
Specifying to back up MASTER settings and applications using the pack-domain command
When automatic backup is specified using backup configuration in WebAdmin, backup files will be automatically created. Also, the pack-domain command is used to create a backup file when necessary. The created file should be managed by the user.
Automatically backing up MASTER settings and applications whenever MASTER starts
MASTER settings and applications are automatically backed up whenever MASTER is started. Domain backup configuration can be specified using jeusadmin.
-
Using the console tool
The set-domain-backup command can be used to create the MASTER backup file whenever MASTER starts.
[MASTER]domain1.adminServer>set-domain-backup -backupOnBoot true Successfully performed the MODIFY operation for Domain Backup Policy. Check the results using "set-domain-backup"
By default, the backup file is created in the directory where pack-domain command is executed. The backup file can be decompressed on a different machine using the unpack-domain command.
Specifying to back up MASTER settings and applications using the pack-domain command
-
Backing up MASTER settings and applications
Use the pack-domain command to back up the settings and applications of MASTER.
offline>pack-domain domain1 Packing the domain [domain1] configuration completed successfully at the path [JEUS_HOME/domains/domain1_packed.zip].
-
Applying backed up MASTER settings and applications to a new machine
Use the unpack-domain command to decompress the backup files. Users can change MASTER information such as IP, Port, and Node when running the unpack-domain command.
offline>unpack-domain domain1 The JEUS Master Server listener address is already set to [0.0.0.0]. Do you want to change it? (y/n): y Enter the JEUS Master Server base listener address: 0.0.0.0 The JEUS Master Server listener port is already set to [9736]. Do you want to change it? (y/n): n The JEUS Master Server nodename is already set to [node1]. Do you want to change it? (y/n): n Unpacking the domain [domain1] configuration completed successfully.
Once MASTER starts with the recovered settings, MSs that were in the INDEPENDENT mode synchronize their settings and applications with MASTER. Afterwards, they leave the INDEPENDENT mode and are managed by MASTER again.
For detailed usage of the pack-domain and unpack-domain commands, refer to pack-domain and unpack-domain in JEUS Reference Guide. |
1.3. Managed Servers (MSs) in INDEPENDENT Mode
Since Managed Servers run services regardless of the presence of MASTER, the services are not affected when MASTER terminates abnormally.
MSs have a local cache that stores settings and applications, which are synchronized when a server starts and when changes are made. If an MS is not connected to MASTER when it starts, it uses the local cache to start in the INDEPENDENT mode. When this happens, the MS is not controlled by MASTER and MASTER cannot monitor the MS. This can occur when MASTER terminates abnormally, when the MASTER address is incorrectly configured, or when a network error occurs.
After MASTER restarts and notifies MS, the MS leaves the INDEPENDENT mode and is managed by MASTER.