Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0.1, 6.1
    • Component/s: ACS Deployment
    • Labels:
    • Environment:
      docker-compose
    • RCA Cause:
      Use case not considered
    • RCA Quality:
      Use case not considered
    • RCA Description:
      The basic feature entered the product many years ago and has, until recently, required a different bootstrap procedure. During the introduction of orchestration technologies, we anticipated fallout - this is just some of that.

      Description

      Steps to reproduce:

      1. Use this custom docker compose file: https://git.alfresco.com/Repository/acs-docker-cluster/tree/debug_multinode_cluster and start it up: docker-compose up
      2. Many times (on a clean start up) one of the nodes does not start and the following error is printed in the log:

        ...
        alfresco3_1 | 2018-08-30 06:04:43,411 INFO [domain.schema.SchemaBootstrap] [localhost-startStop-1] No changes were made to the schema.
        alfresco4_1 | 2018-08-30 06:04:43,438 ERROR [domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema auto-update failed
        alfresco4_1 | org.springframework.dao.DuplicateKeyException:
        alfresco4_1 | ### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "alf_applied_patch_pkey"
        alfresco4_1 | Detail: Key (id)=(patch.db-V5.0-upgrade-to-activiti-5.16.2) already exists.
        alfresco4_1 | ### The error may involve alfresco.appliedpatch.insert_AppliedPatch-Inline
        alfresco4_1 | ### The error occurred while setting parameters
        alfresco4_1 | ### SQL: insert into alf_applied_patch ( id, description, fixes_from_schema, fixes_to_schema, target_schema, applied_to_schema, applied_on_date, applied_to_server, was_executed, succeeded, report ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
        alfresco4_1 | ### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "alf_applied_patch_pkey"
        alfresco4_1 | Detail: Key (id)=(patch.db-V5.0-upgrade-to-activiti-5.16.2) already exists.
        alfresco4_1 | ; ]; ERROR: duplicate key value violates unique constraint "alf_applied_patch_pkey"
        alfresco4_1 | Detail: Key (id)=(patch.db-V5.0-upgrade-to-activiti-5.16.2) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "alf_applied_patch_pkey"
        alfresco4_1 | Detail: Key (id)=(patch.db-V5.0-upgrade-to-activiti-5.16.2) already exists.
        alfresco4_1 | at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:243)
        alfresco4_1 | at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        alfresco4_1 | at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
        alfresco4_1 | at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:421)
        alfresco4_1 | at com.sun.proxy.$Proxy17.insert(Unknown Source)
        alfresco4_1 | at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:254)
        alfresco4_1 | at org.alfresco.repo.domain.patch.ibatis.AppliedPatchDAOImpl.createAppliedPatchEntity(AppliedPatchDAOImpl.java:59)
        alfresco4_1 | at org.alfresco.repo.domain.patch.AbstractAppliedPatchDAOImpl.createAppliedPatch(AbstractAppliedPatchDAOImpl.java:46)
        alfresco4_1 | at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:925)
        alfresco4_1 | at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1646)
        alfresco4_1 | at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
        alfresco4_1 | at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:221)
        alfresco4_1 | at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:186)
        alfresco4_1 | at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:206)
        ...

      This points to a possible problem in the bootstrap sync code. See MNT-19474 and related REPO issues

      Expected behavior:

      • all nodes should start up fine - the bootstrap code should not fail

      Actual results:

      • Sometimes, a node fails to bootstrap properly

      Hints: Add more nodes to the cluster to increase the frequency of the problem

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  arebegea Andrei Rebegea [X] (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel