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

When trying to resolve remote server information against non Artifactory instance, there might be a connection leak

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 2 - Critical
    • Resolution: Done
    • Affects Version/s: 6.16.0, 6.17.0
    • Fix Version/s: 6.20.0, 7.6.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      Critical

      Description

      When Artifactory uses TargetServerInfoResolver#executeRequestAndSetDetails to resolve remote server information against non Artifactory instance (i.e. configuring invalid remote replication against remote server remote server which is not Artifactory) Artifactory will throw an exception indicating that it unable to identify the target server as Artifactory, but will not close the connection. As this code uses the same http connection pool of the remote repository, leaked connections will cause incoming requests to pile up and wait for an available connection forever and eventually cause Artifactory to be non responsive.

      See stacktrace for example:

      2020-02-07 20:22:00,003 [art-exec-127] [ERROR] (o.a.a.c.BasicStatusHolder:211) - Error occurred while performing folder replication for 'remote-test:' to 'http://some.url/somepath': Unable to identify target URL as an Artifactory instance: HTTP/1.1 404 Not Found
      java.lang.IllegalArgumentException: Unable to identify target URL as an Artifactory instance: HTTP/1.1 404 Not Found
      at org.artifactory.addon.replication.core.context.server.TargetServerInfoResolver.executeRequestAndSetDetails(TargetServerInfoResolver.java:113)
      at org.artifactory.addon.replication.core.context.server.TargetServerInfoResolver.resolveTargetInfo(TargetServerInfoResolver.java:59)
      at org.artifactory.addon.replication.core.BaseReplicationProducer.resolveTargetInfo(BaseReplicationProducer.java:141)
      at org.artifactory.addon.replication.core.BaseReplicationProducer.init(BaseReplicationProducer.java:137)
      at org.artifactory.addon.replication.core.BaseReplicationProducer.run(BaseReplicationProducer.java:91)
      at org.artifactory.addon.replication.core.remote.RemoteReplicator.replicate(RemoteReplicator.java:59)
      at org.artifactory.addon.replication.core.remote.RemoteReplicator.replicate(RemoteReplicator.java:47)
      at org.artifactory.addon.replication.core.ReplicationAddonImpl.performRemoteReplication(ReplicationAddonImpl.java:111)
      at org.artifactory.repo.replication.RemoteReplicationJob.onExecute(RemoteReplicationJob.java:102)
      at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:48)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:50)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:834) 
      

      This bug occurs when the user configures pull replication while the remote URL is of a non-Artifactory instance. 

        Attachments

          Activity

            People

            Assignee:
            rotemk Rotem Kfir
            Reporter:
            shayb Shay Bagants
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Sync Status

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