Help debugging UDF Execution Error 1

I’m looking for ideas how to debug a UDF Execution Error. The UDF works fine in our local dev environments, but fails when run in our build environment. The only error indication is the message from a AerospikeClient exception: Error Code 100: UDF: Execution Error 1. There are no errors in aerospike.log, and asinfo indicates everything is happy. I have a simple tool to test registration of the UDF, and it indicates that registration works just fine, too. How can I debug this?

Aerospike 3.4.1, CentOS 6.

For what it’s worth, here’s the UDF:

– Set a particular bin only if record does not already exist. – Returns 1 if bin is written, 0 if not. function writeUnique(r,name,value) if not aerospike:exists(r) then aerospike:create(r) r[name] = value aerospike:update(r) return 1 else return 0 end end

Thanks, Charlie

Normal behavior is that the UDF may have a run-time execution, and would log an error on the server side. The behavior you see is not normal.

If it’s possible to turn on the log to detail level for the UDF component? We would want to look for log line: “rc = 1” or “[CACHE] state create failed”


You can close this topic. It was a failure on my end: the UDF appeared to have been installed correctly, but was not. Once I had the UDF correctly registered, everything worked fine.

1 Like