Should I install LUA separate from Aerospike?



I was trying to use snappy compression for LUA ( It needs. lua.h for compiling Should I install LUA separate from aerospike?


Are you trying to use Snappy with Lua inside the Aerospike server? That would be cool.

I’m pretty sure Aerospike server uses a static link of Lua, since we’ve had issues with different installed versions of Lua.

If you want to run against a different version, I believe there’s a compile process for it — but Aerospike currently supports the imbedding syntax of 5.1 only. If you’re OK with that, and want to hack into the compile process the Snappy library, it should be doable. I’d start by doing an aerospike source compile, find the lua module, and work to integrate Snappy with that, but you could also point the Aerospike server build at the built-in Lua (again, assuming Lua 5.1).


I am trying

####1.Have compiled to ->, and moved it to /usr/lib/ ####2.Then I created snappy.lua like this ####3. Added snappy.lua with aql ####4. I have local snappy = require(“snappy”) from another lua file

I am trying to run that udf from aql , but getting ###Error: (-1) Bad file descriptor

And after that seems aql cant connect ,

I am getting ###WARN AEROSPIKE_ERR_CLIENT Socket write error: 111 ###Error -1: Failed to seed cluster


This is likely an indicator that the lua did not execute correctly. Is there any log on the server side?


We tested LUA snappy library and compiled it with LUA 5.1, and it works fine.

I am also going to write a blog post and describe how to use lua snappy and cjson C libraries within Aerospike UDF. Hope it will be helpful for community.


Hi forkize,

That would be great, thanks! I look forward to reading your blog post and, upon review, publishing it on our guest blog. I am now following you on Twitter, so if you tweet it out, I will be happy to retweet to our community.

We welcome these contributions from the Aerospike community and hope that yours will inspire others to do the same!


Aerospike Community Manager
Twitter: @Mnemaudsyne


Hi forkize,

Can you please share the link to the blog or the link to the sample LUA code which using the Snappy compression. Thanks again for working on this.

-Idris InMobi