Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on OS X Yosemite 10.10.3 returns error #34

Closed
piotrekkmt opened this issue Apr 28, 2015 · 12 comments
Closed

Running on OS X Yosemite 10.10.3 returns error #34

piotrekkmt opened this issue Apr 28, 2015 · 12 comments

Comments

@piotrekkmt
Copy link

I am getting some db2 errors with a connection module for Node.JS if I'm running it locally on my mac machine. It seems like the new version of OS X 10.10.3 changed some security features of the whole system and it now give a nice:

[IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004\n

Would you know if there is some kind of fix for the module for DB2 connections on OS X 10.10.3 (same issue on 10.10.2)?

@piotrekkmt piotrekkmt changed the title Installing on OS X Yosemite 10.10.3 returns error Running on OS X Yosemite 10.10.3 returns error Apr 28, 2015
@avikalar
Copy link
Contributor

Looks like this issue is caused by a fairly major change in Mac OS X security model. This link(https://www.ibm.com/developerworks/community/forums/html/topic?id=b78fe48e-b92c-448f-9154-c5ff4728f77a) talks about work arounds, and they are saying it might need some time to fix this. When I spoke to the team here, right now the work around you can do is to modify the db2dsdriver.cfg under the $INSTALL_DIR/cfg and add/modify the following parameter in it

AUTHENTICATION=SERVER

@mariobriggs
Copy link
Contributor

i think simply setting that in the connection string too should work (assuming u are not using the dsdriver.cfg

@piotrekkmt
Copy link
Author

Hey @mariobriggs that's correct, I didn't find the dsdriver.cfg file in the /node_modules/ folder, only a cfg_sample which I assume isn't being used. So instead I added the AUTHENTICATION=SERVER to my connection string but that didn't seem to solve the issue. Instead I'm getting:

[IBM][CLI Driver] SQL30082N Security processing failed with reason \"17\" (\"UNSUPPORTED FUNCTION\"). SQLSTATE=08001\n

Any other thoughts?

@mariobriggs
Copy link
Contributor

@piotrekkmt i assume this is the same one as we had with a ruby customer and issue is here . can u check your connection string mirrored the example provided there. If it is right i would ask @avikalar to talk to the CLI team and see why u are getting the errorcode 17

@piotrekkmt
Copy link
Author

You might want to do that so, heres my connection string:
DRIVER={DB2};DATABASE=SQLDB;UID=[bluemixusernumber];PWD=[MyPassword];HOSTNAME=[MyIP];port=50000;AUTHENTICATION=SERVER

@bimalkjha
Copy link
Member

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.messages.sql.doc/doc/msql30082n.html
17 (UNSUPPORTED FUNCTION)

the security mechanism specified by the client is invalid for this server. Some typical examples:

    The client sent a new password value to a server that does not support the change password function.
    The client sent SERVER_ENCRYPT authentication information to a server that does not support password encryption. Authentication type catalog information must be the same at the server and the client.
    The client sent a userid (but no password) to a server that does not support authentication by userid only.
    The client has not specified an authentication type, and the server has not responded with a supported type. This might include the server returning multiple types from which the client is unable to choose.
    The CLIENT AUTHENTICATION type is not supported by "IBM Data Server Driver for ODBC and CLI" and "IBM Data Server Driver package"

According to above KC page, it seems SQLDB is not configured to accept authentication as SERVER.

@arvindgu
Copy link

On MacOS, the ibm_db gem does not yet automatically download the IBM DB2 CLI bundle and automatically link to it (still being worked on). Till then u need to export DYLD_LIBRARY_PATH=<sqllib\lib>

@piotrekkmt
Copy link
Author

By export DYLD_LIBRARY_PATH= you mean do that for the terminal? Where would I get the file from? I don't really feel like installing the full DB2 on my machine if there is another way. Could I copy over the libdb2.dylib file into the node_modules folder and reference it through the terminal like that?

@bimalkjha
Copy link
Member

If you have node_modules/ibm_db/installer/clidriver/lib/libdb2.dylib file,then no need to install any db2. Just export DYLD_LIBRARY_PATH=node_modules/ibm_db/installer/clidriver/lib:$DYLD_LIBRARYPATH

@mariobriggs
Copy link
Contributor

@piotrekkmt On MacOS X Yosemite, if you run into the below error when u set 'AUTHENTICATION=SERVER;' in your connection string

[IBM][CLI Driver] SQL30082N Security processing failed with reason \"17\" (\"UNSUPPORTED FUNCTION\"). SQLSTATE=08001\n

then don't set that in your connection string, but instead manually update your DYLD_LIBRARY_PATH as follows

export DYLD_LIBRARY_PATH=<node_modules_dir>/ibm_db/installer/clidriver/lib/icc:$DYLD_LIBRARYPATH

As you mention, because of the security features of macOS X Yosemite, ibm_db or underlying will have to find a way to handle this seamlessly, until then u can use above option

@joeyguerra
Copy link

AUTHENTICATION=SERVER worked for me. Thanks.

@bimalkjha
Copy link
Member

Now, no need to set DYLD_LIBRARY_PATH on Mac for ibm_db to work. This issue is fixed and use will not see SQL1042C error on Mac anymore. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants