Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Istvan Kara Absent Member.
Absent Member.
2908 views

Could not load shared library ./sqoracle.oci11.so

Hiall,

 

HPUX, oracle 11.

 

sm.log said:

22705(2260178) 07/16/2012 09:36:34  RTE E Could not load shared library ./sqoracle.oci11.so
22705(2260178) 07/16/2012 09:36:34  RTE E Unable to find library 'libclntsh.so.11.1'.

 

The situation:

 

place of sqoracle.oci11.so: /apps/sm9/server/RUN/sqoracle.oci11.so

permissions:

-rwxr-xr-x   1 sm         sm          412908 Jul 14  2011 sqoracle.oci11.so

 

env |grep ORA command:

 

ORACLE_BASE=/home/oracle/app/oracle

ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/client_1

LD_LIBRARY_PATH=/home/oracle/app/oracle/product/11.2.0/client_1/lib

(variables set in sm user's .profile file)

 

So.. Could you help me... I have no more idea...

 

Many thanks!

Steven

 

 

Tags (1)
0 Likes
10 Replies
ramesh9 Acclaimed Contributor.
Acclaimed Contributor.

Re: Could not load shared library ./sqoracle.oci11.so

In sm.ini for DB settings if you had put following,

 

sqldictionary:oracle11
[oracle11]

 

can you please change it to,

 

sqldictionary:oracle10
[oracle10]

 

and check...

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Could not load shared library ./sqoracle.oci11.so

Check the user id that you use to access the Oracle db and see if it has all the Oracle privileges as stated in the Install Guide. Could be related as I think I saw that solution once for similar issue.
0 Likes
Absent Member.. Michal_Kovac Absent Member..
Absent Member..

Re: Could not load shared library ./sqoracle.oci11.so

Hi Steve,

there is missing depended library, so f.i. find missing library file with:

find / -name "libclntsh.so.*"

... and copy it (or create symlink etc.) to the /apps/sm9/server/RUN

 

At the end check with:

ldd /apps/sm9/server/RUN/sqoracle.oci11.so

... if all depend libraries can be found.

 

Michal

0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Could not load shared library ./sqoracle.oci11.so

Hi,

 

I had to copy the Libclntsh.so.11.1 from the Oracle installation path into Service Manager’s Run directory. This fixed the error.

 

Cheers!

Sandeep

0 Likes
Isaac_Lozano_MX Absent Member.
Absent Member.

Re: Could not load shared library ./sqoracle.oci11.so

Solution 

You'll need to verify your environment variables.

your bash_profile like this:

 

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib
export TNS_ADMIN=/usr/lib/oracle/11.2/client
export ORACLE_HOME=/usr/lib/oracle/11.2/client
PATH=$ORACLE_HOME/bin:$PATH

export JAVA_HOME=/usr/java/jre1.7.0_79

 

 

To take effect inmediatly:

 

 [sml@smserver]$ source ~/.bash_profile


echo $ORACLE_HOME

 

/usr/lib/oracle/11.2/client


Now SM will start 



0 Likes
rserrano Absent Member.
Absent Member.

Re: Could not load shared library ./sqoracle.oci11.so

I've a similar issue with Service Manager 9.40 installed on RHEL7.

Oracle Client x86_64 installed with sqlclient , jdbc and devel libraries:

oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-jdbc-11.2.0.4.0-1.x86_64.rpm

Dir network/admin created

mkdir /usr/lib/oracle/11.2/client64/network/admin -p

TNSNAMES.ORA created in this dir with my SID info

Created the client.sh under profile.d and started with logout and login:

 export ORACLE_HOME=/usr/lib/oracle/11.2/client64
 export PATH=$PATH:$ORACLE_HOME/bin
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib
 export TNS_ADMIN=$ORACLE_HOME/network/admin
sh /etc/profile.d/client.sh

SQL*PLUS correctly works when I've tested my SID connection!

I've tried to use another user instead of "root". Then I've created "smadmin" with group "adm", and using it by command "runuser smadmin".

But when I'm trying to use "./configure" under /opt/HP/ServiceManager9.40/Server/ , I receive an error message:

# ./configure
WARNING: This program is meant for out-of-box system configuration.
It will overwrite your current settings in sm.ini.
Please backup your sm.ini file.
Enter httpPort (Current value - 13080 ):13080
Enable httpsPort (Y or N) (Current value - N ):N
Choose Database Type:
(0) Oracle 10g
(1) Oracle 11g
(2) Oracle 12c (Current value - 1 ):1
Enter Database name (Current value - BSM ):BSM
Enter SQL user (Current value - ):*****
Enter SQL password (Current value - ):******
Updating new configuration to sm.ini...
Validating SQL connectivity.... Please wait....
Feb 09, 2016 11:33:17 AM com.hp.ov.sm.configuration.Util execCommand
INFO: sm: The root user cannot start the HP Service Manager system.
Feb 09, 2016 11:33:17 AM com.hp.ov.sm.configuration.Util execCommand
INFO:
Feb 09, 2016 11:33:17 AM com.hp.ov.sm.configuration.Util execCommand
INFO: Could not connect to Database. Please see smconfig.log for details.

 

In "smconfig.log" file the issue is related to library 

 28776( 28776) 02/09/2016 10:32:54 RTE E Command line: /opt/HP/ServiceManager9.40/Server/RUN/smserver -sqlverifyconnection -log:/opt/HP/ServiceManager9.40/Server/smconfig.log
28776( 28776) 02/09/2016 10:32:54 RTE E Could not load shared library ./sqoracle.oci11.so
28776( 28776) 02/09/2016 10:32:54 RTE E libclntsh.so.11.1: wrong ELF class: ELFCLASS64
28776( 28776) 02/09/2016 10:32:54 RTE E Could not load shared library sqoracle.oci11.so
28776( 28776) 02/09/2016 10:32:54 RTE E libclntsh.so.11.1: wrong ELF class: ELFCLASS64
28776( 28776) 02/09/2016 10:32:54 RTE E Failed to load library 'sqoracle.oci11.so'
28776( 28776) 02/09/2016 10:32:54 RTE E Failed to load SQL client shared libraries, terminating.
28776( 28776) 02/09/2016 10:32:54 RTE I -Memory : S(280400) O(191740) MAX(472140) - MALLOC's Total(3851)
28776( 28776) 02/09/2016 10:32:54 RTE I Thread termination in progress
28776( 28776) 02/09/2016 10:32:54 RTE E Unable to obtain SYSTEM lock in interm().
28776( 28776) 02/09/2016 10:32:54 RTE I Process termination cleanup complete (exit code=1)

Then I've checked the dependences of "sqoracle.oci11.so" and the result is show below:

 # ldd RUN/sqoracle.oci11.so
linux-gate.so.1 => (0xf7796000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf7758000)
libclntsh.so.11.1 => not found
libsmi18n.so => /usr/lib/oracle/11.2/client64/lib/libsmi18n.so (0xf774f000)
libstdc++.so.6 => not found
libm.so.6 => /lib/libm.so.6 (0xf770c000)
libgcc_s.so.1 => not found
libc.so.6 => /lib/libc.so.6 (0xf754f000)
/lib/ld-linux.so.2 (0xf7797000)
libicuuc.so.44 => not found
libstdc++.so.6 => not found
libgcc_s.so.1 => not found

But libclntsh.so.11.1 correctly exists in path /usr/lib/oracle/11.2/client64/lib/ like other libraries.

 

Can anyone help me ? 

 

0 Likes
Absent Member.. Michal_Kovac Absent Member..
Absent Member..

Re: Could not load shared library ./sqoracle.oci11.so

you have mixed-up binaries:

28776( 28776) 02/09/2016 10:32:54 RTE E libclntsh.so.11.1: wrong ELF class: ELFCLASS64

 

smserver binary is 32bit, and you have installed oracle 64bit client libraries

try with (install) oracle 32bit client libraries

0 Likes
rserrano Absent Member.
Absent Member.

Re: Could not load shared library ./sqoracle.oci11.so

I've tried to install also the oracle client 32bit (oracle-instantclient11.2-basic-11.2.0.4.0-1.i386.rpm, etc.) but it does'nt work.

0 Likes
Absent Member.. Michal_Kovac Absent Member..
Absent Member..

Re: Could not load shared library ./sqoracle.oci11.so

so change also path and ld lib path env vars to 32bit:

export ORACLE_HOME=/usr/lib/oracle/11.2/client64

 

0 Likes
rserrano Absent Member.
Absent Member.

Re: Could not load shared library ./sqoracle.oci11.so

Of course, I've change it to set correctly with 32 bit path

export ORACLE_HOME=/usr/lib/oracle/11.2/client
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin

and I've created also the network/admin dir in this path and created the tnsnames.ora 

 

Now the error message in smconfig.log is changed:

libaio.so.1: cannot open shared object file: No such file or directory.

 

This file exitsts only in lib64 directory. Then I must to download the 32bit version of the same file.

I've download manually because system shows conflicts with existing library, using this url libaio-0.3.103-3.i386.rpm

When I use the command line "./configure" using "smadmin" user, the error message disappear and in smconfgi.log file the results is different:

31124( 31124) 02/09/2016 14:01:54 RTE I Connection to dbtype 'oracle11' Oracle server 'BSM' as user 'system' successful
31124( 31124) 02/09/2016 14:01:54 RTE I Connected to Oracle Version 11.2.0.4.0
31124( 31124) 02/09/2016 14:01:54 RTE I Oracle Client version: 11.2.0.4.0
31124( 31124) 02/09/2016 14:01:54 RTE I Oracle server settings for language, territory and character set: AMERICAN_AMERICA.WE8MSWIN1252 (AL16UTF16)
31124( 31124) 02/09/2016 14:01:54 RTE I OCI Client settings for language, territory and character set: AMERICAN_AMERICA.AL32UTF8 (UTF16)
31124( 31124) 02/09/2016 14:01:54 RTE W Oracle instance setting for NLS_SORT could not be determined. Default to BINARY
31124( 31124) 02/09/2016 14:01:54 RTE I Oracle instance setting for NLS_COMP is set to BINARY
31124( 31124) 02/09/2016 14:01:54 RTE I Oracle session is set up in BINARY mode
31124( 31124) 02/09/2016 14:01:54 RTE I sql total 0.070 call#:24 -->sqociDisconnect:OCISessionEnd
31124( 31124) 02/09/2016 14:01:54 RTE I sql total 0.071 call#:25 -->sqociDisconnect:OCIServerDetach
31124( 31124) 02/09/2016 14:01:54 RTE I Successfully connected to RDBMS server
31124( 31124) 02/09/2016 14:01:54 RTE I -Memory : S(280400) O(191740) MAX(476236) - MALLOC's Total(3874)
31124( 31124) 02/09/2016 14:01:54 RTE I Thread termination in progress
31124( 31124) 02/09/2016 14:01:54 RTE E Unable to obtain SYSTEM lock in interm().
31124( 31124) 02/09/2016 14:01:54 RTE I Process termination cleanup complete (exit code=0)

 

 SOLVED!

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.