Facing AerospikeError: Socket read failed: -4095 issue on put command in local setup

Creating index worked fine but i am stuck in this issue while putting bins to the keys. Check screenshot attached -

Can anyone help me with the issue ?

Hi @Saksham_Patro, welcome to the forum!

Looking at your error, code: -6 from our docs is

AS_ERR_BIN_EXISTS | Create-only operation applied to a bin that already exists.

Without seeing your code, I would guess the policy you are using for writes may have something to do with it.

The Node.js client uses these policies for existing records:

Name Type Description
IGNORE Write the record, regardless of existence. (I.e. create or update.)
CREATE Create a record, ONLY if it doesn’t exist.
UPDATE Update a record, ONLY if it exists.
REPLACE Completely replace a record, ONLY if it exists.
CREATE_OR_REPLACE Completely replace a record if it exists, otherwise create it.

Could you share your code, or your policy object?

Thanks for your response -

Please find the code in the link -

Also find the log in the screenshot attached below for the help

We are using `CREATE_OR_REPLACE policy in exists.

NOTE: The same thing is working fine on hosted env but not on local. Could be due to installed aerospike version are different ?

I am using 6.3 version in local do i have to downgrade the same ?

Thanks.

Hmm
 thanks for sending that. Nothing is popping out to me with your code, but I did a little digging and found a similar issue in the GitHub repo for the Node.js client from 2018. You can check that out here.

That problem had to do with their socketTimeout being set to a very small nonzero value. I don’t see anything setting that in your code, but you might try setting the socketTimeout along with your totalTimeout to see if that changes anything.

As far as working in a hosted env but not your local, I wouldn’t know for sure, but I don’t think the difference between versions would cause this. Are you using the same aerospike.conf file between the environments?

There are no differences in conf file, I have increased the timeout and checked the same, the policy now is as follow but still not able to resolve the issue. { totalTimeout: 300000, socketTimeout: 300000, exists: 4 }

Can you please tell me how to downgrade my aerospike version from 6 to 3 at my local environment ?

What version of the node.js client library are you using? For Aerospike 6.3, it is recommended to us 5.4, but according to the compatibility matrix, the minimum version is 4.0.

Hi Kevin,

I think that is the issue, We are using “aerospike”: “^3.13.0” nodejs library in our code but my aerospike client version is 6.3.0.

Unfortunately I cannot do changes at code level as it is working on various environments but I want to downgrade my aerospike client version compatible to “aerospike”: “^3.13.0” in my local system to run the same. Can you help me with the same as there were no clear documents regarding the same?

If this is not a production system then uninstall the current version and purge any files it may have created based on your aerospike.confg. If you need help, I’d need to know more about how you are deploying Aerospike. Which distro and /etc/aerospike/aerospike.conf.

If this is production, I’m not sure how to downgrade to 3.13 - I’m sure it would involve backup/restore or XDR.

Your current client version would support Aerospike 4.9 through and including 5.7 - it would be much easier to downgrade to one of these if this is a production cluster.

[Edit 2023.04.23] A colleague reminded me that we have to wipe the storage to downgrade below 6.0.

If this is for local development, consider using docker instead of installing the server locally.

Thanks I have reinstalled the version 5.5 at my system after purging but facing the issue -

Do you have an idea for the same ?

Thanks in advance.

Copy paste console output and put it inside of a code-fence - surround it with triple backticks ‘`’. Easier for everyone :).

Not much to go off of in that. The server log file will include more information. Likely some incompatible config complait. Normally status includes a snippet of the log - since it doesn’t, I think you must be logging to a file, probably /var/log/aerospike/aerospike.log.

Regarding “ExecStart=/usr/bin/asd $ASD_OPTIONS --config-file $ASD_CONFIG_FILE --fgdaemon (code=exited, status=1/FAILURE)” issue

I am unable to locate log file for the same, there is no file aerospike.log in the system. Is there any other way to find this compatibility issue ?

Aerospike 6.3.0 is working fine without any compatibility issue but there is some concern in other previous versions installation I have tried from 4.7 to 5.6 all version but they all showing same issue -

ExecStart=/usr/bin/asd $ASD_OPTIONS --config-file $ASD_CONFIG_FILE --fgdaemon (code=exited, status=1/FAILURE)

The config file is normally located at /etc/aerospike/aerospike.conf.

See if there are any logs coming from journalctl:

sudo journalctl --since "1 days ago" -u aerospike.service

Already Tried the journalctl command but it is showing no logs -

Hint: You are currently not seeing messages from other users and the system. Users in groups ‘adm’, ‘systemd-journal’ can see all messages. Pass -q to turn off this notice. – Logs begin at Thu 2023-03-23 16:22:07 IST, end at Sun 2023-04-23 20:35:48 IST. – – No entries –

Yes config file is there but how to check the error log ?

Can you run it with sudo - updated command above.

Thanks,

The log is showing following error -

unable to open file /etc/aerospike/features.conf: No such fi>
Apr 23 21:04:27 KELLGGNLPTP1099 asd[28197]: Apr 23 2023 15:34:27 GMT: CRITICAL (config): (features_ee.c:142) failed to get feature key /etc/aerospike/features.c>
Apr 23 21:04:27 KELLGGNLPTP1099 asd[28197]: Apr 23 2023 15:34:27 GMT: WARNING (as): (signal.c:165) SIGINT received, shutting down Aerospike Enterprise Edition b>
Apr 23 21:04:27 KELLGGNLPTP1099 asd[28197]: Apr 23 2023 15:34:27 GMT: WARNING (as): (signal.c:169) startup was not complete, exiting immediately
Apr 23 21:04:27 KELLGGNLPTP1099 systemd[1]: aerospike.service: Main process exited, code=exited, status=1/FAILURE

If this is a local cluster and you only need one node - you can use the features.conf that ships with the server - I’m not sure why it isn’t there for you.

I’ll email you the a copy of the eval_features.conf for 6.3 - it should have been installed automatically though. For some reason, the this forum doesn’t allow me to upload it. [Fixed]

Attached is eval_features.conf you’ll need to rename it to features.conf and place it in /etc/aerospike/features.conf.

eval_features.conf (1.2 KB)

Thanks for reply,

Now after downgrading aerospike and adding the feature.conf file, the aerospike put command is finally working for the code. Thank you Kevin for your support.

It’s not supposed to be difficult - hopefully things go more smoothly from here. Glad to hear you got it working.

Which version of Ubuntu are you running? I like to try and figure out why the features.conf was missing from your installation.