On Wed, Mar 25, 2020 at 6:50 PM Tamás Gulácsi ***@***.***> wrote:
What does it print with DPI_DEBUG_LEVEL=38 environment variable?
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
diff --git a/odpi/src/dpiOci.c b/odpi/src/dpiOci.c
index c731324..8d73fab 100644
--- a/odpi/src/dpiOci.c
+++ b/odpi/src/dpiOci.c
@@ -1786,9 +1786,12 @@ static int dpiOci__loadLib(dpiError *error)
sizeof(loadError));
#else
dpiOciLibHandle = dlopen(libName, RTLD_LAZY);
- if (!dpiOciLibHandle && i == 0) {
+ if (dpiOciLibHandle) {
+ dpiDebug__print("dlopen(%s): OK\n", libName);
+ } else {
strncpy(loadError, dlerror(), sizeof(loadError) - 1);
loadError[sizeof(loadError) - 1] = '\0';
+ dpiDebug__print("dlopen(%s): %s\n", libName, loadError);
#endif
@@ -1807,6 +1810,13 @@ static int dpiOci__loadLib(dpiError *error)
(void) sprintf(oracleHomeLibName, "%s/lib/%s", oracleHome,
dpiOciLibNames[0]);
dpiOciLibHandle = dlopen(oracleHomeLibName, RTLD_LAZY);
+ if (dpiOciLibHandle) {
+ dpiDebug__print("dlopen(%s): OK\n", oracleHomeLibName);
+ } else {
+ strncpy(loadError, dlerror(), sizeof(loadError) - 1);
+ loadError[sizeof(loadError) - 1] = '\0';
+ dpiDebug__print("dlopen(%s): %s\n", oracleHomeLibName, loadError);
+ }
free(oracleHomeLibName);
and then run with DPI_DEBUG_LEVEL=38
.
(Don't forget to touch some go file to force the recompilation!)
Thanks for your help. It looks like it is using some other environment.
I added the debug and get this:
ODPI [00020] 2020-03-27 07:52:25.287: oracleHome:(null)
ODPI [00020] 2020-03-27 07:52:25.288: oracleHome:(null)
ODPI [00020] 2020-03-27 07:52:25.288: oracleHome:(null)
ODPI [00020] 2020-03-27 07:52:25.289: oracleHome:(null)
ODPI [00020] 2020-03-27 07:52:25.289: oracleHome:(null)
2020-03-27T07:52:25Z [INFO] Emitter using address: 169.254.79.2:2000
panic: ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library:
"libclntsh.so: cannot open shared object file: No such file or directory".
See https://oracle.github.io/odpi/doc/installation.html#linux for help
Then I hardcoded my oracle lib and get:
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHome:/usr/lib/oracle/19.6/client64
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHomeLibName:/usr/lib/oracle/19.6/client64/lib/libclntsh.so
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHome:/usr/lib/oracle/19.6/client64
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHomeLibName:/usr/lib/oracle/19.6/client64/lib/libclntsh.so
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHome:/usr/lib/oracle/19.6/client64
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHomeLibName:/usr/lib/oracle/19.6/client64/lib/libclntsh.so
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHome:/usr/lib/oracle/19.6/client64
ODPI [00022] 2020-03-27 07:55:22.115:
oracleHomeLibName:/usr/lib/oracle/19.6/client64/lib/libclntsh.so
ODPI [00022] 2020-03-27 07:55:22.116:
oracleHome:/usr/lib/oracle/19.6/client64
ODPI [00022] 2020-03-27 07:55:22.116:
oracleHomeLibName:/usr/lib/oracle/19.6/client64/lib/libclntsh.so
2020-03-27T07:55:22Z [INFO] Emitter using address: 169.254.79.2:2000
panic: ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library:
"libclntsh.so: cannot open shared object file: No such file or directory".
See https://oracle.github.io/odpi/doc/installation.html#linux for help
So it is not "looking" to the same environment.
I don't understand what environment it is looking to.
I'm running on Linux Mint (Mate) 19.1 Tessa on my laptop
I don't know which container, or how to check it (it would explain the
other environment)
Can I insert the oracle driver in that container?
Cheers,
Marcel
On Thu, Mar 26, 2020 at 9:29 AM Tamás Gulácsi ***@***.***> wrote:
Try to add some debugging print to ODPI-C's dpiOci.c:
diff --git a/odpi/src/dpiOci.c b/odpi/src/dpiOci.c
index c731324..8d73fab 100644
--- a/odpi/src/dpiOci.c
+++ b/odpi/src/dpiOci.c
@@ -1786,9 +1786,12 @@ static int dpiOci__loadLib(dpiError *error)
sizeof(loadError));
#else
dpiOciLibHandle = dlopen(libName, RTLD_LAZY);
- if (!dpiOciLibHandle && i == 0) {
+ if (dpiOciLibHandle) {
+ dpiDebug__print("dlopen(%s): OK\n", libName);
+ } else {
strncpy(loadError, dlerror(), sizeof(loadError) - 1);
loadError[sizeof(loadError) - 1] = '\0';
+ dpiDebug__print("dlopen(%s): %s\n", libName, loadError);
#endif
@@ -1807,6 +1810,13 @@ static int dpiOci__loadLib(dpiError *error)
(void) sprintf(oracleHomeLibName, "%s/lib/%s", oracleHome,
dpiOciLibNames[0]);
dpiOciLibHandle = dlopen(oracleHomeLibName, RTLD_LAZY);
+ if (dpiOciLibHandle) {
+ dpiDebug__print("dlopen(%s): OK\n", oracleHomeLibName);
+ } else {
+ strncpy(loadError, dlerror(), sizeof(loadError) - 1);
+ loadError[sizeof(loadError) - 1] = '\0';
+ dpiDebug__print("dlopen(%s): %s\n", oracleHomeLibName, loadError);
+ }
free(oracleHomeLibName);
and then run with DPI_DEBUG_LEVEL=38.
(Don't forget to touch some go file to force the recompilation!)
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
#35 (comment)
>, or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAXKRX23EOKD24H23XHB3DTRJMG5HANCNFSM4LTOASXA
>
On Fri, Mar 27, 2020 at 9:42 AM Christopher Jones ***@***.***> wrote:
Check you have libaio (it maybe called libaio1) installed.
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
#35 (comment)
>, or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAXKRXZBK4JG4FHXBCUY7D3RJRRG7ANCNFSM4LTOASXA
>
Check whether SQL*Plus runs.
What Instant Client did you use before?
What glibc do you have?
Any issues with libnsl?
oracle/node-oracledb#892
?
Hi folks, for later readers like me, I think the solution is here:
quick start installation
.
tl;dr
Install
Python 2.7
(Note: recent Node.js tools should work with Python 3).
Install a C Compiler such as Xcode, GCC, Visual Studio 2017, or similar.
Download
Oracle Instant Client
& add the LD_LIBRARY_PATH environment to your newly downloaded package.
# export LD_LIBRARY_PATH=/dir/to/instantclient_version
# Ex:
export LD_LIBRARY_PATH=~/instantclient_19_8