BookmarkSubscribeRSS Feed

Hello,
I am going to post this "idea" on behalve of multiple customers including @bheinsius, @JuanS_OCS and I ran into it myself once or twice too:

 

At Linux crash, existing pid or lock files prevent sas services to start.

When a Linux server containing SAS 9.4 processes (M0 - M4), and pid files or lock files (exmaples below) are not being deleted, the sas services might be prevented from starting in the following case:

When the pid file contains a proces number of a process that is running (with a different service): For example when my /opt/sas/config/Lev1/SASMeta/MetadataServer/server.sas.pid file has pid 4964, and my server crashes, and the server restart, having a process like /usr/sbin/crond (system service) running on the proces id 4964 (the old metadataserver pid), then my metadataserver will not start, until I manually remove the .pid file;

 

A list of pid files that make the basic sas installations to crash are:

- /opt/sas/config/Lev1/ConnectSpawner/server.sas.pid

- /opt/sas/config/Lev1/ObjectSpawner/server.sas.pid

- /opt/sas/config/Lev1/SASApp/OLAPServer/server.sas.pid

- /opt/sas/config/Lev1/SASMeta/MetadataServer/server.sas.pid

 

The SASWebApplication Services will not start when .lck files in the log folder are present, like:

- /opt/sas/config/Lev1/Web/WebAppServer/SASServer1_1/logs/tmlog.lck

 

The customer(s) think(s) when a server is stopped, or when a server is started, these pid files and lck files should be taken care of in a more graceful way than SAS services not starting. I.E. Adding it to the SAS startup script or the Linux OS boot services.

1 Comment
bheinsius
Lapis Lazuli | Level 10

The problem is actually worse, in that this not only happens when your Linux server crashes, but also when it is restarted properly.

 

The sas.server stop script is not executed at server shutdown time because the sas.servers start script does not create the file /var/lock/subsys/sas.servers. The init subsystem only executes stop scripts for services that have their file in that directory. And since sas.servers does not place this file there, the stop script is not executed.

 

I have reported this problem, SAS says you should shutdown your SAS environment yourself before rebooting the server. In my opinion, this is just what stop scripts are for.

 

I have created my own init.d script that does create this lock file. It helps.