Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按照示例中的步骤执行到第9步中的第二步报404 #57

Closed
chimisu opened this issue Mar 2, 2017 · 8 comments
Closed

按照示例中的步骤执行到第9步中的第二步报404 #57

chimisu opened this issue Mar 2, 2017 · 8 comments

Comments

@chimisu
Copy link

chimisu commented Mar 2, 2017

安装完依赖软件,按照示例步骤执行,执行到第9步中的第二步报404

@BG2BKK
Copy link
Contributor

BG2BKK commented Mar 2, 2017

额,错误信息呢

@chimisu
Copy link
Author

chimisu commented Mar 2, 2017

@BG2BKK 已经搞定了,少装了lua-cjson。

@chimisu
Copy link
Author

chimisu commented Mar 2, 2017

@BG2BKK 执行到这一步:curl 127.0.0.1:8030 -H 'X-Uid:39' -H 'X-Real-IP:192.168.1.1',报500错误,会是什么问题呢?

@chimisu
Copy link
Author

chimisu commented Mar 2, 2017

@BG2BKK 2017/03/02 17:23:09 [warn] 12876#0: *5 [lua] base.lua:27: use of lua-resty-core with LuaJIT 2.0 is not recommended; use LuaJIT 2.1+ instead, client: 127.0.0.1, server: api.weibo.cn, request: "GET / HTTP/1.1", host: "127.0.0.1:8030"
2017/03/02 17:23:09 [error] 12876#0: *5 lua entry thread aborted: runtime error: ../lib/lua-resty-core/lib/ngx/semaphore.lua:64: /lib64/libluajit-5.1.so.2: undefined symbol: ngx_http_lua_ffi_semaphore_new
stack traceback:
coroutine 0:
[C]: in function 'require'
...al/src/ABTestingGateway/utils/../diversion/diversion.lua:11: in function <...al/src/ABTestingGateway/utils/../diversion/diversion.lua:1>, client: 127.0.0.1, server: api.weibo.cn, request: "GET / HTTP/1.1", host: "127.0.0.1:8030"

@chimisu
Copy link
Author

chimisu commented Mar 2, 2017

@BG2BKK 升级了LuaJIT到2.1之后报:2017/03/02 17:41:53 [error] 13574#0: *5 lua entry thread aborted: runtime error: ../lib/lua-resty-core/lib/ngx/semaphore.lua:64: /lib64/libluajit-5.1.so.2: undefined symbol: ngx_http_lua_ffi_semaphore_new
stack traceback:
coroutine 0:
[C]: in function 'require'
...al/src/ABTestingGateway/utils/../diversion/diversion.lua:11: in function <...al/src/ABTestingGateway/utils/../diversion/diversion.lua:1>, client: 127.0.0.1, server: api.weibo.cn, request: "GET / HTTP/1.1", host: "127.0.0.1:8030"

@chimisu
Copy link
Author

chimisu commented Mar 6, 2017

已解决,这个issue可以关闭了

@chimisu chimisu closed this as completed Mar 6, 2017
@sleevefone
Copy link

怎么解决的?

@sleevefone
Copy link

#79
经过对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目录下替换;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants