Git Product home page Git Product logo

Comments (12)

avikalar avatar avikalar commented on July 29, 2024

Hey Daniel,

Currently we don't support Mac OS, since DS driver for Mac OS is not available. We would recommend you to switch to linux if it is possible.

Thanks & Regards

from node-ibm_db.

devniel avatar devniel commented on July 29, 2024

Ouch, that's so sad, my application use DB2 hence I can't develop my application on my new Mac OS X because of the lack of a DS driver ? Well, I will do a bit of research ...

from node-ibm_db.

idbjorh avatar idbjorh commented on July 29, 2024

@avikalar You do not have to have the IBM DSDriver in order to use ibm_db: DB2 Express-C for Mac OS includes the DB2 client (and therefore the libraries / includes necessary to build ibm_db). Currently the bindings.gyp file has conditions that mean it will work only on Linux, but you can set up a condition for it to work on Mac OS. See http://stackoverflow.com/questions/26501623/how-do-i-get-ibm-db-for-node-js-to-work-with-db2-in-mac-os-x-10-10/26534238#26534238 for more info.

from node-ibm_db.

devniel avatar devniel commented on July 29, 2024

Thanks Ian, but now I'm getting an 'Abort trap: 6' error. Do you think that maybe it's because I don't create a db2inst1 but instead I set my main mac user (devniel) as the instance user ? Also , only three tests passed .

from node-ibm_db.

mariobriggs avatar mariobriggs commented on July 29, 2024

just to note that 0.0.8 now automatically downloads it's required dependencies of Mac OS too. No more need to install Express-C for Mac

from node-ibm_db.

avikalar avatar avikalar commented on July 29, 2024

@devniel : Are you still stuck at Abort trap: 6' error ? If yes, can you please try installing our latest package(please do not use the latest node version 0.12)

from node-ibm_db.

granteagon avatar granteagon commented on July 29, 2024

I am having an issue on mac os 10.10 as well. I tried DSDriver, but I get the following error from node:

dyld: lazy symbol binding failed: Symbol not found: _SQLAllocHandle
  Referenced from: /Users/grant/myproject/node_modules/ibm_db/build/Release/odbc_bindings.node
  Expected in: dynamic lookup

Using the default install as @mariobriggs indicates does not work either. I get the following error from node.

error: Sending 500 ("Server Error") response:
 Error (E_UNKNOWN) :: Encountered an unexpected error
: [IBM][CLI Driver] SQL1042C  An unexpected system error occurred.  SQLSTATE=58004

    at Error (native)

Details:  Error: [IBM][CLI Driver] SQL1042C  An unexpected system error occurred.  SQLSTATE=58004

My research indicates that this is related to a mismatch between 32 and 64 bit. Since my database is 64 bit, my guess is the ODBC CLI is 32 bit, but I don't know that for sure.

The install of ibm_db completes successfully with this output:

> [email protected] install /Users/grant/myproject/node_modules/ibm_db
> node installer/driverInstall.js

IBM_DB_HOME environment variable have already been set to /Users/grant/dsdriver
  CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_connection.o
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_statement.o
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_result.o
  CXX(target) Release/obj.target/odbc_bindings/src/dynodbc.o
  SOLINK_MODULE(target) Release/odbc_bindings.node
  SOLINK_MODULE(target) Release/odbc_bindings.node: Finished

undefined
[email protected] node_modules/ibm_db
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

FYI: I'm creating a tunnel to my instance over ssh, and exposing a local port 50000. I have DBBeaver using the tunneled port without a problem. Perhaps there is a solution there somewhere. Any assistance with this issue is greatly appreciated.

from node-ibm_db.

granteagon avatar granteagon commented on July 29, 2024

@bimalkjha that didn't work. Here's what I did:

  • Exported that var and made sure the dir existed on my machine.
  • Uninstalled ibm_db
  • Reinstalled ibm_db

Here's the output I got from the installer:

> [email protected] install /Users/grant/myproject/node_modules/ibm_db
> node installer/driverInstall.js

IBM_DB_HOME environment variable have already been set to /Users/grant/dsdriver
  CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_connection.o
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_statement.o
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_result.o
  CXX(target) Release/obj.target/odbc_bindings/src/dynodbc.o
  SOLINK_MODULE(target) Release/odbc_bindings.node
  SOLINK_MODULE(target) Release/odbc_bindings.node: Finished

undefined
[email protected] node_modules/ibm_db
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])

Here's the file I'm testing with:

var ibmdb = require('ibm_db');

ibmdb.open("DATABASE=grant;HOSTNAME=localhost;UID=myuser;PWD=mypass;PORT=50000;PROTOCOL=TCPIP", function (err,conn) {
  if (err) return console.log(err);

  conn.query('select 1 from sysibm.sysdummy1', function (err, data) {
    if (err) console.log(err);
    else console.log(data);

    conn.close(function () {
      console.log('done');
    });
  });
});

When I run the file, here's the error I get:

dyld: lazy symbol binding failed: Symbol not found: _SQLAllocHandle
  Referenced from: /Users/grant/myproject/node_modules/ibm_db/build/Release/odbc_bindings.node
  Expected in: dynamic lookup

dyld: Symbol not found: _SQLAllocHandle
  Referenced from: /Users/grant/myproject/node_modules/ibm_db/build/Release/odbc_bindings.node
  Expected in: dynamic lookup

Thanks

from node-ibm_db.

bimalkjha avatar bimalkjha commented on July 29, 2024

@granteagon Run below commands:
$ . /Users/grant/dsdriver/db2profile
$ node test.js

from node-ibm_db.

bimalkjha avatar bimalkjha commented on July 29, 2024

@granteagon Also, share the result of db2level and db2cli validate command after running db2profile.

from node-ibm_db.

granteagon avatar granteagon commented on July 29, 2024

@bimalkjha Here's what I did:

dsdriver % . /db2profile
dsdriver % ./bin/db2level
zsh: exec format error: ./bin/db2level
dsdriver % ./bin/db2cli
zsh: exec format error: ./bin/db2cli

Looking at the install log file, it looks like it's trying to install Linux AMD, but my machine is Apple Intel.

- 
- 'installDSDriver' script has started ...
- 
- Unzipping and Copying each driver files to install path ...
-   clpplus/bin files are copied to /Users/grant/dsdriver/./bin
-   clpplus/tools files are copied to /Users/grant/dsdriver/./tools
-   jdbc_sqlj_driver/linuxamd64 files are copied to /Users/grant/dsdriver/./java/linuxamd64
-   Performing 'unzip -o -q db2_db2driver_for_jdbc_sqlj.zip' ...
-   Performing 'gunzip ibm_data_server_driver_for_odbc_cli.tar.gz' ...
-   odbc_cli_driver/linuxamd64/adm files are copied to /Users/grant/dsdriver/./adm
-   odbc_cli_driver/linuxamd64/bin/db2cli files are copied to /Users/grant/dsdriver/./bin/db2cli
-   odbc_cli_driver/linuxamd64/bin/db2diag files are copied to /Users/grant/dsdriver/./bin/db2diag
-   odbc_cli_driver/linuxamd64/bin/db2dsdcfgfill files are copied to /Users/grant/dsdriver/./bin/db2dsdcfgfill
-   odbc_cli_driver/linuxamd64/bin/db2ldcfg files are copied to /Users/grant/dsdriver/./bin/db2ldcfg
-   odbc_cli_driver/linuxamd64/bin/db2lddrg files are copied to /Users/grant/dsdriver/./bin/db2lddrg
-   odbc_cli_driver/linuxamd64/bin/db2level files are copied to /Users/grant/dsdriver/./bin/db2level
-   odbc_cli_driver/linuxamd64/bin/db2support files are copied to /Users/grant/dsdriver/./bin/db2support
-   odbc_cli_driver/linuxamd64/bnd files are copied to /Users/grant/dsdriver/./bnd
-   odbc_cli_driver/linuxamd64/cfg files are copied to /Users/grant/dsdriver/./cfg
-   odbc_cli_driver/linuxamd64/cfgcache files are copied to /Users/grant/dsdriver/./cfgcache
-   odbc_cli_driver/linuxamd64/conv files are copied to /Users/grant/dsdriver/./conv
-   odbc_cli_driver/linuxamd64/db2dump files are copied to /Users/grant/dsdriver/./db2dump
-   odbc_cli_driver/linuxamd64/include files are copied to /Users/grant/dsdriver/./include
-   odbc_cli_driver/linuxamd64/lib files are copied to /Users/grant/dsdriver/./lib
-   odbc_cli_driver/linuxamd64/license/UNIX files are copied to /Users/grant/dsdriver/./license/UNIX
-   odbc_cli_driver/linuxamd64/license/odbc_notices.txt files are copied to /Users/grant/dsdriver/./license/odbc_notices.txt
-   odbc_cli_driver/linuxamd64/msg files are copied to /Users/grant/dsdriver/./msg
-   Performing 'gunzip ibm_data_server_driver_for_odbc_cli_32.tar.gz' ...
-   odbc_cli_driver/linuxia32/lib32 files are copied to /Users/grant/dsdriver/./msg
-   odbc_cli_driver/linuxia32/bin32 files are copied to /Users/grant/dsdriver/./msg
-   odbc_cli_driver/linuxia32/adm32 files are copied to /Users/grant/dsdriver/./msg
-   php_driver/linuxamd64 files are copied to /Users/grant/dsdriver/./php/linuxamd64
-   ruby_driver/linuxamd64 files are copied to /Users/grant/dsdriver/./ruby/linuxamd64
-   --> SUCCESS
- Generating db2profile & db2cshrc files ...
- Generating db2profile32 & db2cshrc32 files ...
-   --> SUCCESS
- Performing post-installation clean up ...
-   Removed directory: clpplus
-   Removed directory: jdbc_sqlj_driver
-   Removed directory: odbc_cli_driver
-   Removed directory: php_driver
-   Removed directory: ruby_driver
-   --> SUCCESS
- 
- 'installDSDriver' completed successfully.
- Check /Users/grant/dsdriver/./installDSDriver.log file for complete details.
- 

Here's the file I downloaded. Maybe I've got the wrong download?

Thanks again for your help!

from node-ibm_db.

bimalkjha avatar bimalkjha commented on July 29, 2024

@granteagon yes, your downloaded dsdriver is for linuxamd64 platform and it is not for Mac. I am not sure IBM has released a dsdriver for Mac or not. Please check with IBM support. I don't see a dsdriver for Mac on Fix Central.

To go ahead with node-ibm_db, I would suggest to run below commands:

$ rm -rf node_modules
$ export IBM_DB_HOME=
$ npm install ibm_db

from node-ibm_db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.