Aerospike fails to start with the CRITICAL log message "trailing garbage in features.conf"

Aerospike fails to start due to corrupted features.conf file - trailing garbage error

Problem Description

The asd process fails to start with the following error:

Mar 09 2021 08:49:47 GMT: CRITICAL (config): (features_ee.c:184) trailing garbage in /etc/aerospike/features.conf, line 21
Mar 09 2021 08:49:47 GMT: WARNING (as): (signal.c:166) SIGINT received, shutting down Aerospike Enterprise Edition build 5.5.0.3 os ubuntu18.04
Mar 09 2021 08:49:47 GMT: WARNING (as): (signal.c:169) startup was not complete, exiting immediately

Explanation

This issue is reported when the features.conf file has been manually edited or modified. This could also happen if the features.conf file is edited on a Windows (DOS) OS and then uploaded to Linux. Editing this file in Windows modifies the carriage returns to the Windows standard. The “diff” or “hexdump” Linux commands can be used to check whether the file is different to the original version.

Solution

Solution1:

When a file has been modified on a Windows OS the “0d 0a” windows carriage return/ line feeds can be seen in the following hexdump output.

$ hexdump -C features-1.conf |head -20
00000000  23 20 67 65 6e 65 72 61  74 65 64 20 32 30 31 38  |# generated xxxx|
00000010  2d 31 31 2d 32 38 20 31  37 3a 33 35 3a 31 34 0d  |-xxxxx xxxxxxxx.|
00000020  0a 0d 0a 66 65 61 74 75  72 65 2d 6b 65 79 2d 76  |...feature-key-v|
00000030  65 72 73 69 6f 6e 20 20  20 20 20 20 20 20 20 20  |ersion          |
00000040  20 20 20 20 31 0d 0a 73  65 72 69 61 6c 2d 6e 75  |    1..xxxxxxxxx|
00000050  6d 62 65 72 20 20 20 20  20 20 20 20 20 20 20 20  |mber            |
00000060  20 20 20 20 20 20 20 20  38 32 31 32 39 36 37 34  |        xxxxxxxx|
00000070  33 0d 0a 0d 0a 61 63 63  2d 63 6f 6d 6d 61 6e 64  |3....acc-xxxxxxx|
00000080  2d 63 65 6e 74 65 72 2d  61 70 70 20 20 20 20 20  |-xxxxxxxxxx     |
00000090  20 20 20 20 20 20 74 72  75 65 0d 0a 61 63 63 2d  |      true..acc-|
000000a0  63 6f 6d 6d 61 6e 64 2d  63 65 6e 74 65 72 2d 61  |xxxxxxxxxxxxxx-a|
000000b0  70 69 20 20 20 20 20 20  20 20 20 20 20 74 72 75  |pi           tru|
000000c0  65 0d 0a 61 73 64 62 2d  61 6c 6c 2d 66 6c 61 73  |e.xxxxxxxxxxxxxs|
000000d0  68 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |h               |
000000e0  20 20 20 20 74 72 75 65  0d 0a 61 73 64 62 2d 63  |    true..xxxx-c|
000000f0  68 61 6e 67 65 2d 6e 6f  74 69 66 69 63 61 74 69  |xxxxxxxxxxxxxxxx|
00000100  6f 6e 20 20 20 20 20 20  20 20 20 74 72 75 65 0d  |on         true.|
00000110  0a 61 73 64 62 2d 63 6f  6d 70 72 65 73 73 69 6f  |.xxxxxxxxxxxxxxx|
00000120  6e 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |n               |
00000130  20 20 74 72 75 65 0d 0a  61 73 64 62 2d 65 6e 63  |  xxxxxxxxxxxxxc|

However the Linux carriage return “0a” can be seen in the following hexdump output

$ hexdump -C features.conf |head -20
00000000  23 20 67 65 6e 65 72 61  74 65 64 20 32 30 31 38  |# generated xxxx|
00000010  2d 31 31 2d 32 38 20 31  37 3a 33 35 3a 31 34 0a  |-1xxxxxxxxxxxxx.|
00000020  0a 66 65 61 74 75 72 65  2d 6b 65 79 2d 76 65 72  |.feature-key-ver|
00000030  73 69 6f 6e 20 20 20 20  20 20 20 20 20 20 20 20  |sion            |
00000040  20 20 31 0a 73 65 72 69  61 6c 2d 6e 75 6d 62 65  |  xxxxxxxxxxxxbe|
00000050  72 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |r               |
00000060  20 20 20 20 20 38 32 31  32 39 36 37 34 33 0a 0a  |     xxxxxxxxx..|
00000070  61 63 63 2d 63 6f 6d 6d  61 6e 64 2d 63 65 6e 74  |axxxxxxxxxxxxxnt|
00000080  65 72 2d 61 70 70 20 20  20 20 20 20 20 20 20 20  |er-xxxxxx       |
00000090  20 74 72 75 65 0a 61 63  63 2d 63 6f 6d 6d 61 6e  | xxxxxxxxxcoxxxx|
000000a0  64 2d 63 65 6e 74 65 72  2d 61 70 69 20 20 20 20  |d-cxxxxxxxxxx   |
000000b0  20 20 20 20 20 20 20 74  72 75 65 0a 61 73 64 62  |       xxxx.axxx|
000000c0  2d 61 6c 6c 2d 66 6c 61  73 68 20 20 20 20 20 20  |-all-flash      |
000000d0  20 20 20 20 20 20 20 20  20 20 20 20 20 74 72 75  |             tru|
000000e0  65 0a 61 73 64 62 2d 63  68 61 6e 67 65 2d 6e 6f  |e.axxxxxxxxxxxxo|
000000f0  74 69 66 69 63 61 74 69  6f 6e 20 20 20 20 20 20  |txxxxxxxxxx     |
00000100  20 20 20 74 72 75 65 0a  61 73 64 62 2d 63 6f 6d  |   xxxxxxxxx-com|
00000110  70 72 65 73 73 69 6f 6e  20 20 20 20 20 20 20 20  |pxxxxxxxx       |
00000120  20 20 20 20 20 20 20 20  20 74 72 75 65 0a 61 73  |         true.as|
00000130  64 62 2d 65 6e 63 72 79  70 74 69 6f 6e 2d 61 74  |db-xxxxxxxxxx-at|

The Linux utility “dos2unix” can be used to convert the format:

$ dos2unix features-1.conf 
dos2unix: converting file features-1.conf to Unix format...

Solution2:

Replace the features.conf with the file provided by Aerospike in the path “/etc/aerospike/features.conf”. The Primary Technical Contact (PTC) of the account can enable users to download the current license files from the Aerospike portal. Contact Aerospike support for any further assistance.

Keywords

FEATURES.CONF LICENSE KEY

Timestamp

March 2021

© 2021 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.