how to enable mongodb support in coturn server

195 views
Skip to first unread message

sara waheed

unread,
Sep 26, 2020, 7:44:17 AM9/26/20
to TURN Server (Open-Source project)
i am using coturn and i want to use mongodb as a database 
when i run the turnserver it shows 

    SQLite supported, default database location is /var/lib/turn/turndb
    0: Redis supported
    0: PostgreSQL supported
    0: MySQL supported
    0: MongoDB is not supported
    0: 
    0: Default Net Engine version: 3 (UDP thread per CPU core)

i have installed coturn 
using this command 

    sudo apt-get install coturn


> mongo-c-driver packages are not available "automatically".  MongoDB
> support will not be compiled, unless you install it "manually" before
> the TURN server compilation. Refer to 
> instructions of the driver.

and tried to install mongo c driver by following this guide http://mongoc.org/libmongoc/current/installing.html

**Install libmongoc with a Package Manager**

    apt-get install libmongoc-1.0-0

**Build environment on Unix**

On Debian / Ubuntu:

    $ sudo apt-get install cmake libssl-dev libsasl2-dev

**Configuring the build**
Preparing a build from a git repository clone

    $ cd mongo-c-driver
    $ git checkout 1.17.0  # To build a particular release
    $ python build/calc_release_version.py > VERSION_CURRENT
    $ mkdir cmake-build
    $ cd cmake-build
    $ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..

**Executing a build**

Building on Unix, macOS, and Windows (MinGW-W64 and MSYS2)¶

    $ cmake --build .
    $ sudo cmake --build . --target install

and 

`~/mongo-c-driver/cmake-build$`cmake --build . help

returned 

    Unknown argument help
    Usage: cmake --build <dir> [options] [-- [native-options]]
    Options:
      <dir>          = Project binary directory to be built.
      --target <tgt> = Build <tgt> instead of default targets.
                       May only be specified once.
      --config <cfg> = For multi-configuration tools, choose <cfg>.
      --clean-first  = Build target 'clean' first, then build.
                       (To clean only, use --target 'clean'.)
      --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
      --             = Pass remaining options to the native tool.

and 

**Generating the documentation**

    cmake -DENABLE_MAN_PAGES=ON -DENABLE_HTML_DOCS=ON ..
returned

    -- No CMAKE_BUILD_TYPE selected, defaulting to RelWithDebInfo
    file VERSION_CURRENT contained BUILD_VERSION 1.17.0
    -- Build and install static libraries
      -- Using bundled libbson
    libbson version (from VERSION_CURRENT file): 1.17.0
    --     struct timespec found
    Adding -fPIC to compilation of bson_static components
    CMake Error at CMakeLists.txt:10 (_message):
      Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
    Call Stack (most recent call first):
      /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message)
      /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
      build/cmake/FindSphinx.cmake:10 (find_package_handle_standard_args)
      src/libbson/CMakeLists.txt:444 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/user/mongo-c-driver/cmake-build/CMakeFiles/CMakeOutput.log".
    See also "/home/user/mongo-c-driver/cmake-build/CMakeFiles/CMakeError.log".

    cmake --build . --target mongoc-doc

    make: *** No rule to make target 'mongoc-doc'.  Stop.

and when i restart the coturn server it still shows that mongodb is not supported

how can i resolve this issue

Reply all
Reply to author
Forward
0 new messages