# Version 1.10.1 ODBC doesn't work?

**URL:** <https://forum.opensearch.org/t/version-1-10-1-odbc-doesnt-work/3915>\
**Category:** SQL\
**Created:** [October 11, 2020, 2:06pm UTC](https://forum.opensearch.org/t/version-1-10-1-odbc-doesnt-work/3915 "2020-10-11T14:06:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ftlj](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@ftlj](https://forum.opensearch.org/u/ftlj)\
**Post date:** [October 11, 2020, 2:06pm UTC](https://forum.opensearch.org/t/version-1-10-1-odbc-doesnt-work/3915/1 "2020-10-11T14:06:58Z")

</div>

Hi, I tried the following ODBC settings but doesn’t work. Please help. I verified with curl command without error.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/00f9b9c8b64f904f01a682065ba1a27d6ce1710d.png)

![Screenshot 2020-10-11 at 10.00.32 PM](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/dbcd46a95594ca285f5486638f8cb0dc0884804e.png)

 ![Screenshot 2020-10-11 at 10.00.52 PM](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/9593aa3bb8d4f4a0e67dc2f88a80754918be13ce.png)

 ![Screenshot 2020-10-11 at 10.08.49 PM](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/99d1b4cf8af2e41f74b8e17839ec6bcc9ccd10aa.png)

---

<div class="post-metadata">

**Author:** ![ftlj](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@ftlj](https://forum.opensearch.org/u/ftlj)\
**Post date:** [October 23, 2020, 9:31am UTC](https://forum.opensearch.org/t/version-1-10-1-odbc-doesnt-work/3915/2 "2020-10-23T09:31:55Z")

</div>

I post more information hopefully anyone can help.

Verify elasticsearch connection and plugins:

> C:\> curl -u admin:admin -k [https://es1:9200/\_cat/plugins?pretty](https://es1:9200/_cat/plugins?pretty)  
> es1 opendistro-anomaly-detection 1.10.1.0  
> es1 opendistro-job-scheduler 1.10.1.0  
> es1 opendistro-knn 1.10.1.0  
> es1 opendistro\_alerting 1.10.1.2  
> es1 opendistro\_index\_management 1.10.1.1  
> es1 opendistro\_performance\_analyzer 1.10.1.0  
> es1 opendistro\_security 1.10.1.0  
> es1 opendistro\_sql 1.10.1.1

ODBC Test Connection log file:

> mylog.c[logs\_on\_off]234: mylog\_on=7 qlog\_on=7  
> start\_logging:Global.debug&commlog=7&7  
> mylog.c[InitializeLogging]533: Log Output Dir: C:\Users\FTLJ\Desktop  
> es\_odbc.c[DllMain]111: exe name=odbcad32  
> dlg\_specif[CC\_conninfo\_init]452: entering opt=2  
> setup.c[ParseAttributes]584: aszKey=‘DSN’, value=‘ODFE SQL ODBC DSN’  
> dlg\_specif[copyConnAttributes]145: key=‘DSN’ value=‘ODFE SQL ODBC DSN’  
> dlg\_specif[CC\_conninfo\_init]452: entering opt=3  
> dlg\_specif[getDSNinfo]224: drivername=elasticsearchodbc  
> setup.c[ParseAttributes]584: aszKey=‘DSN’, value=‘ODFE SQL ODBC DSN’  
> dlg\_specif[copyConnAttributes]145: key=‘DSN’ value=‘ODFE SQL ODBC DSN’  
> setup.c[test\_connection]440: conn\_string=DRIVER=elasticsearchodbc;server=[https://es1](https://es1);database=elasticsearch;port=9200;UID=admin;PWD=admin;auth=BASIC;region=;useSSL=1;hostnameVerification=0;logLevel=7;logOutput=C:\Users\FTLJ\Desktop;responseTimeout=10;fetchSize=-1;  
> odbcapi30.[SQLAllocHandle]33: entering  
> environ.c[ESAPI\_AllocEnv]44: entering  
> environ.c[ESAPI\_AllocEnv]60: leaving phenv=0000000000317930  
> odbcapi30.[SQLSetEnvAttr]431: entering att=200,3  
> odbcapi30.[SQLAllocHandle]33: entering  
> connection[ESAPI\_AllocConnect]63: entering…  
> connection[ESAPI\_AllocConnect]66: \*\*\*\* henv = 0000000000317930, conn = 000000000032BFB0  
> environ.c[EN\_add\_connection]502: entering self = 0000000000317930, conn = 000000000032BFB0  
> environ.c[EN\_add\_connection]531: added at 0, conn-\>henv = 0000000000317930, conns[0]-\>henv = 0000000000317930  
> odbcapiw.c[SQLDriverConnectW]122: entering  
> win\_unicod[ucs2\_to\_utf8]126: 00000000001CB2A0 ilen=-3 newlen=224 olen=224 utf8str=DRIVER=elasticsearchodbc;server=[https://es1](https://es1);database=elasticsearch;port=9200;UID=admin;PWD=admin;auth=BASIC;region=;useSSL=1;hostnameVerification=0;logLevel=7;logOutput=C:\Users\FTLJ\Desktop;responseTimeout=10;fetchSize=-1;  
> misc.c[make\_string]115: malloc size=224  
> misc.c[make\_string]117: str=0000000000306DB0  
> dlg\_specif[CC\_conninfo\_init]452: entering opt=2  
> drvconn.c[dconn\_get\_attributes]223: our\_connect\_string = ‘DRIVER=elasticsearchodbc;server=[https://es1](https://es1);database=elasticsearch;port=9200;UID=admin;PWD=xxxxx;auth=BASIC;region=;useSSL=1;hostnameVerification=0;logLevel=7;logOutput=C:\Users\FTLJ\Desktop;responseTimeout=10;fetchSize=-1;’  
> dlg\_specif[getDSNinfo]224: drivername=elasticsearchodbc  
> drvconn.c[dconn\_get\_attributes]223: our\_connect\_string = ‘DRIVER=elasticsearchodbc;server=[https://es1](https://es1);database=elasticsearch;port=9200;UID=admin;PWD=xxxxx;auth=BASIC;region=;useSSL=1;hostnameVerification=0;logLevel=7;logOutput=C:\Users\FTLJ\Desktop;responseTimeout=10;fetchSize=-1;’  
> dlg\_specif[copyConnAttributes]145: key=‘DRIVER’ value=‘elasticsearchodbc’  
> dlg\_specif[copyConnAttributes]145: key=‘server’ value=‘[https://es1](https://es1)’  
> dlg\_specif[copyConnAttributes]145: key=‘database’ value=‘elasticsearch’ not found  
> dlg\_specif[copyConnAttributes]145: key=‘port’ value=‘9200’  
> dlg\_specif[copyConnAttributes]145: key=‘UID’ value=‘admin’  
> dlg\_specif[copyConnAttributes]121: key=‘PWD’ value=‘xxxxxxxx’  
> dlg\_specif[copyConnAttributes]145: key=‘auth’ value=‘BASIC’  
> dlg\_specif[copyConnAttributes]145: key=‘region’ value=‘’  
> dlg\_specif[copyConnAttributes]145: key=‘useSSL’ value=‘1’  
> dlg\_specif[copyConnAttributes]145: key=‘hostnameVerification’ value=‘0’  
> dlg\_specif[copyConnAttributes]145: key=‘logLevel’ value=‘7’  
> dlg\_specif[copyConnAttributes]145: key=‘logOutput’ value=‘C:\Users\FTLJ\Desktop’  
> dlg\_specif[copyConnAttributes]145: key=‘responseTimeout’ value=‘10’  
> dlg\_specif[copyConnAttributes]145: key=‘fetchSize’ value=‘-1’  
> mylog.c[logs\_on\_off]234: mylog\_on=7 qlog\_on=7  
> mylog.c[logs\_on\_off]234: mylog\_on=7 qlog\_on=7  
> start\_logging:Global.debug&commlog=7&7  
> mylog.c[InitializeLogging]533: Log Output Dir: C:\Users\FTLJ\Desktop  
> es\_communi[ESCommunication::LogMsg]793: Initializing Aws API.  
> es\_communi[ESCommunication::LogMsg]793: Verifying connection options.  
> es\_communi[ESCommunication::LogMsg]793: Required connection option are valid.  
> es\_communi[ESCommunication::LogMsg]793: Starting DB connection.  
> es\_communi[ESCommunication::LogMsg]793: Attempting to establish DB connection.  
> es\_communi[ESCommunication::LogMsg]793: Checking for SQL plugin  
> **es\_communi[ESCommunication::LogMsg]793: Client error: ‘Encountered network error when sending http request’.**  
> es\_communi[ESCommunication::LogMsg]793: Failed to establish connection to DB.  
> es\_communi[ESCommunication::LogMsg]793: Dropping DB connection.  
> connection[CC\_set\_error\_statements]553: entering self=000000000032BFB0  
> connection[CC\_log\_error]641: CONN ERROR: func=LIBES\_connect, desc=‘’, errnum=202, errmsg=‘Connection error: [Open Distro For Elasticsearch][SQL ODBC Driver][SQL Plugin] Connection error: Failed to establish connection to DB.’  
> connection[CC\_log\_error]644: ------------------------------------------------------------  
> connection[CC\_log\_error]647: henv=0000000000317930, conn=000000000032BFB0, status=0, num\_stmts=16  
> connection[CC\_log\_error]649: esconn=0000000000000000, stmts=0000000000302A10, lobj\_type=-999  
> es\_communi[ESCommunication::LogMsg]793: Shutting down Aws API.  
> connection[CC\_log\_error]641: CONN ERROR: func=ESAPI\_DriverConnect, desc=‘Error from CC\_Connect’, errnum=202, errmsg=‘Connection error: [Open Distro For Elasticsearch][SQL ODBC Driver][SQL Plugin] Connection error: Failed to establish connection to DB.’  
> connection[CC\_log\_error]644: ------------------------------------------------------------  
> connection[CC\_log\_error]647: henv=0000000000317930, conn=000000000032BFB0, status=0, num\_stmts=16  
> connection[CC\_log\_error]649: esconn=0000000000000000, stmts=0000000000302A10, lobj\_type=-999  
> odbcapi30w[SQLGetDiagRecW]197: entering  
> es\_api30.c[ESAPI\_GetDiagRec]39: entering type=2 rec=1  
> environ.c[ESAPI\_ConnectError]228: entering hdbc=000000000032BFB0 \<512\>  
> connection[CC\_get\_error]618: entering  
> connection[CC\_get\_error]630: leaving  
> environ.c[ESAPI\_ConnectError]245: CC\_get\_error: status = 202, msg = #Connection error: [Open Distro For Elasticsearch][SQL ODBC Driver][SQL Plugin] Connection error: Failed to establish connection to DB.#  
> environ.c[ESAPI\_ConnectError]332: szSqlState = ‘08001’,len=134, szError=‘Connection error: [Open Distro For Elasticsearch][SQL ODBC Driver][SQL Plugin] Connection error: Failed to establish connection to DB.’  
> es\_api30.c[ESAPI\_GetDiagRec]60: leaving 0  
> win\_unicod[utf8\_to\_ucs2\_lf]244: ilen=134 bufcount=512 string=Connection error: [Open Distro For Elasticsearch][SQL ODBC Driver][SQL Plugin] Connection error: Failed to establish connection to DB. ocount=134  
> odbcapi30.[SQLFreeHandle]219: entering  
> connection[ESAPI\_FreeConnect]207: entering…hdbc=000000000032BFB0  
> connection[CC\_Destructor]314: entering self=000000000032BFB0  
> connection[CC\_cleanup]413: entering self=000000000032BFB0  
> connection[CC\_set\_error\_statements]553: entering self=000000000032BFB0  
> connection[CC\_log\_error]641: CONN ERROR: func=CC\_cleanup, desc=‘’, errnum=1, errmsg=‘Connection not open’  
> connection[CC\_log\_error]644: ------------------------------------------------------------  
> connection[CC\_log\_error]647: henv=0000000000317930, conn=000000000032BFB0, status=0, num\_stmts=16  
> connection[CC\_log\_error]649: esconn=0000000000000000, stmts=0000000000302A10, lobj\_type=-999  
> connection[CC\_cleanup]428: after LIBES\_disconnect  
> dlg\_specif[CC\_conninfo\_init]452: entering opt=1  
> connection[CC\_cleanup]494: leaving  
> connection[CC\_Destructor]321: after CC\_Cleanup  
> connection[CC\_Destructor]332: after free statement holders  
> connection[CC\_Destructor]343: leaving  
> connection[ESAPI\_FreeConnect]225: leaving…  
> odbcapi30.[SQLFreeHandle]219: entering  
> environ.c[ESAPI\_FreeEnv]69: entering env=0000000000317930  
> environ.c[EN\_Destructor]442: entering self=0000000000317930  
> environ.c[EN\_Destructor]465: clearing conns count=128  
> environ.c[EN\_Destructor]477: leaving rv=1  
> environ.c[ESAPI\_FreeEnv]72: ok  
> es\_odbc.c[DllMain]118: DETACHING odfesqlodbc.dll
