Ns <NAMESPACE> can't remove arena stage X: permissions error

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

Synopsis

The following error: ns can’t remove arena stage X: permissions error is sully do to a permission error.

Aerospike server was most likely started as root and changed after a warm restart. Objects in shared memory remained owned by root and process is running as another user.

Solution

Would be for you to purge files in shared memory for Aerospike that were created by root. Here are some of the command to run:

  1. Stop your node by running

Occurrences Tally

  1. sudo /etc/init.d/aerospike stop

  2. List all shared memories

     ipcs -a
    
  3. Delete all shared memories with pattern “0xae"

     for i in `ipcs -m | sed "s/ .*$//" | grep 0xae`;do sudo ipcrm -M $i;done
    
  4. List all shared memories

     ipcs -a
    
  5. Restart Aerospike service

     sudo /etc/init.d/aerospike start