Giter VIP home page Giter VIP logo

Comments (3)

neoxic avatar neoxic commented on September 14, 2024

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.

aivils avatar aivils commented on September 14, 2024

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.

neoxic avatar neoxic commented on September 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.