CAF start returns "initialisation failed" error on Linux

Document ID : KB000020088
Last Modified Date : 14/08/2018
Show Technical Document Details
Introduction:

Symptoms:

On Linux, all caf commands like "caf status", "caf stop", "caf setserveraddress" are returning "initialisation failed" .

In the TRC_CCNFAGENT_*.log the following errors are observed :

110713-06:46:51.7152010L|022248|f6718b90|CcnfAgentW|cfOSServices    |cfOSServices |000000|ERROR  | CCFOSEvent::Init: Unable to create semaphore for global event evt_DoneE5F27766-E9E4-11E2-8187-8570C3B55EBD
110713-06:46:51.7152490L|022248|f6718b90|CcnfAgentW|CcnfAgentWorker |ccnfshmem.h |000240|ERROR  | ### Create(): no event 'DoneE5F27766-E9E4-11E2-8187-8570C3B55EBD' ###
110713-06:46:53.2196770L|022248|f6718b90|CcnfAgentW|CcnfAgentWorker |cmsgshm.cpp |000748|ERROR  | ### FactoryThread(): can't create shm block size 2040 ###
110713-06:46:56.6214340L|022248|f6718b90|CcnfAgentW|cfOSServices    |cfOSServices|000000|ERROR  | CIpcCommon::GetIPCKey: failed to create new semaphore: sem_evt_DoneE8E192A4-E9E4-11E2-8187-8570C3B55EBD: (28) No space left on device

 

Environment:

All supported versions of Linux 

CA Client Automation - All Versions

 

Cause: 

The above log lines indicate that the semaphore limit "maximum number arrays" has been reached and no new semaphore can be created. This causes a problem in starting the ccnfagent plugin.

 

Resolution:

1. Check what the semaphore limits are set to, 

    Following command returns the semaphore limits (max number of arrays) :

           ipcs -l


    In this example "max number of arrays" is set to 128
 

User-added image


     As a solution we could change the semaphore limit in order to increase the "maximum number of arrays" value.


NOTE:
This is generally done in the /etc/sysctl.conf or with the sysctl command. Please see the appropriate man pages or check with your OS vendor


Example for RedHat following command could be executed to increase the value to 256 :

* Execute following commands :

sysctl -w kernel.sem="250 32000 100 256"


* Edit  file /etc/sysctl.conf and update the line kernel.sem like this (or create it if it does not exist) :

kernel.sem=250 32000 100 256


250 is "max semaphores per array"
32000 is "max semaphores system wide"
100 is "max ops per semop call"
256 is "max number of arrays"



 

2. Another solution is to configure ccnfagent to not use semaphores but Session messaging :

 

  1. Create a file "usemessenger" in /opt/CA/DSM/Agent/CCNF
  2. Kill the caf process semop call
  3. caf start 
Instructions:
Please Update This Required Field