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

Smart repo stats sync fails with exception when remote is offline

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Deferred
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: HttpRepo
    • Labels:
      None
    • Severity:
      Medium

      Description

      If you enable stats sync on offline remote repo and download a cached file, Arti throws an exception:

      2016-03-05 15:29:00,827 [art-exec-278] [ERROR] (o.q.c.JobRunShell   :211) Job artifactory.StatsDelegatingServiceFlushJob#56937827-ff34-450b-8116-752d26c8c4af threw an unhandled Exception: 
      java.lang.IllegalStateException: Repo is offline. Cannot use the HTTP client.
      	at org.artifactory.repo.HttpRepo.getHttpClient(HttpRepo.java:874) ~[classes/:na]
      	at org.artifactory.repo.HttpRepo.doExecuteMethod(HttpRepo.java:475) ~[classes/:na]
      	at org.artifactory.repo.HttpRepo.executeMethod(HttpRepo.java:492) ~[classes/:na]
      	at org.artifactory.repo.HttpRepo.executeMethod(HttpRepo.java:443) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.request(StatsDelegatingServiceImpl.java:509) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.doDelegate(StatsDelegatingServiceImpl.java:328) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.delegateStats(StatsDelegatingServiceImpl.java:243) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.onTraversingEnd(StatsDelegatingServiceImpl.java:195) ~[classes/:na]
      	at org.artifactory.storage.db.fs.service.AbstractStatsService.doFlushStats(AbstractStatsService.java:165) ~[classes/:na]
      	at org.artifactory.storage.db.fs.service.AbstractStatsService.flushStats(AbstractStatsService.java:106) ~[classes/:na]
      	at org.artifactory.storage.jobs.StatsDelegatingServiceFlushJob.onExecute(StatsDelegatingServiceFlushJob.java:49) ~[classes/:na]
      	at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:50) ~[classes/:na]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
      	at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102) [classes/:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_74]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_74]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
      2016-03-05 15:29:00,828 [art-exec-278] [ERROR] (o.q.c.ErrorLogger   :2425) Job (artifactory.StatsDelegatingServiceFlushJob#56937827-ff34-450b-8116-752d26c8c4af threw an exception.
      org.quartz.SchedulerException: Job threw an unhandled exception.
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.2.1.jar:na]
      	at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102) [classes/:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_74]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_74]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
      Caused by: java.lang.IllegalStateException: Repo is offline. Cannot use the HTTP client.
      	at org.artifactory.repo.HttpRepo.getHttpClient(HttpRepo.java:874) ~[classes/:na]
      	at org.artifactory.repo.HttpRepo.doExecuteMethod(HttpRepo.java:475) ~[classes/:na]
      	at org.artifactory.repo.HttpRepo.executeMethod(HttpRepo.java:492) ~[classes/:na]
      	at org.artifactory.repo.HttpRepo.executeMethod(HttpRepo.java:443) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.request(StatsDelegatingServiceImpl.java:509) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.doDelegate(StatsDelegatingServiceImpl.java:328) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.delegateStats(StatsDelegatingServiceImpl.java:243) ~[classes/:na]
      	at org.artifactory.storage.service.StatsDelegatingServiceImpl.onTraversingEnd(StatsDelegatingServiceImpl.java:195) ~[classes/:na]
      	at org.artifactory.storage.db.fs.service.AbstractStatsService.doFlushStats(AbstractStatsService.java:165) ~[classes/:na]
      	at org.artifactory.storage.db.fs.service.AbstractStatsService.flushStats(AbstractStatsService.java:106) ~[classes/:na]
      	at org.artifactory.storage.jobs.StatsDelegatingServiceFlushJob.onExecute(StatsDelegatingServiceFlushJob.java:49) ~[classes/:na]
      	at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:50) ~[classes/:na]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
      	... 4 common frames omitted
      

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              yossis Yossi Shaul
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

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