Skip to content

log level error in ngx_http_lua_conf.c #92

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

Closed
mei-rune opened this issue Mar 20, 2012 · 5 comments
Closed

log level error in ngx_http_lua_conf.c #92

mei-rune opened this issue Mar 20, 2012 · 5 comments

Comments

@mei-rune
Copy link

在 src/ngx_http_lua_conf.c 文件的第 51 行, 如下
ngx_conf_log_error(NGX_ERROR, cf, 0, "Failed to initialize Lua VM");
其中日志级别错误, 可改为

        ngx_conf_log_error(NGX_LOG_ERR, cf, 0, "Failed to initialize Lua VM");
agentzh added a commit that referenced this issue Mar 20, 2012
… first argument, as reported by runner-mei in github issue #92.
@agentzh
Copy link
Member

agentzh commented Mar 20, 2012

i've just fixed this. thanks for the catch!

@agentzh agentzh closed this as completed Mar 20, 2012
@mruse
Copy link

mruse commented Sep 7, 2015

我遇到了同样的错误:
nginx: [error] failed to initialize Lua VM

系统版本:Darwin CmsTopMacPro 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
软件版本:nginx-1.8.0, luajit 2.0.4 , nginx-lua-mudle-0.9.16

同时安装的模块还有:ngx_devel_kit, nginx-rtmp-module,redis2-nginx-module

貌似0.9.16版本里src/ngx_http_lua_conf.c 替换为 src/ngx_http_lua_config.c

报该错误有2个文件;
.//src/ngx_http_lua_module.c: "failed to initialize Lua VM");
if (lmcf->lua == NULL) {
ngx_conf_log_error(NGX_LOG_ERR, cf, 0,
"failed to initialize Lua VM");
return NGX_ERROR;
}

.//src/ngx_http_lua_util.h: "failed to initialize Lua VM");

if (!llcf->enable_code_cache && r->connection->fd != -1) {
lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module);

    dd("lmcf: %p", lmcf);

    L = ngx_http_lua_init_vm(lmcf->lua, lmcf->cycle, r->pool, lmcf,
                             r->connection->log, &cln);
    if (L == NULL) {
        ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                      "failed to initialize Lua VM");
        return NULL;
    }

    if (lmcf->init_handler) {
        if (lmcf->init_handler(r->connection->log, lmcf, L) != NGX_OK) {
            /* an error happened */
            return NULL;
        }
    }

水平有限,望春哥赐教。

@agentzh
Copy link
Member

agentzh commented Sep 8, 2015

@mruse Please, no Chinese here. This place is considered English only. If you really want to use Chinese, please use the openresty (Chinese) mailing list instead. Please see https://openresty.org/#Community for more details.

Regarding your question, please try to use the latest OpenResty 1.9.3.1 release and see if you can still see the problem with it. See

https://openresty.org/#Download

@agentzh
Copy link
Member

agentzh commented Sep 8, 2015

@mruse Ensure that you can reproduce the issue without those 3rd-party nginx modules like "nginx-rtmp-module" that OpenResty does not maintain since those nginx modules have varying qualities and may break ngx_lua due to their own issues.

thibaultcha pushed a commit to spacewander/lua-nginx-module that referenced this issue Jan 5, 2019
… get set.

Fixed a regression introduced in 017e004 and previously described
in openresty#92.

Signed-off-by: Thibault Charbonnier <[email protected]>
thibaultcha pushed a commit that referenced this issue Jan 5, 2019
… get set.

Fixed a regression introduced in 017e004 and previously described
in #92.

Signed-off-by: Thibault Charbonnier <[email protected]>
@Vinutha-Garimella
Copy link

Hi @agentzh, I do have this rtmp issue in openersty I am seeing this error after adding the rtmp module in nginx.conf file. Do I have to install nginx and nginx-common in openresty container.

root@openresty-test:~# openresty -t
2020/02/20 10:03:08 [emerg] 1654#1654: unknown directive "rtmp" in /usr/local/openresty/nginx/conf/nginx.conf:36
nginx: [emerg] unknown directive "rtmp" in /usr/local/openresty/nginx/conf/nginx.conf:36
nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed

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

4 participants