Clarity

Expand all | Collapse all

Upgrade to 13.1 fails - invalid database connection for local tenant

  • 1.  Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jun 16, 2013 02:12 PM
    I've been trying to upgrade v12.1.1 to 13.1 without success.

    The First three attemps were fresh upgrades from a working v.12.1.1 .
    I had both jdk 6 and 7, Tomcat folder given in install to version 7.

    Then I made an upgrade to v13.0 which did not go smoothly, but eventually I got upgraded v13.0 working as I should expect.
    No customization that I know of to the java libs and no classpath environmental variable set.
    Note that the jdk and Tomcat were the same versions for v13.0 and v12.1.3

    Tried to upgrade to v13.1 and that failed.

    When running the install jdk 7 was installed and java_home was pointing to that and Tomcat 7 was unziped and its folder was given when the installer asked.

    The Build finished but the update failed.
    Going in to CSA the Install status was in incomplete and the preupgrade was Installed but db and from there on needed upgrade.

    Installing database from the Install and Overview resulted in error in admin log

    6/16/13 12:18 PM (admin) Command: install database schema from driver file
    6/16/13 12:18 PM (admin) To URL: jdbc:clarity:sqlserver://W2008:1433;DatabaseName=clarity;InsensitiveResultSetBufferSize=0;ProgramName=Clarity
    6/16/13 12:18 PM (admin) As user: niku
    6/16/13 12:18 PM (admin) For vendor: mssql
    6/16/13 12:18 PM (admin) Previous schema directory: D:\Clarity\upgrade\infrastructure\previousSchema
    6/16/13 12:18 PM (admin) Option: filtering on type "^((?!(?:pre|post)-upgrade).)*$"
    6/16/13 12:18 PM (admin) Option: -updateHistory=false - update history will not be recorded for this session.
    6/16/13 12:18 PM (admin) Loading DBDriver file: D:\Clarity\upgrade\projmgr\schema\driver.xml
    6/16/13 12:18 PM (admin) Loading DBDriver file: D:\Clarity\upgrade\projmgr\schema\driver.xml
    6/16/13 12:18 PM (admin) Current database version is projmgr_20120817_0528
    6/16/13 12:18 PM (admin) DBDriver for projmgr_20120817_0528
    6/16/13 12:18 PM (admin) Resume installation of DBDriver ...
    6/16/13 12:18 PM (admin) Current database version is projmgr_20111204_1616
    6/16/13 12:18 PM (admin) Note: Foreign Keys have been disabled
    6/16/13 12:18 PM (admin) Note: Foreign Keys and Triggers have been enabled
    6/16/13 12:18 PM (admin) DBDriver successfully installed!
    6/16/13 12:18 PM (admin) Total time: 0H:0M:2S
    6/16/13 12:18 PM (admin) Updating schema for component = calendar
    6/16/13 12:18 PM (admin) Updating schema for component = uif
    6/16/13 12:18 PM (admin) Updating schema for component = nsa
    6/16/13 12:18 PM (admin) Calling auditTrailReEnableUpgrade
    6/16/13 12:18 PM (admin) Component = database i18n resource files are applied during the schema update
    6/16/13 12:18 PM (admin) No i18n resource files found for component = infrastructure
    6/16/13 12:18 PM (admin) Component = ppm i18n resource files are applied during the schema update
    6/16/13 12:18 PM (admin) No i18n resource files found for component = nmc
    6/16/13 12:18 PM (admin) No i18n resource files found for component = njs
    6/16/13 12:18 PM (admin) No i18n resource files found for component = revmgr
    6/16/13 12:18 PM (admin) No i18n resource files found for component = reporting
    6/16/13 12:18 PM (admin) No i18n resource files found for component = projmgr
    6/16/13 12:18 PM (admin) No i18n resource files found for component = calendar
    6/16/13 12:18 PM (admin) No i18n resource files found for component = uif
    6/16/13 12:18 PM (admin) No i18n resource files found for component = nsa
    6/16/13 12:18 PM (admin) Updating xogseeddata for component = database
    6/16/13 12:18 PM (admin)
    Applying lookup_autosuggest_corrections.xml
    6/16/13 12:18 PM (admin)
    Applying OBJECT_ACTION_MENU_ITEM_LOOKUPS.xml
    6/16/13 12:18 PM (admin)
    Applying platform_lookups.xml
    6/16/13 12:19 PM (admin)
    Applying XOG_ACCESS_RIGHTS.xml
    6/16/13 12:19 PM (admin) Error Applying XOG: null
    6/16/13 12:19 PM (admin) java.lang.NullPointerException
    6/16/13 12:19 PM (admin)
    at com.niku.security.service.AuthenticationService.removeSessionCaches(AuthenticationService.java:960)
    6/16/13 12:19 PM (admin)
    at com.niku.security.service.AuthenticationService.delete(AuthenticationService.java:231)
    6/16/13 12:19 PM (admin)
    at com.niku.xog.client.XOGAdminClient.processFileDescriptors(XOGAdminClient.java:793)
    6/16/13 12:19 PM (admin)
    at com.niku.xog.client.XOGAdminClient.execute(XOGAdminClient.java:437)
    6/16/13 12:19 PM (admin)
    at com.niku.xog.client.XOGAdminClient.main(XOGAdminClient.java:221)
    6/16/13 12:19 PM (admin) ERROR: Upgrade failed for tenant
    6/16/13 12:19 PM (admin) ==========================================
    6/16/13 12:19 PM (admin) DBTools Log - Sun Jun 16 12:19:53 EEST 2013
    6/16/13 12:19 PM (admin) ==========================================
    6/16/13 12:19 PM (admin) Command: extract row count
    6/16/13 12:19 PM (admin) To URL: jdbc:clarity:sqlserver://W2008:1433;DatabaseName=clarity;InsensitiveResultSetBufferSize=0;ProgramName=Clarity
    6/16/13 12:19 PM (admin) As user: niku
    6/16/13 12:19 PM (admin) For vendor: mssql
    6/16/13 12:20 PM (admin) Total time: 0H:0M:49S
    6/16/13 12:20 PM (admin) -----------------------------------------------------
    6/16/13 12:20 PM (admin) 2013-06-16 12:20:42: Finished updating database
    6/16/13 12:20 PM (admin) -----------------------------------------------------
    Jun 16, 2013 12:20:42 PM Error executing command: db -javaHome D:\jdk7\jre core-upgrade
    D:\Clarity\.setup\scripts\db.xml:1662: The following error occurred while executing this line:
    D:\Clarity\.setup\scripts\db.xml:1595: The following error occurred while executing this line:
    D:\Clarity\.setup\scripts\db.xml:1608: The following error occurred while executing this line:
    D:\Clarity\.setup\scripts\db.xml:1689: The following error occurred while executing this line:

    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
    D:\Clarity\.setup\scripts\db.xml:1895: ERROR: Upgrade failed. Please review the upgrade logs for details.

    The same error was in install.log earlier

    nsa-ca.log has
    WARN 2013-06-16 19:06:53,844 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Found invalid database connection for local tenant clarity

    The connection details were not changed since v13.0 and the database shows as available in CSA. Though the healthcheck gives all the details of the database but says valid=false

    In other threads the solutions for the problems with the new v13.1 installed have been pointed to memory parameters and tomcat.

    I did not change the memory parameters for install and tomcat was unzipped as before and I am not sure if those or anything java related to to the database connection though it is a java command that failed.

    What might be wrong?

    Martti K.


  • 2.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jun 17, 2013 05:01 AM
    Hello Martti,

    I am exactly not sure, what could be the cause of the error; but I guess it could be something with the rights, as the install log is showing the messages

    6/16/13 12:19 PM (admin) at com.niku.security.service.AuthenticationService.removeSessionCaches(AuthenticationService.java:960)
    6/16/13 12:19 PM (admin) at com.niku.security.service.AuthenticationService.delete(AuthenticationService.java:231)

    6/16/13 12:19 PM (admin) at com.niku.xog.client.XOGAdminClient.processFileDescriptors(XOGAdminClient.java:793)
    6/16/13 12:19 PM (admin) at com.niku.xog.client.XOGAdminClient.execute(XOGAdminClient.java:437)
    6/16/13 12:19 PM (admin) at com.niku.xog.client.XOGAdminClient.main(XOGAdminClient.java:221)
    6/16/13 12:19 PM (admin) ERROR: Upgrade failed for tenant

    Dipanjan


  • 3.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant
    Best Answer

    Broadcom Employee
    Posted Jun 17, 2013 11:42 AM
    Hello Martti,

    The error you are seeing is due to a known Clarity defect, resolved in 13.1.0.1 and 13.2:

    CLRT-69648 caches.xml has old entries which are unused and causing upgrade failures

    Technical Details:
    Will see errors in install.log similar to:

    9/10/12 12:44 PM (ExecTask) Error Applying XOG: null
    9/10/12 12:44 PM (ExecTask) java.lang.NullPointerException
    9/10/12 12:44 PM (ExecTask) at
    com.niku.security.service.AuthenticationService.removeSessionCaches(Authentica
    tionService.java:960)
    9/10/12 12:44 PM (ExecTask) at
    com.niku.security.service.AuthenticationService.delete(AuthenticationService.j
    ava:231)
    9/10/12 12:44 PM (ExecTask) at
    com.niku.xog.client.XOGAdminClient.processFileDescriptors(XOGAdminClient.java:
    793)
    9/10/12 12:44 PM (ExecTask) at
    com.niku.xog.client.XOGAdminClient.execute(XOGAdminClient.java:437)
    9/10/12 12:44 PM (ExecTask) at
    com.niku.xog.client.XOGAdminClient.main(XOGAdminClient.java:221)

    Steps to Reproduce:
    1. Add some extra entries to the caches.xml
    2. Run upgrade to any higher version
    3. Still you see the extra entries

    Expected Result: Caches.xml should match with one with in template foler
    Actual Result: It still has extra entries.

    Workaround :

    Please do the following:
    1.
    Rollback your Clarity and database to prior release
    2.
    Connect to Clarity server
    3.
    Copy the caches.xml file from the following source folder to the appropriate target folder:
    Source Folder: %NIKU_HOME%\.setup\templates\config
    Target Folder: %NIKU_HOME%\config
    4.
    This will replace the caches file with the template one and will allow you to perform a succesful upgrade.
    Note : there is no need to backup the existing file, as the entries there are unused.


    Please let me know how it goes.


    Regards
    Nika


  • 4.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jun 17, 2013 03:44 PM
    Thanks Nika.

    Consider yourself tele-hugged.

    It certainly did the trick in from v13.0 to v.13.1 upgrade - see below - and in much shorter time than what failed upgrade took.
    Tomorrow I'll try and upgrade from v12.1

    Searching the KB for CLRT-69648 or caches.xml brings TEC docs.

    But please educate me.

    If I search for the error message
    db.xml: ERROR: Upgrade failed
    or
    Found invalid database connection for local tenant clarity

    I don't get those. How would I find those on my own?

    Secondly 13.1.0.1 and 13.2:
    When i look for v13.1 downloads I can only see 0000, no later version.
    I do have 13.1.0.1.0019. but that is a fix pack and not a completed install so that can't fix it.

    Is there a way to get an install media where the problem is fixed?

    Martti K.


    .


  • 5.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Broadcom Employee
    Posted Jun 18, 2013 02:38 PM
    Hi Martti,

    I am glad the issue is now solved.

    The reason you didn't find the TEC doc is that it does not include the whole error message. I will now correct it so you will be able to find it with message:
    ERROR: Upgrade failed for tenant
    You could also consider searching for error messages by the first message in the stack trace, i.e.:

    at com.niku.security.service.AuthenticationService.removeSessionCaches

    This should return the exact error (in TEC578077 it is unfortunately mistyped, so I am going to correct this too).


    In my opinion, the message:
    WARN 2013-06-16 19:06:53,844 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Found invalid database connection for local tenant clarity
    is not the actual issue, but a consequence of it (due to the error, the database could not get upgraded to the correct level, so there is a warning thrown later that there is a database version mismatch).


    Considering the fixes : this defect is fixed in the 13.1.0.1 fix pack (and the subsequent cumulative fix packs 13.1.0.x), for which the latest one is available when you actually select 13.1 level 0000:





    When said fixed means that the fix will actually modify the exact call to the method in order to handle any similar issues with extra entries in future. This doesn't mean this will work for the direct upgrade to 13.1 : this will be solved for any further upgrades (to 13.2 i.e.).

    To solve this issue while upgrading to 13.1, please just use the workaround per above (replacing the file with its template).

    Regards
    Nika


  • 6.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jun 18, 2013 03:17 PM
    Thanks.

    Tried to search for

    at com.niku.security.service.AuthenticationService.removeSessionCaches
    removeSessionCaches
    SessionCaches

    but no results.

    Regarding the fix I've got the fix no problem, but my understanding is that you have to have v 13.1 installed before you can apply the fix, but because of the bug you cannot install 13.1

    So how can I solve the install problem with the fix?

    Martti K.


  • 7.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Broadcom Employee
    Posted Jun 18, 2013 03:46 PM
    Hi Martti,

    My apologies, I think I did not express myself clear enough in my response.

    You won't be unfortunately able to search for the whole correct string yet, as I have just corrected it.
    You could try by copying the one in the TEC doc, which is currently mistyped and see for yourself that this should work for the search. Once my changes are published, you would be able to find it with :

    com.niku.security.service.AuthenticationService.removeSessionCaches

    The fix is not fixing the upgrade to 13.1, so there is no way you could patch the bug before upgrade. Your only solution when upgrading to 13.1 can be to use the workaround. The defect fix will resolve any issue with upgrades to further releases, after 13.1.

    Please let me know in case of any questions.

    Regards
    Nika


  • 8.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jun 18, 2013 04:03 PM
    Thanks again.

    Still not get that quite with the search, but it is not worth pursuing further as you gave the work around and the fix.

    So I think I have understood it correctly with the fix.

    Martti K.


  • 9.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jun 18, 2013 04:56 PM
    That was for upgrading 12.1.1 - 13.0 - 13.1 manually :grin:

    However using the workaround and trying to run 13.1 install directly on 12.1.1 still fails. :sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad:sad

    I'll open another thread on that.

    Martti K.


  • 10.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Posted Jul 09, 2013 09:15 AM
    I seem to have the same issues when upgrading to 13.1 from 13.0.1.

    I tried your solution and copied the cache.xml file from the ".setup/templates/config" directory to the main config directory. But when I run the install that file is deleted and rewritten to the old version and doesn't match the ".setup" folder version. Any thoughts?


  • 11.  RE: Upgrade to 13.1 fails - invalid database connection for local tenant

    Broadcom Employee
    Posted Jul 09, 2013 11:11 AM
    Hello danglauber,

    Does it fail again with same error? Maybe it's because of the way you are replacing the file.
    Please make sure all services are stopped before replacing the file. Then make sure it's replacing the existing caches.xml in config (not cache.xml, the name should correspond)
    This should work every time in my experience.

    Regards
    Nika