isage / lua-resty-moongoo

MongoDB library for OpenResty
Do What The F*ck You Want To Public License
118 stars 33 forks source link

bson_append_binary(): precondition failed: binary #34

Closed dev0pz closed 5 years ago

dev0pz commented 5 years ago

Hi. I was having issues when trying to connect to MongoDB > 3.2 using user:password in its mongodb uri and only in such case, no problems at all with non authenabled mongodbs.

I was using debian stretch openresty openresty/1.15.8.1 with current lua-resty-moongoo master with your compiled Lua-cbson trying with both: compiling libbson 1.7.0 and then with the recent libbson 1.9.5

everything works perfect with non authenticaticated connections but whenever i try to connect using mongo credentials like mongodb://user:password@server it throws:

src/bson/bson.c:812 bson_append_binary(): precondition failed: binary 2019/08/30 16:37:04 [alert] 1#1: worker process 6 exited on signal 6 when trying to query some collection.

thanks a lot, it's an amazing lib

isage commented 5 years ago

Can you try with patch from this pull request https://github.com/isage/lua-resty-moongoo/pull/32 ?

dev0pz commented 5 years ago

confirmed. it works fine. thanks a lot, will tip your hat!