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

Federate will always go through the system default proxy when doing full sync and artifacts no longer have events in the node_events table



    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 7.19.9
    • Fix Version/s: 7.23.3, 7.21.10
    • Component/s: None
    • Labels:
    • Location:


      Problem description: This scenario will happen during full sync of the federation when trying to federate repositories that have artifacts that no longer have a record in the node_events table. 

      Artifactory will create a file list on the local and remote Artifactory and will try to stream them in order to do the federation.

      In this scenario, in case there is a system default proxy will always try to go through the Proxy, even though it's not configured.  

      What is the expected behavior: Full sync will not go through the default proxy

      Steps to reproduce:

      1. Create repository A on Artifactory A and repository B on Artifactory B.
      2. Deploy 1 artifact on repository A and a different artifact on repository B.
      3. Go into the DB and delete the generated events associated to the artifacts deployments in the node_events table.
      4. Covert repository A and repository B to federation repos (make sure you have the correct base URL and circle of trust).
      5. Perform full sync - Notice it will succeed.
      6. Repeat steps 1-3.
      7. Create a system default proxy (it can be a fake proxy also).
      8. Convert the new repositories to Federate repos and make sure the federations do not include the new proxy (verify in the config descriptor, since there is a UI bug that always shows proxy at the time of opening this bug).
      9. Perform full sync - This will fail with the following error:


      2021-06-30T10:43:46.989Z [jfrt ] [ERROR] [7b21537b3f058826] [.ReplicationControllerImpl:203] [290a2ff206b7bf576652] - Full sync failure in: Federated_full_sync_from_test-libs-snapshot-local_to_http://omitted:8082/artifactory/test-libs-snapshot-local java.util.concurrent.ExecutionException: java.lang.RuntimeException: Failed to stream local file list to file: /opt/jfrog/artifactory/var/data/artifactory/tmp/work/test-libs-snapshot-local0.9838630061132935 at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.artifactory.addon.replication.v2.replication.traversal.DoubleFileListStreamTraversal.<init>(DoubleFileListStreamTraversal.java:38) at org.artifactory.addon.replication.v2.replication.controller.ReplicationControllerImpl.call(ReplicationControllerImpl.java:196) at org.artifactory.addon.replication.v2.replication.controller.ReplicationControllerImpl.call(ReplicationControllerImpl.java:31) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.artifactory.opentracing.TraceableRunnableDecorator.run(TraceableRunnableDecorator.java:33) 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)
      Caused by: java.lang.RuntimeException: Failed to stream local file list to file: /opt/jfrog/artifactory/var/data/artifactory/tmp/work/test-libs-snapshot-local0.9838630061132935 at org.artifactory.addon.replication.v2.replication.streamer.AqlRepoStreamerImpl.writeRoFile(AqlRepoStreamerImpl.java:25) at org.artifactory.addon.replication.v2.replication.traversal.DoubleFileListStreamTraversal.lambda$prepareRemoteFileLis$1(DoubleFileListStreamTraversal.java:96) ... 5 common frames omitted Caused by: java.lang.RuntimeException: Failed to get file list stream from remote repo at org.artifactory.addon.replication.v2.replication.streamer.RemoteTreeProvider.getStream(RemoteTreeProvider.java:36) at org.artifactory.addon.replication.v2.replication.streamer.AqlRepoStreamerImpl.writeRoFile(AqlRepoStreamerImpl.java:21) ... 6 common frames omitted Caused by: org.artifactory.addon.replication.v2.replication.exceptions.ReplicationRequestException: Failed to propagate data to target repo: http://omitted:8082/artifactory/api/search/aql?compact=true with status code: 0 at org.artifactory.addon.replication.v2.replication.streamer.HttpClientServiceImpl.sendMessage(HttpClientServiceImpl.java:84) at org.artifactory.addon.replication.v2.replication.streamer.HttpClientServiceImpl.sendPost(HttpClientServiceImpl.java:59) at org.artifactory.addon.replication.v2.replication.streamer.RemoteTreeProvider.getStream(RemoteTreeProvider.java:33) ... 7 common frames omitted Caused by:
      org.apache.http.conn.HttpHostConnectException: Connect to localhost:8888 [localhost/] failed: Connection refused (Connection refused)

      Possible workaround: Only remove the default system proxy, and at the time of writing this bug there is another bug where there is no update to the cache after removing the system default proxy, which means that we will also require to restart Artifactory.


      The customer pain level: 4





              shaibz Shai Ben-Zvi
              0 Vote for this issue
              2 Start watching this issue



                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-26091 -
                  • Last Sync Date: