-
Notifications
You must be signed in to change notification settings - Fork 75
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
SSL connection - ORA-12538: TNS:no such protocol adapter #55
Comments
Could you post the output of the following command or send it to kubo@jiubao.org?
Delete sensitive data from the output or set the environment variable |
Thanks for the quick reply - won't be able to check until I'm back at work on Monday, I'll let you know the results then ! David. |
Update: Managed to compile the libocidump library (used the Solaris settings in the Makefile, and needed to add the "-m64" flag to CFLAGS and LD_SHARED, my Oracle client library is 64-bit). Ran it as follows : And the output (I did a comparison run against a non-SSL connection, do you want that output too ?) :
SQL*Plus: Release 11.2.0.3.0 Production on Mon May 12 11:19:40 2014 Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to: SQL> 1: OCISessionEnd(0x1001da428, 0x1001d9370, 0x1001e0f40, 0) => OCI_SUCCESS |
Thank you! Could you change chker2(OCIAttrSet(svcctx->base.hp.ptr, OCI_HTYPE_SVCCTX, /* move these 4 lines before OCISessionBegin() */
svcctx->usrhp, 0, OCI_ATTR_SESSION, /* ditto. */
oci8_errhp), /* ditto. */
&svcctx->base); /* ditto. */
chker2(OCISessionBegin_nb(svcctx, svcctx->base.hp.ptr, oci8_errhp,
svcctx->usrhp, FIX2UINT(cred),
FIX2UINT(mode)),
&svcctx->base); If you install ruby-oci8 as a gem, edit If it doesn't fix the issue, change # logon by the OCI function OCISessionBegin().
allocate_handles()
@session_handle.send(:attr_set_string, 288, "") # add this line. 288: OCI_ATTR_EDITION
@session_handle.send(:attr_set_string, OCI_ATTR_USERNAME, username || "/") # change this line.
@session_handle.send(:attr_set_string, OCI_ATTR_PASSWORD, password || "") # ditto.
if @@oracle_client_version >= ORAVER_11_1
# 'rubyoci8' is displayed in V$SESSION_CONNECT_INFO.CLIENT_DRIVER |
Hi, I have applied the changes as specified above (see below for diffs/details), unfortunately I'm still getting the ORA-12538 error on the SSL connection : Do you need to see the (redacted) versions of tnsnames.ora entries that I'm using ? Details of changes :
|
I’d like to confirm just in case; did you copy oci8lib_191.so to ~/.gem/gems/ruby-oci8-2.1.6/lib after running make command?
Thanks. Please post it. Yet another cause what I think of is that the 32-bit Oracle client library may not support SSL. |
Could you download ociconnect.c, compile it as both 32-bit and 64-bit and run them as follows?
|
Hi - it looks like this is it !
I'm now working on the re-build of Ruby as 64-bit, will try it and let you know. |
Whew. "re-build of Ruby as 64-bit" sounds so simple, but on Solaris with a bunch of dependent libraries, it took a while. Anyway, the good news is - that worked. Running ruby-oci8 with ruby 2.1.2 all built as 64-bit and linked to the Oracle client 64-bit libraries, I can connect to non-SSL and SSL databases now. |
Environment :
Solaris 10, ruby 1.9.1, ruby-oci8 2.1.6, Oracle client 11.2.0.3.0, connecting to databases also on 11.2.0.3.0.
Database connection details/aliases are in tnsnames.ora, username/password details are stored in an Oracle Wallet (i.e. ewallet.p12, cwallet.sso). Environment variables TNS_ADMIN and WALLET_DIR are set correctly.
The situation :
OracleInterface::CategoryClassMethods#full_path: ORA-12538: TNS:no such protocol adapter
Minimal program to reproduce the issue (connection string redacted) - if I replace the connection string with "ABC123_USER" (where that references a Wallet entry /tnsnames.ora entry for a non-SSL database), this program works :
require 'dbi'
require 'oci8'
begin
dbenv = OCI8.new(nil, nil, "XYZ123_SSL_USER")
rescue OCIException => e
puts "OracleInterface::CategoryClassMethods#full_path: #{e}"
end
Note that both command-lines work:
sqlplus /@ABC123_USER
sqlplus /@XYZ123_SSL_USER
In summary: This problem only occurs when using ruby-oci8 to attempt to connect to a DB over an SSL connection.
Please let me know if you need any further information to help track down this issue.
The text was updated successfully, but these errors were encountered: