Giter VIP home page Giter VIP logo

Comments (16)

BG2BKK avatar BG2BKK commented on July 17, 2024 1

经过对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.

BG2BKK avatar BG2BKK commented on July 17, 2024

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.

BG2BKK avatar BG2BKK commented on July 17, 2024

这是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.

niuhp avatar niuhp commented on July 17, 2024

现在就剩这个了,访问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.

BG2BKK avatar BG2BKK commented on July 17, 2024

请问你的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.

niuhp avatar niuhp commented on July 17, 2024

是2.1.0啊

from abtestinggateway.

niuhp avatar niuhp commented on July 17, 2024

http://luajit.org/download.html

from abtestinggateway.

BG2BKK avatar BG2BKK commented on July 17, 2024

没有遇到过你的错误,用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.

fonlang avatar fonlang commented on July 17, 2024

@niuhp 访问8030端口提示ngx_http_lua_ffi_semaphore_new未定义
这个解决了吗?我也遇到了。CentOS7下

from abtestinggateway.

BG2BKK avatar BG2BKK commented on July 17, 2024

你好,这个是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.

nosun avatar nosun commented on July 17, 2024

我用的openresty 最新版本, luajit2.1.0beta2, 也是同样的问题

from abtestinggateway.

BG2BKK avatar BG2BKK commented on July 17, 2024

请问是哪个问题?

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.

nosun avatar nosun commented on July 17, 2024

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.

BG2BKK avatar BG2BKK commented on July 17, 2024

你好,这个问题是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.

BG2BKK avatar BG2BKK commented on July 17, 2024

经过测试,我换用 lua-resty-core的v0.1.6 tag可以正常使用,目前该项目的master分支是v0.1.7rc+了,我不知道如何指定tag作为git项目的sub module,所以我将所需lua-resty-core手动放到我的项目里,然后在README中指明。

非常感谢你的反馈,欢迎使用

from abtestinggateway.

ysjgxm avatar ysjgxm commented on July 17, 2024

运行时日志报错,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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.