You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by vaibhav negi <ss...@gmail.com> on 2011/01/05 08:45:05 UTC

HIVE ODBC test fails at testing with isql

Hi All,

i set hive odbc wrapper using directions given in
http://wiki.apache.org/hadoop/Hive/HiveODBC . When i test it with isql it
says

[ISQL]ERROR: Could not SQLConnect

i have hive server started on localhost:10000 and specified this information
in odbc.ini.

odbcinst -j output

unixODBC 2.3.0
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /home/hadoop/.odbc.ini
SQLULEN Size.......: 4
SQLLEN Size........: 4
SQLSETPOSIROW Size.: 2

files in /usr/local/lib

i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
driver as libodbc.so . Is that the problem?

libhiveclient.a
libhiveclient.so -> libhiveclient.so.1.0.0
libhiveclient.so.1.0.0
libodbccr.la
libodbccr.so -> libodbccr.so.1.0.0
libodbccr.so.1 -> libodbccr.so.1.0.0
libodbccr.so.1.0.0
libodbcinst.la
libodbcinst.so -> libodbcinst.so.1.0.0
libodbcinst.so.1 -> libodbcinst.so.1.0.0
libodbcinst.so.1.0.0
libodbc.la
libodbc.so -> libodbc.so.1.0.0
libodbc.so.1 -> libodbc.so.1.0.0
libodbc.so.1.0.0
libthrift.a
libthrift.jar
libthrift.la
libthrift.so -> libthrift.so.0.0.0
libthrift.so.0 -> libthrift.so.0.0.0
libthrift.so.0.0.0
libthriftz.a
libthriftz.la
libthriftz.so -> libthriftz.so.0.0.0
libthriftz.so.0 -> libthriftz.so.0.0.0
libthriftz.so.0.0.0


Thanks
Vaibhav Negi

Re: HIVE ODBC test fails at testing with isql

Posted by vaibhav negi <ss...@gmail.com>.
Hi,

Thanks for the tips carl, but still it doesn't run .. now i will try it on
another server some other day.

Thanks and Regards

Vaibhav Negi


On Thu, Jan 6, 2011 at 1:10 PM, Carl Steinbach <ca...@cloudera.com> wrote:

> 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/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
> >
>
> 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/libodbchive.so
> >
>
> This looks OK, but did you verify that /usr/local/lib/libodbchive.so
> 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
> install
> all of your test software there. In other words, build unixODBC again, but
> this
> 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
> contain
> the unixODBC driver libs along with the isql executable and various header
> files.
> 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 libodbchive.so in ~/local/lib
> export LD_LIBRARY_PATH=~/local/lib:$LD_LIBRARY_PATH
>
> # Load ~/local/lib/libodbchive.so before loading anything else.
> export LD_PRELOAD=~/local/lib/libodbchive.so
>
> 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 libodbchive.so
> library
> is
> able to satisfy all of it's dependencies:
>
> % ldd -d -r ~/local/lib/libodbchive.so
>
> Running ldd on isql won't tell you much because isql loads libodbchive.so
> dynamically at runtime using the location of the driver lib specified in
> your
> odbc.ini file.
>
> Hope this helps.
>
> Carl
>

Re: HIVE ODBC test fails at testing with isql

Posted by vaibhav negi <ss...@gmail.com>.
Hi,

Thanks for the tips carl, but still it doesn't run .. now i will try it on
another server some other day.

Thanks and Regards

Vaibhav Negi


On Thu, Jan 6, 2011 at 1:10 PM, Carl Steinbach <ca...@cloudera.com> wrote:

> 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/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
> >
>
> 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/libodbchive.so
> >
>
> This looks OK, but did you verify that /usr/local/lib/libodbchive.so
> 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
> install
> all of your test software there. In other words, build unixODBC again, but
> this
> 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
> contain
> the unixODBC driver libs along with the isql executable and various header
> files.
> 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 libodbchive.so in ~/local/lib
> export LD_LIBRARY_PATH=~/local/lib:$LD_LIBRARY_PATH
>
> # Load ~/local/lib/libodbchive.so before loading anything else.
> export LD_PRELOAD=~/local/lib/libodbchive.so
>
> 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 libodbchive.so
> library
> is
> able to satisfy all of it's dependencies:
>
> % ldd -d -r ~/local/lib/libodbchive.so
>
> Running ldd on isql won't tell you much because isql loads libodbchive.so
> dynamically at runtime using the location of the driver lib specified in
> your
> odbc.ini file.
>
> Hope this helps.
>
> Carl
>

Re: HIVE ODBC test fails at testing with isql

Posted by Carl Steinbach <ca...@cloudera.com>.
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/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
>

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/libodbchive.so
>

This looks OK, but did you verify that /usr/local/lib/libodbchive.so
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
install
all of your test software there. In other words, build unixODBC again, but
this
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
contain
the unixODBC driver libs along with the isql executable and various header
files.
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 libodbchive.so in ~/local/lib
export LD_LIBRARY_PATH=~/local/lib:$LD_LIBRARY_PATH

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

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 libodbchive.so library
is
able to satisfy all of it's dependencies:

% ldd -d -r ~/local/lib/libodbchive.so

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

Hope this helps.

Carl

Re: HIVE ODBC test fails at testing with isql

Posted by Carl Steinbach <ca...@cloudera.com>.
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/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
>

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/libodbchive.so
>

This looks OK, but did you verify that /usr/local/lib/libodbchive.so
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
install
all of your test software there. In other words, build unixODBC again, but
this
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
contain
the unixODBC driver libs along with the isql executable and various header
files.
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 libodbchive.so in ~/local/lib
export LD_LIBRARY_PATH=~/local/lib:$LD_LIBRARY_PATH

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

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 libodbchive.so library
is
able to satisfy all of it's dependencies:

% ldd -d -r ~/local/lib/libodbchive.so

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

Hope this helps.

Carl

Re: HIVE ODBC test fails at testing with isql

Posted by Ning Zhang <nz...@fb.com>.
I guess libodbc.so is the one you renamed from libodbchive.so? If so can you ldd libodbc.so and see what other .so files are linked? You can follow the links and do the ldd check for all necessary .so files (libodbchive.so, libhiveclient.so and libthrift.so). Also please make sure all these .so files are compiled to compatible architecture (i.e., all 32-bit or 64-bit) as mentioned in the Hive ODBC wiki. 


On Jan 5, 2011, at 10:51 PM, vaibhav negi wrote:

> HI Ning ,
> 
> output of ldd isql is :-
> 
> [root@vmlinux3 ~]# ldd /usr/local/bin/isql
>        linux-gate.so.1 =>  (0x00d7a000)
>        libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x0045c000)
>        libdl.so.2 => /lib/libdl.so.2 (0x00548000)
>        libreadline.so.5 => /usr/lib/libreadline.so.5 (0x005ea000)
>        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x036b1000)
>        libpthread.so.0 => /lib/libpthread.so.0 (0x0054e000)
>        libc.so.6 => /lib/libc.so.6 (0x00110000)
>        /lib/ld-linux.so.2 (0x003b9000)
> [root@vmlinux3 ~]#
> 
> Is there any missing library here?
> 
> Thanks and regards
> 
> Vaibhav Negi
> 
> 
> On Thu, Jan 6, 2011 at 12:17 AM, Ning Zhang <nz...@fb.com> wrote:
> 
>> It looks like isql cannot find the dynamically linked libraries. Can you
>> ldd isql and see if all dynamically linked libraries are correct?
>> 
>> On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote:
>> 
>>> Hi Carl,
>>> 
>>> Downloaded the patched  version of unixODBC from the given link and
>>> installed successfully . libodbchive.so gets generated in /usr/local/lib
>> .
>>> But still the error persists.
>>> 
>>> error output when i run isql hive
>>> 
>>> [-----]SQL_SUCCESS
>>> [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
>>> [-----]SQL_SUCCESS
>>> [ISQL]ERROR: Could not SQLConnect
>>> 
>>> I tried following commands also--
>>> 
>>> export
>>> 
>> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
>>> 
>>> export LD_PRELOAD=/usr/local/lib/libodbchive.so
>>> 
>>> I think i am missing something very important.
>>> 
>>> Do i need to copy files in /usr/local/lib/ to /lib ?
>>> 
>>> Thanks and Regards
>>> Vaibhav Negi
>>> 
>>> 
>>> On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com>
>> wrote:
>>> 
>>>> Hi Vaibhav,
>>>> 
>>>> 
>>>>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
>>>>> driver as libodbc.so . Is that the problem?
>>>>> 
>>>>> 
>>>> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
>>>> should
>>>> not rename or symlink this file. I think your problem is that you forgot
>> to
>>>> patch
>>>> the unixODBC library before building it. The patch attached to HIVE-1101
>>>> must
>>>> be applied to the unixODBC-2.2.14 source tree before you build it. This
>>>> patch contains
>>>> the code and Makefile changes that cause unixODBC to build
>> libhiveodbc.so
>>>> 
>>>> Thanks.
>>>> 
>>>> Carl
>>>> 
>> 
>> 


Re: HIVE ODBC test fails at testing with isql

Posted by Ning Zhang <nz...@fb.com>.
I guess libodbc.so is the one you renamed from libodbchive.so? If so can you ldd libodbc.so and see what other .so files are linked? You can follow the links and do the ldd check for all necessary .so files (libodbchive.so, libhiveclient.so and libthrift.so). Also please make sure all these .so files are compiled to compatible architecture (i.e., all 32-bit or 64-bit) as mentioned in the Hive ODBC wiki. 


On Jan 5, 2011, at 10:51 PM, vaibhav negi wrote:

> HI Ning ,
> 
> output of ldd isql is :-
> 
> [root@vmlinux3 ~]# ldd /usr/local/bin/isql
>        linux-gate.so.1 =>  (0x00d7a000)
>        libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x0045c000)
>        libdl.so.2 => /lib/libdl.so.2 (0x00548000)
>        libreadline.so.5 => /usr/lib/libreadline.so.5 (0x005ea000)
>        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x036b1000)
>        libpthread.so.0 => /lib/libpthread.so.0 (0x0054e000)
>        libc.so.6 => /lib/libc.so.6 (0x00110000)
>        /lib/ld-linux.so.2 (0x003b9000)
> [root@vmlinux3 ~]#
> 
> Is there any missing library here?
> 
> Thanks and regards
> 
> Vaibhav Negi
> 
> 
> On Thu, Jan 6, 2011 at 12:17 AM, Ning Zhang <nz...@fb.com> wrote:
> 
>> It looks like isql cannot find the dynamically linked libraries. Can you
>> ldd isql and see if all dynamically linked libraries are correct?
>> 
>> On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote:
>> 
>>> Hi Carl,
>>> 
>>> Downloaded the patched  version of unixODBC from the given link and
>>> installed successfully . libodbchive.so gets generated in /usr/local/lib
>> .
>>> But still the error persists.
>>> 
>>> error output when i run isql hive
>>> 
>>> [-----]SQL_SUCCESS
>>> [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
>>> [-----]SQL_SUCCESS
>>> [ISQL]ERROR: Could not SQLConnect
>>> 
>>> I tried following commands also--
>>> 
>>> export
>>> 
>> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
>>> 
>>> export LD_PRELOAD=/usr/local/lib/libodbchive.so
>>> 
>>> I think i am missing something very important.
>>> 
>>> Do i need to copy files in /usr/local/lib/ to /lib ?
>>> 
>>> Thanks and Regards
>>> Vaibhav Negi
>>> 
>>> 
>>> On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com>
>> wrote:
>>> 
>>>> Hi Vaibhav,
>>>> 
>>>> 
>>>>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
>>>>> driver as libodbc.so . Is that the problem?
>>>>> 
>>>>> 
>>>> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
>>>> should
>>>> not rename or symlink this file. I think your problem is that you forgot
>> to
>>>> patch
>>>> the unixODBC library before building it. The patch attached to HIVE-1101
>>>> must
>>>> be applied to the unixODBC-2.2.14 source tree before you build it. This
>>>> patch contains
>>>> the code and Makefile changes that cause unixODBC to build
>> libhiveodbc.so
>>>> 
>>>> Thanks.
>>>> 
>>>> Carl
>>>> 
>> 
>> 


Re: HIVE ODBC test fails at testing with isql

Posted by vaibhav negi <ss...@gmail.com>.
HI Ning ,

output of ldd isql is :-

[root@vmlinux3 ~]# ldd /usr/local/bin/isql
        linux-gate.so.1 =>  (0x00d7a000)
        libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x0045c000)
        libdl.so.2 => /lib/libdl.so.2 (0x00548000)
        libreadline.so.5 => /usr/lib/libreadline.so.5 (0x005ea000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x036b1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0054e000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        /lib/ld-linux.so.2 (0x003b9000)
[root@vmlinux3 ~]#

Is there any missing library here?

Thanks and regards

Vaibhav Negi


On Thu, Jan 6, 2011 at 12:17 AM, Ning Zhang <nz...@fb.com> wrote:

> It looks like isql cannot find the dynamically linked libraries. Can you
> ldd isql and see if all dynamically linked libraries are correct?
>
> On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote:
>
> > Hi Carl,
> >
> > Downloaded the patched  version of unixODBC from the given link and
> > installed successfully . libodbchive.so gets generated in /usr/local/lib
> .
> > But still the error persists.
> >
> > error output when i run isql hive
> >
> > [-----]SQL_SUCCESS
> > [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
> > [-----]SQL_SUCCESS
> > [ISQL]ERROR: Could not SQLConnect
> >
> > I tried following commands also--
> >
> > export
> >
> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
> >
> > export LD_PRELOAD=/usr/local/lib/libodbchive.so
> >
> > I think i am missing something very important.
> >
> > Do i need to copy files in /usr/local/lib/ to /lib ?
> >
> > Thanks and Regards
> > Vaibhav Negi
> >
> >
> > On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com>
> wrote:
> >
> >> Hi Vaibhav,
> >>
> >>
> >>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
> >>> driver as libodbc.so . Is that the problem?
> >>>
> >>>
> >> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
> >> should
> >> not rename or symlink this file. I think your problem is that you forgot
> to
> >> patch
> >> the unixODBC library before building it. The patch attached to HIVE-1101
> >> must
> >> be applied to the unixODBC-2.2.14 source tree before you build it. This
> >> patch contains
> >> the code and Makefile changes that cause unixODBC to build
> libhiveodbc.so
> >>
> >> Thanks.
> >>
> >> Carl
> >>
>
>

Re: HIVE ODBC test fails at testing with isql

Posted by vaibhav negi <ss...@gmail.com>.
HI Ning ,

output of ldd isql is :-

[root@vmlinux3 ~]# ldd /usr/local/bin/isql
        linux-gate.so.1 =>  (0x00d7a000)
        libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x0045c000)
        libdl.so.2 => /lib/libdl.so.2 (0x00548000)
        libreadline.so.5 => /usr/lib/libreadline.so.5 (0x005ea000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x036b1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0054e000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        /lib/ld-linux.so.2 (0x003b9000)
[root@vmlinux3 ~]#

Is there any missing library here?

Thanks and regards

Vaibhav Negi


On Thu, Jan 6, 2011 at 12:17 AM, Ning Zhang <nz...@fb.com> wrote:

> It looks like isql cannot find the dynamically linked libraries. Can you
> ldd isql and see if all dynamically linked libraries are correct?
>
> On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote:
>
> > Hi Carl,
> >
> > Downloaded the patched  version of unixODBC from the given link and
> > installed successfully . libodbchive.so gets generated in /usr/local/lib
> .
> > But still the error persists.
> >
> > error output when i run isql hive
> >
> > [-----]SQL_SUCCESS
> > [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
> > [-----]SQL_SUCCESS
> > [ISQL]ERROR: Could not SQLConnect
> >
> > I tried following commands also--
> >
> > export
> >
> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
> >
> > export LD_PRELOAD=/usr/local/lib/libodbchive.so
> >
> > I think i am missing something very important.
> >
> > Do i need to copy files in /usr/local/lib/ to /lib ?
> >
> > Thanks and Regards
> > Vaibhav Negi
> >
> >
> > On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com>
> wrote:
> >
> >> Hi Vaibhav,
> >>
> >>
> >>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
> >>> driver as libodbc.so . Is that the problem?
> >>>
> >>>
> >> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
> >> should
> >> not rename or symlink this file. I think your problem is that you forgot
> to
> >> patch
> >> the unixODBC library before building it. The patch attached to HIVE-1101
> >> must
> >> be applied to the unixODBC-2.2.14 source tree before you build it. This
> >> patch contains
> >> the code and Makefile changes that cause unixODBC to build
> libhiveodbc.so
> >>
> >> Thanks.
> >>
> >> Carl
> >>
>
>

Re: HIVE ODBC test fails at testing with isql

Posted by Ning Zhang <nz...@fb.com>.
It looks like isql cannot find the dynamically linked libraries. Can you ldd isql and see if all dynamically linked libraries are correct?

On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote:

> Hi Carl,
> 
> Downloaded the patched  version of unixODBC from the given link and
> installed successfully . libodbchive.so gets generated in /usr/local/lib .
> But still the error persists.
> 
> error output when i run isql hive
> 
> [-----]SQL_SUCCESS
> [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
> [-----]SQL_SUCCESS
> [ISQL]ERROR: Could not SQLConnect
> 
> I tried following commands also--
> 
> export
> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
> 
> export LD_PRELOAD=/usr/local/lib/libodbchive.so
> 
> I think i am missing something very important.
> 
> Do i need to copy files in /usr/local/lib/ to /lib ?
> 
> Thanks and Regards
> Vaibhav Negi
> 
> 
> On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com> wrote:
> 
>> Hi Vaibhav,
>> 
>> 
>>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
>>> driver as libodbc.so . Is that the problem?
>>> 
>>> 
>> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
>> should
>> not rename or symlink this file. I think your problem is that you forgot to
>> patch
>> the unixODBC library before building it. The patch attached to HIVE-1101
>> must
>> be applied to the unixODBC-2.2.14 source tree before you build it. This
>> patch contains
>> the code and Makefile changes that cause unixODBC to build libhiveodbc.so
>> 
>> Thanks.
>> 
>> Carl
>> 


Re: HIVE ODBC test fails at testing with isql

Posted by Ning Zhang <nz...@fb.com>.
It looks like isql cannot find the dynamically linked libraries. Can you ldd isql and see if all dynamically linked libraries are correct?

On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote:

> Hi Carl,
> 
> Downloaded the patched  version of unixODBC from the given link and
> installed successfully . libodbchive.so gets generated in /usr/local/lib .
> But still the error persists.
> 
> error output when i run isql hive
> 
> [-----]SQL_SUCCESS
> [-----]hEnv = $09BF20A0 phDbc = $0804E2FC
> [-----]SQL_SUCCESS
> [ISQL]ERROR: Could not SQLConnect
> 
> I tried following commands also--
> 
> export
> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so
> 
> export LD_PRELOAD=/usr/local/lib/libodbchive.so
> 
> I think i am missing something very important.
> 
> Do i need to copy files in /usr/local/lib/ to /lib ?
> 
> Thanks and Regards
> Vaibhav Negi
> 
> 
> On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com> wrote:
> 
>> Hi Vaibhav,
>> 
>> 
>>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
>>> driver as libodbc.so . Is that the problem?
>>> 
>>> 
>> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
>> should
>> not rename or symlink this file. I think your problem is that you forgot to
>> patch
>> the unixODBC library before building it. The patch attached to HIVE-1101
>> must
>> be applied to the unixODBC-2.2.14 source tree before you build it. This
>> patch contains
>> the code and Makefile changes that cause unixODBC to build libhiveodbc.so
>> 
>> Thanks.
>> 
>> Carl
>> 


Re: HIVE ODBC test fails at testing with isql

Posted by vaibhav negi <ss...@gmail.com>.
Hi Carl,

Downloaded the patched  version of unixODBC from the given link and
installed successfully . libodbchive.so gets generated in /usr/local/lib .
But still the error persists.

error output when i run isql hive

[-----]SQL_SUCCESS
[-----]hEnv = $09BF20A0 phDbc = $0804E2FC
[-----]SQL_SUCCESS
[ISQL]ERROR: Could not SQLConnect

I tried following commands also--

export
LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so

export LD_PRELOAD=/usr/local/lib/libodbchive.so

I think i am missing something very important.

Do i need to copy files in /usr/local/lib/ to /lib ?

Thanks and Regards
Vaibhav Negi


On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com> wrote:

> Hi Vaibhav,
>
>
> > i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
> > driver as libodbc.so . Is that the problem?
> >
> >
> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
> should
> not rename or symlink this file. I think your problem is that you forgot to
> patch
> the unixODBC library before building it. The patch attached to HIVE-1101
> must
> be applied to the unixODBC-2.2.14 source tree before you build it. This
> patch contains
> the code and Makefile changes that cause unixODBC to build libhiveodbc.so
>
> Thanks.
>
> Carl
>

Re: HIVE ODBC test fails at testing with isql

Posted by vaibhav negi <ss...@gmail.com>.
Hi Carl,

Downloaded the patched  version of unixODBC from the given link and
installed successfully . libodbchive.so gets generated in /usr/local/lib .
But still the error persists.

error output when i run isql hive

[-----]SQL_SUCCESS
[-----]hEnv = $09BF20A0 phDbc = $0804E2FC
[-----]SQL_SUCCESS
[ISQL]ERROR: Could not SQLConnect

I tried following commands also--

export
LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so

export LD_PRELOAD=/usr/local/lib/libodbchive.so

I think i am missing something very important.

Do i need to copy files in /usr/local/lib/ to /lib ?

Thanks and Regards
Vaibhav Negi


On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <ca...@cloudera.com> wrote:

> Hi Vaibhav,
>
>
> > i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
> > driver as libodbc.so . Is that the problem?
> >
> >
> libodbc.so is the ODBC DriverManager library provided by unixODBC. You
> should
> not rename or symlink this file. I think your problem is that you forgot to
> patch
> the unixODBC library before building it. The patch attached to HIVE-1101
> must
> be applied to the unixODBC-2.2.14 source tree before you build it. This
> patch contains
> the code and Makefile changes that cause unixODBC to build libhiveodbc.so
>
> Thanks.
>
> Carl
>

Re: HIVE ODBC test fails at testing with isql

Posted by Carl Steinbach <ca...@cloudera.com>.
Hi Vaibhav,


> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
> driver as libodbc.so . Is that the problem?
>
>
libodbc.so is the ODBC DriverManager library provided by unixODBC. You
should
not rename or symlink this file. I think your problem is that you forgot to
patch
the unixODBC library before building it. The patch attached to HIVE-1101
must
be applied to the unixODBC-2.2.14 source tree before you build it. This
patch contains
the code and Makefile changes that cause unixODBC to build libhiveodbc.so

Thanks.

Carl

Re: HIVE ODBC test fails at testing with isql

Posted by Carl Steinbach <ca...@cloudera.com>.
Hi Vaibhav,


> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive
> driver as libodbc.so . Is that the problem?
>
>
libodbc.so is the ODBC DriverManager library provided by unixODBC. You
should
not rename or symlink this file. I think your problem is that you forgot to
patch
the unixODBC library before building it. The patch attached to HIVE-1101
must
be applied to the unixODBC-2.2.14 source tree before you build it. This
patch contains
the code and Makefile changes that cause unixODBC to build libhiveodbc.so

Thanks.

Carl