ASMCMD fails to start on module libnnz10.so, permission denied

本文介绍了在Oracle Linux 5.8环境下使用ASMCMD时遇到的启动失败问题及其解决方案。该问题主要由SELinux政策设置导致,在RHEL5和OEL5中尤为显著。文章提供了详细的步骤来调整SELinux模式以解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

10.2.0.5 on oracle linux 5.8使用asmcmd出现以下错误:

[oracle@sdb2 ~]$ export ORACLE_SID=+ASM1

[oracle@sdb2 ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

[oracle@sdb2 ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/asm


[oracle@sdb2 ~]$ asmcmd
install_driver(Oracle) failed: Can't load '/u01/app/oracle/product/10.2.0/asm/perl/lib/site_perl/5.8.3/i686-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: /u01/app/oracle/product/10.2.0/asm/lib32/libnnz10.so: cannot restore segment prot after reloc: Permission denied at /u01/app/oracle/product/10.2.0/asm/perl/lib/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229.
 at (eval 2) line 3
Compilation failed in require at (eval 2) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /u01/app/oracle/product/10.2.0/asm/bin/asmcmdcore line 5953


转到底部转到底部

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References


APPLIES TO:

Oracle Server Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7
This problem can occur on any platform.
ASM - Version: 11.1.0.6 to 11.1.0.7
Red Hat Advanced Server
Linux x86-64
RHEL 5 and OEL 5 only. RHEL 4 and OEL 4 are not affected. This is because of the more aggressive way that SELinux policies are enforced in RHEL 5 and OEL 5.

SYMPTOMS

Immediately after a successful ASM installation, ASMCMD will not start:

$ echo $ORACLE_HOME 
/opt/oracle/10.2.0 
$ export ORACLE_SID=+ASM 
$ asmcmd
install_driver(Oracle) failed: Can't load '/opt/oracle/10.2.0/perl/lib/site_perl/5.8.3/i686-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: /opt/oracle/10.2.0/lib32/libnnz10.so: cannot restore segment prot after reloc: Permission denied at /opt/oracle/10.2.0/perl/lib/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229. 
at (eval 2) line 3 
Compilation failed in require at (eval 2) line 3. 
Perhaps a required shared library or dll isn't installed where expected 
at /opt/oracle/10.2.0/bin/asmcmdcore line 5953

CHANGES

SELINUX policy "Enforcing" causes the permission problem.

CAUSE

You are encountering unpublished Bug 6140224, "SQLPLUS FAILS TO LOAD LIBNNZ11.SO WITH SELINUX ENABLED ON EL5/RHEL5". Oracle Developement is actively working on this compiler version compatibility issue (ICC compilers that are used for several libraries, such as LIBNNZ10.SO and LIBNNZ11.SO) in the RHEL 5 and OEL 5 environments. 


This is fixed in the forthcoming version 11.2. No fix is available for the current versions. Please use the workaround presented below.

SOLUTION


Switch the SELinux from the default "Enforcing" mode that it is running in, to the "Permissive" mode. 

Commands, as root: 
====================== 
getenforce (returns "Enforcing") 
setenforce 0 
getenforce (returns "Permissive") 

The commands for the workaround are immediate, and will remain in effect until the next reboot.

Please also ensure that SELinux "Permissive" enforcing is set at boot time by adding "enforcing=0" to the kernel boot line. An example of setting the SELinux mode to permissive from GRUB could be as follows: 

title Red Hat Enterprise Linux ES (2.6.18-8.EL) 
root (hd0,0) 
kernel /vmlinuz-2.6.18-8.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet enforcing=0 
initrd /initrd-2.6.18-8.EL.img

Another example as follows:

/etc/selinux/config 

and add: 
selinux=0 
SELINUX=disabled


For additional information about Red Hat SELinux, see: 
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/

REFERENCES

BUG:6342166 - DOCUMMENT SELINUX WORKAROUND FOR RHEL 5 / OEL 5 IN RELEASE NOTES
NOTE:454196.1 - ./sqlplus: error on libnnz11.so: cannot restore segment prot after reloc


### 解决 NTPdate 权限被拒问题 当 `ntpdate` 命令执行失败并报告权限被拒绝时,通常是因为系统安全策略阻止了该操作。具体原因可能涉及SELinux配置或防火墙设置。 #### SELinux 配置调整 如果 SELinux 正处于 enforcing 模式下运行,可能会阻止 `ntpdate` 的正常工作。为了验证这一点,可以临时切换到 permissive 模式来测试: ```bash setenforce 0 ``` 若此更改使得 `ntpdate` 可以正常使用,则表明问题是由于 SELinux 引起的。此时应考虑永久性地允许必要的网络连接行为而不是禁用 SELinux[^1]。 对于希望保持 SELinux enabled 的环境来说,可以通过添加适当的安全上下文规则来解决问题: ```bash semanage port -a -t ntp_port_t -p udp 123 ``` 这会告诉 SELinux 允许通过 UDP 端口 123 进行的时间协议通信。 #### 修改防火墙设置 另一个常见原因是防火墙未开放所需端口 (UDP 123),即使本地机器能够访问互联网也可能无法与其他 NTP 服务器建立联系。因此建议确认防火墙状态,并确保已正确打开相应端口: ```bash firewall-cmd --zone=public --add-port=123/udp --permanent firewall-cmd --reload ``` 上述命令将把 UDP 123 添加至公共区域中的持久化规则列表里,并重新加载配置使改动生效[^3]。 #### 用户权限不足 最后还需注意的是,某些情况下普通用户账户确实缺乏足够的权限去更新系统时间。在这种情形下,请尝试使用超级用户身份重试命令: ```bash sudo ntpdate pool.ntp.org ``` 这样就可以绕过任何潜在的身份验证障碍[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值