尝试通过 nginx 在 Lua 中运行 resty-mongol 时出现错误。错误是“尝试索引全局'位'(一个零值)”。我的环境有
https://github.com/openresty/lua-nginx-module/releases/tag/v0.10.6 - 使用 nginx 1.10.1 版本构建。
入口线程中止:运行时错误:...ules/lua-resty-mongol/lib/resty/mongol/object_id.lua:56:尝试索引全局“位”(一个零值)堆栈回溯:协程 0:.. .ules/lua-resty-mongol/lib/resty/mongol/object_id.lua:56: 在主块 [C]: 在函数 'require' ...e/modules/lua-resty-mongol/lib/resty/ mongol/bson.lua:25: 在主块中 [C]: 在函数 'require' .../modules/lua-resty-mongol/lib/resty/mongol/colmt.lua:20: 在主块中 [C] : 在函数 'require' ...e/modules/lua-resty-mongol/lib/resty/mongol/dbmt.lua:9: 在主块 [C]: 在函数 'require' 在此处输入代码 ...e /modules/lua-resty-mongol/lib/resty/mongol/init.lua:14:在主块中。
- 重新启动后,我上线了
mongo:new() [string "mongo:new()"]:1: 尝试调用方法 'new' (一个 nil 值)
我突然开始收到此错误,现在每次都失败。故障出现在我的代码行中的加载模块
require "resty.mongol"
行。可能出了什么问题。有人遇到过吗?