0
  1. I am getting error when trying to running resty-mongol in Lua through nginx. The err is " attempt to index global 'bit' (a nil value)". My environment has

    https://github.com/openresty/lua-nginx-module/releases/tag/v0.10.6 - build with nginx 1.10.1 version.

Entry thread aborted: runtime error: ...ules/lua-resty-mongol/lib/resty/mongol/object_id.lua:56: attempt to index global 'bit' (a nil value) stack traceback: coroutine 0: ...ules/lua-resty-mongol/lib/resty/mongol/object_id.lua:56: in main chunk [C]: in function 'require' ...e/modules/lua-resty-mongol/lib/resty/mongol/bson.lua:25: in main chunk [C]: in function 'require' .../modules/lua-resty-mongol/lib/resty/mongol/colmt.lua:20: in main chunk [C]: in function 'require' ...e/modules/lua-resty-mongol/lib/resty/mongol/dbmt.lua:9: in main chunk [C]: in function 'require'enter code here ...e/modules/lua-resty-mongol/lib/resty/mongol/init.lua:14: in main chunk.

  1. And after a reboot i am getting on the line

mongo:new() [string "mongo:new()"]:1: attempt to call method 'new' (a nil value)

I started getting this error all of a sudden and now it fails everytime. The faliure is at the load module line within my code - require "resty.mongol" line. what possibly have gone wrong. Has anybody faced it yet?

Sumant Das
  • 19
  • 6
  • How did you install mongol lib? – Vyacheslav Sep 22 '16 at 09:48
  • do you reallly use luajit? – Vyacheslav Sep 22 '16 at 09:49
  • i have configured nginx to configure and build with lua-nginx-module And then i downloaded ngx_openresty ngx_openresty-1.9.7.2.tar.gz , extracted and installed it. Mongol is just downloaded from git and appended the init.lua path to package.path in nginx. – Sumant Das Sep 22 '16 at 11:43
  • juggling with this issues for past 4 days – Sumant Das Sep 22 '16 at 11:44
  • Getting problem with ffl and bit module loading - when running the lua file directly its able to find the modules. I have checked the path and cpath values.. they are same when running directly and when running through nginx. let me know if you need any more info.. – Sumant Das Sep 22 '16 at 11:46

0 Answers0