Bringing a Resource In Service (restore)
Start the Apache resource in the following order:
- Use the httpd command’s -t option to perform a syntax check on the configuration file. If there is a syntax error, the process exits with an error.
- Determine whether to use the SSL module based on the information whether ssl.conf is read from the configuration file.
- Start httpd using the following command. If the startup fails, it exits with an error.
- When using the SSL module
$HTTPD_PATH $DOPTS -d "$SERVER_ROOT" -f "$CONF_FILE" -c "SSLPassPhraseDialog exec:/usr/bin/true" -c "PidFile $PIDFILE"
- Without using the SSL module
$HTTPD_PATH $DOPTS -c "PidFile $PIDFILE" -d "$SERVER_ROOT" -f "$CONF_FILE"
Each variable stores the following values:
$HTTPD_PATH
: The httpd binary path specified when creating the resource
$DOPTS
: a httpd startup option in /etc/sysconfig/
$SERVER_ROOT
: ServerRoot path specified when creating the resource
$CONF_FILE
: $SERVER_ROOT/conf/httpd.conf (httpd configuration file)
$PID_FILE
: a PID file path
- When using the SSL module
- Check that the httpd process is started and make sure that it is possible to make a TCP/IP connection with the http server. If the check fails, the process exits with an error.
Taking a Resource Out of Service (remove)
Stop the Apache resource in the following order:
- Delete the PID file /var/run/httpd.$INSTANCE.pid.
$INSTANCE is the resource ID without the first “apache-”.
- Stop the process with the TERM signal.
kill -TERM $pid
- If the process did not stop, terminate the process with a KILL signal.
kill -KILL $pid
Monitoring (quickCheck)
Monitor the Apache resource in the following order:
- The quickCheck script checks for the presence of the PID file /var/run/httpd.$INSTANCE.pid exists and its contents match the actual httpd PID.
$INSTANCE is the resource ID without the first “apache-”.
- The quickCheck script verifies that it is possible to make a TCP/IP connection with the http server.
If any of these checks fail, it is determined as a resource failure and the monitoring ends with an error.
The monitor process times out in 20 seconds. If it times out, the process is aborted but it is not determined as a resource failure.
Recovery (recover)
Recover the Apache resource:
- Perform the same process as the restore. If the restore fails, the recovery ends with an error.
Post your comment on this topic.