Home Forums Hive / HCatalog ODBC Error Could not SQLConnect

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Ed Perry 2 months, 3 weeks ago.

  • Creator
    Topic
  • #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)

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #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

    Collapse
    #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

    Collapse
    #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)

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)