Thursday, January 14, 2016

OAM Webgate 11g EditHttpConf tool


While I was working on  OAM (Oracle Access Manager) 11g, trying to get the Webgate agent to install over OHS (Oracle HTTP Server) I came across this odd error:


[oemora@lnxdbtst > /apps/oemora/Oracle/Middleware/Oracle_OAMWebGate1/webgate/ohs/tools/setup/InstallTools]$ ./EditHttpConf \
> -w /apps/oemora/Oracle/Middleware/Oracle_WT1/instances/instance8/config/OHS/ohs1 \
> -oh /apps/oemora/Oracle/Middleware/Oracle_OAMWebGate1
./EditHttpConf: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory

Obviously, the webgate installer doesn't set up the environment for you.  In this case, there's a missing shared library named "libclntsh.so.11.1".  In my environment, there were several instances of that library.  I got random obscure errors, ranging from "unable to run "Ob*", to wrong ELFCLASS.  In the end, I had help from fellow colleagues, but long story short, I needed to reference the shared library in the OHS_HOME directory- in my case it is/u01/middleware/ohs_home/lib, so I needed to run this command:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$WL_HOME/Oracle_WT1/lib

In doing so, I finally got it to run correctly:

[oemora@lnxdbtst > /apps/oemora/Oracle/Middleware/Oracle_OAMWebGate1/webgate/ohs/tools/setup/InstallTools]$ ./EditHttpConf \
> -w /apps/oemora/Oracle/Middleware/Oracle_WT1/instances/instance8/config/OHS/ohs1 \
> -oh /apps/oemora/Oracle/Middleware/Oracle_OAMWebGate1
The web server configuration file was successfully updated
/apps/oemora/Oracle/Middleware/Oracle_WT1/instances/instance8/config/OHS/ohs1/httpd.conf has been backed up as /apps/oemora/Oracle/Middleware/Oracle_WT1/instances/instance8/config/OHS/ohs1/httpd.conf.ORIG
[oemora@lnxdbtst > /apps/oemora/Oracle/Middleware/Oracle_OAMWebGate1/webgate/ohs/tools/setup/InstallTools]$