I would like to monitor and eventually execute some commands from another machine where I've installed the latest (at the moment of this post of course) available Enterprise Manager Cloud Console 12c that is Oracle Enterprise Manager Cloud Control 12c Release 3 Plug-in Update 1 (12.1.0.3) which contains the original 12c Release 3 (12.1.0.3) software binaries along with a few new plug-ins and updated plug-in versions.
I would like to compare the easy way to manage a Real Application Clusters from a GUI solution against the classic command line interface (CLI).
After I successfully deployed the agents from my Enterprise Manager Clod Control machine to the two target RAC nodes whenever I tried to perform some operations they resulted in the following error:
ERROR: NMO not setuid-root (Unix-only)
The following steps helped me to solve the problem.
On my nodes (demorac01 and demorac02) I created a local directory where EMCC deployed the agent. Let's have a look at the content of that directory in the second node:
[oracle@demorac02 agent12cr3]$ pwd /u01/app/oracle/agent12cr3 [oracle@demorac02 agent12cr3]$ ll total 28 -rw-rw-r-- 1 oracle oinstall 178 Jun 22 2013 agentimage.properties drwxr-xr-x 6 oracle oinstall 4096 Feb 15 10:36 agent_inst drwxr-xr-x 3 oracle oinstall 4096 Feb 14 10:34 core drwxr-xr-x 13 oracle oinstall 4096 Feb 14 23:04 plugins -rwxr-xr-x 1 oracle oinstall 449 Feb 14 10:32 plugins.txt -rw-r--r-- 1 oracle oinstall 599 Feb 14 10:38 plugins.txt.status drwxr-xr-x 5 oracle oinstall 4096 Feb 14 10:36 sbinInside the sbin directory there are other files that according to the Oracle documentations should be owned by root. During my local deploy they were set up to be owned by oracle user instead.
[oracle@demorac02 agent12cr3]$ cd sbin [oracle@demorac02 sbin]$ ll total 1372 drwxr-xr-x 3 oracle oinstall 4096 Feb 14 10:36 cfgtoollogs drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 install drwxrwx--- 11 oracle oinstall 4096 Jun 22 2013 inventory -rwxr-xr-x 1 oracle oinstall 22754 Jun 22 2013 nmb.0 -rwxr-xr-x 1 oracle oinstall 43494 Jun 22 2013 nmgsshe -rwxr-xr-x 1 oracle oinstall 43494 Jun 22 2013 nmgsshe.0 -rwxr-xr-x 1 oracle oinstall 57835 Jun 22 2013 nmhs.0 -rwxr-xr-x 1 oracle oinstall 40007 Jun 22 2013 nmo.0 -rwxr-xr-x 1 oracle oinstall 585242 Jun 22 2013 nmosudo -rwxr-xr-x 1 oracle oinstall 585242 Jun 22 2013 nmosudo.0 -rw-r----- 1 oracle oinstall 56 Jan 26 16:41 oraInst.locBefore proceding with the solution adopted just note that the agent was running and collecting all the available info from the RAC node as you can see from the command below:
[oracle@demorac02 sbin]$ cd /u01/app/oracle/agent12cr3/core/12.1.0.3.0/bin [oracle@demorac02 bin]$ ./emctl status agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Agent Version : 12.1.0.3.0 OMS Version : 12.1.0.3.0 Protocol Version : 12.1.0.1.0 Agent Home : /u01/app/oracle/agent12cr3/agent_inst Agent Binaries : /u01/app/oracle/agent12cr3/core/12.1.0.3.0 Agent Process ID : 21139 Parent Process ID : 21096 Agent URL : https://192.168.56.102:3872/emd/main/ Repository URL : https://emcc.example.com:4900/empbs/upload Started at : 2014-02-14 10:39:20 Started by user : oracle Last Reload : (none) Last successful upload : 2014-02-15 10:30:47 Last attempted upload : 2014-02-15 10:30:47 Total Megabytes of XML files uploaded so far : 1.3 Number of XML files pending upload : 0 Size of XML files pending upload(MB) : 0 Available disk space on upload filesystem : 29.49% Collection Status : Collections enabled Heartbeat Status : Ok Last attempted heartbeat to OMS : 2014-02-15 10:35:48 Last successful heartbeat to OMS : 2014-02-15 10:35:48 Next scheduled heartbeat to OMS : 2014-02-15 10:36:48 --------------------------------------------------------------- Agent is Running and ReadyTo correct the permissions on the desired files you have to run again the file root.sh located under the software location of the Enterprise Manager Cloud Control.
[oracle@demorac02 sbin]$ su - Password: [root@demorac02 ~]# cd /u01/app/oracle/agent12cr3/core/12.1.0.3.0/ [root@demorac02 12.1.0.3.0]# ll total 180 drwxr-xr-x 4 oracle oinstall 4096 Jun 22 2013 archives drwxr-xr-x 2 oracle oinstall 4096 Feb 14 10:36 bin drwxr-xr-x 6 oracle oinstall 4096 Feb 14 10:39 cfgtoollogs drwxr-xr-x 6 oracle oinstall 4096 Jun 22 2013 common drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 diagnostics -rw-r----- 1 oracle oinstall 430 Apr 7 2008 dummy.ic.linux.txt -rw-r----- 1 oracle oinstall 412 Apr 7 2008 dummy.ic.txt drwxrwxr-x 3 oracle oinstall 4096 Jun 22 2013 EMStage drwxr-xr-x 6 oracle oinstall 4096 Feb 14 10:36 install drwxr-xr-x 2 oracle oinstall 4096 Jun 22 2013 instantclient drwxrwx--- 14 oracle oinstall 4096 Jun 22 2013 inventory drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 jdbc drwxr-xr-x 6 oracle oinstall 4096 Feb 14 10:34 jdk drwxr-xr-x 2 oracle oinstall 4096 Feb 14 10:34 jlib drwxr-xr-x 2 oracle oinstall 4096 Jun 22 2013 js drwxr-xr-x 2 oracle oinstall 4096 Jun 22 2013 jythonLib drwxr-xr-x 5 oracle oinstall 4096 Jun 22 2013 ldap drwxr-xr-x 4 oracle oinstall 4096 Jun 22 2013 lib drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 lib32 drwxr-xr-x 4 oracle oinstall 4096 Jun 22 2013 modules drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 network drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 ocm drwxr-xr-x 10 oracle oinstall 4096 Feb 14 10:35 OPatch drwxr-xr-x 7 oracle oinstall 4096 Jun 22 2013 opmn -rw-r----- 1 oracle oinstall 56 Jan 26 16:41 oraInst.loc drwxr-xr-x 7 oracle oinstall 4096 Feb 14 10:35 oui drwxr-xr-x 5 oracle oinstall 4096 Feb 14 10:35 perl drwxr-xr-x 2 oracle oinstall 4096 Jun 22 2013 prereqs drwxr-xr-x 10 oracle oinstall 4096 Jun 22 2013 rda drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 relnotes -rwxr-xr-x 1 oracle oinstall 1991 Feb 14 10:35 replacebins.sh -rwxr-xr-x 1 oracle oinstall 1986 Jun 22 2013 replacebins.sh.ouibak -rwxr-xr-x 1 oracle oinstall 1968 Jun 20 2012 replacebins.sh.template -rw-r--r-- 1 oracle oinstall 1968 Jun 20 2012 replacebins.sh.template.ouibak -rwxr-xr-x 1 oracle oinstall 4079 Feb 14 10:35 root.sh -rwxr-xr-x 1 oracle oinstall 3933 Jun 22 2013 root.sh.old -rwxr-x--- 1 oracle oinstall 10 Feb 14 10:34 root.sh.old.1 -rwxr-x--- 1 oracle oinstall 10 Feb 14 10:35 root.sh.ouibak -rwxr-xr-x 1 oracle oinstall 3874 Feb 14 10:35 root.sh.template -rw-r--r-- 1 oracle oinstall 3869 Jun 22 2013 root.sh.template.ouibak drwxr-xr-x 5 oracle oinstall 4096 Jun 22 2013 stage drwxr-xr-x 6 oracle oinstall 4096 Jun 22 2013 sysman drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 ucp drwxr-xr-x 5 oracle oinstall 4096 Jun 22 2013 xdk drwxr-xr-x 2 oracle oinstall 4096 Jun 22 2013 xsdsThat file needs to be run as root user too.
[root@demorac02 12.1.0.3.0]# ./root.sh Finished product-specific root actions. /etc exist Creating /etc/oragchomelist file... Finished product-specific root actions.Now if you go again under the previous sbin directory you can see that the owner is changed:
[root@demorac02 12.1.0.3.0]# cd /u01/app/oracle/agent12cr3/sbin/ [root@demorac02 sbin]# ll total 1496 drwxr-xr-x 3 oracle oinstall 4096 Feb 14 10:36 cfgtoollogs drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 install drwxrwx--- 11 oracle oinstall 4096 Jun 22 2013 inventory -rws--x--- 1 root oinstall 22754 Feb 15 10:48 nmb -rwxr-xr-x 1 oracle oinstall 22754 Jun 22 2013 nmb.0 -rwxr-xr-x 1 root oinstall 43494 Feb 15 10:48 nmgsshe -rwxr-xr-x 1 oracle oinstall 43494 Jun 22 2013 nmgsshe.0 -rws--x--- 1 root oinstall 57835 Feb 15 10:48 nmhs -rwxr-xr-x 1 oracle oinstall 57835 Jun 22 2013 nmhs.0 -rws--x--- 1 root oinstall 40007 Feb 15 10:48 nmo -rwxr-xr-x 1 oracle oinstall 40007 Jun 22 2013 nmo.0 -rwxr-xr-x 1 root oinstall 585242 Feb 15 10:48 nmosudo -rwxr-xr-x 1 oracle oinstall 585242 Jun 22 2013 nmosudo.0 -rw-r----- 1 oracle oinstall 56 Jan 26 16:41 oraInst.locIt's time to bounce the agent so the new settings could be used by the Enterprise Manager Clod Control during its operations. You must stop and start the agent as oracle user.
[oracle@demorac02 bin]$ id uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),492(vboxsf),54322(dba) [oracle@demorac02 bin]$ pwd /u01/app/oracle/agent12cr3/core/12.1.0.3.0/bin [oracle@demorac02 bin]$ ./emctl stop agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. Stopping agent ..... stopped. [oracle@demorac02 bin]$ ./emctl start agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. Starting agent ............................................................................... started. [oracle@demorac02 bin]$ ./emctl status agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Agent Version : 12.1.0.3.0 OMS Version : 12.1.0.3.0 Protocol Version : 12.1.0.1.0 Agent Home : /u01/app/oracle/agent12cr3/agent_inst Agent Binaries : /u01/app/oracle/agent12cr3/core/12.1.0.3.0 Agent Process ID : 11011 Parent Process ID : 10961 Agent URL : https://192.168.56.102:3872/emd/main/ Repository URL : https://emcc.example.com:4900/empbs/upload Started at : 2014-02-15 10:51:36 Started by user : oracle Last Reload : (none) Last successful upload : 2014-02-15 10:53:23 Last attempted upload : 2014-02-15 10:53:23 Total Megabytes of XML files uploaded so far : 0.01 Number of XML files pending upload : 0 Size of XML files pending upload(MB) : 0 Available disk space on upload filesystem : 29.48% Collection Status : Collections enabled Heartbeat Status : Ok Last attempted heartbeat to OMS : 2014-02-15 10:55:37 Last successful heartbeat to OMS : 2014-02-15 10:55:37 Next scheduled heartbeat to OMS : 2014-02-15 10:56:38 --------------------------------------------------------------- Agent is Running and ReadyI have a RAC with two nodes so the same steps need to be executed on the other node, demorac01 in my case. Here there are the wrong settings before running the root.sh script.
[oracle@demorac01 sbin]$ pwd /u01/app/oracle/agent12cr3/sbin [oracle@demorac01 sbin]$ ll total 1372 drwxr-xr-x 3 oracle oinstall 4096 Feb 14 10:21 cfgtoollogs drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 install drwxrwx--- 11 oracle oinstall 4096 Jun 22 2013 inventory -rwxr-xr-x 1 oracle oinstall 22754 Jun 22 2013 nmb.0 -rwxr-xr-x 1 oracle oinstall 43494 Jun 22 2013 nmgsshe -rwxr-xr-x 1 oracle oinstall 43494 Jun 22 2013 nmgsshe.0 -rwxr-xr-x 1 oracle oinstall 57835 Jun 22 2013 nmhs.0 -rwxr-xr-x 1 oracle oinstall 40007 Jun 22 2013 nmo.0 -rwxr-xr-x 1 oracle oinstall 585242 Jun 22 2013 nmosudo -rwxr-xr-x 1 oracle oinstall 585242 Jun 22 2013 nmosudo.0 -rw-r----- 1 oracle oinstall 56 Jan 26 16:41 oraInst.locRun the root.sh script on demorac01 as root user.
[oracle@demorac01 sbin]$ su - Password: [root@demorac01 ~]# cd /u01/app/oracle/agent12cr3/core/12.1.0.3.0/ [root@demorac01 12.1.0.3.0]# ./root.sh Finished product-specific root actions. /etc exist Creating /etc/oragchomelist file... Finished product-specific root actions.Let's check the new settings.
[root@demorac01 12.1.0.3.0]# cd ../../sbin/ [root@demorac01 sbin]# ll total 1496 drwxr-xr-x 3 oracle oinstall 4096 Feb 14 10:21 cfgtoollogs drwxr-xr-x 3 oracle oinstall 4096 Jun 22 2013 install drwxrwx--- 11 oracle oinstall 4096 Jun 22 2013 inventory -rws--x--- 1 root oinstall 22754 Feb 15 10:54 nmb -rwxr-xr-x 1 oracle oinstall 22754 Jun 22 2013 nmb.0 -rwxr-xr-x 1 root oinstall 43494 Feb 15 10:54 nmgsshe -rwxr-xr-x 1 oracle oinstall 43494 Jun 22 2013 nmgsshe.0 -rws--x--- 1 root oinstall 57835 Feb 15 10:54 nmhs -rwxr-xr-x 1 oracle oinstall 57835 Jun 22 2013 nmhs.0 -rws--x--- 1 root oinstall 40007 Feb 15 10:54 nmo -rwxr-xr-x 1 oracle oinstall 40007 Jun 22 2013 nmo.0 -rwxr-xr-x 1 root oinstall 585242 Feb 15 10:54 nmosudo -rwxr-xr-x 1 oracle oinstall 585242 Jun 22 2013 nmosudo.0 -rw-r----- 1 oracle oinstall 56 Jan 26 16:41 oraInst.locBounce the agent on demorac01: stop and start it as oracle user.
[root@demorac01 sbin]# logout [oracle@demorac01 sbin]$ cd ../core/12.1.0.3.0/bin/ [oracle@demorac01 bin]$ ./emctl stop agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. Stopping agent ..... stopped. [oracle@demorac01 bin]$ ./emctl start agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. Starting agent .......................................................... started.Let's check the agent status.
[oracle@demorac01 bin]$ ./emctl status agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Agent Version : 12.1.0.3.0 OMS Version : 12.1.0.3.0 Protocol Version : 12.1.0.1.0 Agent Home : /u01/app/oracle/agent12cr3/agent_inst Agent Binaries : /u01/app/oracle/agent12cr3/core/12.1.0.3.0 Agent Process ID : 13377 Parent Process ID : 13332 Agent URL : https://192.168.56.101:3872/emd/main/ Repository URL : https://emcc.example.com:4900/empbs/upload Started at : 2014-02-15 10:56:16 Started by user : oracle Last Reload : (none) Last successful upload : 2014-02-15 10:57:01 Last attempted upload : 2014-02-15 10:57:01 Total Megabytes of XML files uploaded so far : 0 Number of XML files pending upload : 0 Size of XML files pending upload(MB) : 0 Available disk space on upload filesystem : 21.39% Collection Status : Collections enabled Heartbeat Status : Ok Last attempted heartbeat to OMS : 2014-02-15 10:57:00 Last successful heartbeat to OMS : 2014-02-15 10:57:00 Next scheduled heartbeat to OMS : 2014-02-15 10:58:01 --------------------------------------------------------------- Agent is Running and ReadySo both agents are now running again on the RAC nodes. Let's verify that I solved my issue directly from the Enterprise Manager Cloud Control: the error "NMO not setuid-root (Unix-only)" was thrown the first time when I tried to start up a pluggable database.
Let's do the same step again. Here is the current situation: a CDB in open mode and the pluggable database PDB001 not open.
Click on the target name link named "DEMO.demorac_PDB001". It will open the following screenshot and information: "Database is not open. Regions that fetch real-time data from target database will not be displayed"
So I want to open that PDB. Point your mouse over "Oracle Database" menu, then "Control" and finally "Open/Close Pluggable Database".
Give the credentials to access the remote Oracle database.
It seems to work because the Enterprise Manager Cloud Console is currently showing a new page.
Because I want to open the pluggable database PDB001 on both the available instances I select both instances using the CTRL button, and then clicked on "Open" from the Action menu.
A new browser page will show the status of the operation in progress.
When the operation terminates successfully the "Open/Close Pluggable Database" page will show that the status of the pluggable database PDB001 is now OPEN.
Clicking on the target link of the pluggable database named "DEMO.demorac_PDB001" will show new activities are performed and so collected from the agent.
That's all.