Comments (3)
Although I believe this is unrelated to lua-mongo itself, I'll venture to throw an idea that probably TLS initialization in mongo-c-driver conflicts with the one in Nginx. Moreover, you haven't provided a code snippet, so one is left to guess. You could try to use different TLS backends in Nginx and mongo-c-driver to eliminate possible interference.
As a sidenote, using lua-mongo with OpenResty (I believe it's your case) defies the whole purpose of using asynchronous I/O in Nginx because mongo-c-driver is inherently synchronous, hence it will not use Nginx's I/O infrastructure and will always block the workers.
from lua-mongo.
Later I realized that this site is right to report an error.
openresty/lua-nginx-module#1801
Yes is kong's issue. kong provide different ssl library:
bash-5.0# ldd /usr/lib/libmongoc-1.0.so
/lib/ld-musl-x86_64.so.1 (0x7f8ed61d3000)
libssl.so.1.1 => /lib/libssl.so.1.1 (0x7f8ed60bb000)
libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7f8ed5e3c000)
libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x7f8ed5e30000)
libz.so.1 => /lib/libz.so.1 (0x7f8ed5e16000)
libzstd.so.1 => /usr/lib/libzstd.so.1 (0x7f8ed5d62000)
libbson-1.0.so.0 => /usr/lib/libbson-1.0.so.0 (0x7f8ed5d22000)
libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f8ed61d3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f8ed5b89000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f8ed5b75000)
bash-5.0#
bash-5.0# ldd /usr/local/openresty/nginx/sbin/nginx
/lib/ld-musl-x86_64.so.1 (0x7f1b00765000)
libluajit-5.1.so.2 => /usr/local/openresty/luajit/lib/libluajit-5.1.so.2 (0x7f1b0049b000)
libssl.so.1.1 => /usr/local/kong/lib/libssl.so.1.1 (0x7f1b00407000)
libcrypto.so.1.1 => /usr/local/kong/lib/libcrypto.so.1.1 (0x7f1b00121000)
libz.so.1 => /lib/libz.so.1 (0x7f1b00107000)
libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f1b00765000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f1b000f3000)
bash-5.0#
Do you recommend recompiling mongoc with the libraries that come with openresty-kong?
from lua-mongo.
I'm not sure that having the same library as a dependency guarantees proper initialization both in Nginx and mongo-c-driver. OpenSSL is notorious to be user unfriendly as much as possible. It could work though, who knows. However, if this path fails, you could try building Nginx against another TLS library (MbedTLS for example) and leave mongo-c-driver suffering with OpenSSL or vice versa.
from lua-mongo.
Related Issues (20)
- Find method how to select the specified column? HOT 1
- have a question HOT 1
- Install error HOT 5
- undefined symbol: mongoc_collection_replace_one HOT 4
- i have problem guy.how to find or aggregation ISODate. HOT 1
- Compile error HOT 2
- Process aborts due to a zero server_id HOT 1
- Session support HOT 4
- Unable to install lua-mongo with luarocks HOT 2
- insertOne question HOT 1
- cant get build via luarocks in windows HOT 1
- How to install on Windows? HOT 3
- When mongo has username and password, how can I do? HOT 2
- How to create a TTL index? HOT 4
- Lua-mongo can't be used with mongo-c-driver_v1.19 HOT 2
- Cannot create bson document with array indexed by numbers HOT 3
- building with luarocks mingw64 HOT 7
- The specified module could not be found? HOT 3
- Support for Multi-field Sorting in find Method HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-mongo.