2.6.4 Settings for automatic restart
When a failure occurs, the stopped Management Server and Administration Agent can restart automatically. If you set up automatic restart, the settings for automatic start are also valid. You use the mngautorun command to specify the automatic restart settings of Management Server and Administration Agent. For details on the mngautorun command, see mngautorun (Set up/canceling the set up of autostart and autorestart) in the uCosminexus Application Server Command Reference Guide.
We recommend that in Windows, you make the automatic restart processing of Management Server and Administration Agent set up with the mngautorun command to execute synchronously. In such cases, you specify the synchronous execution option (-sync option) when executing the command. If you specify this option, during the automatic restart, the starting of Management Server and Administration Agent is executed synchronously. Also, during the automatic restart, you can specify the waiting time until the starting of Management Server and Administration Agent is executed synchronously (the timeout time of synchronous execution), with the -timeout option.
In UNIX, the synchronous execution option cannot be specified for the automatic restart processing.
- Important note
-
- When executing operations by specifying the automatic start settings of a version earlier than 09-00
-
If you are executing operations by specifying the automatic start settings of a version earlier than 09-00, when enabling the settings described in this subsection, you are required to cancel the automatic start settings of the version earlier than 09-00. For details on how to change the settings, see Chapter 10 in the uCosminexus Application Server Maintenance and Migration Guide.
- Settings for automatic restart when JavaVM is terminated abnormally
-
We recommend that when JavaVM terminates abnormally, after you acquire the user dump, for the correct operations of automatic restart of Application Server, you specify the registry value (DontShowUI : 1) in one of the following registry keys, and control response requests when acquiring the user dump:
\\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
\\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Windows Error Reporting (to be used when the above mentioned registry key is not present)
The execution format and execution example of the mngautorun command are as follows:
- Execution format
mngautorun respawn {server|agent|both} [-runlevel run-level]#1 [-sync#2 [-timeout timeout-time-of-synchronous-execution#2]]
#1: The run level can be specified in UNIX. In Windows, the run level cannot be specified.
#2: The synchronous execution option and the timeout time of the synchronous execution can be specified in Windows. In UNIX, synchronous execution option and the timeout time of the synchronous execution cannot be specified.
- Example of execution
-
-
When restarting Management Server automatically
mngautorun respawn server
-
When restarting Administration Agent automatically
mngautorun respawn agent
-
When restarting Management Server and Administration Agent automatically
mngautorun respawn both
-
When synchronously executing the automatic restart of Management Server and Administration Agent#
mngautorun respawn both -sync
#: The synchronous execution of the automatic restart can be specified in Windows. In UNIX, the synchronous execution of the automatic restart cannot be specified.
-
The following subsection describes the contents of an automatic restart, set up in Management Server and Administration Agent, when executing the mngautorun command:
- Organization of this subsection
(1) Contents of automatic restart setup in Management Server
This subsection describes the OS-wise settings specified in Management Server for automatic restart, when executing the mngautorun command.
-
In Windows
The following contents are set up in the recovery functionality of a service so that if an error occurs, the service of Management Server restarts:
-
Initial error: Restart the service
-
Reset of an error count: 0 (error count is not reset)
-
Restart of the service: 0 (restart is executed immediately after an abnormal termination)
Note that you can manually change the settings for the values of reset of an error count and restart of the service.
-
-
In UNIX
The settings# that automatically restart Management Server when the OS starts or restarts can be specified by using the mngautorun command with the respawn option specified.
If these settings are specified, the Management Server service is monitored and, when the service terminates, it is restarted.
- #: In the /etc/inittab file, specify the Management Server start command with the respawn option specified. In Linux, register CoMS.service (service that automatically starts, stops, or restarts Management Server) in a subdirectory of the /etc/systemd/system directory.
-
- Important note
-
In UNIX, irrespective of whether any failure occurs in the services of Management Server, if a service of Management Server is stopped by using the mngsvrctl command, the service is restarted.
(2) Contents of automatic restart setup in Administration Agent
This subsection describes the OS-wise settings specified in Administration Agent for automatic restart, when executing the mngautorun command.
- Reference note
-
With the automatic restart process, the Administration Agent automatic start configuration file (/opt/Cosminexus/manager/config/AdminAgentrc) is read before starting Administration Agent. You can code the following settings in this file, so that the logical server which starts from Administration Agent inherits the settings:
-
Control settings of resources (ulimit)
-
Permissions at the time of file creation (umask)
-
Environment variables
Do not code settings other than the settings mentioned in this subsection, in the Administration Agent automatic start configuration file. If you code other settings in the Administration Agent automatic start configuration file, operations are not guaranteed.
The Administration Agent automatic start configuration file is executed as Shell Script. Therefore, if you change the contents coded in the Administration Agent automatic start configuration file, adequately check the operations.
-
-
In Windows
The following contents are set up in the recovery functionality of a service so that if an error occurs, the service of Administration Agent restarts:
-
Initial error: Restart the service
-
Reset of an error count: 0 (error count is not reset)
-
Restart of the service: 0 (restart is executed immediately after an abnormal termination)
Note that you can manually change the settings for the values of reset of an error count and restart of the service.
- Important note
-
After the adminagentsv process is down and then restarts, even if you use a service or a command to stop Administration Agent, a logical server is not stopped, because the following key is not valid:
-
adminagent.finalization.stop_servers key of Installation-directory-of-Cosminexus\manager\config\adminagent.properties
-
-
-
In UNIX
The settings# that automatically restart Administration Agent when the OS starts or restarts can be specified by using the mngautorun command with the respawn option specified.
If these settings are specified, the Administration Agent service is monitored and, when the service terminates, it is restarted.
- #: In the /etc/inittab file, specify the Administration Agent start command with the respawn option specified. In Linux, register CoAA.service (service that automatically starts, or stops, or restarts Administration Agent) in a subdirectory of the /etc/systemd/system directory.
-
- Important note
-
In UNIX, irrespective of whether any failure occurs in the services of Administration Agent, if a service of Administration Agent is stopped by using the adminagentctl command, the service is restarted.