w1nk / node-odbc

unixODBC bindings for node
MIT License
90 stars 102 forks source link

node-odbc can't see library file #43

Closed merrittholmes closed 11 years ago

merrittholmes commented 11 years ago

We are getting the error:

{ error: '[node-odbc] SQL_ERROR', message: '[unixODBC][Driver Manager]Can\'t open lib \'/usr/lib/libhiveodbc.so.1\' : file not found', state: '01000'

The file is there and we can use it using isql so we can;t work out what the issue is. ITs a 32bit version.

Any ideas?

wankdanker commented 11 years ago

What does your connection string look like?

merrittholmes commented 11 years ago

connectionString = "DSN=IMPALA-SERVER";

This is the odbc.ini file

[Data Sources] IMPALA-SERVER=Hive ODBC Driver

[IMPALA-SERVER] Driver=/usr/lib/libhiveodbc.so.1 Description=Hive ODBC Driver Host=ec2-23-23-42-185.compute-1.amazonaws.com Port=21000 Database= FRAMED=0 Trace=Yes TraceFile=/tmp/odbc.log Type=Beeswax

odbcinst.ini [ODBC Drivers] Hive Driver=Installed

[Hive Driver] Driver=/usr/lib/libhiveodbc.so.1 Description=Hive Driver Setup=/usr/lib/libhiveodbc.so.1 APILevel=2 ConnectFunctions=YYY DriverODBCVer=1.0 FileUsage=0 SQLLevel=1

On Fri, Jun 28, 2013 at 5:31 PM, Dan VerWeire notifications@github.comwrote:

What does your connection string look like?

— Reply to this email directly or view it on GitHubhttps://github.com/w1nk/node-odbc/issues/43#issuecomment-20199057 .

Mike Merritt-Holmes Big Data Partnership Mob: 07973 460 394 Tel: +44 (0)20 7 205 2550 twitter.com/bigdataexperts www.bigdatapartnership.com

NOTICE AND DISCLAIMER

This email (including attachments) is confidential. If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose.

Business Address: 16-24 Underwood Street, London N1 7JQ Registered Office: Finsgate, 5-7 Cranwood Street, London, EC1V 9EE Big Data Partnership Limited is a company registered in England & Wales with Company No 7904824

wankdanker commented 11 years ago

I find it curious that in your odbc.ini, you have Driver=/usr/lib/libhiveodbc.so.1. In my experience, that line typically contains the name of the driver as configured in odbcinst.ini. So, I would expect that that should be Driver=Hive Driver. Not sure if that is relevant though, as you said this works with isql...

Other than that, I can't really see anything that is suspect. Could it be a permissions thing? Are you running isql with the same account that the node process is running?

wankdanker commented 11 years ago

Oh, also, I would expect that there will be other issues if you have 64 bit node and 32 bit driver unless the driver manager can do some translation automatically. That I am unsure of. I only mention this because a user previously used a 32bit DB2 driver with a 64bit installation and they were seeing weird number things. They may have been using the driver directly by using the dynodbc option (https://github.com/wankdanker/node-odbc#build-options).

wankdanker commented 11 years ago

No feedback for 3 months. Closing.