Services are started and stopped differently depending on whether they are installed in an HA environment or not.
While Messaging Server is running under HA control, you cannot use the normal Messaging Server start, restart, and stop commands to control individual Messaging Server services. If you attempt a stop-msg in an HA deployment, the system warns that it has detected an HA setup and will tell you how to properly stop the system.
The appropriate start, stop and restart commands are shown in the tables below. Note that there are no specific HA commands to individually start, restart, or stop other Messaging Server services (for example, SMTP). However, you can run a stop-msg service command to stop/restart individual servers such as imap, pop or sched.
Sun Cluster’s finest granularity is that of an individual resource. Since Messaging Server is known to Sun Cluster as a resource, scswitch commands affect all Messaging Server services as a whole.
Table 4–2 Start, Stop, Restart in a Sun Cluster 3.0/3.1 Environment
Action |
Individual Resource |
Entire Resource Group |
|
---|---|---|---|
Start |
scswitch -e -j resource |
sscswitch -Z -g resource_group |
|
Restart |
|
scswitch -R -g resource_group |
|
Stop |
scswitch -n -j resource |
scswitch -F -g resource_group |
Table 4–3 Start, Stop, Restart in Veritas 3.5, 4.0, 4.1 and 5.0 Environments
Action |
Individual Resource |
Entire Resource Group |
||
---|---|---|---|---|
Start |
hares -online resource -sys system |
hagrp -online group -sys system |
||
Restart |
|
|
||
Stop |
hares -offline resource -sys system |
hagrp -offline group -sys system |
Start and stop services from the command line using the commands msg-svr-base/sbin/start-msg and msg-svr-base/sbin/stop-msg. While it is possible to start and stop services individually using the command template: msg-svr-base/sbin/stop-msg service (where service can be smtp, imap, pop, store, http, ens, or sched) it is not recommended except in specific tasks as described in this manual. Certain services have dependencies on other services and must be started in a prescribed order. Complications can arise when trying to start services on their own. For this reason, you should start and stop all the services together using the start-msg and stop-msg commands.
You must first enable services such as POP, IMAP, and HTTP, before starting or stopping them. For more information, see 5.1.1 Enabling and Disabling Services.
Important: If a server process crashes, other processes may hang as they wait for locks held by the server process that crashed. If you are not using automatic restart (see 4.5 Automatic Restart of Failed or Unresponsive Services), and if any server process crashes, you should stop all processes, then restart all processes. This includes the POP, IMAP, HTTP, and MTA processes, as well as the stored (message store) process, and any utilities that modify the message store, such as mboxutil, deliver, reconstruct, readership, or upgrade.
Again, it is not recommended to shut down individual services except in the specific tasks as described in various parts of this manual. Certain services have dependencies on other services and must be started in a prescribed order. Complications can arise when trying to start services on their own. For this reason, you should start and stop all the services together using the start-msg and stop-msg commands.
Use the start-msg and stop-msg commands to start or stop any of the messaging services. Examples:
msg-svr-base/sbin/start-msg imap
msg-svr-base/sbin/stop-msg pop
msg-svr-base/sbin/stop-msg sched
msg-svr-base/sbin/stop-msg smtp
The services must be enabled in order to stop or start them. See 4.4.2.1 To Specify What Services Can Be Started.
The start-msg and stop-msg command start and stop all of the MTA services, not just the SMTP server. If you want more granular control when starting or stopping the MTA services, you can use the start/stop-msg command for the dispatcher and the job controller. For more information, see start-msg in Sun Java System Messaging Server 6.3 Administration Reference and stop-msg in Sun Java System Messaging Server 6.3 Administration Reference.
By default the following services are started with start-msg:
#./start-msg Connecting to watcher ... Launching watcher ... Starting ens server .... 21132 Starting store server .... 21133 checking store server status ... ready Starting imap server .... 21135 Starting pop server .... 21138 Starting http server .... 21141 Starting sched server .... 21143 Starting dispatcher server .... 21144 Starting job_controller server .... 21146 |
These can be controlled by enabling or disabling the configutil parameters: service.imap.enable, service.pop.enable, service.http.enable, local.smsgateway.enable, local.snmp.enable, local.imta.enable, local.mmp.enable, local.ens.enable, and local.sched.enable. Note that you need to set both service.imap.enable and service.imap.enablesslport to 0 in order to disable IMAP. The same goes for POP and HTTP. See the configutil Parameters in Sun Java System Messaging Server 6.3 Administration Reference for details on how these work.
To start an MTA-only system, you should also start imsched. Before you do this, remove any scheduled jobs that are not appropriate to your installations.
imschedis an individual component of Messaging Server which must be started separately if you are not starting all of Messaging Server. If you start your MTA-only system using start-msg imtaor start-msg smtp, then you will not be running the imsched process.
To run messaging server in MTA mode only (no store/imap/pop/http processes), then you can either select the MTA to be only installed/configured during the configuration of messaging server after initial install (msg_base/sbin/configure) or manually disable the message store and mshttp process using the following configutil commands:
./configutil -o local.store.enable -v 0 ./configutil -o service.http.enable -v 0 |
Once you have disabled http and other store processes, you can then start messaging server by running the following:
# ./start-msg bash-3.00# ./start-msg Connecting to watcher ... Launching watcher ... 4034 Starting ens server ... 4035 Starting sched server ... 4036 Starting dispatcher server .... 4038 Starting job_controller server .... 4042 |
Not that all the appropriate processes are started including imsched and imta. This way the customer doesn't have to remember to start the sched process.