hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Steinbach <>
Subject Re: HIVE ODBC test fails at testing with isql
Date Thu, 06 Jan 2011 07:40:55 GMT
Hi Vaibhav,

ror output when i run isql hive
> [-----]SQL_SUCCESS
> [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
> [-----]SQL_SUCCESS
> [ISQL]ERROR: Could not SQLConnect

Did you remember to start the HiveServer process?

Do you have the driver configured to use the right IP
address and port number for the HiveServer process?

> I tried following commands also--
> export
> LD_LIBRARY_PATH=/usr/local/lib/

LD_LIBRARY_PATH should contain a list of directories, not files, e.g:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

export LD_PRELOAD=/usr/local/lib/

This looks OK, but did you verify that /usr/local/lib/
actually exists?

> I think i am missing something very important.
> Do i need to copy files in /usr/local/lib/ to /lib ?

No, don't do this. In fact, when you're experimenting with new software I'd
recommend that you try to avoid altering the contents of system directories
like /usr/local, /lib, etc, since this can cause hard to find problems weeks
or months later.

One good way to keep things sane (and what I recommend you try doing now)
is to create a subdirectory in your home directory (e.g. $HOME/local) and
all of your test software there. In other words, build unixODBC again, but
time specify that you want the software installed to $HOME/local by running
configure with --prefix=$HOME/local

You'll end up with bin, lib and include directories under $HOME/local which
the unixODBC driver libs along with the isql executable and various header
You will then need to update some of your environment variables as follows:

# Make sure we find isql in ~/local/bin first
export PATH=~/local/bin:$PATH

# Make sure we use in ~/local/lib

# Load ~/local/lib/ before loading anything else.
export LD_PRELOAD=~/local/lib/

Remember that these environment variable settings are specific to the
task at hand, so you probably don't want to add them to login
configuration files.

As a final sanity check please use ldd to verify that library
able to satisfy all of it's dependencies:

% ldd -d -r ~/local/lib/

Running ldd on isql won't tell you much because isql loads
dynamically at runtime using the location of the driver lib specified in
odbc.ini file.

Hope this helps.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message