‘Cannot allocate memory’, PRCR-1172 : Failed to execute “srvmhelper” for -getTargetHubSize

When install or check 13.5 OEM agent on Linux 8, the following errors occur:

$ emctl status agent
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00006f2078020000, 2798568, 0) failed; error='Cannot allocate memory' (errno=12).
$ cat /tmp/ hs_err_pid12345.log
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1400832 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Set larger code cache with -XX:ReservedCodeCacheSize=, tid=0x00007fd043ec1700
#
# JRE version: (8.0_261-b12) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode linux-amd64 compressed oops)
# Core dump written. Default location: /u01/app/oracle/product/13.5.0/agent/agent_inst/sysman/emd/core or core.12345

Also when installing Oracle 12.2 on Linux 8, the following errors occur:

ID: oracle.install.commons.util.exception.AbstractErrorAdvisor:849
oracle.cluster.verification.VerificationException: An internal error occurred within cluster verification framework
PRCR-1172 : Failed to execute "srvmhelper" for -getTargetHubSize
PRCR-1172 : Failed to execute "srvmhelper" for -getTargetHubSize
PRCR-1172 : Failed to execute "srvmhelper" for -getTargetHubSize
PRCR-1172 : Failed to execute "srvmhelper" for -getTargetHubSize
$ cluvfy stage -pre dbinst -allnodes -r 12.2 -d /u01/app/oracle/product/12.2.0/dbhome_1
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f7aa945a000, 2793472, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2793472 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/oracle/hs_err_pid79287.log

SOLUTION

Subscribe to get access

Read more of this content when you subscribe today.

OCI : How to copy/move files from Linux machine to object storage

  1.  You need to go to your bucket details and click on the right side to open the tab with “Pre-Authenticated Requests”
  2. Click on “Create Pre-Authenticated Request”, choose the name and expiration time for the link.
  3. The link will appear in a pop-up window only once, and you have to copy and save it if you want to use it later. If you have forgotten to do that it is not a problem you can create another one
  4. Now move the file from the command line to the object storage
    $ curl -T test_file.out https://namespace.objectstorage……
$curl  -X PUT -T test_file.out https://namespace.objectstorage.ap-sydney-1.oci.customer-oci.com/p/5S651g2nLPB9K5-6L64vniabeSlEU_caURJsTxxiUgA-PPpa-RoHBN2gBdsodndg/n/namespace/b/bucket_name/o/  --limit-rate 200k -v

How to Connect to an Oracle Autonomous Database

Connecting to an Autonomous Database using SQL Developer

Firstly download a wallet for an Autonomous Database.
Overview>Autonomous Database>Autonomous Database details>Database connection>Wallet type ( Instance wallet )>Download by giving password.

Then open SQL Developer on your local computer. In the Connections panel, right-click Connections and select New Connection.

Connecting to an Autonomous Database using tnsnames.ora

Copy and unzip the wallet file under TNS_ADMIN:

$ cat sqlnet.ora
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="/home/oracle/ADWDB_WALLET")))
SSL_SERVER_DN_MATCH=no
$ sqlplus admin@adwdb_high
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 1 13:13:45 2024
Version 19.23.0.0.0

Copyright (c) 1982, 2023, Oracle. All rights reserved.

Enter password:
Last Successful login time: Tue Oct 01 2024 13:08:39 +10:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.25.0.1.0

SQL>

Connecting to an Autonomous Database with an Easy Connect String

$ sqlplus admin@tcps://adwdb.adb.ap-melbourne-1.oraclecloud.com:1522/g12345f7da5af88_adwdb_high.adb.oraclecloud.com?ssl_server_dn_match=no

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 1 13:21:15 2024
Version 19.23.0.0.0

Copyright (c) 1982, 2023, Oracle. All rights reserved.

Enter password:
Last Successful login time: Tue Oct 01 2024 13:13:52 +10:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.25.0.1.0

SQL>

Without “ssl_server_dn_match=no”, you might get “ORA-29002: SSL transport detected invalid or obsolete server certificate.”

$ sqlplus admin@tcps://adwdb.adb.ap-melbourne-1.oraclecloud.com:1522/g12345f7da5af88_adwdb_high.adb.oraclecloud.com

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 1 13:31:45 2024
Version 19.23.0.0.0

Copyright (c) 1982, 2023, Oracle. All rights reserved.

Enter password:
ERROR:
ORA-29002: SSL transport detected invalid or obsolete server certificate.


Enter user-name:

You can put both “ssl_server_dn_match’ and “wallet_location” in command line together:

$  sqlplus admin@tcps://adwdb.adb.ap-melbourne-1.oraclecloud.com:1522/g12345f7da5af88_adwdb_high.adb.oraclecloud.com?ssl_server_dn_match=no?wallet_location=/home/oracle/ADWDB_WALLET

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 1 13:39:31 2024
Version 19.23.0.0.0

Copyright (c) 1982, 2023, Oracle. All rights reserved.

Enter password:
Last Successful login time: Tue Oct 01 2024 13:38:54 +10:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.25.0.1.0

SQL>

Installing a 13.5 Management Agent Using the agentDeploy Script

We can install a Management Agent using the agentDeploy.sh script in the following ways:

Using EM CLI from the remote Destination Host

Acquiring the Management Agent Software and Downloading it onto the destination Host Using EM CLI.

Download and Set up EM CLI on the destination host.

The rest steps will be same as the followings, so we don’t repeat again.

Using EM CLI from the OMS Host

Acquiring the Management Agent Software and Downloading it onto the OMS Host Using EM CLI.

On OMS server host:

$ emcli login -username=sysman
Enter password :

Login successful

$ emcli sync
Synchronized successfully

$ emcli get_supported_platforms
-----------------------------------------------
Version = 13.5.0.0.0
 Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

Download the Management Agent software from the Software Library to a temporary directory on the OMS host:

$ emcli get_agentimage -destination=/tmp/agentimage  -platform="Linux x86-64" -version=13.5.0.0.0
=== Partition Detail ===
Space free : 7 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/product/13.5.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2024-09-30_20-25-31-PM.log
Downloading /tmp/agentimage/13.5.0.0.0_AgentCore_226.zip
File saved as /tmp/agentimage/13.5.0.0.0_AgentCore_226.zip
Downloading /tmp/agentimage/13.5.0.0.0_Plugins_226.zip
File saved as /tmp/agentimage/13.5.0.0.0_Plugins_226.zip
Downloading /tmp/agentimage/unzip
File saved as /tmp/agentimage/unzip
Executing command: /tmp/agentimage/unzip /tmp/agentimage/13.5.0.0.0_Plugins_226.zip -d /tmp/agentimage
Archieving agentImage and plugins.
Exit status is:0
Agent Image Download completed successfully.

$ ls -ltr /tmp/agentimage/
total 774044
-rw-r--r--. 1 oracle oinstall 792618975 Sep 30 20:25 13.5.0.0.0_AgentCore_226.zip

Transferring the Management Agent Software to the Destination Host /tmp directory.

Unzip the agent image into a temp directory:

$ unzip /tmp/13.5.0.0.0_AgentCore_226.zip -d agentimage/

Archive: 13.5.0.0.0_AgentCore_226.zip
inflating: agentimage/agentcore.bin
inflating: agentimage/agent.rsp
inflating: agentimage/agentDeploy.sh
inflating: agentimage/agentimage.properties
inflating: agentimage/unzip
inflating: agentimage/zip
creating: agentimage/plugins/
inflating: agentimage/plugins/oracle.sysman.emas.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.sysman.si.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.fmw.gg.discovery.plugin-13.5.2.0.0.farb
inflating: agentimage/plugins/oracle.sysman.db.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.sysman.xa.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.sysman.oh.discovery.plugin-13.5.0.0.0.farb
inflating: agentimage/plugins/oracle.sysman.oh.agent.plugin-13.5.0.0.0.farb
inflating: agentimage/plugins.txt
creating: agentimage/oneoffs/
inflating: agentimage/oneoffs/agentDeploy.sh
inflating: agentimage/oneoffs/agentConfig.jar
inflating: agentimage/oneoffs/agentInstaller.jar
inflating: agentimage/oneoffs/applypatchesonapplicablehome.pl
inflating: agentimage/oneoffs/opatch_common.pl

Edit agent.rsp

$ cat agentimage/agent.rsp | grep -v "#"

OMS_HOST=omsserver
EM_UPLOAD_PORT=4903
AGENT_BASE_DIR=/u01/app/oracle/product/13.5.0/agent_1
AGENT_PORT=3872
EM_INSTALL_TYPE="AGENT"

Install agent now.

$ /tmp/agentimage/agentDeploy.sh RESPONSE_FILE=agentimage/agent.rsp
...
..
Waiting for agent targets to get promoted...
Successfully Promoted agent and its related targets to Management Agent

Installing Oracle Management Agent in Silent Mode by Using the AgentPull Script

This is to demonstrate how to install 13.5 Oracle Management Agent in Silent Mode by Using the AgentPull Script .

Note: To install a Management Agent using the AgentPull script, you DO NOT need to download the Management Agent software onto the destination host. The AgentPull script performs this action automatically.

Get AgentPull script from OMS by running the following command, here we are going to install 13.5 agent on Linux platform.

On web to download AgentPull.sh script bu the following URL:
https:/OMS_HOST:OMS_PORT/em/install/getAgentImage

OR

$ cd /tmp
$ curl "https://OMS_HOST:OMS_PORT/em/install/getAgentImage" --insecure -o AgentPull.sh
$ chmod +x /tmp/AgentPull.sh

Identify the Platform by :

$ ./AgentPull.sh  -showPlatforms

Platforms Version
Linux x86-64 13.5.0.0.0

Create a response file for installing the new agent:

$ cat /tmp/agent.properties
LOGIN_USER=sysman
LOGIN_PASSWORD=sysmanpasswd
PLATFORM="Linux x86-64"
AGENT_REGISTRATION_PASSWORD=abcd1234
AGENT_BASE_DIR=/u01/app/oracle/product/13.5.0/agent_1

Install OEM agent by running the following command now:

$ /tmp/AgentPull.sh RSPFILE_LOC=/tmp/agent.properties 

The new agent should be installed and registered on OMS successfully.

But I got agent evaluation errors on OMS for newly installed agent. it is resolved through:

  • Disabled firewalld
  • EM 13c: Agent Shows Availability Evaluation Error with Message: Target data is currently being uploaded to the repository (Doc ID 2379296.1)