Clarity

Expand all | Collapse all

ERROR: Upgrade failed for tenant when installed patch 14

  • 1.  ERROR: Upgrade failed for tenant when installed patch 14

    Posted Oct 23, 2017 05:37 AM
      |   view attached

    Hi All, 

     

    Currently we are facing issue when tried to install patch 14 (install.13.3.0.14.5.i.jar) on our Clarity v.13.3

    Aim is to continue in upgrade to Clarity 15.3, however patch 14 is a pre-requirement step of this upgrade path.

     

    Do you know what can be a root-cause of this problem? Error message saying nothing to me is only one found in admin.log file:

     

    found /home/clarity/niku/clarity/maintenance/componentList.xml
    Schema pre-upgrade
    ERROR: Upgrade failed for tenant

     

    Similar case has appeared already before but has never been solved: Schema pre-upgrade ERROR: Upgrade failed for tenant 

     

    9/28/17 1:19 PM (ExecTask) init_upgrade - HeapSize Max = 2048m, PermGenSize Max = 256m
    9/28/17 1:19 PM (ExecTask) Preupgrade
    9/28/17 1:19 PM (ExecTask)
    9/28/17 1:19 PM (ExecTask) Total time: 0H:0M:1S
    9/28/17 1:19 PM (ExecTask) core-upgrade
    9/28/17 1:19 PM (ExecTask) found /home/clarity/niku/clarity/maintenance/componentList.xml
    9/28/17 1:19 PM (ExecTask) Schema pre-upgrade
    9/28/17 1:19 PM (ExecTask) ERROR: Upgrade failed for tenant 
    9/28/17 1:19 PM (ExecTask) ==========================================
    9/28/17 1:19 PM (ExecTask) DBTools Log - Thu Sep 28 13:19:17 UTC 2017
    9/28/17 1:19 PM (ExecTask) ==========================================
    9/28/17 1:19 PM (ExecTask)
    9/28/17 1:19 PM (ExecTask) Command: extract row count
    9/28/17 1:19 PM (ExecTask) To URL: jdbc:clarity:oracle://DB_server:1521;SID=PPMDEV;BatchPerformanceWorkaround=true;InsensitiveResultSetBufferSize=0;ServerType=dedicated;supportLinks=true
    9/28/17 1:19 PM (ExecTask) As user: niku
    9/28/17 1:19 PM (ExecTask) For vendor: oracle
    9/28/17 1:19 PM (ExecTask) -----------------------------------------------------
    9/28/17 1:19 PM (ExecTask) 2017-09-28 13:19:49: Finished updating database
    9/28/17 1:19 PM (ExecTask) -----------------------------------------------------
    9/28/17 1:19 PM (ExecTask)        
    9/28/17 1:19 PM (ExecTask) Error occurred: /home/clarity/niku/clarity/.setup/scripts/db.xml:1453: The following error occurred while executing this line:
    9/28/17 1:19 PM (ExecTask) /home/clarity/niku/clarity/.setup/scripts/db.xml:1464: The following error occurred while executing this line:
    9/28/17 1:19 PM (ExecTask) /home/clarity/niku/clarity/.setup/scripts/db.xml:1499: The following error occurred while executing this line:
    9/28/17 1:19 PM (ExecTask) /home/clarity/niku/clarity/.setup/scripts/db.xml:1563: The following error occurred while executing this line:
    9/28/17 1:19 PM (ExecTask) /home/clarity/niku/clarity/.setup/scripts/db.xml:1775: ERROR: Upgrade failed.  Please review the upgrade logs for details.
    9/28/17 1:19 PM (ExecTask) Check admin.log or use -verbose for more information.
    9/28/17 1:19 PM (UnknownElement) Task "exec" finished with error.
    /home/clarity/temp/install-packages/13.3.0.14/install.xml:902: exec returned: 1
         at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:646)
         at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
         at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)

     

    Thanks a lot for your hints!

    Matej

    Attachment(s)

    zip
    install.log.zip   7 KB 1 version


  • 2.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Broadcom Employee
    Posted Oct 23, 2017 10:15 AM

    Hi Matej,

     

    Can i get the install.log please

     

    Regards

    Suman Pramanik 



  • 3.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Posted Oct 24, 2017 02:24 AM

    Hi Suman, 

     

    It's been already attached to my first post

     

    Matej



  • 4.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Broadcom Employee
    Posted Oct 24, 2017 02:36 AM

    Apologies Matej, I missed out looking into the attachment. The failure happened here 

     

    Command: extract row count
    9/28/17 1:19 PM (ExecTask) To URL: jdbc:clarity:oracle://dedussv-ora1.de.henkelgroup.net :1521;SID=PPMDEV;BatchPerformanceWorkaround=true;InsensitiveResultSetBufferSize=0;ServerType=dedicated;supportLinks=true
    9/28/17 1:19 PM (ExecTask) As user: niku
    9/28/17 1:19 PM (ExecTask) For vendor: oracle
    9/28/17 1:19 PM (ExecTask)
    9/28/17 1:19 PM (ExecTask) Total time: 0H:0M:31S
    9/28/17 1:19 PM (ExecTask)
    9/28/17 1:19 PM (ExecTask) -----------------------------------------------------
    9/28/17 1:19 PM (ExecTask) 2017-09-28 13:19:49: Finished updating database
    9/28/17 1:19 PM (ExecTask) -----------------------------------------------------
    9/28/17 1:19 PM (ExecTask)
    9/28/17 1:19 PM (ExecTask) Error occurred: /home/clarity/niku/clarity/.setup/scripts/db.xml:1453: The following error occurred while executing this line:

     

    So i would check few things 

     

    1. Check if the oracle table space are correctly filled up in csa 

     

    The db.xml where its failing is checking the tablespace 

     

    <xpath file="${install.dir}/config/properties.xml">
    <fetch property="home" select="/properties/databaseServer/@home" overwrite="false"/>
    <fetch property="vendor" select="/properties/database[@id='Niku']/@vendor" overwrite="false"/>
    <fetch property="url" select="/properties/database[@id='Niku']/@url" overwrite="false"/>
    <fetch property="serviceId" select="/properties/database[@id='Niku']/@serviceId" overwrite="false"/>
    <fetch property="password" select="/properties/database[@id='Niku']/@password" overwrite="false"/>
    <fetch property="fromlargeIndex" select="/properties/database[@id='Niku']/@largeIndex" overwrite="false"/>
    <fetch property="fromsmallIndex" select="/properties/database[@id='Niku']/@smallIndex" overwrite="false"/>
    <fetch property="fromlargeTables" select="/properties/database[@id='Niku']/@largeTables" overwrite="false"/>
    <fetch property="fromsmallTables" select="/properties/database[@id='Niku']/@smallTables" overwrite="false"/>
    <fetch property="host" select="/properties/database[@id='Niku']/@host" overwrite="false"/>

     

    Can you please attach the properties.xml.

     

    Regards

    Suman Pramanik 



  • 5.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Posted Oct 24, 2017 02:55 AM
      |   view attached

    Hi Suman, 

     

    Please find properties.xml file in the attachment. 

    Is there anything else what should I check with our DB admin? 

     

    Thanks a lot

    Matej

    Attachment(s)

    zip
    properties.xml.zip   2 KB 1 version


  • 6.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Broadcom Employee
    Posted Oct 24, 2017 03:04 AM

    Thank you and this is the problem where table space is default. Check with your DBA what table spaces he has set and update the same in CSA

     

    <databaseServer vendor="oracle" home="" useMultilingualSort="false" sysPassword="" largeTables="USERS_LARGE" smallTables="USERS_SMALL" largeIndex="INDX_LARGE" smallIndex="INDX_SMALL" highVolatilityParameters="PCTFREE 20 PCTUSED 60" lowVolatilityParameters="PCTFREE 5 PCTUSED 80" fetchSize="60"/>

     

    Regards

    Suman Pramanik 



  • 7.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Posted Oct 25, 2017 05:20 AM
      |   view attached

    Hi Suman, 

     

    Our DB admin said we have the same 4 tablespaces set for our DB. When we had session with him and started the install script, installation went through even till post-upgrade step, so it's weird for me.

    However it has failed again but with more readable error (below error log). As the similar case I found there 15.2 Upgrade Fails  I assume it's something with ID of procedure which can't be inserted into the DB due to unique constraint of PK. 

     

    As this is quite "hardcoding" DB work and I don't want to damage our DB, could you please post similar procedure like Nika_Hadzhikidi which I can follow to fix it? Thanks a lot

    I'm attaching also NIKU.CMN_OPTION_VALUES_INS_SP procedure. 

    Matej

     

    10/25/17 8:31 AM (ExecTask) Command: install database schema from driver file
    10/25/17 8:31 AM (ExecTask) To URL: jdbc:clarity:oracle://dedussv-ora1.de.net:1521;SID=PPMDEV;BatchPerformanceWorkaround=true;InsensitiveResultSetBufferSize=0;ServerType=dedicated;supportLinks=true
    10/25/17 8:31 AM (ExecTask) As user: niku
    10/25/17 8:31 AM (ExecTask) For vendor: oracle
    10/25/17 8:31 AM (ExecTask) Option: filtering on type "^post-upgrade$"
    10/25/17 8:31 AM (ExecTask) Loading DBDriver file: /home/clarity/niku/clarity/maintenance/database/schema/driver.xml
    10/25/17 8:31 AM (ExecTask) Loading DBDriver file: /home/clarity/niku/clarity/maintenance/database/schema/driver.xml
    10/25/17 8:31 AM (ExecTask) Current database version is database_20151008_0600
    10/25/17 8:31 AM (ExecTask) DBDriver for database_20151008_0600
    10/25/17 8:31 AM (ExecTask) Resume installation of DBDriver ...
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) Current database version is database_20131128_0809
    10/25/17 8:31 AM (ExecTask) Note: Foreign Keys have been disabled
    10/25/17 8:31 AM (ExecTask) Processing File: /home/clarity/niku/clarity/maintenance/database/xlate/seed_en.properties
    10/25/17 8:31 AM (ExecTask) Size: 4281
    10/25/17 8:31 AM (ExecTask) Processing File: /home/clarity/niku/clarity/maintenance/database/xlate/seed_en.properties
    10/25/17 8:31 AM (ExecTask) Size: 4281
    10/25/17 8:31 AM (ExecTask) Applying Resources for language: en
    10/25/17 8:31 AM (ExecTask) Hashmap Size: 0
    10/25/17 8:31 AM (ExecTask) Updated 3380 records for language : en
    10/25/17 8:31 AM (ExecTask) Process - post-upgrade: POSTUPGRADE_SEED_RES_PLAN_LABOR_ONLY.xml
    10/25/17 8:31 AM (ExecTask) com.ca.clarity.jdbc.oraclebase.ddc: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (NIKU.CMN_OPTION_VALUES_PK) violated
    10/25/17 8:31 AM (ExecTask) ORA-06512: at "NIKU.CMN_OPTION_VALUES_INS_SP", line 30
    10/25/17 8:31 AM (ExecTask) ORA-06512: at line 21
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) at com.ca.clarity.jdbc.oraclebase.ddes.j(Unknown Source)
    10/25/17 8:31 AM (ExecTask) at com.ca.clarity.jdbc.oraclebase.ddes.a(Unknown Source)
    10/25/17 8:31 AM (ExecTask) at com.ca.clarity.jdbc.oraclebase.ddes.executeBatch(Unknown Source)
    10/25/17 8:31 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    10/25/17 8:31 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    10/25/17 8:31 AM (ExecTask) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    10/25/17 8:31 AM (ExecTask) at java.lang.reflect.Method.invoke(Method.java:606)
    10/25/17 8:31 AM (ExecTask) SQL Text:
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) DECLARE
    10/25/17 8:31 AM (ExecTask) currentOptionValue VARCHAR2(30);
    10/25/17 8:31 AM (ExecTask) BEGIN
    10/25/17 8:31 AM (ExecTask) currentOptionValue := '0';
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) BEGIN
    10/25/17 8:31 AM (ExecTask) SELECT cov.VALUE INTO currentOptionValue FROM CMN_OPTIONS co, CMN_OPTION_VALUES cov WHERE cov.OPTION_ID = co.ID AND co.OPTION_CODE = 'FIN.RES_PLAN_USE_LABOR_ONLY';
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) EXCEPTION
    10/25/17 8:31 AM (ExecTask) WHEN NO_DATA_FOUND THEN
    10/25/17 8:31 AM (ExecTask) NULL;
    10/25/17 8:31 AM (ExecTask) WHEN OTHERS THEN
    10/25/17 8:31 AM (ExecTask) NULL;
    10/25/17 8:31 AM (ExecTask) END;
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) IF currentOptionValue <> '1' THEN
    10/25/17 8:31 AM (ExecTask) BEGIN
    10/25/17 8:31 AM (ExecTask) at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68) CMN_OPTION_VALUES_DEL_SP('FIN.RES_PLAN_USE_LABOR_ONLY');
    10/25/17 8:31 AM (ExecTask) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$a18eb97c.executeBatch(<generated>)
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) CMN_OPTIONS_DEL_SP('FIN.RES_PLAN_USE_LABOR_ONLY');
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.Utilities.executeAndCommitSql(Utilities.java:2686)
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.DriverApp.apply(DriverApp.java:1490)
    10/25/17 8:31 AM (ExecTask) CMN_OPTIONS_INS_SP('FIN.RES_PLAN_USE_LABOR_ONLY', 'FIN.RES_PLAN_USE_LABOR_ONLY', 'FIN.RES_PLAN_USE_LABOR_ONLY', 1,1,1);
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.DriverApp.installSchemaDriver(DriverApp.java:710)
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:1836)
    10/25/17 8:31 AM (ExecTask) CMN_OPTION_VALUES_INS_SP('FIN.RES_PLAN_USE_LABOR_ONLY', NULL, NULL, '0', 1);
    10/25/17 8:31 AM (ExecTask) END;
    10/25/17 8:31 AM (ExecTask) END IF;
    10/25/17 8:31 AM (ExecTask) END;
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:954)
    10/25/17 8:31 AM (ExecTask) Note: Foreign Keys and Triggers have been enabled
    10/25/17 8:31 AM (ExecTask)
    10/25/17 8:31 AM (ExecTask) DBDriver failed to install!
    10/25/17 8:31 AM (ExecTask) Exception in thread "main" java.lang.Exception: DBDriver failed to install
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.DriverApp.installSchemaDriver(DriverApp.java:908)
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:1836)
    10/25/17 8:31 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:954)
    10/25/17 8:31 AM (ExecTask) Caused by: com.ca.clarity.jdbc.oraclebase.ddc: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (NIKU.CMN_OPTION_VALUES_PK) violated
    10/25/17 8:31 AM (ExecTask) ORA-06512: at "NIKU.CMN_OPTION_VALUES_INS_SP", line 30
    10/25/17 8:31 AM (ExecTask) ORA-06512: at line 21

    Attachment(s)



  • 8.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Broadcom Employee
    Posted Oct 25, 2017 08:06 AM

    I find it strange that if the table space was same why it failed last time   Also did you back up the database or continued with failure 



  • 9.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Posted Oct 25, 2017 08:12 AM

    Yes it's weird for me too....We have of course backup from database. Now I was waiting for your recommendation how to solve this error  

     

    Matej



  • 10.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Broadcom Employee
    Posted Oct 25, 2017 08:18 AM

    check the tables CMN_OPTIONS and CMN_OPTION_VALUES for duplicates and if you found duplicate then you can use the fix which Nika_Hadzhikidi provided in below thread

    15.2 Upgrade Fails 

     

    Regards

    Suman Pramanik 



  • 11.  Re: ERROR: Upgrade failed for tenant when installed patch 14
    Best Answer

    Posted Oct 25, 2017 09:01 AM

    Of course I've checked Nika's procedure but there weren't any duplicate entries in tables which could cause this.

    After running queries like

     

    select * from cmn_option_values
    order by last_updated_date desc

    select * from cmn_options
    where option_code like '%FIN.RES_PLAN_USE_LABOR_ONLY%'

     

    In first case I didn't find any record in table from today, in second case I didn't find anything  

     

    So I then run insert SP from error log above:

     

    exec CMN_OPTIONS_INS_SP('FIN.RES_PLAN_USE_LABOR_ONLY', 'FIN.RES_PLAN_USE_LABOR_ONLY', 'FIN.RES_PLAN_USE_LABOR_ONLY', 1,1,1);
    exec CMN_OPTION_VALUES_INS_SP('FIN.RES_PLAN_USE_LABOR_ONLY', NULL, NULL, '0', 1);

     

    Checked both tables, records were in, then run installer and Patch 14 has been finally installed successfully  

    Hopefully this will help to someone else. I'd like to also say Thank you a lot for your help, Suman. 

     

    Matej



  • 12.  Re: ERROR: Upgrade failed for tenant when installed patch 14

    Broadcom Employee
    Posted Oct 25, 2017 09:14 AM

    these queries will never duplicates, nevertheless glad you were able to upgrade 

     

    select * from cmn_option_values
    order by last_updated_date desc

    select * from cmn_options
    where option_code like '%FIN.RES_PLAN_USE_LABOR_ONLY%'