When doing Apache graceful restart, Web Agent reports error "PID Cache error"

book

Article ID: 7127

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

 

We're running a Web Agent on Apache, and when we restart Apache server
with the command :

/local/opt/bin/scripts/service reload myinstance 

then the Web Agent reports errors : 

error.log : 

  May 23 14:19:36 myhost [23/May/2017:14:19:36] [Info] [CA WebAgent IPC] 
  [31025] [CSmSem::getSem] Attempted to attach to non-existent semaphore with key 0x6beecd05 
  May 23 14:19:36 myhost [23/May/2017:14:19:36] [Info] [CA WebAgent IPC] 
  [31025] [CSmSem::getSem] Attempted to attach to non-existent semaphore with key 0x6beecd05 
  May 23 14:19:36 myhost [23/May/2017:14:19:36] [Info] [CA WebAgent IPC] 
  [31025] [CSmSem::getSem] Created semaphore 30081042 using key 0x6beecd05 
  May 23 14:19:36 myhost [23/May/2017:14:19:36] [Error] [CA WebAgent IPC] 
  [31025] [CSmSharedSegment::smalloc] Error allocating shared memory segment using key 0x6ceecd05 - 
  File exists (17) 
  May 23 14:19:36 myhost [23/May/2017:14:19:36] [Info] [CA WebAgent IPC] 
  [31025] [CSmSem::SemRm] Removed semaphore 30081042 
  May 23 14:19:36 myhost [23/May/2017:14:19:36] [Error] SiteMinder Agent 
  May 23 14:19:36 myhost PID Cache error. 
  May 23 14:19:36 myhost Failed to initialize PID Cache 
  May 23 14:19:40 myhost nm: '/local/opt/bin/httpd': No such file 
  May 23 14:19:40 myhost [Tue May 23 14:19:40 2017] [warn] Siteminder Web Agent: 
  restart not supported. 

Why do we have the Notice "nm: '/local/opt/bin/httpd': No such file"
and Warning "Siteminder Web Agent: restart not supported." ?

 

Cause

 

When you ran nm -A against /usr/sbin/httpd and /usr/sbin/httpd.worker
on the RedHat Apache and you get the message :

  "no symols".

To illustrate it :

  [[email protected] /opt]# nm -A /usr/sbin/httpd
  nm: /usr/sbin/httpd: no symbols

  [[email protected] /opt]# nm -A /usr/sbin/httpd.worker
  nm: /usr/sbin/httpd.worker: no symbols

For the Agent to be able to support graceful restart, symbols should
be available. If no symbol is available, then you'll see the message 

  "nm: '/local/opt/bin/httpd': No such file"

If symbols are available from the httpd binary, but the symbol
"restart_pending" is not found, then the warning message

  "Siteminder Web Agent: restart not supported"

will appear. Out of the box Web Agent does this check for start, stop,
restart and gracefull options for the apachectl commands.

 

Environment

 

  Web Agent 12.52SP1CR10 build 2813 on Apache 2.4.43 64bit RedHat 7.8;

 

Resolution

 

Compile your own Apache or get an Apache version which binaries will
show symbols and the "restart_pending" symbols, in order to have the
LLAWP to not shutdown if a restart or graceful is option is send to
the apachectl command. If restart_pending symbol is not present, the
LLAWP process will shutdown and start over.

The commands

  nm -A /usr/sbin/httpd 
  nm -A /usr/sbin/httpd .worker

should return symbols and "restart_pending" one.