clickhouse-odbc
clickhouse-odbc copied to clipboard
Linux Tableau Server ODBC issue
After configuration I get the error:
[unixODBC][Driver Manager]Can't open lib '/opt/clickhouse-odbc/build/driver/libclickhouseodbcw.so' : file not found Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection. Unable to connect using the DSN named "ClickHouse DSN (Unicode)". Check that the DSN exists and is a valid connection.
I understand that something wrong with the configuration. But I think everything is OK
My Configuration:
odbcinst.ini:
[ClickHouse ODBC Driver (ANSI)] Description = ODBC Driver (ANSI) for ClickHouse Driver = /opt/clickhouse-odbc/build/driver/libclickhouseodbc.so
[ClickHouse ODBC Driver (Unicode)] Description = ODBC Driver (Unicode) for ClickHouse Driver = /opt/clickhouse-odbc/build/driver/libclickhouseodbcw.so'
odbc.ini
[ODBC Data Sources] ClickHouse DSN (ANSI) = ClickHouse ODBC Driver (ANSI) ClickHouse DSN (Unicode) = ClickHouse ODBC Driver (Unicode)
[ClickHouse DSN (ANSI)] Driver = ClickHouse ODBC Driver (ANSI) Description = DSN (localhost) for ClickHouse ODBC Driver (ANSI)
[ClickHouse DSN (Unicode)] Driver = ClickHouse ODBC Driver (Unicode) Description = DSN (localhost) for ClickHouse ODBC Driver (Unicode)
So, the same configuration works on MacOs with Tableau Desktop. On MacOs I build the driver from the sources. On the Linux Tableau Server I just downloaded the tar file clickhouse-odbc-1.1.9-Linux.tar.gz (the same with clickhouse-odbc-1.1.8)
I don't understand what is wrong
you can try command
ldd /opt/clickhouse-odbc/build/driver/libclickhouseodbcw.so
and probably
libclickhouseodbcw.so not satisfy system library requirements
libicuuc.so.50 => not found
for the example
also, you can downgrade odbc driver version to 1.6 before ICU encoding and library dependency
or try to compile from sources or any other way to satisfy a library dependency
Thanks a lot for your answer. You are right. When I tried with 1.6 version I could connect. And everything is OK. And could you help me with the freshest driver, please. So, you were right about the resukts of the command:
ldd /opt/clickhouse-odbc/build/driver/libclickhouseodbcw.so linux-vdso.so.1 => (0x00007ffd0818a000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3fdbde9000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3fdbbe1000) libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007f3fdb9cf000) libicuuc.so.50 => not found libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3fdb7cb000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3fdb4c2000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3fdb0f8000) /lib64/ld-linux-x86-64.so.2 (0x00007f3fdc7af000) libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f3fdaeee000)
But I don't understand how I can fix it. For example, I see that:
sudo apt-get install libicu-dev Reading package lists... Done Building dependency tree Reading state information... Done libicu-dev is already the newest version (55.1-7ubuntu0.5).
Sorry but for now I can't find the way too and still using 1.6
You can follow the instructions and build the latest version of the driver from sources yourself, on the machine where you are planning to use it, and then, the local system version of ICU will be used, and it will work fine.
Thank you. guys. I see... I have tried already and I couldn't because of some errors. I will try another time or maybe I will continue to use the 1.6 version
1.6 worked with strange errors, but latest tag 1.9 not work at all
Compiled on same machine
ldd libclickhouseodbc.so
linux-vdso.so.1 (0x00007ffff77ed000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6f43f90000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6f43dae000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6f43d93000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6f43ba1000)
libiodbcinst.so.2 => /lib/x86_64-linux-gnu/libiodbcinst.so.2 (0x00007f6f4398d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6f44472000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6f4383c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6f43836000)
ldd libclickhouseodbcw.so
linux-vdso.so.1 (0x00007ffd570d1000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5a91497000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5a912b5000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5a9129a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5a910a8000)
libiodbcinst.so.2 => /lib/x86_64-linux-gnu/libiodbcinst.so.2 (0x00007f5a90e94000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5a91979000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5a90d43000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5a90d3d000)
Tableau uses it's own version of libstdc++.so
by overriding LD_LIBRARY_PATH
. That .so
may not be compatible with what the ClickHouse ODBC driver is trying to load, causing the dlopen()
to fail. Try building the diver with this option specified at configure-time in cmake: -DCH_ODBC_RUNTIME_LINK_STATIC=On