Management Agent installation fails on a target host with RedHat 7 because of missing several java variables.
RELATED

EM 13C AGENT DEPLOYMENT FAILS BECAUSE THE VISIBLEPW IS NOT SET THE SUDOERS FILE
EM 13C AGENT DEPLOYMENT FAILS BECAUSE THE USER ORACLE DOES NOT HAVE THE PRIVILEGES TO RUN COMMANDS AS USER ROOT

SYMPTOMS

When deploying a 13c agent on the target host with RedHat/OEL 7.x, the deployment process crashes with the folloing errors:

1. When installing an OMS agent though the Enterprise Manager Cloud Control 13c console

OMS Agent Installation Fails Because of Missing Some Java Options

The error stack is

Remote Prerequisite Checks

Execution of command ABD=/agent13c; cd /agent13c/ADATMP_2019-02-18_19-52-03-PM;
$ABD/ADATMP_2019-02-18_19-52-03-PM/agentcore.bin -prereqChecker -silent -ignoreSysPrereqs
-rscratchPath $ABD/ADATMP_2019-02-18_19-52-03-PM/prereqlogs -entryPoint
oracle.sysman.top.agent_Complete -nowait -noconsole -J-DORACLE_HOSTNAME=dbpilot.net
-J-DAGENT_PORT=3872 -J-DALLOW_IPADDRESS=true -J-DAGENT_BASE_DIR=/agent13c
-J-DSTAGE_LOCATION=$ABD/ADATMP_2019-02-18_19-52-03-PM/prereq_stage -J-DUSER_NAME=oracle
-J-DRUN_AS=null -J-DORACLE_HOME=$ABD/agent_13.3.0.0.0 on host dbpilot.net Failed

Error Message:Not Available
Exit Code :1

You may have selected the wrong platform "Linux x86-64" for this host. If so select the correct platform.

You may have specified a non writable location for the environment variable TMP/TEMP in your shell initialization
script($HOME/.cshrc, $HOME/.bashrc etc).
Ensure that this location is writable.

2. When installing an OMS agent with the .rpm package and a response file
/etc/init.d/oracle-agt RESPONSE_FILE=/usr/lib/oracle/agent/agent.properties
...
EErrrroorr: oCcocuulrdr endo tdu rcirneg aitnei ttihael iJzaavtai oVni rotfu aVlM MCaocuhlidn en.otE rrreosre:r vAe feantoaulg he xscpeapctei ofno rh aosb joecct chuerarped. Program will exit

what means

Error occurred during initialization of VM. Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine. Error: A fatal exception has occured.
SOLUTION

In my case, I had had the issue because of two reasons: 1. Lack of read permission on the /etc/oraInst.loc file and 2. Missing several java environment variables

1. Lack of read permission on the /etc/oraInst.loc file
##############################################
## Confirm the lack of the read permission for an agent installation user
##############################################

[oracle@dbpilot.net]$ cat /etc/oraInst.loc
cat: /etc/oraInst.loc: Permission denied

[oracle@dbpilot.net]$ ls -l /etc/oraInst.loc
-rw-r-----. 1 root root 127 Feb 27  2018 /etc/oraInst.loc

##############################################
## Provide the read permission to an agent installation user
##############################################

[root@dbpilot.net]# chmod 644 /etc/oraInst.loc

[root@dbpilot.net]# ls -l /etc/oraInst.loc
-rw-r--r--. 1 root root 127 Feb 27  2018 /etc/oraInst.loc

##############################################
## Confirm the permission is granted by an agent installation user
##############################################

[root@dbpilot.net]# su - oracle

[oracle@dbpilot.net ~]$ cat /etc/oraInst.loc
inst_group=oracle
inventory_loc=/agent13c/oraInventory
2. Missing several java environment variables

Set the following variables on a target host in user's .bash_profile or .bashrc file and retry the agent deployment

export TMP=/tmp
export _JAVA_OPTIONS="-Xms256m -Xmx512m"
export EM_COMMON_JAVA_OPTIONS="-Xms256m -Xmx512m"
NOTE

These environment variables are required for agent installation only. After an agent is successfully deployed the variables can be removed from the .bash* file.

REFERENCES

EM 12c Agent Deployment Fails With Error "Error occurred during initialization of VM" (Doc ID 1488163.1)

Written At
19 FEB 201909:30
Red Hat Release
7.x x64
Enterprise Manager
13.1.0.0.0 - 13.3.0.0.0