Skip to content

Lua plugin error: undefined symbol: lua_gettop #5158

@DrmagicE

Description

@DrmagicE

I'm trying to use redis with lua plugin:

require('redis')
local redis = require 'redis'
local client = redis.connect('127.0.0.1', 6379)
local response = client:ping()  

.... 

and got the error message below:

ERROR: [ReverseProxy] failed to add remap rule at /opt/ats/etc/trafficserver/remap.config line 196: 
Failed to create instance for plugin "/opt/ats/libexec/trafficserver/tslua.so": 
[ts_lua_add_module] lua_pcall /opt/ats/etc/trafficserver/script/test_global_hdr.lua failed: 
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_gettop

require('redis') works in luajit.

How can i fix that ?

Version :
Trafficserver 8.0
Luajit 2.0.5
Lua 5.1.4

OS:
CentOS 7

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions