简体   繁体   中英

LoadModule weblogic_module */lib/mod_wl_24.so

I have a problem with Apache/2.4.17 (Unix) and the weblogic module (plugin) mod_wl_24.so

For this project I have used the httpd_vhosts.conf configuration under the extra directory (that I have enabled before in httpd.conf whith "Include conf/extra/httpd-vhosts.conf") and i have keep the default configurations in httpd.conf

I'm on arch-linux, but i think this is not relevant...

I download the right version of WL plugin and i had put the WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0 directory under the ServerRoot of apache:

/etc/httpd

    drwxr-xr-x   4 root root  4096  4 dic 18.24 .
    drwxr-xr-x 100 root root 12288  9 dic 09.57 ..
    drwxr-xr-x   5 root root  4096  9 dic 11.02 conf
    lrwxrwxrwx   1 root root    22 11 nov 17.33 modules -> /usr/lib/httpd/modules
    drwxr-xr-x   5 root root  4096  4 dic 12.48 WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0

when I configure the httpd_vhosts.conf in extra directory of apache for load the plugin:

LoadModule weblogic_module WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/mod_wl_24.so

and after restart apache, I receive this error:

systemctl status httpd -l

● httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since mer 2015-12-09 11:14:06 CET; 2h 23min ago
  Process: 4231 ExecStop=/usr/bin/apachectl graceful-stop (code=exited, status=1/FAILURE)
  Process: 4211 ExecStart=/usr/bin/apachectl start -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 4211 (code=exited, status=1/FAILURE)

dic 09 11:14:06 lollo-sorint systemd[1]: Stopped Apache Web Server.
dic 09 11:14:06 lollo-sorint systemd[1]: Started Apache Web Server.
dic 09 11:14:06 lollo-sorint apachectl[4211]: httpd: Syntax error on line 499 of /etc/httpd/conf/httpd.conf: Syntax error on line 26 of /etc/httpd/conf/extra/httpd-vhosts.conf: Cannot load WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/mod_wl_24.so into server: libopmnsecure.so: cannot open shared object file: No such file or directory
dic 09 11:14:06 lollo-sorint systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
dic 09 11:14:06 lollo-sorint apachectl[4231]: httpd: Syntax error on line 499 of /etc/httpd/conf/httpd.conf: Syntax error on line 26 of /etc/httpd/conf/extra/httpd-vhosts.conf: Cannot load WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/mod_wl_24.so into server: libopmnsecure.so: cannot open shared object file: No such file or directory
dic 09 11:14:06 lollo-sorint systemd[1]: httpd.service: Control process exited, code=exited status=1
dic 09 11:14:06 lollo-sorint systemd[1]: httpd.service: Unit entered failed state.
dic 09 11:14:06 lollo-sorint systemd[1]: httpd.service: Failed with result 'exit-code'.

I have correctly set the LD_LIBRARY_PATH on system for the lib directory of mod_wl_24.so:

ls -lrta WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/

-rwxr-x--- 1 root root   552424  6 ott 07.59 mod_wl.so
-rwxr-x--- 1 root root   553554  6 ott 07.59 mod_wl_24.so
-rwxr-x--- 1 root root 10535697  6 ott 07.59 libnnz11.so
-rwxr-x--- 1 root root    85909  6 ott 07.59 libopmnsecure.so
-rwxr-x--- 1 root root    67967  6 ott 07.59 libonssys.so
-rwxr-x--- 1 root root   326469  6 ott 07.59 libdms2.so
-rwxr-x--- 1 root root 52761218  6 ott 07.59 libclntsh.so
drwxr-xr-x 5 root root     4096  4 dic 12.48 ..
drwxr-xr-x 2 root root     4096  4 dic 17.15 .

env

LD_LIBRARY_PATH=/etc/httpd/WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib

ldd WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/mod_wl_24.so

    linux-vdso.so.1 (0x00007ffd173fb000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fe6f4178000)
    libopmnsecure.so => /etc/httpd/WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/libopmnsecure.so (0x00007fe6f3f68000)
    libonssys.so => /etc/httpd/WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/libonssys.so (0x00007fe6f3d5a000)
    libdms2.so => /etc/httpd/WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib/libdms2.so (0x00007fe6f3b19000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007fe6f381b000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fe6f3604000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007fe6f3260000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fe6f305c000)
    /usr/lib64/ld-linux-x86-64.so.2 (0x0000563b8fd02000)
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fe6f2e3e000)
    librt.so.1 => /usr/lib/librt.so.1 (0x00007fe6f2c36000)

So, libopmnsecure.so lib is defined and elaborate from system...

I'm little desperate because i can not find a logical explanation for that...

anyone had that such problem before? Any little help would be grateful :)

I have similar issue with Red Hat RHEL7 and apache 2.4.

For this kind of error

Cannot load .../lib/mod_wl_24.so into server: libonssys.so: cannot open shared object file: No such file or directory

Library libonssys.so is given with weblogic httpd module.

under

/etc/ld.so.conf.d/

create a file pluginWeblogic.conf valued with pathToWeblogicPlugin/lib

for this example valued file pluginWeblogic.conf with

/etc/httpd/WLSPlugin12.2.1-Apache2.2-Apache2.4-Linux_x86_64-12.2.1.0.0/lib

and on shell run :

ldconfig

then restart apache :

  systemctl restart httpd

I have found the problem,

The new system control "systemd" don't load the ENV LD_LIBRARY_PATH when i use the "systemctl restart httpd" command... i don't know why, but is clearly, because if i restart the apache with "apachectl restart" the mod_weblogic is load correctly

i hope this help anybody have this problem

Review the following file:

cat /usr/lib/systemd/system/httpd.service

Under [Service] it specifies the EnvironmentFile =/etc/sysconfig/httpd

Update the file /etc/sysconfig/httpd with the LD_LIBRARY_PATH to the Weblogic Plugin

vi /etc/sysconfig/httpd
# Update to include Weblogic Plugin 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/PATH/weblogic-plugins/lib
#

Restart Apache

systemctl stop httpd.service  ; 
systemctl start httpd.service ; 
systemctl status httpd.service

There's no need to set the LD_LIBRARY_PATH. You can simply update the LD_LIBRARY_PATH by copying the 'lib' contents to /usr/lib or /usr/lib64

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM