The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hortonworks Sandbox Forum

Connecting to HIve in Sandbox from Linux

  • #38611
    Mikel Gomez
    Member

    HI,

    I am trying to connect to hive on my hortonworks sandbox from Suse linux
    . Connectivity is available and i have unixODBC 2.3.1 installed in my SUSE Enterprise Box. 64 bits Suse ODBC driver for Hortonworks in also installed.

    When calling my Data Source using isql hive1 i get the following error:

    ~> isql -v hive1
    [01000][unixODBC][Driver Manager]Can’t open lib ‘/usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so’ : file not found
    [ISQL]ERROR: Could not SQLConnect

    But the file exists and 777 permissions are granted so full access should be allowed.

    If I do an ldd i get this information:
    linux-vdso.so.1 => (0x00007fff785e3000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f070f16d000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f070ef50000)
    libssl.so.1.0.0 => not found
    libcrypto.so.1.0.0 => not found
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f070ed34000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f070ea29000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f070e7b0000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f070e59a000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f070e222000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f0711227000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f070e00b000)

    so 2 libraries missing, what am i doing wrong? do i have to install other packages after the driver? I installed hive-odbc-native-1.2.0.1005-1.x86_64.rpm.

    if would be great if someone can help me to solve this.

    thanks in advance,
    miguel

  • Author
    Replies
  • #38808
    Dave
    Moderator

    Hi Mikel,

    Should this:

    /usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so

    Be:

    /usr/lib/hive/lib/native/Linux-amd64-64/lib/hortonworkshiveodbc64.so

    Thanks

    Dave

    #39022
    Mikel Gomez
    Member

    HI Dave, thanks for the answer.

    No, the file after extracting the driver exists with other files within the directory and has that name. Thus, under /usr/lib/hive/lib/native/Linux-amd64-64 i can see several files:

    drwx—r-x 3 toor root 4096 Oct 1 09:31 .
    drwx—r-x 4 toor root 4096 Sep 24 11:17 ..
    -rwxr-xr-x 1 toor root 544 Feb 22 2013 SimbaHiveODBC.did
    lrwxrwxrwx 1 toor root 18 Sep 24 11:17 libcrypto.so -> libcrypto.so.1.0.0
    -rwxr-xr-x 1 toor root 1943353 Feb 22 2013 libcrypto.so.1.0.0
    -rwxr-xr-x 1 toor root 43755670 Feb 22 2013 libhortonworkshiveodbc64.so
    lrwxrwxrwx 1 toor root 15 Sep 24 11:17 libssl.so -> libssl.so.1.0.0
    -rwxr-xr-x 1 toor root 400543 Feb 22 2013 libssl.so.1.0.0

    and i can see the two libraries not found within the same directory:
    libssl.so.1.0.0 => not found
    libcrypto.so.1.0.0 => not found

    the problem now is how to make the driver used the libraries. If I put these libraries in /usr/lib64, then no ssh, sftp will work and then i will have no access to the machine (this happened to me yesterday), so how can i proceed?

    thanks,
    mikel

The forum ‘Hortonworks Sandbox’ is closed to new topics and replies.

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.