Failed Assertion on insufficient privileges to switch user to X

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.

Failed Assertion on insufficient privileges to switch user to X

Problem Description

WARNINGS:

May 16 2019 22:31:25 GMT: FAILED ASSERTION (misc): (daemon.c:72) insufficient privileges to switch user to 0
May 16 2019 22:31:25 GMT: WARNING (as): (signal.c:159) SIGINT received, shutting down
May 16 2019 22:31:25 GMT: WARNING (as): (signal.c:162) startup was not complete, exiting immediately

The above warnings indicate a Failed Assertion due to a mismatch in user or group permissions.

Explanation

In versions prior to 4.5.3.2 the user and group setting of the aerospike.conf were ignored on systemd environments.

Running Aerospike as non-root required modification of the systemd aerospike.service. This issue has been remedied in version 4.5.3.2.

Solution

The quick fix to this issue is to update the user and group setting in aerospike.conf to the correct ones and remove the User= and Group= entries from the aerospike systemd service file.

service {
...
user aerospike_USER 
group aerospike_GROUP
}

Note

Running as non-root requires that a user has the right permissions to access the file system, storage devices and shared memory.

Links

Keywords

4.5.3.2 non-root permissions ipcs root privileges

Timestamp

05/15/2019