Oracle 企业管理器错误 - NMO setuid (root)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23177234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:19:47  来源:igfitidea点击:

Oracle Enterprise Manager Error - NMO setuid (root)

oraclesetuid

提问by user3041770

I've been trying for days to fix the "Connection to host as user SYSDBA failed.ERROR: NMO not setuid-root (Unix-only)".

几天来我一直在尝试修复“以用户 SYSDBA 身份连接到主机失败。错误:NMO not setuid-root(仅限 Unix)”。

All, without exception, of the blogs I visited, say that in order to fix the issue, it's only needed to run the root.sh script as root, where script path is $ORACLE_HOME. I did that during Oracle Grid and Database install as requested, but re-run to make sure.

无一例外,我访问过的所有博客都说,为了解决这个问题,只需要以 root 身份运行 root.sh 脚本,其中脚本路径是 $ORACLE_HOME。我按照要求在 Oracle Grid 和 Database 安装期间这样做了,但重新运行以确保。

If i list the permissions of nmo and nmb binary files after running the root.sh, i get:

如果我在运行 root.sh 后列出 nmo 和 nmb 二进制文件的权限,我会得到:

ls -la ./nm? -rws--x--- 1 root oinstall 34166 Apr 16 02:10 ./nmb -rws--x--- 1 root oinstall 44437 Apr 16 02:05 ./nmo

ls -la ./nm? -rws--x--- 1 root oinstall 34166 Apr 16 02:10 ./nmb -rws--x--- 1 root oinstall 44437 Apr 16 02:05 ./nmo

After following tutorials, i did: chown root nmo chmod 6750 nmo chown root nmb chmmod 6750 nmb

按照教程之后,我做了: chown root nmo chmod 6750 nmo chown root nmb chmmod 6750 nmb

permissions went like so:

权限是这样的:

ls -la ./nm? -rwsr-s--- 1 root oinstall 34166 Apr 16 02:10 ./nmb -rwsr-s--- 1 root oinstall 44437 Apr 16 02:05 ./nmo

ls -la ./nm? -rwsr-s--- 1 root oinstall 34166 Apr 16 02:10 ./nmb -rwsr-s--- 1 root oinstall 44437 Apr 16 02:05 ./nmo

Above permissions are according to what most blogs said they should be like. SO I relaunched EM:

以上权限是根据大多数博客所说的。所以我重新启动了 EM:

emctl stop dbconsole emctl start dbconsole

emctl 停止 dbconsole emctl 启动 dbconsole

and Still got the error. I am almost performing a fresh install of Grid and Database, because I repeated the procedures multiple times, backed up /etc/oratab, deleted it and re run root.sh (so it could recreate oratab and fix possible mistakes).

仍然有错误。我几乎正在执行网格和数据库的全新安装,因为我多次重复这些过程,备份 /etc/oratab,将其删除并重新运行 root.sh(因此它可以重新创建 oratab 并修复可能的错误)。

I installed everything following the documentation, opened root.sh and referenced scripts so I could read them, but found nothing suspect.

我按照文档安装了所有内容,打开了 root.sh 并引用了脚本,以便我可以阅读它们,但没有发现任何可疑之处。

My EM version is 11.2.0.3.0

我的EM版本是11.2.0.3.0

I am running Oracle Linux under VirtualBox.

我在 VirtualBox 下运行 Oracle Linux。

AGAIN: I've executed the root.sh as suggested in 99% of the websites regarding the setuid nmo error... Any clues or different procedures?

再次:我已经按照 99% 的网站中关于 setuid nmo 错误的建议执行了 root.sh ......任何线索或不同的程序?

Thanks.

谢谢。

采纳答案by Mark J. Bobak

Check if the filesystem that $ORACLE_HOME is in, is mounted with the nosuidoption. If it is, that will prevent any executable running as root, even if SUID bit is set.

检查 $ORACLE_HOME 所在的文件系统是否使用该nosuid选项挂载。如果是,即使设置了 SUID 位,也会阻止任何以 root 身份运行的可执行文件。

Hope that helps.

希望有帮助。

回答by senanqerib

Execute root.sh script in $ORACLE_HOME directory as root user:

以 root 用户身份在 $ORACLE_HOME 目录中执行 root.sh 脚本:

For example:

例如:

sh /opt/oracle/product/11g/root.sh

sh /opt/oracle/product/11g/root.sh

回答by user1623624

Beside root.sh. You might run into my case.

在 root.sh 旁边。你可能会遇到我的情况。

Got the similar problem and found out the error came from inadequate swap space. My swap is low and run down to 300MB, this problem "Failed to launch process: Cannot run program "/opt/OEMAgent/sbin/nmo" (in directory /opt/OEMAgent/agent_inst/bin"): error=12, Not enough space" suddenly shows up.

遇到了类似的问题,发现错误来自交换空间不足。我的交换很低,运行到 300MB,这个问题“无法启动进程:无法运行程序“/opt/OEMAgent/sbin/nmo”(在目录/opt/OEMAgent/agent_inst/bin 中):错误=12,不是足够的空间”突然出现。

It goes away immediately after adding additional swap space.

添加额外的交换空间后,它会立即消失。