#  Dremio ODBC Driver   error   in ubuntu linux 

**URL:** <https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599>\
**Category:** Uncategorized\
**Created:** [January 2, 2018, 8:14pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599 "2018-01-02T20:14:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveen](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@praveen](https://community.dremio.com/u/praveen)\
**Post date:** [January 2, 2018, 8:14pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/1 "2018-01-02T20:14:45Z")

</div>

Can you pls help me … getting error during ( Dremio ODBC Driver error in ubuntu linux )

error :

PHP Warning: odbc\_connect(): SQL error: [unixODBC][Driver Manager]Can’t open lib ‘Dremio ODBC Driver 64-bit’ : file not found, SQL state 01000 in SQLConnect in /var/www/html/test.php on line 42  
Connection Failed

code :

$conn = odbc\_connect(“DRIVER={Dremio ODBC Driver 64-bit};host=localhost:9047;AuthenticationType:Plain;Database=ds.slave\_index”,“pravee”, “Praveen”);  
//echo "test ".$conn;  
if (!$conn)  
{exit("Connection Failed: " . $conn);}

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [January 2, 2018, 11:32pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/2 "2018-01-02T23:32:09Z")

</div>

Did you use `alien` (or another tool) to convert the RPM package into a DEB package? It is possible then that your ODBC configuration is not updated automatically, and that you need to do it by hand, by modifying `/etc/odbcinst.ini` and `/etc/odbc.ini`, as instructed by unixODBC manual.

---

<div class="post-metadata">

**Author:** ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://community.dremio.com/u/arjun)\
**Post date:** [July 10, 2018, 2:24pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/3 "2018-07-10T14:24:46Z")

</div>

@laurent Hi, I’m pretty new to Dremio. I got the same error as above when trying to connect. I am using a Debian based system. Already converted the rpm to deb package using alien.

As you mentioned above the .ini files are not updated and in my case empty.  
I could’t understand the odbc manuals and it doesn’t have an entry for dremio. Can you pls post the sample content of these files.

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![anthony](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/anthony/32/670_2.png) [@anthony](https://community.dremio.com/u/anthony)\
**Post date:** [July 11, 2018, 3:52pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/4 "2018-07-11T15:52:29Z")

</div>

@arjun sample content of those files  
odbc.ini  
[Dremio]  
Description=Dremio  
Driver=/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so  
ConnectionType=Direct  
HOST=localhost  
PORT=31010  
ZKQuorum=[Zookeeper Quorum]  
ZKClusterID=[Cluster ID]  
AuthenticationType=Plain  
UID=[USERNAME]  
PWD=[PASSWORD]  
DelegationUID=  
KrbServiceName=dremio  
KrbServiceHost=  
AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;NumberOfPrefetchBuffers=5;  
Catalog=DREMIO  
Schema=

odbcinst.ini  
[Dremio]  
Description=Dremio  
Driver=/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so  
UsageCount=1

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [July 11, 2018, 4:23pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/5 "2018-07-11T16:23:57Z")

</div>

You should also be able to find the templates for these files under `/opt/dremio-odbc/conf`

---

<div class="post-metadata">

**Author:** ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://community.dremio.com/u/arjun)\
**Post date:** [July 12, 2018, 4:47am UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/6 "2018-07-12T04:47:35Z")

</div>

Thanks for the help… I fixed this error already…well I’m not sure ‘fixed’ is the right word 😄 …at least no errors…

Since I wasn’t able to get the DSN, I directlr gave the path of the driver file (something like this ‘/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so’) and it worked.

But I’ll try this now …will update soon…

UPDATE: Tried the above format Still the same error pops up. But the other method works. Will there be any possible issues from doing so?

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [July 19, 2018, 3:47pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/7 "2018-07-19T15:47:42Z")

</div>

Would you be able to share `/etc/odbcinst.ini`?

---

<div class="post-metadata">

**Author:** ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://community.dremio.com/u/arjun)\
**Post date:** [July 20, 2018, 4:20am UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/8 "2018-07-20T04:20:33Z")

</div>

Ya, here it is…

Description=Dremio  
Driver=/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so  
UsageCount=1

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [July 20, 2018, 4:05pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/9 "2018-07-20T16:05:42Z")

</div>

> [@praveen](#):
>
> Dremio ODBC Driver 64-bit

Make sure you have a section defined for it. Usually your `odbcinst.ini` file looks like this:

```auto
[ODBC Drivers]
Dremio ODBC Driver 64-bit=Installed

[Dremio ODBC Driver 64-bit]
Description=Dremio
Driver=/opt/dremio-odbc/lib64/libdrillodbc_sb64.so
UsageCount=1

```

---

<div class="post-metadata">

**Author:** ![Manuel\_Munoz](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Manuel\_Munoz](https://community.dremio.com/u/Manuel_Munoz)\
**Post date:** [November 6, 2018, 2:32pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/10 "2018-11-06T14:32:57Z")

</div>

Hi. I am having the same issue, it seems to be a problem related to permissions. Running php-fcgi and getting the same error. Do I have to set-up an Environment variable?

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [November 6, 2018, 4:23pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/11 "2018-11-06T16:23:57Z")

</div>

Can you share the config files and error message?

---

<div class="post-metadata">

**Author:** ![Manuel\_Munoz](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Manuel\_Munoz](https://community.dremio.com/u/Manuel_Munoz)\
**Post date:** [November 6, 2018, 5:56pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/12 "2018-11-06T17:56:58Z")

</div>

/etc/odbcinst.ini:

[ODBC Drivers]  
Dremio=Installed

[Dremio]  
Description=Dremio ODBC Driver(64-bit)  
Driver=/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so  
UsageCount=1

/etc/odbc.ini

[Dremio]  
Description=Dremio ODBC Driver (64-bit) DSN  
Driver=/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so  
# The DriverUnicodeEncoding setting is only used for SimbaDM  
# When set to 1, SimbaDM runs in UTF-16 mode.  
# When set to 2, SimbaDM runs in UTF-8 mode.  
#DriverUnicodeEncoding=2

# Values for ConnectionType, AdvancedProperties, Catalog, Schema should be set here.  
# If ConnectionType is Direct, include Host and Port. If ConnectionType is ZooKeeper, include ZKQuorum and ZKClusterID  
# They can also be specified on the connection string.  
# AuthenticationType: No authentication; Plain;  
ConnectionType=Direct  
HOST=192.168.1.53  
PORT=31010  
#ZKQuorum=[Zookeeper Quorum]  
#ZKClusterID=[Cluster ID]  
AuthenticationType=Plain  
UID=apps  
PWD=Vulcan00  
#DelegationUID=  
AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;NumberOfPrefetchBuffers=5;  
Catalog=DREMIO  
Schema=  
SSL=0  
DisableHostVerification=0  
DisableCertificateVerification=0  
TrustedCerts=/opt/dremio-odbc/lib64/cacerts.pem  
UseSystemTrustStore=0  
# The key, “UseExactTLSProtocolVersion”, toggles between “Min\_TLS” or “TLSProtocol”.  
# UseExactTLSProtocolVersion=1 indicates that the driver should use the exact TLS Protocol version to communicate with the Dremio node.  
# UseExactTLSProtocolVersion=0 indicates that the driver should use the minimum TLS Protocol version to communicate with the Dremio node.  
UseExactTLSProtocolVersion=0  
#Min\_TLS=  
#TLSProtocol=

php.fcgi

#!/bin/bash  
# Shell Script To Run PHP5 using mod\_fastcgi under Apache 2.x  
# Tested under Red Hat Enterprise Linux / CentOS 5.x  
### Set PATH ###  
PHP\_CGI=/opt/NetMake/v9/components/apache/cgi-bin/php-cgi  
PHP\_FCGI\_CHILDREN=2  
PHP\_FCGI\_MAX\_REQUESTS=100  
PHPRC="/opt/NetMake/v9/components/apache/conf/"  
INFORMIXDIR="/opt/IBM/ifx/"  
INFORMIXSQLHOSTS="/opt/IBM/ifx/etc/sqlhosts"  
CLIENT\_LOCALE=“en\_US.utf8”  
DB\_LOCALE=“en\_US.819”  
INFORMIXSERVER=“demo\_on”  
ODBCINI="/etc/odbc.ini"  
LD\_LIBRARY\_PATH="/opt/dremio-odbc/lib64/"  
### no editing below ###  
export PHPRC  
export PHP\_FCGI\_CHILDREN  
export PHP\_FCGI\_MAX\_REQUESTS  
export INFORMIXDIR  
export INFORMIXSQLHOSTS  
export CLIENT\_LOCALE  
export DB\_LOCALE  
export INFORMIXSERVER  
export ODBCINI  
export LD\_LIBRARY\_PATH  
exec $PHP\_CGI

I manage to connect trough isql.  
i also manage to connect with this cli php script:

$conn = odbc\_connect(“Driver={Dremio};host=192.168.1.53;Port=31010;AuthenticationType:Plain;Database=censo\_2015”,“apps”, “xxxx”);  
//echo "test ".$conn;  
if (!$conn)  
{exit("Connection Failed: " . $conn);}

But the problem raises in php-fcgi who complains:

odbc\_connect(): SQL error: [unixODBC][Driver Manager]Can’t open lib ‘/opt/dremio-odbc/lib64/libdrillodbc\_sb64.so’ : file not found, SQL state 01000 in SQLConnect

Thank you for your kind Responses!

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [November 15, 2018, 7:47pm UTC](https://community.dremio.com/t/dremio-odbc-driver-error-in-ubuntu-linux/599/13 "2018-11-15T19:47:51Z")

</div>

If you manage to connect through isql and php cli, but not using php fcgi, it might be a FastCGI configuration. Maybe the configuration for FastCGI/PHP uses a chroot or doesn’t allow to calls to dlopen for security reason.
