Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-22649

security.<timetstamp>.xml file is being synced between nodes after upgrade upon Artifactory start process

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 7.5.7
    • Fix Version/s: 7.23.3
    • Component/s: HA
    • Labels:
      None
    • Severity:
      High

      Description

      On HA environment there are unnecessary backup files that are being synced after upgrade to 7.x and should be excluded, for example security.<timestamp>.xml is not excluded.

      2020-06-28T06:07:16.737Z [jfrt ] [DEBUG] [32832f42cd7662ed] [o.j.c.ConfigWrapperImpl:336 ] [ocalhost-startStop-1] - Start modify on local server='artdb-0' config='artifactory/config/security.20200525T105006.xml'

      The impact:
      Artifactory will try to decrypt the files and in case the backups contains a lot of information it will take time.
      This creates an issue since services like the router will give up after a short time (the default timeout of the Router service registry against Access is 15 seconds).

      Steps to reproduce:
      1. Configure an HA on 7.x
      2. Create a security.<timestamp>.xml that contains a lot of information.
      3. Start the primary node

      During start up notice the following entry in the console.log hang:

      2021-05-23T02:07:55.101Z [jfrt ] [INFO ] [220dea33c51fd59b] [.c.ConfigurationManagerImpl:97] [ocalhost-startStop-2] - Starting file sync

      In addition, below is the thread dumps when Artifactory "hangs" upon start:

      "localhost-startStop-1" #18 daemon prio=5 os_prio=0 cpu=12673.75ms elapsed=13.56s tid=0x00007f4d20006800 nid=0x4be7 runnable  [0x00007f4d37cb5000]
      java.lang.Thread.State: RUNNABLE
      at org.jfrog.security.crypto.JFrogBase58.divmod256(JFrogBase58.java:301)
      at org.jfrog.security.crypto.JFrogBase58.decode(JFrogBase58.java:265)
      at org.jfrog.security.crypto.DotParts.getPayload(DotParts.java:59)
      at org.jfrog.security.crypto.JFrogEnvelop.isGoodChecksum(JFrogEnvelop.java:42)
      at org.jfrog.security.crypto.EncryptionWrapperBase.decryptIfNeeded(EncryptionWrapperBase.java:83)
      at org.jfrog.config.db.ConfigsDao.decryptConfigIfNeeded(ConfigsDao.java:245)
      at org.jfrog.config.db.ConfigsDao.getConfigContent(ConfigsDao.java:225)
      at org.jfrog.config.db.ConfigsDao.getConfigs(ConfigsDao.java:100)
      at org.jfrog.config.ConfigurationManagerImpl.registerConfigsFromDB(ConfigurationManagerImpl.java:158)
      at org.jfrog.config.ConfigurationManagerImpl.initSharedFolders(ConfigurationManagerImpl.java:150)
      at org.jfrog.config.ConfigurationManagerImpl.startSync(ConfigurationManagerImpl.java:108)
      at org.artifactory.lifecycle.storage.db.init.PostDbSchemaInitializationManager.convertAndInit(PostDbSchemaInitializationManager.java:67)
      at org.artifactory.lifecycle.storage.db.init.PostDbSchemaInitializationManager$$Lambda$311/0x0000000100591040.run(Unknown Source)
      at org.artifactory.lifecycle.storage.db.init.HaInitLock.runInsideInitLockIfNeeded(HaInitLock.java:81)
      at org.artifactory.lifecycle.storage.db.init.PostDbSchemaInitializationManager.init(PostDbSchemaInitializationManager.java:50)
      at org.artifactory.lifecycle.webapp.servlet.BasicConfigurationManager.initArtifactoryInstallation(BasicConfigurationManager.java:141)
      at org.artifactory.lifecycle.webapp.servlet.BasicConfigurationManager.initialize(BasicConfigurationManager.java:125)
      at org.artifactory.lifecycle.webapp.servlet.ArtifactoryHomeConfigListener.contextInitialized(ArtifactoryHomeConfigListener.java:57)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4697)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5163)
      - locked <0x0000000080083af8> (a org.apache.catalina.core.StandardContext)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      - locked <0x0000000080083af8> (a org.apache.catalina.core.StandardContext)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1822)
      at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.6/Executors.java:515)
      at java.util.concurrent.FutureTask.run(java.base@11.0.6/FutureTask.java:264)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1128)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
      at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)
      

        Attachments

          Issue Links

            Activity

                People

                Assignee:
                Unassigned
                Reporter:
                shaibz Shai Ben-Zvi
                Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Sync Status

                    Connection: RTFACT Sync
                    RTMID-22649 -
                    SYNCHRONIZED
                    • Last Sync Date: