Problem:
Web agent installed to Apache web server. Unable to startup Apache after web server restart with following error in Apache error log:
###
Cannot load /<webagent_installed folder>/webagent/bin/libmod_sm22.so into server: libsmerrlog.so: cannot open shared object file: No such file or directory
Web server version: ASF Apache 2.2
Web server OS version: RedHat Linux 6.7
Web agent version: R12SP3CR10
Web agent environment variables were not loaded
In general, the error means web server unable to locate libsmerrlog.so (located <webagent>/bin) and thus causing issue to load libmod_sm22.so. This normally resolved after load web agent environment variables
ie:
. ./ca_wa_env.sh
However, there are couple of ways to startup Apache include using httpd startup script or apachectl script that bundle with Apache. Some customer has their own Apache startup script and the startup script might overwritten the web agent environment variables set to the OS user.
For example, startup script (my-httpd) resided in init.d. Apache startup via
service my-httpd start
Make sure web agent environment variables loaded in startup script
ie:
. ./ca_wa_env.sh
Resolution 2:
Some installs of apache/linux have restricted list of environment variables that are passed through to the child httpd processes. In those cases you you need to set the Apache PassEnv directive so that apache will pass through the environment variables LD_LIBRARY_PATH and PATH as set by the ca_wa_env.sh script.
Edit httpd.conf and add :
PassEnv LD_LIBRARY_PATH PATH
Further Debugging:
If set web agent environment variables didn't help, try run strace to get more information:
strace -Ff -t -i -v -o strace.log -s 16384 <command>
where <command> is command to startup web server.