你好,多谢你的帮助。在使用过程中还是遇到一些问题如下:
https://github.com/doujiang24/stream-lua-nginx-module/tree/balancer
https://github.com/doujiang24/lua-resty-core/tree/balancer
我使用了以上分支编译安装 openresty,编译安六顺利通过。
但 resty/core/base.lua 检查 ngx.config.ngx_lua_version 为失败。
因为 stream-lua-nginx-module 中定义的版本是 10006,
于是我又pull了 (https://github.com/doujiang24/stream-lua-nginx-module/releases/tag/v0.0.7)
此时编译失败,错误日志如下:
home/json/Downloads/openresty-1.11.2.2/module/stream-lua-nginx-module/src/ngx_stream_lua_module.c:609:20: error: ‘ngx_stream_core_main_conf_t’ has no member named ‘phases’
arr = &cmcf->phases[NGX_STREAM_LOG_PHASE].handlers;
^
/home/json/Downloads/openresty-1.11.2.2/module/stream-lua-nginx-module/src/ngx_stream_lua_module.c:609:29: error: ‘NGX_STREAM_LOG_PHASE’ undeclared (first use in this function)
arr = &cmcf->phases[NGX_STREAM_LOG_PHASE].handlers;
^
/home/json/Downloads/openresty-1.11.2.2/module/stream-lua-nginx-module/src/ngx_stream_lua_module.c:609:29: note: each undeclared identifier is reported only once for each function it appears in
/home/json/Downloads/openresty-1.11.2.2/module/stream-lua-nginx-module/src/ngx_stream_lua_module.c:621:12: warning: assignment from incompatible pointer type [enabled by default]
*h = ngx_stream_lua_log_handler;
^
objs/Makefile:2570: recipe for target 'objs/addon/src/ngx_stream_lua_module.o' failed
make[2]: *** [objs/addon/src/ngx_stream_lua_module.o] Error 1
------------------
Best Regards
-----------------------------------------
Json Shen @ 2017
This message is for the named addressees' use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please immediately delete it. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Unless otherwise stated, any commercial information given in this message does not constitute an offer to deal on any terms quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation.
------------------ 原始邮件 ------------------
发件人: "DeJiang Zhu"<douj...@gmail.com>;
发送时间: 2017年2月17日(星期五) 上午10:16
收件人: "openresty"<openresty@googlegroups.com>;
主题: Re: [openresty] balancer_by_lua_block 不支持 tcp 吗
--