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

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.

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

This has been fixed as of version 4.5.3.2. In previous versions, the only solution is to run as a root user.

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