Thursday, July 30, 2015

bsu.sh: java.lang.OutOfMemoryError: GC overhead limit exceeded

Version:

Oracle Weblogic server 10.3.6 in OEL 64 bit

Issue:

July 2015 PSU (WLS PATCH SET UPDATE 10.3.6.0.12) on weblogic server is failing with "OutOfMemoryError". Patching is failing immediately after it is invoked.

Error:

[oracle@soahost1 bsu]$ ./bsu.sh -install -patch_download_dir=/home/oracle/middleware/utils/bsu/cache_dir -patchlist=EJUW -prod_dir=/home/oracle/middleware/wlserver_10.3

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:448)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)
        at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
        at com.bea.plateng.patch.Patch.main(Patch.java:281)

Reason:

The default java memory arguments  provided in bsu.sh file are not sufficient

Solution:

Increase the Java memory values in bsu.sh file (under $MW_HOME/utils/bsu) by adjusting the valuMEM_ARGS values.

By default the values will be
MEM_ARGS="-Xms256m -Xmx512m"

I increased it to 1024-1024 as follows
"-Xms1024m -Xmx1024m"

Save the bsu.sh file and re-execute the patching command.

TNS-12555: TNS:permission denied with TNS-00525

Version:

Oracle EE 12.1.0.1.0 in Linux 64 bit

Issue:

Listener is not coming up when it is tried to start. We always ends up getting the same error log.

Errors:

TNSLSNR for Linux: Version 12.1.0.1.0 - Production
System parameter file is /home/oracle/product/121010/network/admin/listener.ora
Log messages written to /home/oracle/diag/tnslsnr/hostdb1/listener121010/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hostdb1.idc.oracle.com)(PORT=1211)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1211)))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted

Listener failed to start. See the error message(s) above...

Reason: 

In most cases this will happen when "root" user was used for previous start of listener.That is the reason why we are getting permission denied and Insufficient privilege in error stack.

Solution:

1. cd /var/tmp

2. Check the ownership of the cd /var/tmp/.oracle folder. It should be such a way that the owner is the <oracle> owner and the group '<dba>' group of the oracle user.

In this case .oracle was owned by root as shown below

drwxrwxrwt   2 root root  4096 Apr 28 16:59 .oracle


3. Change the user and group using the appropriate command:

I have used the following commands as root user

chown oracle .oracle
chgrp dba .oracle
chmod 777 .oracle

After the change the folder permissions are as follows

drwxrwxrwt   2 oemora dba   4096 Apr 28 17:04 .oracle

4. Start the TNS Listener.

It should start normally now.