EM 12c: Securing the Enterprise Manager 12c Cloud Control OMS with a Third Party Certificate Fails with Error; String index out of range (Doc ID 1670934.1)

Last updated on MAY 14, 2014

Applies to:

Enterprise Manager Base Platform - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

Securing the EM 12c Cloud Control OMS with az third party certificate fails with the following error:

<OMS_HOME>/bin>./emctl secure oms -host <slbmachine.domain> -secure_port <secure upload port> -slb_port <slb upload port> -slb_console_port <slb console port> -wallet /home/oraoms/wallets001 -trust_certs_loc /home/oraoms/wallets001/trusted_certs.txt
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Securing OMS... Started.
Enter Enterprise Manager Root (SYSMAN) Password :
Enter Agent Registration Password :
Securing OMS... Failed. Check the log /apps/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/log/secure.log

 
Following are the entries from .../gc_inst/em/EMGC_OMS1/sysman/log/secure.log:
==========================
2014-05-02 10:06:29,929 [main] INFO  oms.SecureOMSCmds processSecureOMS.789 - Custom trust certificates location: /home/oraoms/wallets001/trusted_certs.txt
2014-05-02 10:06:29,931 [main] ERROR oms.SecureOMSCmds processSecureOMS.1469 - Securing of OMS failed with following error:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:881)
    at java.lang.StringBuffer.substring(StringBuffer.java:416)
    at oracle.sysman.emctl.secure.oms.SecureOMSCmds.validateCertsFile(SecureOMSCmds.java:1788)
    at oracle.sysman.emctl.secure.oms.SecureOMSCmds.processSecureOMS(SecureOMSCmds.java:794)
    at oracle.sysman.emctl.secure.oms.SecureOMSCmds.main(SecureOMSCmds.java:605)
2014-05-02 10:06:29,934 [main] ERROR oms.SecureOMSCmds main.636 - Securing OMS failed : String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:881)
    at java.lang.StringBuffer.substring(StringBuffer.java:416)
    at oracle.sysman.emctl.secure.oms.SecureOMSCmds.validateCertsFile(SecureOMSCmds.java:1788)
    at oracle.sysman.emctl.secure.oms.SecureOMSCmds.processSecureOMS(SecureOMSCmds.java:794)
    at oracle.sysman.emctl.secure.oms.SecureOMSCmds.main(SecureOMSCmds.java:605)
======================================

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms