Home Forums Hortonworks Sandbox Tutorial 11: Configuring Mac ODBC

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  Kyle Porter 6 months, 2 weeks ago.

  • Creator
    Topic
  • #46299

    Philip Topham
    Participant

    I’m stuck, and cannot get the iODBC driver to work. Can anyone help?

    Current setup: MAC OSX 10.9.1
    Sandbox: 2.0
    iODBC: 3.52.7
    Excel Mac: 2011

    When I test with Excel I get [iODBC][Driver Manager]Specified driver could not be loaded. — the iODBC forum says to check file paths and configurations. I’ve done so but still doesn’t seem to work. What have I overlooked.
    Here are my detailed steps

    1) The ENV variable is “DYLD\_LIBRARY\_PATH=/usr/lib/hive/lib/native/universal” has been added permanently.
    a) I verified that the path exists
    user$ ls /usr/lib/hive/lib/native/universal
    total 170968
    drwx---r-x 8 root wheel 272 Jan 2 18:20 ./
    drwx---r-x 4 root wheel 136 Aug 8 12:17 ../
    -rwxr-xr-x 1 root wheel 544 Aug 8 12:17 SimbaHiveODBC.did*
    -rwxr-xr-x 1 root wheel 3309240 Aug 8 12:17 libcrypto.1.0.0.dylib*
    lrwxr-xr-x 1 root wheel 21 Jan 2 18:19 libcrypto.dylib@ -> libcrypto.1.0.0.dylib
    -rwxr-xr-x 1 root wheel 83439736 Aug 8 12:17 libhortonworkshiveodbc.dylib*
    -rwxr-xr-x 1 root wheel 769176 Aug 8 12:17 libssl.1.0.0.dylib*
    lrwxr-xr-x 1 root wheel 18 Jan 2 18:20 libssl.dylib@ -> libssl.1.0.0.dylib

    2) Both ODBC ini files are in my home directory with READ permission for all

    user$ ls ~/.odbc*ini
    -rw-r--r--@ 1 user staff 1024 Jan 3 09:28 /Users/user/.odbc.ini
    -rw-r--r-- 1 user staff 198 Aug 8 12:17 /Users/user/.odbcinst.ini

    3) The default sandbox user is ‘hue’ , which I checked by going to “http://127.0.0.1:8000/dump_config” and looking at the useradmin tab information.

    4) For ODBC.INI, the HOST was updated to 127.0.0.1 (i.e localhost) as was the host fully qualified domain name HS2HostFQDN

    HOST=127.0.0.1
    PORT=10000
    Schema=default
    FastSQLPrepare=0
    UseNativeQuery=0
    HiveServerType=2
    HS2AuthMech=2
    #HS2HostFQDN=[Hive Server 2 Host FQDN]
    HS2HostFQDN=127.0.0.1
    HS2KrbServiceName=[Hive Server 2 SASL service name]
    UserName=hue

    5) FOR ODBCINST.INI, that was not change but I did verify file paths

    user$ ls /usr/lib/hive/lib/native/universal/libhortonworks*
    -rwxr-xr-x 1 root wheel 83439736 Aug 8 12:17 /usr/lib/hive/lib/native/universal/libhortonworkshiveodbc.dylib*


    cat ~/.odbcinst.ini
    [ODBC Drivers]
    Hortonworks Hive ODBC Driver=Installed

    [Hortonworks Hive ODBC Driver]
    Description=Hortonworks Hive ODBC Driver
    Driver=/usr/lib/hive/lib/native/universal/libhortonworkshiveodbc.dylib

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

The topic ‘Tutorial 11: Configuring Mac ODBC’ is closed to new replies.

  • Author
    Replies
  • #46667

    Kyle Porter
    Participant

    Fantastic, glad to hear you’ve gotten everything working.

    Collapse
    #46666

    Philip Topham
    Participant

    Sorry, I wasn’t clear. I am connecting now.

    The basic issues where, I had to:
    1) add all the ENV variables
    2) RERUN the following command everytime, even though this should auto launch on system startup —-> launchctl setenv DYLD_LIBRARY_PATH /usr/lib/hive/lib/native/universal/
    3) Change the hive server port in the INI file to 2200, because the default Sandbox 2.0 server forwards port 2200 to port 10000.

    Collapse
    #46463

    Kyle Porter
    Participant

    Hi Philip,

    Just to be clear, at this point you’re receiving the Connection refused message and haven’t managed to resolve your issue, correct?

    Cheers,
    Kyle

    Collapse
    #46462

    Philip Topham
    Participant

    That suggesting moved me forward but still no complete resolution.
    Ensuring “launchctl setenv DYLD_LIBRARY_PATH /usr/lib/hive/lib/native/universal/” seems to be essential even though the same information is in the /etc/launched.conf

    After making those changes, I started receiving the [Hortonworks][Hardy] (34) Error from Hive: connect() Connection refused.

    Through a lot of futzing, I discovered that the Oracle VM Virtual Box, maps PORT 10000 to PORT 2200
    – You can see what ports the Sandbox 2.0 is using on the Oracle Virtual Box, by going to
    –> Oracle VM Virtual Box Manager
    –> Selecting the NETWORK icon
    –> Selecting “Port Forwarding”

    The Column HOST PORT reforest to my MAC (listed at 2200)
    The Column GUEST PORT refers to the SANDBOX (listed as 10000)

    NOTE The Configure Button in the iODBC Data Source Chooser (accessed from Execl–> Get External Data) doesn’t allow the ODBC.INI file to be updated, even though the file’s permissions are set to RW…RW..RW…

    I hope this saves someone else some troubleshooting time.

    Cheers Philip.

    Collapse
    #46382

    Kyle Porter
    Participant

    Hi Philip,

    My name is Kyle, and I work for Simba Technologies which develops the underlying ODBC driver that you are using. I may be able to help you resolve the issue you’re facing, as we’ve seen a few similar issues.

    Would you be able to do the following:

    1) Set the following environment variables
    a. ODBCINI = /usr/lib/hive/lib/native/hiveodbc/Setup/odbc.ini
    b. ODBCINSTINI = /usr/lib/hive/lib/native/hiveodbc/Setup/odbcinst.ini
    c. SIMBAINI = /usr/lib/hive/lib/native/hiveodbc/Setup/hortonworks.hiveodbc.ini

    This is because, in our testing, we noticed that the ini files were not being picked up by the iodbctest program even though they were in the home directory

    2) Starting up Excel:
    You can do either of the following options to launch Excel:

    a. Launch Excel from command line
    i. Set the environment variable DYLD_LIBRARY_PATH =/usr/lib/hive/lib/native/universal/
    ii. Go to “/Applications/Microsoft Office 2011/Microsoft Excel.app/Contents/MacOS” and launch Excel in command line
    b. Set launchctl from the command line
    i. launchctl setenv DYLD_LIBRARY_PATH /usr/lib/hive/lib/native/universal/
    ii. Open Excel as usual from the launcher.

    Cheers,
    Kyle

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