Skip to Main Content

Connecting from OracleDB to Elasticsearch server

User_RE60GJun 25 2021

Hi
I've got a n00b question.
We are attempting to setup OracleDB gateway to an Elasticsearch server in order to pull some logs for voice calls.
I've gone as far as loading the cdata elasticsearch driver for ODBC and run though a configuration guideline from https://www.cdata.com/kb/tech/elasticsearch-odbc-oracle-hs.rst
/etc/odbcinst.ini
[CData ODBC Driver for Elasticsearch]
Description = CData ODBC Driver for Elasticsearch 2021
Driver = /opt/cdata/cdata-odbc-driver-for-elasticsearch/lib/libelasticsearchodbc.x64.so
UsageCount = 1
Driver64 = /opt/cdata/cdata-odbc-driver-for-elasticsearch/lib/libelasticsearchodbc.x64.so

listenar.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = elasticsearch)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = dg4odbc)
(ENV="LD_LIBRARY_PATH=/usr/lib64:/opt/cdata/cdata-odbc-driver-for-elasticsearch/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib")
**ENV part was added to try and force the driver
tnsnames.ora:
ELASTICSEARCH =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE_SERVER_IP)(PORT = 1521))
(CONNECT_DATA =
(SID = elasticsearch)
)
(HS=OK)
)

# ldd /opt/cdata/cdata-odbc-driver-for-elasticsearch/lib/libelasticsearchodbc.x64.so
linux-vdso.so.1 => (0x00007fff389ce000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2288188000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2287f84000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2287d6d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f22879da000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2287756000)
/lib64/ld-linux-x86-64.so.2 (0x0000003fa1800000)

I am now getting this error:

HOCXU_SEM_VER=112000
Entered hgolofn at 2021/06/24-16:00:23
No ODBC library specified.
Exiting hgolofn, rc=28500 at 2021/06/24-16:00:23
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:417 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:110 FUNCTION:hgoexit() ID:Connection context

The driver seems to be loaded and all is correct as far as I can see.
At this stage we are at wits end. Any advise will be truly appreciated.
Thanks
Kobus

Comments
Post Details
Added on Jun 25 2021
1 comment
44 views