orlabs / orange

OpenResty/Nginx Gateway for API Monitoring and Management.
http://orange.sumory.com
MIT License
2.31k stars 573 forks source link

ubuntu 安装报模块不存在,安装openresty并没有排除模块 #296

Closed xioayangguang closed 4 years ago

xioayangguang commented 5 years ago
使用的Orange版本

v0.7.0

nginx version: openresty/1.9.15.1

需求或场景

运行start.sh报错, nginx: [error] init_by_lua error: /usr/local/orange/orange/orange.lua:11: module 'resty.dns.client' not found:

使用的插件

配置文件没有改动

具体的配置

两个配置文件一句话都没有改动,lua_package_path也没有改

期望的结果

安装成功

错误的结果

nginx: [error] init_by_lua error: /usr/local/orange/orange/orange.lua:11: module 'resty.dns.client' not found: no field package.preload['resty.dns.client'] no file './lualib/resty/dns/client.lua' no file './lualib/resty/resty/dns/client.lua' no file '/usr/local/orange/resty/dns/client.lua' no file '/usr/local/lor/resty/dns/client.lua' no file '/usr/local/openresty/lualib/resty/dns/client.lua' no file '/usr/local/openresty/lualib/resty/dns/client/init.lua' no file './resty/dns/client.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta2/resty/dns/client.lua' no file '/usr/local/share/lua/5.1/resty/dns/client.lua' no file '/usr/local/share/lua/5.1/resty/dns/client/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/resty/dns/client.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/resty/dns/client/init.lua' no file '/usr/local/openresty/lualib/resty/dns/client.so' no file './resty/dns/client.so' no file '/usr/local/lib/lua/5.1/resty/dns/client.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/resty/dns/client.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/usr/local/openresty/lualib/resty.so' no file './resty.so' no file '/usr/local/lib/lua/5.1/resty.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/resty.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /usr/local/orange/orange/orange.lua:11: in main chunk [C]: in function 'require' init_by_lua:2: in main chunk

liulei18 commented 5 years ago
xioayangguang commented 5 years ago

"balancer"插件会报错。安装了 /opt/openresty/bin/opm get jojohappy/lua-resty-balancer luarocks install penlight luarocks install lua-resty-dns-client 这两个也安装了

版本

nginx version: openresty/1.13.6.2 Orange 0.7.0

报错如下: nginx: [error] [lua] orange.lua:75: init(): Startup error: ./orange/utils/utils.lua:192: ./orange/utils/balancer.lua:8: module 'resty.dns.balancer' not found: no field package.preload['resty.dns.balancer'] no file './lualib/resty/dns/balancer.lua' no file './lualib/resty/resty/dns/balancer.lua' no file '../resty/dns/balancer.lua' no file '/usr/local/lor/resty/dns/balancer.lua' no file '/opt/openresty/site/lualib/resty/dns/balancer.ljbc' no file '/opt/openresty/site/lualib/resty/dns/balancer/init.ljbc' no file '/opt/openresty/lualib/resty/dns/balancer.ljbc' no file '/opt/openresty/lualib/resty/dns/balancer/init.ljbc' no file '/opt/openresty/site/lualib/resty/dns/balancer.lua' no file '/opt/openresty/site/lualib/resty/dns/balancer/init.lua' no file '/opt/openresty/lualib/resty/dns/balancer.lua' no file '/opt/openresty/lualib/resty/dns/balancer/init.lua' no file './resty/dns/balancer.lua' no file '/opt/openresty/luajit/share/luajit-2.1.0-beta3/resty/dns/balancer.lua' no file '/usr/local/share/lua/5.1/resty/dns/balancer.lua' no file '/usr/local/share/lua/5.1/resty/dns/balancer/init.lua' no file '/opt/openresty/luajit/share/lua/5.1/resty/dns/balancer.lua' no file '/opt/openresty/luajit/share/lua/5.1/resty/dns/balancer/init.lua' no file '/opt/openresty/site/lualib/resty/dns/balancer.so' no file '/opt/openresty/lualib/resty/dns/balancer.so' no file './resty/dns/balancer.so' no file '/usr/local/lib/lua/5.1/resty/dns/balancer.so' no file '/opt/openresty/luajit/lib/lua/5.1/resty/dns/balancer.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/opt/openresty/site/lualib/resty.so' no file '/opt/openresty/lualib/resty.so' no file './resty.so' no file '/usr/local/lib/lua/5.1/resty.so' no file '/opt/openresty/luajit/lib/lua/5.1/resty.so' no file '/usr/local/lib/lua/5.1/loadall.so'

xioayangguang commented 5 years ago

谢谢,已经解决了

mingluyang commented 5 years ago

最后这个balancer是怎么解决的?我也卡在这里了,我opm这个了但是还是不行

xioayangguang commented 4 years ago

去找到这个插件,然后安装就解决了,也可以把这个插件关闭

shuaijinchao commented 4 years ago

we released a new version of 0.8.0, which solved the problem of dependent installation through lualocks. hope version 0.8.0 can solve your problem.

shuaijinchao commented 4 years ago

you can experience our new v0.8.0 version. If you find any problems, please feel free to provide feedback through the issues.