PRCT-1011 during srvctl add service

Today I’ve came across strange error related to srvctl add service.


$ srvctl add service -d db -s SERVICE_NAME -preferred INST1,INST2
PRCR-1006 : Failed to add resource ora.db.db_service.svc for SERVICE_NAME
PRCT-1011 : Failed to run "osdbagrp". Detailed error:

As always trace information will help us.


$ export SRVM_TRACE=TRUE

$ srvctl add service -d db -s SERVICE_NAME -preferred INST1,INST2

...

...

...

[main] [ 2016-04-20 18:49:54.284 MSK ] [UnixSystem.dorunRemoteExecCmd:3486] Final unix SSH command: /opt/oracle/product/database/12.1.0.2/bin/osdbagrp -o
[main] [ 2016-04-20 18:49:54.284 MSK ] [RuntimeExec.runCommand:135] Calling Runtime.exec() with the command
[main] [ 2016-04-20 18:49:54.285 MSK ] [RuntimeExec.runCommand:137] /bin/sh
[main] [ 2016-04-20 18:49:54.285 MSK ] [RuntimeExec.runCommand:137] -c
[main] [ 2016-04-20 18:49:54.285 MSK ] [RuntimeExec.runCommand:137] /opt/oracle/product/database/12.1.0.2/bin/osdbagrp -o
[main] [ 2016-04-20 18:49:54.286 MSK ] [RuntimeExec.runCommand:207] runCommand: Waiting for the process
[Thread-4] [ 2016-04-20 18:49:54.286 MSK ] [StreamReader.run:61] In StreamReader.run
[Thread-3] [ 2016-04-20 18:49:54.286 MSK ] [StreamReader.run:61] In StreamReader.run
[Thread-3] [ 2016-04-20 18:49:54.288 MSK ] [StreamReader.run:65] OUTPUT>oinstall
[main] [ 2016-04-20 18:49:54.288 MSK ] [RuntimeExec.runCommand:209] runCommand: process returns 0
[main] [ 2016-04-20 18:49:54.288 MSK ] [RuntimeExec.runCommand:226] RunTimeExec: output>
[main] [ 2016-04-20 18:49:54.288 MSK ] [RuntimeExec.runCommand:229] oinstall
[main] [ 2016-04-20 18:49:54.288 MSK ] [RuntimeExec.runCommand:235] RunTimeExec: error>

main] [ 2016-04-20 18:49:54.290 MSK ] [UnixSystem.dorunRemoteExecCmd:3486] Final unix SSH command: /opt/oracle/product/database/12.1.0.2/bin/osdbagrp -a
[main] [ 2016-04-20 18:49:54.290 MSK ] [RuntimeExec.runCommand:135] Calling Runtime.exec() with the command
[main] [ 2016-04-20 18:49:54.290 MSK ] [RuntimeExec.runCommand:137] /bin/sh
[main] [ 2016-04-20 18:49:54.290 MSK ] [RuntimeExec.runCommand:137] -c
[main] [ 2016-04-20 18:49:54.290 MSK ] [RuntimeExec.runCommand:137] /opt/oracle/product/database/12.1.0.2/bin/osdbagrp -a
[main] [ 2016-04-20 18:49:54.291 MSK ] [RuntimeExec.runCommand:207] runCommand: Waiting for the process
[Thread-6] [ 2016-04-20 18:49:54.291 MSK ] [StreamReader.run:61] In StreamReader.run
[Thread-5] [ 2016-04-20 18:49:54.291 MSK ] [StreamReader.run:61] In StreamReader.run
[main] [ 2016-04-20 18:49:54.372 MSK ] [RuntimeExec.runCommand:209] runCommand: process returns 139
[main] [ 2016-04-20 18:49:54.373 MSK ] [RuntimeExec.runCommand:226] RunTimeExec: output>
[main] [ 2016-04-20 18:49:54.373 MSK ] [RuntimeExec.runCommand:235] RunTimeExec: error>
[main] [ 2016-04-20 18:49:54.373 MSK ] [RuntimeExec.runCommand:257] Returning from RunTimeExec.runCommand

As you can see osdbagrp -o works well, but osdbagrp -a isn’t. I’ve decided to run osdbagrp -a from $GRID_HOME, and $RDBMS_HOME.

$GRID_HOME/bin/osdbagrp -a, has returned oinstall value.

$RDBMS_HOME/bin/osdbagrp -a, has returned Memory fault.

Then I’ve just copied $GRID_HOME/bin/osdbagrp to $RDBMS_HOME/bin/osdbagrp

Or you can recreate it.

<pre class="b-page-code__pre">cat $ORACLE_HOME/rdbms/lib/config.c

#define SS_DBA_GRP "dba"
#define SS_OPER_GRP "dba"
#define SS_ASM_GRP "dba"
#define SS_BKP_GRP "dba"
#define SS_DGD_GRP "dba"
#define SS_KMT_GRP "dba"

const char * const ss_dba_grp[] =
     {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};

oracle$ rm -f $ORACLE_HOME/rdbms/lib/config.o; make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk $ORACLE_HOME/rdbms/lib/config.o; cd $ORACLE_HOME/srvm/lib; make -f ins_srvm.mk iosdbagrp; osdbagrp -a

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s