Failed Assertion on insufficient privileges to switch user to X

#1

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

https://www.aerospike.com/docs/operations/configure/non_root/

Keywords

4.5.3.2 non-root permissions ipcs root privileges

Timestamp

05/15/2019