Comments (16)
经过对openresty各版本的比对,我发现api ngx_http_lua_ffi_sema_new的引入是从当前最新版本openresty-1.9.15.1开始的,所以没有发现,看来我的锅轻一点了 :)
解决这个问题的终极办法是,如果想用semaphore的话,每次使用lua-resty-core的时候,需要将lua-resty-core/lib/ngx 和 lua-resty-core/lib/resty 的版本与openresty保持一直,简单粗暴的方法就是,从/usr/local/oprensty/lualib中将ngx和resty目录 copy 到ABTestingGateway的lib/lua-resty-core目录下替换;
解决这个问题的终极办法是,如果想用semaphore的话,每次使用lua-resty-core的时候,需要将lua-resty-core/lib/ngx 和 lua-resty-core/lib/resty 的版本与openresty保持一直,简单粗暴的方法就是,从/usr/local/oprensty/lualib中将ngx和resty目录 copy 到ABTestingGateway的lib/lua-resty-core目录下替换;
我之所以没有将lua_package_path中的路径直接指定到openresty的路径下,原因是1、我们使用的tengine,所以lua-resty-core等lib需要从目录外指定;2、运维人员应该拥有自己指定lib路径的权力。
这样的话,我仍然将本repo中的lib-resty-core保持原状,然后在readme中说明吧。
from abtestinggateway.
configure arguments: --with-ld-opt=-Wl,-rpath,/usr/local/web/LuaJIT-2.0.1/lib --with-luajit-inc=/usr/local/web/LuaJIT-2.0.1/include/luajit-2.0 --with-luajit-lib=/usr/local/web/LuaJIT-2.0.1/lib --without-http_rewrite_module --add-module=../lua-nginx-module-0.10.4
因为 --without-http_rewrite_module 了,所以set指令不生效
from abtestinggateway.
这是redis的unix socket
domain的访问接口,如果自动生成的话,一般是redis启动时生成的,如果你不想用的话,可以在配置文件中取消这个配置。
On Mon, May 23, 2016 at 2:33 PM, niuhp [email protected] wrote:
访问ab_admin报错了,提示
/tmp/redis.sock failed (2: No such file or directory)
请问这个文件什么时候生成,什么时候使用—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#27 (comment)
黄振栋
[email protected]
Phone:15010359288
personal site: https://bg2bkk.github.io
from abtestinggateway.
现在就剩这个了,访问8030端口提示ngx_http_lua_ffi_semaphore_new未定义,,
lua entry thread aborted: runtime error: ../lib/lua-resty-core/lib/ngx/semaphore.lua:64: /usr/local/lib/libluajit-5.1.so.2: undefined symbol: ngx_http_lua_ffi_semaphore_new
from abtestinggateway.
请问你的luajit用的是哪个版本的,LuaJIT-2.1可以在openresty软件包中获得
On Mon, May 23, 2016 at 2:54 PM, niuhp [email protected] wrote:
现在就剩这个了,访问8030端口提示ngx_http_lua_ffi_semaphore_new未定义,,
lua entry thread aborted: runtime error:
../lib/lua-resty-core/lib/ngx/semaphore.lua:64:
/usr/local/lib/libluajit-5.1.so.2: undefined symbol:
ngx_http_lua_ffi_semaphore_new—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#27 (comment)
from abtestinggateway.
是2.1.0啊
from abtestinggateway.
http://luajit.org/download.html
from abtestinggateway.
没有遇到过你的错误,用openresty软件包中维护的LuaJIT看看呢?
试一下,不行我再想想别的原因
On Mon, May 23, 2016 at 3:28 PM, niuhp [email protected] wrote:
http://luajit.org/download.html
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#27 (comment)
from abtestinggateway.
@niuhp 访问8030端口提示ngx_http_lua_ffi_semaphore_new未定义
这个解决了吗?我也遇到了。CentOS7下
from abtestinggateway.
你好,这个是ngx_lua比较新的版本中带有的 resty.semaphore模块,请确定ngx_lua版本包含该模块
On Sun, Jun 19, 2016 at 2:42 PM, noodles-v6 [email protected]
wrote:
@niuhp https://github.com/niuhp
访问8030端口提示ngx_http_lua_ffi_semaphore_new未定义
这个解决了吗?我也遇到了。CentOS7下—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA0sgZfQAfy73w2WlzSeKjgS1uSDrNfXks5qNOS9gaJpZM4Ii9Xy
.
from abtestinggateway.
我用的openresty 最新版本, luajit2.1.0beta2, 也是同样的问题
from abtestinggateway.
请问是哪个问题?
On Thu, Jul 28, 2016 at 11:03 AM, 郭华伟 [email protected] wrote:
我用的openresty 最新版本, luajit2.1.0beta2, 也是同样的问题
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0sgQXMlo0kLREMK_AicdZalNAztJnaks5qaBv3gaJpZM4Ii9Xy
.
from abtestinggateway.
lua entry thread aborted: runtime error: ../lib/lua-resty-core/lib/ngx/semaphore.lua:64: /usr/local/lib/libluajit-5.1.so.2: undefined symbol: ngx_http_lua_ffi_semaphore_new
反复测试了好几遍,始终如此
from abtestinggateway.
你好,这个问题是api的更新,曾经也出现过这样的问题中已经解决了,
但是出现这个问题的原因是我版本中的lua-resty-lib没有更新到最新版,仍然使用了ngx_http_lua_ffi_semaphore_new,而新版已经是ngx_http_lua_ffi_sema_new了,这点我很抱歉。之所以一直没有发现,原因是我开发时采用的是tengine+luajit+lua-resty-lib,我当时的ngx_lua版本和lua-resty-lib契合,所以没有报错;当我采用新版openresty时没有进行深入测试,非常抱歉,我正在修复和测试
但是你的问题在于,使用了非openresty维护的luajit版本,openresty维护的LuaJIT是2.1版本以上了,会有与ngx有关的更新,而你是从官方下载的LuaJIT,编译是不会通过的
checking for LuaJIT library in /home/huang/workspace/oss/LuaJIT-2.1.0-beta2/lib and /home/huang/workspace/oss/LuaJIT-2.1.0-beta2/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl) ... not found
checking for LuaJIT library in /home/huang/workspace/oss/LuaJIT-2.1.0-beta2/lib and /home/huang/workspace/oss/LuaJIT-2.1.0-beta2/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env) ... not found
./configure: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUAJIT_LIB is defined as /home/huang/workspace/oss/LuaJIT-2.1.0-beta2/lib and LUAJIT_INC (path for lua.h) /home/huang/workspace/oss/LuaJIT-2.1.0-beta2/include/luajit-2.1, but we cannot find LuaJIT there.
from abtestinggateway.
经过测试,我换用 lua-resty-core的v0.1.6 tag可以正常使用,目前该项目的master分支是v0.1.7rc+了,我不知道如何指定tag作为git项目的sub module,所以我将所需lua-resty-core手动放到我的项目里,然后在README中指明。
非常感谢你的反馈,欢迎使用
from abtestinggateway.
运行时日志报错,index变量错误是什么原因呢:
2019/11/06 12:11:17 [error] 1606#1606: *36 lua entry thread aborted: runtime error: /root/ABTestingGateway/utils/../admin/ab_action.lua:16: attempt to index local 'systemConf' (a userdata value)
stack traceback:
coroutine 0:
/root/ABTestingGateway/utils/../admin/ab_action.lua: in main chunk, client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"
from abtestinggateway.
Related Issues (20)
- 希望能做出集成的docker image HOT 1
- 【时好时坏】uidsuffix,新id第一次访问500,后面再刷新就正常 HOT 1
- 有编好的openresty-1.9.7.5吗? HOT 1
- 有好的交流群吗?有几个源码问题求解 HOT 1
- 如果并发量比较高,redis是否有压力?还有redis挂了的话,分流的使用受影响吗 HOT 3
- 修改了nginx和bate等文件的user为root了,lua文件增加了x权限,在curl时还是报404的错啊?
- 请问怎么调试正在运行的lua代码呢?各位都用的什么工具啊? HOT 2
- 开启编译缓存的情况下,会出现分流错误 HOT 2
- redis
- 这个项目还在维护么? HOT 1
- policy_set和policy_get规则不一致
- stop-all-nginx.sh无法停止abtesting.sh启动的进程?
- 为什么不增加一个基于cookie的分流策略呢?且为什么uid分流要求一定是数字 HOT 1
- bug:多级分流造成的 shdict key 名冲突 HOT 2
- 按照步骤部署完成后,运行
- 是不是已经停止维护了呢?
- How to use password to connect to redis HOT 2
- init_process_timer HOT 1
- 最近想使用这个网关,请问是用master好,还是v2.1好
- 如果要集成redis集群,那这个是否只需要替换redis相关就可以了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abtestinggateway.