Saturday, March 28, 2009

silent installation of Enterprise Manager Grid Control 10.2.0.3 on Linux x86-64

The first full release of Grid Control 10g rel. 2 for Linux x86-64 is 10.2.0.3
To be prepared for future release 10.2.0.5 (I hope it will come soon) on x86-64
I have decided to try silent installation of Grid Control using existing database.

A database had been created, up and running together with listener on 1521 port.

Based on contents of the response file I added variables to start silent installation

/u02/install/gc/Disk1> ./runInstaller -silent \
-responseFile /u02/install/gc/Disk1/response/em_using_existing_db.rsp \
BASEDIR="/u02/grid" INSTALLATION_NAME="EMHome_1" \
s_reposHost="rac2" \
s_reposPort="1521" \
s_reposSID="repdb" \
s_reposDBAPwd="sys24" \
s_mgmtTbsName="/u01/oradata/repdb/mgmt.dbf" \
s_ecmTbsName="/u01/oradata/repdb/mgmt_ecm_depot1.dbf" \
s_reposPwd="man24" \
s_reposPwdConfirm="man24" \
s_securePassword="man24" \
s_securePasswordConfirm="man24" \
-ignoresysprereqs use_prereq_checker=false


Later it failed with:
SEVERE:OUI-10029:You have specified a non-empty directory
to install this product. It is recommended to specify either
an empty or a non-existent directory. You may, however, choose
to ignore this message if the directory contains Operating System
generated files or subdirectories like lost+found.


But why it happened, the directory defined under BASEDIR did not even exist!

Checking log of installation I found that home for OMS
was not defined like I wanted:
INFO: Setting variable 'ORACLE_HOME'
to '/u01/app/oracle/product/10.2.0/db_1/OracleHomes/oms10g'.
Received the value from the command line.


Ok, I defined ORACLE_HOME, ORACLE_HOME_NAME
pointing to the same location where I would like to install oms
and reran the installation again:

/u02/install/gc/Disk1> ./runInstaller -silent \
-responseFile /u02/install/gc/Disk1/response/em_using_existing_db.rsp \
ORACLE_HOME="/u02/grid/oms10g" ORACLE_HOME_NAME="oms10g" \
s_reposHost="rac2" \
s_reposPort="1521" \
s_reposSID="repdb" \
s_reposDBAPwd="sys24" \
s_mgmtTbsName="/u01/oradata/repdb/mgmt.dbf" \
s_ecmTbsName="/u01/oradata/repdb/mgmt_ecm_depot1.dbf" \
s_reposPwd="man24" \
s_reposPwdConfirm="man24" \
s_securePassword="man24" \
s_securePasswordConfirm="man24" \
-ignoresysprereqs use_prereq_checker=false


But when it started I noted that OMS and agent homes were set not
to locations that I supposed to see:
OMS Home    : /u01/app/oracle/product/10.2.0/db_1/OracleHomes/oms10g
Space Required: 2.4GB
AGENT Home: /u01/app/oracle/product/10.2.0/db_1/OracleHomes/agent10g
Space Required: 0.5GB


So I cancelled the installation and checked log file:
INFO: Setting variable 'ORACLE_HOME' to '/u02/grid/oms10g'.
Received the value from the command line.
INFO: Setting variable 'ORACLE_HOME_NAME' to 'oms10g'.
Received the value from the command line.
INFO: Setting variable 's_omsHomeName' to 'oms10g'.
Received the value from the command line.
INFO: Setting variable 's_omsHome'
to '/u01/app/oracle/product/10.2.0/db_1/OracleHomes/oms10g'.
Received the value from the command line.


Even with sets of ORACLE_HOME and ORACLE_HOME_NAME
oms and agent homes were set to some default location
using the same ORACLE_HOME as for repdb database.

Detailed analysis of the log file showed existence of variables:
s_omsHome, s_omsHomeName, s_agentHome, s_agentHomeName
I removed ORACLE_HOME and added variables defined above:

/u02/install/gc/Disk1> ./runInstaller -silent \
-responseFile /u02/install/gc/Disk1/response/em_using_existing_db.rsp \
s_omsHome="/u02/grid/oms10g" s_omsHomeName="oms10g" \
s_agentHome="/u02/grid/agent10g" s_agentHomeName="agent10g" \
s_reposHost="rac2" \
s_reposPort="1521" \
s_reposSID="repdb" \
s_reposDBAPwd="sys24" \
s_mgmtTbsName="/u01/oradata/repdb/mgmt.dbf" \
s_ecmTbsName="/u01/oradata/repdb/mgmt_ecm_depot1.dbf" \
s_reposPwd="man24" \
s_reposPwdConfirm="man24" \
s_securePassword="man24" \
s_securePasswordConfirm="man24" \
-ignoresysprereqs use_prereq_checker=false


After start and during the checks installer asked me about the space:
You may not have enough space on your drive for a successful install.
Do you still want to continue?


