Configuration problem with weblogic connector module mod_wl_24 and apache 2.4.6

After using apache and weblogic for more than 10 years(the last working module used is: mod_wl_22), I am ready to set up a replacement system with the newer version of the connector module (mod_wl_24) for our production.

I follow the official documentation from this link:

https://docs.oracle.com/middleware/1221/webtier/develop-plugin/apache.htm#PLGWL395

The server OS is:
root@server90 ~]# uname -a
Linux server90 4.1.12-94.3.9.el7uek.x86_64 #2 SMP Fri Jul 14 20:09:40 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux

Open in new window

Apache version:
[root@server90 ~]# apachectl -version
Server version: Apache/2.4.6 ()
Server built:   Oct 19 2017 14:54:33

Open in new window

APACHE_HOME folder details
[root@server90 httpd]# pwd
/etc/httpd
[root@server90 httpd]# ll
total 8
drwxr-xr-x 2 root root   58 Mar 10 21:58 conf
drwxr-xr-x 2 root root  103 Mar 10 21:56 conf.d
drwxr-xr-x 2 root root 4096 Mar 10 21:42 conf.modules.d
drwxr-xr-x 2 root root 4096 Mar 11 15:31 lib
lrwxrwxrwx 1 root root   19 Feb 22 16:32 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root   29 Feb 22 16:32 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx 1 root root   10 Feb 22 16:32 run -> /run/httpd
[root@server90 httpd]# 

Open in new window

I created a lib folder at the APACHE_HOME folder and copy all the lib files and this connection module(downloaded from Apache foundation website) into this folder
[root@server90 httpd]# cd lib/
[root@server90 lib]# ll
total 138808
-rwxr-xr-x 1 root root  6990875 Mar 10 21:00 libclntshcore.so
-rwxr-xr-x 1 root root  6990875 Mar 10 21:00 libclntshcore.so.12.1
-rwxr-xr-x 1 root root 58793741 Mar 10 21:00 libclntsh.so
-rwxr-xr-x 1 root root 58793741 Mar 10 21:00 libclntsh.so.12.1
-rwxr-xr-x 1 root root   409107 Mar 10 21:00 libdms2.so
-rwxr-xr-x 1 root root  1768370 Mar 10 21:00 libipc1.so
-rwxr-xr-x 1 root root   544150 Mar 10 21:00 libmql1.so
-rwxr-xr-x 1 root root  6747034 Mar 10 21:00 libnnz12.so
-rwxr-xr-x 1 root root   346242 Mar 10 21:00 libons.so
-rwxr-xr-x 1 root root    98521 Mar 10 21:00 libonsssl.so
-rwxr-xr-x 1 root root    72281 Mar 10 21:00 libonssys.so
-rwxr-xr-x 1 root root   567319 Mar 11 15:24 mod_wl_24.so
[root@server90 lib]# 

Open in new window

After that, I added directive for loading the module  into the $APACHE_HOME/conf/httpd.conf file:
[root@server90 httpd]# cd conf
[root@server90 conf]# ll
total 36
-rw-r--r-- 1 root root 11814 Mar 11 00:49 httpd.conf
-rw-r--r-- 1 root root 13077 Oct 19 17:55 magic
-rw-r--r-- 1 root root  4104 Mar 10 21:58 weblogic.conf
[root@server90 conf]# cat httpd.conf 
LoadModule weblogic_module /etc/httpd/lib/mod_wl_24.so

Open in new window

Then verify if this apache web server has included the dynamic sharing module: mod_so.c
[root@server90 conf]# apachectl -l
Compiled in modules:
  core.c
  mod_so.c
  http_core.c
[root@server90 conf]# 

Open in new window

the next step is to try to test the syntax of httpd.conf:
[root@server90 conf]# apachectl -t
httpd: Syntax error on line 355 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_wl_24.so into server: libonssys.so: cannot open shared object file: No such file or directory
[root@server90 conf]# 

Open in new window

it shows some error message:
[root@server90 lib]# systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2018-03-11 15:31:52 EDT; 21s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 24595 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 24591 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 24591 (code=exited, status=1/FAILURE)
Mar 11 15:31:52 server90 systemd[1]: Starting The Apache HTTP Server...
Mar 11 15:31:52 server90 httpd[24591]: httpd: Syntax error on line 355 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/lib/mod_wl_24.so into server: libonssys.so: cannot open shared object file: No such file or directory
Mar 11 15:31:52 server90 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 11 15:31:52 server90 kill[24595]: kill: cannot find process ""
Mar 11 15:31:52 server90 systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 11 15:31:52 server90 systemd[1]: Failed to start The Apache HTTP Server.
Mar 11 15:31:52 server90 systemd[1]: Unit httpd.service entered failed state.
Mar 11 15:31:52 server90 systemd[1]: httpd.service failed.

Open in new window

I realize I forgot to export the library path, export the path below and try again
[root@server90 conf]# export LD_LIBRARY_PATH=/etc/httpd/lib
[root@server90 conf]# apachectl -t
Syntax OK
[root@server90 conf]# 

Open in new window

I also tried to move the mod_wl_24.so module to the folder of the apache modules though this dose not make any differences
[root@server90 conf]#mv /etc/httpd/lib/mod_wl_24.so /etc/httpd/modules/

[root@server90 conf]# cd ../modules/
[root@server90 modules]# ll
.......
-rwxr-xr-x 1 root root  11104 Oct 19 17:55 mod_version.so
-rwxr-xr-x 1 root root  15280 Oct 19 17:55 mod_vhost_alias.so
-rwxr-xr-x 1 root root  19472 Oct 19 17:55 mod_watchdog.so
-rwxr-xr-x 1 root root 567319 Mar 11 15:24 mod_wl_24.so
[root@server90 modules]# 

Open in new window

verify the httpd.conf again:
[root@server90 ~]# apachectl -t
Syntax OK

Open in new window

everything looks good so far, then trying to start the apache web server:
[root@server90 conf]# apachectl start
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@server90 conf]# systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2018-03-12 01:21:16 EDT; 23s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 26974 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 26970 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 26970 (code=exited, status=1/FAILURE)

Mar 12 01:21:16 server90 systemd[1]: Starting The Apache HTTP Server...
Mar 12 01:21:16 server90 httpd[26970]: httpd: Syntax error on line 355 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_wl_24.so into server: libonssys.so: cannot open shared object file: No such file or directory
Mar 12 01:21:16 server90 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 12 01:21:16 server90 kill[26974]: kill: cannot find process ""
Mar 12 01:21:16 server90 systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 12 01:21:16 server90 systemd[1]: Failed to start The Apache HTTP Server.
Mar 12 01:21:16 server90 systemd[1]: Unit httpd.service entered failed state.
Mar 12 01:21:16 server90 systemd[1]: httpd.service failed.
[root@server90 conf]# 

Open in new window

I tried to search around for answers but nothing really helpful:

https://blogbyjagan.blogspot.com/2016/12/cannot-load-etchttpdmodulesmodwl24so.html

https://stackoverflow.com/questions/48125324/centos-7-apache-httpd-can-not-load-weblogic-plug-library

https://grepora.com/2016/07/23/apache-2-4-with-port-redirect-to-weblogic-12c/

 Can anybody help to find where the problem is?
Arthur WangAsked:
Who is Participating?
 
Arthur WangConnect With a Mentor Author Commented:
After two weeks of waiting for help, no answers at all, but find one of the answers on this page though it's not marked to the correct answer:

https://stackoverflow.com/questions/34179316/loadmodule-weblogic-module-lib-mod-wl-24-so

"need to create (weblogic's).so library in /usr/lib
ln -s /etc/httpd/weblogic-plugins/libopmnsecure.so /usr/lib
ln -s /etc/httpd/weblogic-plugins/libonssys.so /usr/lib
ln -s /etc/httpd/weblogic-plugins/libdms2.so /usr/lib
ldconfig "

then I just tried and it's working, I have to soft link all the weblogic plugin library so files into the /usr/lib.  
Now i am able to start the apache server without any problem, but still don't understand why I have to do it this way. there are so many .so files in the lib folder, why just these three need to be linked? can anybody explain to me?
0
 
Arthur WangAuthor Commented:
since my problem has been solved, no need to keep hanging this question here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.