Operating System - HP-UX
1822143 Members
3912 Online
109640 Solutions
New Discussion

Apache Failure: Can't open shared library: /usr/lib/libnsl.1

 
SOLVED
Go to solution
RonHoover
Occasional Advisor

Apache Failure: Can't open shared library: /usr/lib/libnsl.1

We have an HP-UX server running Oracle 9i database, Cold Fusion and HP Apache with Netegrity Siteminder for third party authentication. I have to upgrade the database to 10g. The runInstaller pre-check recommended the following:
Failed OS Patch check on the following:

• PHSS_31221
• PHSS_32508
• PHSS_32509
• PHSS_32510
• PHSS_32731
• PHSS_31312

Failed Kernel parameter check on the following:
• ksi_alloc_max=32768; found ksi_alloc_max=16384
• maxssiz_64bit=1073741824; found maxssiz_64bit=134217728
• maxswapchunks=16384; found maxswapchunks=1513
• maxuprc=3687; found maxuprc=75
• msgmap=4098; found msgmap=42
• msgmni=4096; found msgmni=50
• msgseg=32767; found msgseg=2048
• msgtql=4096; found msgtql=40
• ncsize=34816; found ncsize=7848
• nfile=63488; found nfile=3000
• nflocks=4096; found nflocks=200
• ninode=34816; found ninode=2728
• nkthread=7184; found nkthread=6000
• nproc=4096; found nproc=2048
• semmap=4098; found semmap=2050
• semmni=4096; found semmni=2048
• semmns=8192; found semmns=2048
• semmnu=4092; found semmnu=64
• shmmax=1073741824; found shmmax=268435456
• shmmni=512; found shmmni=500
• vps_ceiling=64; foundvps_ceiling=16

This is the contents of the Bundle that was applied:
patch hp-ux_patches/s700_800/11.X/PHCO_33142
patch hp-ux_patches/s700_800/11.X/PHKL_29243

patch hp-ux_patches/s700_800/11.X/PHSS_32732
patch hp-ux_patches/s700_800/11.X/PHSS_33037
patch hp-ux_patches/s700_800/11.X/PHSS_33944

patch hp-ux_patches/s700_800/11.X/PHSS_35098

patch hp-ux_patches/s700_800/11.X/PHSS_35099

patch hp-ux_patches/s700_800/11.X/PHSS_35100

patch superseded_patches/hp-ux_patches/s700_800/11.X/PHCO_31314

patch superseded_patches/hp-ux_patches/s700_800/11.X/PHNE_28810

patch superseded_patches/hp-ux_patches/s700_800/11.X/PHSS_32731

The Kernel changes were also applied. The database starts up fine. but when I try and start Apache, the following error is thrown:
Syntax error on line 176 of /opt/hpapache2/conf/httpd.conf:
Cannot load /web/sso/netegrity/webagent/bin/libmod_sm20.sl into server: Can't open shared library: /usr/lib/libnsl.1

Line 176 of httpd.conf is:
LoadModule sm_module "/web/sso/netegrity/webagent/bin/libmod_sm20.sl"
libmod_sm20.sl trys to load /usr/lib/libnsl.1 and that is where the failure is!

Any help would be greatly appreciated!
Ron
7 REPLIES 7
RonHoover
Occasional Advisor

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

Some additional notes:
-r-xr-xr-x 1 bin bin 745472 Apr 27 2005 libnsl.1

# more /opt/hpapache2/bin/envvars
SHLIB_PATH=/web/sso/netegrity/webagent/bin:/opt/hpapache2/lib:/usr/lib
export SHLIB_PATH
NETE_WA_PATH=/web/sso/netegrity/webagent/bin
export NETE_WA_PATH
NETE_WA_ROOT=/web/sso/netegrity/webagent
export NETE_WA_ROOT
PATH=$PATH:/web/sso/netegrity/webagent/bin
export PATH

# swlist -l file | grep /usr/lib/libnsl.1
NFS.NFS-SHLIBS: /usr/lib/libnsl.1
PHNE_32477.NFS-SHLIBS: /usr/lib/libnsl.1

