This discussion is archived
9 Replies Latest reply: Nov 10, 2010 7:59 AM by 812407 RSS

lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2

626620 Newbie
Currently Being Moderated
I just installed Oracle 11.2 on Redhat linux 2.6.18-92.el5. Everything appear to be OK. Both the instanec and the listener are up running.

But when I ran lsnrctl I get error
[oracle@cchbi ~]$ lsnrctl
lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: 
cannot restore segment prot after reloc: Permission denied
I also get the same error when run sqlplus

Check the library file
[oracle@cchbi lib]$ ll /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
-rwxr-xr-x 1 oracle oinstall 47M Apr  9 01:54 /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
I searched the forum and find thread with a similar error
lsnrctl error(error while loading shared libraries)
The error there is 
lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.1.0/db _1/lib/libclntsh.so11.1: 
cannot restore segment prot after reloc: Permission denied.
It was solved by setting SELINUX=permissive in /etc/selinux/config file.

I followed the suite but it does not work here. The error is about the same library file. The only different is that we are Oracle 11.2.

What is going wrong?
  • 1. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    SalmanQureshi Expert
    Currently Being Moderated
    Hi,
    Also check the fire wall setting of your server and disable the firewall if enabled.

    http://www.cyberciti.biz/faq/disable-linux-firewall-under-centos-rhel-fedora/

    Salman
  • 2. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    626620 Newbie
    Currently Being Moderated
    Thanks. I checked the firewall setting. It is disabled.

    I saw something in id output, that may be resiponsible.
    [root@cchbi dbhome_1]# cat /etc/passwd|grep oracle
    oracle:x:500:501:oracle user:/home/oracle:/bin/bash
    [root@cchbi dbhome_1]# id oracle
    uid=500(oracle) gid=501(oinstall) groups=501(oinstall),50(ftp),502(dba) context=user_u:system_r:unconfined_t
    I do not expect to see the 'context=user_u:system_r:unconfined_t' at the end. Does it cause the problem? How to get rid of them? They are not in the /etc/passwd file
  • 3. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    sb92075 Guru
    Currently Being Moderated
    post results from following command


    env | sort
  • 4. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    626620 Newbie
    Currently Being Moderated
    Solved. The server box was set to SELinux permissive. I disabled it and now Oracle works.

    Thanks for help.
  • 5. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    455440 Newbie
    Currently Being Moderated
    Hi,

    I have also got the same error.
    What is this "SELinux permissive"?
    How to check for it and disable it?


    Thanks,
    KK
  • 6. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    530897 Explorer
    Currently Being Moderated
    Kishore KVR wrote:
    Hi,

    I have also got the same error.
    What is this "SELinux permissive"?
    How to check for it and disable it?
    You can use the command getenforce to see the current mode of SELinux. To disable SELinux temporarily you can use the command setenforce Permissive. In permissive mode the denials will still occur and will be logged but the operations will not be blocked. Permissive mode is the recommend mode by Oracle Support.

    Setting the mode with setenforce command above will not survive a reboot. If you would like to change the mode permanently see the following link.

    http://www.oracledistilled.com/oracle-database/troubleshooting/error-cannot-restore-segment-prot-after-reloc-permission-denied/
  • 7. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    RenjithMadhavan Journeyer
    Currently Being Moderated
    The sestatus command provides a configurable view into the status of SELinux. The simplest form of this command shows the following information:

    [root@localhost ~]# sestatus
    SELinux status: enabled
    SELinuxfs mount: /selinux
    Current mode: enforcing
    Mode from config file: enforcing
    Policy version: 21
    Policy from config file: targeted

    You can enable and disable SELinux enforcement at runtime or configure it to start in the correct mode at boot time, using the command line or GUI. SELinux can operate in one of three modes: disabled, meaning not enabled in the kernel; permissive, meaning SELinux is running and logging but not controlling permissions; or enforcing, meaning SELinux is running and enforcing policy.

    Use the setenforce command to change between permissive and enforcing modes at runtime. Use setenforce 0 to enter permissive mode; use setenforce 1 to enter enforcing mode.
  • 8. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    user9942601 Explorer
    Currently Being Moderated
    I had similar problem when starting sqlplus.

    This link really helped.
    http://www.oracledistilled.com/oracle-database/troubleshooting/error-cannot-restore-segment-prot-after-reloc-permission-denied/
    I also made changes in grub.conf.

    Thanks for the solution.
  • 9. Re: lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2
    812407 Newbie
    Currently Being Moderated
    I got the same error. However, I would advise against disabling SELinux. It's a security feature.

    I happen to be running a default installation of the GNOME desktop in Oracle Linux 5.5. Consequently, when the error occurred, an SELinux alert appeared in GNOME's notification area.

    The SELinux alert describes a targeted workaround to prevent this particular error. The error is due to a bug which I believe has already been reported. The full workaround which worked for me is as follows:

    - Click OK to dismiss the installer's error message, but don't close the installer.

    - Open a new terminal session for the oracle user.

    - Apply the suggested workaround from the SELinux alert (note that the path may differ in your case):

    $ chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libcnltsh.so.11.1

    - In the installer, click Retry to retry the Oracle Net Configuration Assistant step.

    The installation ran to completion, and I was then able to connect to Enterprise Manager using the following URL. Note that it's https (rather than http, as was printed in Section 12 of the Quick Installation Guide for Linux x86_64):

    http://localhost:1158/em/

    If anybody sees a problem with this workaround, please post a correction. Otherwise, enjoy your new Oracle installation!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points