How to configure Policy server auto start for RHEL 7

Document ID : KB000009288
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

We have installed CA SSO Policy server on RHEL 7 and we have enabled the auto startup as in the docs: 

https://docops.ca.com/ca-single-sign-on/12-7/en/installing/install-a-policy-server/install-policy-server-on-unix/configure-auto-startup

Environment:
12.6 or 12.7 Policy Server RHEL 7.x
Cause:

systemd fails to start the Siteminder policy server because the start-all script exits with code "1" even in the case of a successful start by hand 

 

PS version is 12.70.0000.1194  

 

Below is the full shell output: 

 

[root@mxclsmiss12:/etc/systemd/system]# systemctl start siteminder 

Job for siteminder.service failed because the control process exited with error code. See "systemctl status siteminder.service" and "journalctl -xe" for details. 

[root@mxclsmiss12:/etc/systemd/system]# ps -ef | grep pol 

polkitd 980 1 0 May15 ? 00:00:01 /usr/lib/polkit-1/polkitd --no-debug 

root 55207 53419 0 16:52 pts/1 00:00:00 grep --color=auto pol 

[root@mxclsmiss12:/etc/systemd/system]# systemctl status siteminder.service 

Loaded: loaded (/etc/systemd/system/siteminder.service; enabled; vendor preset: disabled) 

Active: failed (Result: exit-code) since Fri 2017-05-19 16:52:29 CEST; 48s ago 

Process: 55021 ExecStart=/opt/CA/siteminder/start-all (code=exited, status=1/FAILURE) 

 

Resolution:

Configure auto startup to ensure that the Policy Server restarts automatically when the UNIX system is rebooted.

 

•Step 1. Modify the S98sm script by replacing every instance of the string nete_ps_root with an explicit path to the CA Single Sign-on installation directory as below. 

 

#!/bin/sh -

# this script starts and stops the siteminder policy server

# at boot time

su - root -c /opt/CA/siteminder/start-all & (Edit start-all and stop-all paths)

•Step 2. Copy S98sm to /etc/rc2.d path.

 

cp S98sm /etc/rc2.d (May need sudo access to copy)

•Step 3. Creating of Service by creating the new file /etc/systemd/system/S98sm.service 

 

•Step 4. Add the following content in /etc/systemd/system/S98sm.service

 

----------------------------------

#!/bin/sh - (Optional depending on shell used)

 

[Unit]

 

Description=S98sm Service

Requires=network.target

 

[Service]

Type=forking

User=root

ExecStart=/opt/CA/siteminder/S98sm start

ExecStop=/opt/CA/siteminder/S98sm stop

Restart=on-abort

SuccessExitStatus=0 1

 

[Install]

WantedBy=multi-user.target

----------------------------------

 

Note: Verify that user listed in both files (S98sm & S98sm.service) are the same?

 

•Step 5. $systemctl daemon-reload 

•Step 6. $systemctl enable S98sm 

•Step 7. $systemctl start S98sm 

 

 

Additional Information:

Note: To Disable the service at boot, run the following command: 

 

systemctl disable S98sm