Hive / HCatalog Forum

ODBC Error Could not SQLConnect

  • #58122
    Ed Perry
    Participant

    I have been trying to get the ODBC Drivers working on the sandbox and it just does not seem to be working for me.
    I can connect to the port via JDBC/Squirrel but can’t seem to get the ODBC driver working .

    I am getting an error

    [endeca@sandbox ~]$ isql -v -d HIVE
    [S00][nxDC[otnok]OB](16)Ual olct QGtrvtPoietigfnto. SQLGetPrivateProfileString function.
    [ISQL]ERROR: Could not SQLConnect

    I tried with both

    hive-odbc-native-1.4.5.1005-centos6.tar.gz
    hive-odbc-native-1.4.8.1008-centos6.tar.gz


    [endeca@sandbox ~]$ more ~/.odbc.ini
    [ODBC]
    # Specify any global ODBC configuration here such as ODBC tracing.

    [ODBC Data Sources]
    Hive=Hive

    [Hive]

    # Description: DSN Description.
    # This key is not necessary and is only to give a description of the data source.
    Description=Hortonworks Hive ODBC Driver (64-bit) DSN

    # Driver: The location where the ODBC driver is installed to.
    Driver=/usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.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 HOST, PORT, KrbHostFQDN, and KrbServiceName should be set here.
    # They can also be specified on the connection string.
    HOST=10.32.150.104
    PORT=10000
    Schema=default
    FastSQLPrepare=0
    UseNativeQuery=0
    HiveServerType=2
    #AuthMech=2
    #KrbHostFQDN=[Hive Server 2 Host FQDN]
    #KrbServiceName=[Hive Server 2 Kerberos service name]
    UID=endeca

    What am I doing wrong? Oh and this is just the Sandbox I download last month.

    [endeca@sandbox ~]$ uname -a
    Linux sandbox.hortonworks.com 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    [endeca@sandbox ~]$ more /etc/redhat-release
    CentOS release 6.5 (Final)

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #58123
    Ed Perry
    Participant

    Oh and all the libraries match

    [endeca@sandbox ~]$ ldd /usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so
    linux-vdso.so.1 => (0x00007fffedb2b000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fa872c6d000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa872a50000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007fa872835000)
    librt.so.1 => /lib64/librt.so.1 (0x00007fa87262d000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa872327000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fa8720a2000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa871e8c000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fa871af8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa8752fb000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa8718dd000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa8716a6000)
    libfreebl3.so => /lib64/libfreebl3.so (0x00007fa87142f000)

    #58254
    Jason Shih
    Participant

    I have same error from RH6 due to default unixODBC installed.
    you might consider rebuilding latest unixODBC (2.3) from your server and launch isql refer to new installed binary.

    Cheers,
    Jason

    #58255
    Ed Perry
    Participant

    Thanks, but figured it out (mostly) it was the hortonworks.hive.ini the example file for odbcUnix is bad.
    It says to comment one of these lines
    ODBCInstLib=libiodbcinst.a(libiodbcinst.so.2)

    I thought this was some configuration syntax but it was not, it needs to be this (or similar). But that is wrong

    ODBCInstLib=libiodbcinst.so

    Once I did that it connects just fine. Though Error messages still seem corrupt but I think that is a Locale issue

    Hope this helps

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.