Discussions

Expand all | Collapse all

found thrift error while installing mapd

  • 1.  found thrift error while installing mapd

    Posted 05-31-2019 00:46
    i installed mapd using docker, docker image is running but not able to connect to mapd
    root@a3e86a02caf1:/omnisci#
    root@a3e86a02caf1:/omnisci# bin/mapdql

    but giving thrift error:
    bin/mapdql: error while loading shared libraries: libthrift-0.11.0.so: cannot open shared object file: No such file or directory

    #Core
    #Immerse


  • 2.  RE: found thrift error while installing mapd

    Posted 05-31-2019 02:01
    Edited by Candido Dessanti 05-31-2019 02:02
    Hi @naugulan

    that's weird because of libthrift-0.11.0.so would be statically linked on mapdql/omnisql command.
    using ldd command, the library shouldn't be listed 
    e.g.

    mapd@zion-tr:/opt/mapd/omnisci-os-4.6.1-20190501-1937c23915-Linux-x86_64/bin$ ldd omnisql
            linux-vdso.so.1 (0x00007ffdc6979000)
            libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faa48027000)
            libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa47c89000)
            libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa47a6a000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa47679000)
            /lib64/ld-linux-x86-64.so.2 (0x00007faa4822b000)

    Which docker image are you using?



  • 3.  RE: found thrift error while installing mapd

    Posted 05-31-2019 03:05
      |   view attached
    but its listed

    Attachment(s)

    txt
    error.txt   1K 1 version


  • 4.  RE: found thrift error while installing mapd

    Posted 05-31-2019 03:43
    Edited by Candido Dessanti 05-31-2019 04:01
    I just tried the official CPU docker image

    mapd@zion-tr:~$ sudo docker run -d -v $HOME/omnisci-docker-storage:/omnisci-storage -p 6273-6280:6273-6280 omnisci/core-os-cpu
    [sudo] password for mapd:
    Unable to find image 'omnisci/core-os-cpu:latest' locally
    latest: Pulling from omnisci/core-os-cpu
    b234f539f7a1: Pull complete
    55172d420b43: Pull complete
    5ba5bbeb6b91: Pull complete
    43ae2841ad7a: Pull complete
    f6c9c6de4190: Pull complete
    6cf68766e857: Pull complete
    15e9d6b0c91d: Pull complete
    fe2dbb84953d: Pull complete
    6745ece9fd1c: Pull complete
    4718a735c18d: Pull complete
    797e6b2a2a51: Pull complete
    ab52ee7cda51: Pull complete
    89ab19e1dfa6: Pull complete
    50d30bf89674: Pull complete
    Digest: sha256:dd433f4465a7a5f856e00e94f4b4b11e018dae2842452bcb9a987d40e50e65b3
    Status: Downloaded newer image for omnisci/core-os-cpu:latest
    a8a1bce23b88fba7947a898cc2c5aa83b465129d9a6f8abe979d3babcf08db36
    mapd@zion-tr:~$ sudo docker container ls
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    a8a1bce23b88 omnisci/core-os-cpu "/bin/sh -c '/omnisc…" 20 seconds ago Up 17 seconds 0.0.0.0:6273-6280->6273-6280/tcp unruffled_williams
    mapd@zion-tr:~$ sudo docker exec -it a8a1bce23b88 bash
    root@a8a1bce23b88:/omnisci# omnisql
    bash: omnisql: command not found
    root@a8a1bce23b88:/omnisci# ls
    EULA-CE.txt MAPD_GIT_HASH.txt SampleCode bin docker mapd.thrift startomnisci
    LICENSE.md QueryEngine ThirdParty completion_hints.thrift insert_sample_data startmapd systemd
    root@a8a1bce23b88:/omnisci# cd bin
    root@a8a1bce23b88:/omnisci/bin# ls -ltr
    total 291488
    -rwxr-xr-x 1 root root 12440577 May 1 14:54 omnisci_web_server
    -rw-r--r-- 1 root root 5421748 May 1 14:55 omnisci-jdbc-4.6.1.jar
    -rw-r--r-- 1 root root 25986823 May 1 14:55 calcite-1.0-SNAPSHOT-jar-with-dependencies.jar
    -rw-r--r-- 1 root root 32876772 May 1 14:55 mapd-1.0-SNAPSHOT-jar-with-dependencies.jar
    -rwxr-xr-x 1 root root 108711400 May 1 15:11 omnisci_server
    -rwxr-xr-x 1 root root 86998504 May 1 15:11 initdb
    -rwxr-xr-x 1 root root 3256937 May 1 15:11 generate_cert
    -rwxr-xr-x 1 root root 7417960 May 1 15:11 omnisql
    lrwxrwxrwx 1 root root 7 May 1 15:11 mapdql -> omnisql
    lrwxrwxrwx 1 root root 18 May 1 15:11 mapd_web_server -> omnisci_web_server
    lrwxrwxrwx 1 root root 14 May 1 15:11 mapd_server -> omnisci_server
    -rwxr-xr-x 1 root root 7199816 May 1 15:11 StreamImporter
    -rwxr-xr-x 1 root root 8151120 May 1 15:11 KafkaImporter

    root@a8a1bce23b88:/omnisci/bin# ldd mapdql

    linux-vdso.so.1 => (0x00007ffffbf05000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fba5950e000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fba59205000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fba58fe8000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fba58c1e000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fba59712000)

    root@a8a1bce23b88:/omnisci/bin# ./omnisql

    Password:
    User mapd connected to database mapd
    omnisql>

    As you can see the shared library isn't needed and the command is working.

    But I haven't an idea which docker image are you using; it looks is a version of the database compiled with  -DPREFER_STATIC_LIBS=off (it's the default), while the various distributions of the database have libraries statically linked.

    So if you have compiled the core with the default, you have to include the /usr/local/mapd-deps/ on your docker image (the directory contains all the shared libraries needed)
    If it's already included, try to include in LD_LIBRARY_PATH variable
    export LD_LIBRARY_PATH=/usr/local/mapd-deps/lib;$LD_LIBRARY_PATH
    before running the mapdql command