Hi,
We are using Aerospike for our project and using the Node J client. We are using a UDF for our purpose. We are using the old version of Nodejs and aerospike. Now we are moving to newer versions. Below are the version details:
Component Old version New Version Ubuntu 14.04 16.04 NodeJs 0.12.15 8.9.3 Aerospike 3.7.4 3.15.0.2 Aerospike NodeJs Client 1.0.31 3.0.2
We are facing the difficult in running the UDF on the Node JS in the new version. The UDF is running fine on the AQL console, but is failing on the NodeJS. We are able to run the select, query and all the Aerospike features. Just UDFs are failing. Here is the sample code:
We have referred to the example here:
https://github.com/aerospike/aerospike-client-nodejs/blob/master/examples/query_aggregate.js
I am getting the following error:
err: { AerospikeError: UDF: Execution Error 1 at Function.AerospikeError.fromASError (/mnt/canvas/app/releases/canvasproject/canvas.services/node_modules/aerospike/lib/error.js:133:12) at Command.convertError (/mnt/canvas/app/releases/canvasproject/canvas.services/node_modules/aerospike/lib/commands/command.js:42:27) at Command.convertResponse (/mnt/canvas/app/releases/canvasproject/canvas.services/node_modules/aerospike/lib/commands/command.js:50:22) at asCallback (/mnt/canvas/app/releases/canvasproject/canvas.services/node_modules/aerospike/lib/commands/command.js:102:22) message: ‘UDF: Execution Error 1’, code: 100, func: ‘as_query_aggregate’, file: ‘src/main/aerospike/aerospike_query.c’, line: 959 }
I saw the discussion as: AerospikeError: UDF: Execution Error 1 and checked the system path as
“my-nodejs-app-path/node_modules/aerospike/modules/lua-core/src”
Also, I saw in the documentation that we need to register the UDF. Do we really need to register the UDF, as we have registered the UDF using the AQL console. Actually, I have tried registering the UDF on client connect event, but still it did not work.
Could you please help me out?