Failure when starting Aerospike with Index on Disk as non-root user

#1

Failure when starting Aerospike with Index on Disk as non-root user

Problem Description

When starting Aerospike with Index on Disk (also known as ‘allflash’) the startup fails with the following error message:

Mar 12 21:52:42 astest01ea1.aws.sig asd[6422]: Mar 12 2019 21:52:42 GMT: WARNING (hardware): (hardware.c:247) error while opening file /proc/sys/vm/dirty_bytes for writing: 13 (Permission denied)
Mar 12 21:52:42 astest01ea1.aws.sig asd[6422]: Mar 12 2019 21:52:42 GMT: FAILED ASSERTION (hardware): (hardware.c:276) write failed unexpectedly

Explanation

Aerospike Index on Disk uses operating system page caching heavily and, as such, when starting, will optimize IO settings to ensure best performance. The error message above indicates that the user starting the Aerospike daemon does not have sufficient privileges to make these changes and the startup fails.

Solution

At this time the only solution is to run as a root user.

This is tracked under Jira AER-6040 expected to be addressed in an upcoming release.

Notes

When started from the command line using the root user, Aerospike will then switch to a non-root user to relinquish root privileges after startup. When running via systemd this is not possible as the systemd implements the new style daemon model.

Keywords

ALL FLASH INDEX ON DISK ROOT SYSTEMD DIRTY_BYTES

Timestamp

4/3/2019