Sun Java Communications Suite 5 What's New

Automatic Restart of Services Using Watcher

Calendar Server and Messaging Server now use the same stop and start mechanism. The start-cal and stop-cal commands are wrappers for a new internal service, csservice, which was introduced as part of the Watcher implementation. This service starts the Watcher, and then starts all other processes. The csservice program is aware of any dependencies the other services have, and in which sequence the services should be started.

Each registered service (process) opens a connection to the Watcher. If a process dies without properly disconnecting, the Watcher automatically restarts it. If the process dies twice in a defined interval, Watcher does not restart it. This timeout interval is configurable.

Additional Watcher information:

Calendar Server Services Monitored by Watcher

The Watcher monitors all of the services registered with it. For Calendar Server, the registered processes are: cshttpd, csadmind, csdwpd, dsnotifyd.

If csstored is enabled, that is, if the configuration parameter local.store.enable is set to "y", then csstored is also registered with the Watcher. When it is enabled, csstored must be successfully started before each service that accesses the store can be started. If it stops, then the dependent processes must be stopped an restarted also.

Configuring Watcher

Watcher is enabled by default. To manage the Watcher process, new parameters were added to the ics.conf file:

Watcher Logging

Watcher writes to two logs:

Automatic Restart in High Availability Deployments

If a server fails twice within the timeout period, the system stops trying to restart the server. In an HA system, Calendar Server is shutdown and a failover to the other system occurs.

Wrapper Scripts for csservice

The public interfaces to csservice are start-cal and stop-cal. This section shows the usage for each of these wrapper scripts and contains tables with explanations of their options and a list of components to be started or stopped.

start-cal Wrapper Script

The start-cal usage is as follows:

./start-cal [options...] [components...]

The following is the list of options:

-? or --help

Display this help list.

-d

Enable debugging mode.

-l

List active services.

-L

List enabled services.

-A

List all services.

This following is the list of components:

watcher

mfagent

ens

store

notify

admin

http

dwp

If no components are listed, start-cal starts all enabled services.

stop-cal Wrapper Script

The stop-cal usage is as follows:

./stop-cal [options...] [components...]

The following is the list of options:

-? or --help

Display this help list.

-d

Enable debugging mode.

-f

Force stop using SIGKILL. (This works only with UNIX® platforms.)

This following is the list of components:

watcher

mfagent

ens

store

notify

admin

http

dwp

If no components are listed, stop-cal stops all enabled services.