Lua Redis Module Loading Failure in Suricata 8.0.0 DPDK Mode: socket.coreError undefined symbol: lua_pcall

Hello Suricata Community,

I’m encountering a module-loading error when using a Lua script to interact with Redis in Suricata 8.0.0 (DPDK mode). The similar test script works flawlessly outside Suricata (e.g., via LuaJIT), but fails within Suricata with the following error:

E: output-lua: couldn't prime file: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so':
        /usr/local/lib/lua/5.1/socket/core.so: undefined symbol: lua_pcall
E: output-lua: couldn't initialize script
W: runmodes: output module "lua": setup failed

Suricata Lua Script​​ (simplified): execute falied by command “suricata –dpdk“

local redis = require "redis"
local client = redis.connect("192.168.2.191", 1103)

function log(args)
    -- HTTP transaction logic (omitted for brevity)
    -- Attempt Redis operations here
end

Similar Test Script​​ (works without issues): execute successfully by luajit

local redis = require "redis"
local client = redis.connect("192.168.2.191", 1103)
client:set("hello", "world")
print(client:get("hello")) -- Outputs "world"

After thorough debugging, I confirmed the root cause was ​​version mismatch between Suricata’s embedded Lua and the system Lua environment​​. Suricata expected Lua 5.4, but the system had remnants of an incompatible version (likely 5.1).

​Solution:​

:white_check_mark:​Reinstalling Lua 5.4​​ resolved the issue completely.