I canceled it again and found that ORACLE_HOME was pointed to the
home of RDBMS of the database that I used for repository:
Global Settings
Source: /u02/install/gc/Disk1/oms/Disk1/stage/products.xml
Oracle Home: /u01/app/oracle/product/10.2.0/db_1/OracleHomes/oms10g (oms10g)
Installation Type: Core


Ok, there is nothing difficult to add ORACLE_HOME as well,
started installation again:

/u02/install/gc/Disk1> ./runInstaller -silent \
-responseFile /u02/install/gc/Disk1/response/em_using_existing_db.rsp \
ORACLE_HOME="/u02/grid/oms10g" ORACLE_HOME_NAME="oms10g" \
s_omsHome="/u02/grid/oms10g" s_omsHomeName="oms10g" \
s_agentHome="/u02/grid/agent10g" s_agentHomeName="agent10g" \
s_reposHost="rac2" \
s_reposPort="1521" \
s_reposSID="repdb" \
s_reposDBAPwd="sys24" \
s_mgmtTbsName="/u01/oradata/repdb/mgmt.dbf" \
s_ecmTbsName="/u01/oradata/repdb/mgmt_ecm_depot1.dbf" \
s_reposPwd="man24" \
s_reposPwdConfirm="man24" \
s_securePassword="man24" \
s_securePasswordConfirm="man24" \
-ignoresysprereqs use_prereq_checker=false


Everything was going ok but failed at "OMS configuration" step.
The main log did not show much information but since it failed
during execution of configuration tools I checked log files
in the directory where they are kept - $OMS_HOME/cfgtoollogs/cfgfw

There were messages about errors during connection
to the respository database:
WARNING: oracle.sysman.top.oms:getConnection::
Connection refused:rac2::repdb:Exception=Io exception:
Invalid number format for port number
INFO: oracle.sysman.top.oms:
Failed to connect to Database for s_SysUser=SYS,
s_encrSysPwd=******, connectString=rac2::repdb,
using default for node=rac2,sid=repdb.
ConnectException=Io exception:
Invalid number format for port number
INFO: oracle.sysman.top.oms:fixNodeNames:
The repository host name specified contains invalid format
for domain extention=rac2:Fixin is not done!
...
Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=)))
(CONNECT_DATA=(SID=repdb))):
ORA-12533: TNS:illegal ADDRESS parameters
(DBD ERROR: OCIServerAttach)
...
INFO: oracle.sysman.top.oms:RepManager Create Repository Error = 50.
Please check the log file at /u02/grid/oms10g/sysman/log/
emca_repos_create11_45_57.log


"
Invalid number format for port number" why is that?
The port had been defined so why it happened?

Search on Metalink revealed the note about the similar problem
Oms Config Failed with Error: Invalid number format for port number

and the workaround is simple - to remove s_reposPort from
command line and put it to the response file.

That was done (copied original file under /tmp and changed
s_reposPort to 1521) and I started installation again
(removed entries from inventory.xml and oratab,
deleted installed directories from /u02/grid):

/u02/install/gc/Disk1> ./runInstaller -silent \
-responseFile /tmp/em_using_existing_db.rsp \
ORACLE_HOME="/u02/grid/oms10g" ORACLE_HOME_NAME="oms10g" \
s_omsHome="/u02/grid/oms10g" s_omsHomeName="oms10g" \
s_agentHome="/u02/grid/agent10g" s_agentHomeName="agent10g" \
s_reposHost="rac2" \
s_reposSID="repdb" \
s_reposDBAPwd="sys24" \
s_mgmtTbsName="/u01/oradata/repdb/mgmt.dbf" \
s_ecmTbsName="/u01/oradata/repdb/mgmt_ecm_depot1.dbf" \
s_reposPwd="man24" \
s_reposPwdConfirm="man24" \
s_securePassword="man24" \
s_securePasswordConfirm="man24" \
-ignoresysprereqs use_prereq_checker=false


Now it was executed without problems, all assistances went through
and installation had been finished. I was able to connect to
Grid Control Console.

A couple of things to mention:
* 10.2.0.4 database was used for repository
but certified is 10.2.0.3 for Linux x86-64
* Linux release is CentOS 5 64-bit that's why
-ignoresysprereqs use_prereq_checker=false were used
* Got
"Create Repository Error = 14" and "Create Repository Error = 12"
when not all objects of repository were cleaned from previous
installations.
To delete them:
declare
begin
for cr in (select * from dba_synonyms where table_owner = 'SYSMAN') loop
execute immediate 'drop public synonym '||cr.synonym_name;
end loop;
end;
/

drop user sysman cascade;

drop user mgmt_view cascade;

drop role MGMT_USER;

drop tablespace MGMT_TABLESPACE including contents and datafiles;

drop tablespace MGMT_ECM_DEPOT_TS including contents and datafiles;





I hope your silent installation will be successful!

Have a good day!