Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

nginx: [error] failed to initialize Lua VM #47

Open
yiliaofan opened this issue Oct 28, 2019 · 5 comments
Open

nginx: [error] failed to initialize Lua VM #47

yiliaofan opened this issue Oct 28, 2019 · 5 comments

Comments

@yiliaofan
Copy link

macosx env:
nginx version: slardar/1.1
built by clang 11.0.0 (clang-1100.0.33.8)
built with OpenSSL 1.0.2j 26 Sep 2016
TLS SNI support enabled
configure arguments: --with-http_ssl_module --with-stream_ssl_module --with-openssl=/Users/dd/work/nginx/slardar/deps/openssl-OpenSSL_1_0_2j --with-pcre=/Users/dd/work/nginx/slardar/deps/pcre-8.39 --with-ld-opt=-Wl,-rpath,/usr/local/slardar/luajit/lib,-rpath,/usr/local/slardar/nginx/app/lib/ --with-zlib=/Users/dd/work/nginx/slardar/deps/zlib-1.2.11 --with-http_stub_status_module --with-stream --add-module=/Users/dd/work/nginx/slardar/deps/stream-lua-nginx-module-4557314 --add-module=/Users/dd/work/nginx/slardar/deps/lua-nginx-module-0.10.11 --prefix=/usr/local/slardar/nginx

error:
 /usr/local/slardar/nginx  sudo sbin/nginx -t
nginx: [error] failed to initialize Lua VM in /usr/local/slardar/nginx/conf/nginx.conf:37

容器可以启动的。。于是,对比了下容器文件与mac os编译的文件 没发现文件差异。

请帮看下是啥原因导致的? 如何修复呢 谢谢!

ps:
LUAJIT_LIB=/usr/local/slardar/luajit/lib
LUAJIT_INC=/usr/local/slardar/luajit/include/luajit-2.1
这个设置了。

@yejingx
Copy link
Contributor

yejingx commented Oct 28, 2019

/usr/local/slardar/nginx/conf/nginx.conf:37
这个文件有改过吗?37 行贴一下看看是什么?

@yiliaofan
Copy link
Author

yiliaofan commented Oct 29, 2019

配置文件没改过,如下图:
image

谢谢~

@huangnauh
Copy link
Collaborator

配置文件没改过,如下图:
image

谢谢~

  1. 你可以把 debug 日志打开,看看出错是在什么地方
  2. 在 macOS Majave 下,用 slardar 默认配置启动 nginx 没有异常, 你可以排查下你的相关改动

@yiliaofan
Copy link
Author

@huangnauh 非常感谢~

开了相关debug 没有获得更多信息

修改了如下:
conf/nginx.conf:9:error_log logs/error.log debug;
conf/nginx.conf:20: lua_socket_log_errors on;
conf/slardar/status.conf:8: access_log on;

是否我漏了相关配置? 谢谢!

@huangnauh
Copy link
Collaborator

@huangnauh 非常感谢~

开了相关debug 没有获得更多信息

修改了如下:
conf/nginx.conf:9:error_log logs/error.log debug;
conf/nginx.conf:20: lua_socket_log_errors on;
conf/slardar/status.conf:8: access_log on;

是否我漏了相关配置? 谢谢!

可以检查下编译的时候有没有打开 with-debug

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

No branches or pull requests

3 participants