# chatr /opt/hpapache2/bin/httpd
/opt/hpapache2/bin/httpd:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled second
embedded path enabled first /opt/hpapache2/lib
shared library list:
dynamic /usr/lib/libcl.2
static /opt/hpapache2/lib/libaprutil-0.sl.9
static /opt/hpapache2/lib/libexpat.sl.1
static /opt/hpapache2/lib/libapr-0.sl.9
dynamic /usr/lib/libm.2
dynamic /usr/lib/libnsl.1
dynamic /usr/lib/libpthread.1
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references enabled
shared library private mapping disabled
shared library text merging disabled
Arunvijai_4
Honored Contributor
Solution

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

Hi Ron,

Can you comment the line and start apache ? Is it working ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RonHoover
Occasional Advisor

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

Arun,

Thanks for the response!
I commented out the following 2 lines and it starts:
LoadModule sm_module "/web/sso/netegrity/webagent/bin/libmod_sm20.sl"
SmInitFile "/opt/hpapache2/conf/WebAgent.conf"

But the applications are all coded to use Siteminder variables so that is why I need those lines.
Arunvijai_4
Honored Contributor

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

Hi Ron,

Can you do a "ldd" and "chatr" for /web/sso/netegrity/webagent/bin/libmod_sm20.sl

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RonHoover
Occasional Advisor

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

# ldd /web/sso/netegrity/webagent/bin/libmod_sm20.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libstream.2 => /usr/lib/libstream.2
/usr/lib/libstd.2 => /usr/lib/libstd.2
/usr/lib/libCsup.2 => /usr/lib/libCsup.2
/usr/lib/dld.sl: Can't open shared library: /vobs/devel/agentframework/Release/HP-UX/lib/libsmeventlog.sl
/usr/lib/dld.sl: No such file or directory


# chatr /web/sso/netegrity/webagent/bin/libmod_sm20.sl
/web/sso/netegrity/webagent/bin/libmod_sm20.sl:
shared library
shared library dynamic path search:
SHLIB_PATH enabled first
embedded path disabled second Not Defined
shared library list:
dynamic /vobs/devel/common/Release/HP-UX/lib/libsmerrlog.sl
dynamic /vobs/devel/agentframework/Release/HP-UX/lib/libsmeventlog.sl
dynamic /usr/lib/libCsup.2
dynamic /usr/lib/libstd.2
dynamic /usr/lib/libstream.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libc.2
dynamic /usr/lib/libnsl.1
dynamic /usr/lib/libpthread.1
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
Arunvijai_4
Honored Contributor

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

Hi Ron,

Here is the problem, /usr/lib/dld.sl: Can't open shared library: /vobs/devel/agentframework/Release/HP-UX/lib/libsmeventlog.sl
/usr/lib/dld.sl: No such file or directory


I think, at the of build you got hardcorded library. Either get the library from above location and put it in /usr/lib or compile with static library.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RonHoover
Occasional Advisor

Re: Apache Failure: Can't open shared library: /usr/lib/libnsl.1

# ldd /web/sso/netegrity/webagent/bin/libmod_sm20.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libstream.2 => /usr/lib/libstream.2
/usr/lib/libstd.2 => /usr/lib/libstd.2
/usr/lib/libCsup.2 => /usr/lib/libCsup.2
/vobs/devel/agentframework/Release/HP-UX/lib/libsmeventlog.sl =>
/vobs/devel/agentframework/Release/HP-UX/lib/libsmeventlog.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libstream.2 => /usr/lib/libstream.2
/usr/lib/libstd.2 => /usr/lib/libstd.2
/usr/lib/libCsup.2 => /usr/lib/libCsup.2
/vobs/devel/common/Release/HP-UX/lib/libsmerrlog.sl => /vobs/devel/comm
on/Release/HP-UX/lib/libsmerrlog.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libstream.2 => /usr/lib/libstream.2
/usr/lib/libstd.2 => /usr/lib/libstd.2
/usr/lib/libCsup.2 => /usr/lib/libCsup.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/vobs/devel/common/Release/HP-UX/lib/libsmcommonutil.sl => /vobs/de
vel/common/Release/HP-UX/lib/libsmcommonutil.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libstream.2 => /usr/lib/libstream.2
/usr/lib/libstd.2 => /usr/lib/libstd.2
/usr/lib/libCsup.2 => /usr/lib/libCsup.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libnsl.1 => /usr/lib/libnsl.1

I created the directory structure and put alaises but still get:
./apachectl start
Syntax error on line 176 of /opt/hpapache2/conf/httpd.conf:
Cannot load /web/sso/netegrity/webagent/bin/libmod_sm20.sl into server: Can't op
en shared library: /usr/lib/libnsl.1