Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-14517

Database version check doesn't work in case of existing database from older Ambari version

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.2.0
    • 2.2.1
    • ambari-server
    • None

    Description

      Issue created on base of Apache user group conversation.
      STR:

      1. install Ambari 2.0
      2. deploy cluster
      3. remove ambari rpm and install Ambari 2.2 (do NOT do upgrade)

      Expected result:

      • Database version check should throw exception about incompatible db version.

      Actual result:

      • Guice provision exception is thrown:
        26 Dec 2015 10:57:46,911 ERROR [main] AmbariServer:819 - Failed to run the Ambari Server
        com.google.inject.ProvisionException: Guice provision errors:
        
        1) Error injecting method, Exception [EclipseLink-4011] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
        Exception Description: Error preallocating sequence numbers.  The sequence table information is not complete.
          at org.apache.ambari.server.api.services.AmbariMetaInfo.init(AmbariMetaInfo.java:243)
          at org.apache.ambari.server.api.services.AmbariMetaInfo.class(AmbariMetaInfo.java:125)
          while locating org.apache.ambari.server.api.services.AmbariMetaInfo
            for field at org.apache.ambari.server.controller.AmbariServer.ambariMetaInfo(AmbariServer.java:145)
          at org.apache.ambari.server.controller.AmbariServer.class(AmbariServer.java:145)
          while locating org.apache.ambari.server.controller.AmbariServer
        
        1 error
                at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
                at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
                at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:812)
        Caused by: Exception [EclipseLink-4011] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
        Exception Description: Error preallocating sequence numbers.  The sequence table information is not complete.
        

      Analisys:
      According to exception it seems like Eclipselink initialize some data prior to database version check.
      We should ensure db version check is first DB interaction of Ambari.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsen Dmytro Sen
            dsen Dmytro Sen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment