Mutex and shared memory cleanup
On UNIX®, Linux®, and z/OS® systems, if the broker or agent is stopped incorrectly, you might need to manually clean up mutex and shared memory that are used in the communication of data between the CandleMonitor node and agent.
Symptoms of this problem are as follows:
- When restarted, the agent does not fully initialize.
- Subsequent attempts to shut down the agent hang.
- Information data is missing, and there is a Broker_Not_Responding event. Statistics data is missing with at least one CandleMonitor node deployed.
Do the following steps to clean up mutexes and shared memory:
- Stop the agent and the brokers that are monitored by the agent.
- On UNIX, Linux
systems, or z/OS UNIX (on z/OS systems):
- Issue the ipcs -a command.
- In the generated output, find all message queues with the brokers' user IDs and agents' user IDs, and record the IDs and KEY field for each.
- Find all semaphores that have a KEY field that matches the KEY fields for the message queues, and record the ID field for each.
- Find all shared memory that have brokers' user IDs, agents' user IDs, and an NATTCH field of 0, and record the ID field for each.
- Switch to a user ID that can issue the ipcrm command; the user ID need to be the owner user ID (in the ipcs –a output), a user ID in the same group as the owner, or a root user ID.
- For each message queue that you recorded, issue the ipcrm -q <ID> command.
- For each semaphore that you recorded, issue the ipcrm -s <ID> command.
- For each shared memory that you recorded, issue the ipcrm -m <ID> command.
- Restart the brokers and the agent.