Sun Java System Messaging Server 6.3 Administration Guide

4.4.2 To Start and Stop Services in a non-HA Environment

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.


Note –

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.

ProcedureTo Start Up, Shut Down, or View the Status of Any Messaging Services

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.

  1. 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.


    Note –

    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.


4.4.2.1 To Specify What Services Can Be Started

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.