[ 
https://issues.apache.org/jira/browse/SLING-10200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothee Maret updated SLING-10200:
-----------------------------------
    Description: 
The queue API currently exposes the number of attempts to import a given entry 
but not the logs corresponding to the last attempt. The logs typically contain 
the root cause for the failure.

Providing the logs as properties of each queue item will allow investigating 
the root cause of increasing attempts without having to access and scrape logs.

By using the default GET servlet, we currently obtain the following informations

{code}
curl -u admin:admin 
localhost:9500/libs/sling/distribution/services/agents/publish.-1.json | jq 
'.queues'
{
  "sling:resourceType": "sling/distribution/service/agent/queue/list",
  "items": [
    "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber"
  ],
  "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber": {
    "capabilities": [],
    "sling:resourceType": "sling/distribution/service/agent/queue",
    "state": "RUNNING",
    "items": [
      "aemdistribution_package-0@576438706"
    ],
    "itemsCount": "1",
    "empty": false,
    "aemdistribution_package-0@576438706": {
      "size": 3771,
      "paths": [
        "/libs"
      ],
      "sling:resourceType": "sling/distribution/service/agent/queue/item",
      "action": "ADD",
      "id": "aemdistribution_package-0@576438706",
      "time": "Fri Mar 05 15:56:56 UTC 2021",
      "state": "QUEUED",
      "userid": "admin",
      "attempts": "2"
    }
  }
}
{code}

We would add two properties, a `message` and `stackTrace` corresponding to the 
last processing attempt.

{code}
{
  "name": "publish",
  "sling:resourceType": "sling/distribution/service/agent",
  "queues": {
    "sling:resourceType": "sling/distribution/service/agent/queue/list",
    "items": [
      "8ca33c66-4c3a-459f-a61d-6a5a02a8a2a5-publishSubscriber",
      "ce0d68de-9be9-4165-a951-e106cb963d5b-publishSubscriber"
    ],
    "8ca33c66-4c3a-459f-a61d-6a5a02a8a2a5-publishSubscriber": {
      "capabilities": [
        "removable",
        "clearable"
      ],
      "sling:resourceType": "sling/distribution/service/agent/queue",
      "state": "BLOCKED",
      "items": [
        "-0@85098"
      ],
      "itemsCount": "1",
      "empty": false,
      "-0@85098": {
        "size": 4291,
        "paths": [
          "/var/test"
        ],
        "errorTrace": "java.lang.Throwable: Error processing distribution 
package dstrpck-1615494012187-af61eeb4-be2e-43d2-974d-797387a8f96a at offset 
85098 first path /var/test. Retry attempts 127/infinite. Url: 
https://aemk8s.blob.core.windows.net/aem-distribution/42361682-65c2-4f58-b378-384e9a14f4d4?sig=%2Fv%2FZNjyPTzPOvP0OauuqKbvQmoatK4ZXM4DgFw7BViY%3D&se=2021-03-21T20%3A20%3A12Z&sv=2019-02-02&sp=r&sr=b,
 retrying, Message: javax.jcr.AccessDeniedException: OakAccess0000: Access 
denied\n\tat 
org.apache.sling.distribution.journal.queue.impl.QueueErrors.toThrowable(QueueErrors.java:68)\n\tat
 
org.apache.sling.distribution.journal.queue.impl.QueueErrors.handleEvent(QueueErrors.java:63)\n\tat
 
org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:431)\n\tat
 
org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutDenylistTiming(HandlerTask.java:82)\n\tat
 
org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:107)\n\tat
 
org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:167)\n\tat
 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat
 java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat
 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat
 java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: 
java.lang.Throwable: 
org.apache.sling.distribution.common.DistributionException: 
javax.jcr.AccessDeniedException: OakAccess0000: Access denied\n\tat 
org.apache.sling.distribution.serialization.impl.vlt.FileVaultContentSerializer.importFromStream(FileVaultContentSerializer.java:170)\n\tat
 
org.apache.sling.distribution.packaging.impl.InMemoryDistributionPackageBuilder.installPackageInternal(InMemoryDistributionPackageBuilder.java:119)\n\tat
 
org.apache.sling.distribution.packaging.impl.AbstractDistributionPackageBuilder.installPackage(AbstractDistributionPackageBuilder.java:156)\n\tat
 
org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.installPackage(MonitoringDistributionPackageBuilder.java:92)\n\tat
 
org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory.installPackage(VaultDistributionPackageBuilderFactory.java:340)\n\tat
 
org.apache.sling.distribution.journal.bookkeeper.PackageHandler.installAddPackage(PackageHandler.java:78)\n\tat
 
org.apache.sling.distribution.journal.bookkeeper.PackageHandler.apply(PackageHandler.java:61)\n\tat
 
org.apache.sling.distribution.journal.bookkeeper.BookKeeper.importPackage(BookKeeper.java:149)\n\tat
 
org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueueItem(DistributionSubscriber.java:354)\n\tat
 
org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.fetchAndProcessQueueItem(DistributionSubscriber.java:311)\n\tat
 
org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueue(DistributionSubscriber.java:287)\n\tat
 java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: 
javax.jcr.AccessDeniedException: OakAccess0000: Access denied\n\tat 
org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:232)\n\tat
 
org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:213)\n\tat
 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:684)\n\tat
 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:505)\n\tat
 
org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:424)\n\tat
 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:275)\n\tat
 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:421)\n\tat
 
com.adobe.granite.repository.impl.CRX3SessionImpl.save(CRX3SessionImpl.java:207)\n\tat
 org.apache.jackrabbit.vault.fs.io.AutoSave.save(AutoSave.java:177)\n\tat 
org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:441)\n\tat 
org.apache.sling.distribution.serialization.impl.vlt.FileVaultContentSerializer.importFromStream(FileVaultContentSerializer.java:162)\n\t...
 11 more\nCaused by: org.apache.jackrabbit.oak.api.CommitFailedException: 
OakAccess0000: Access denied\n\tat 
org.apache.jackrabbit.oak.security.authorization.permission.PermissionValidator.checkIsGranted(PermissionValidator.java:352)\n\tat
 
org.apache.jackrabbit.oak.security.authorization.permission.PermissionValidator.checkPermissions(PermissionValidator.java:205)\n\tat
 
org.apache.jackrabbit.oak.security.authorization.permission.PermissionValidator.childNodeAdded(PermissionValidator.java:145)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.VisibleValidator.childNodeAdded(VisibleValidator.java:104)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.VisibleValidator.childNodeAdded(VisibleValidator.java:30)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.CompositeEditor.childNodeAdded(CompositeEditor.java:107)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:115)\n\tat
 
org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeAdded(MapRecord.java:465)\n\tat
 org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:527)\n\tat 
org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:462)\n\tat 
org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:651)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147)\n\tat
 
org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeChanged(CompositeNodeState.java:309)\n\tat
 
org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeChanged(CompositeNodeState.java:256)\n\tat
 
org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:430)\n\tat
 
org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeChanged(MapRecord.java:471)\n\tat
 org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:517)\n\tat 
org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:462)\n\tat 
org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:420)\n\tat 
org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:651)\n\tat
 
org.apache.jackrabbit.oak.composite.CompositeNodeState.compareAgainstBaseState(CompositeNodeState.java:163)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)\n\tat
 
org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60)\n\tat
 
org.apache.jackrabbit.oak.composite.CommitHookEnhancer.processCommit(CommitHookEnhancer.java:55)\n\tat
 org.apache.jackrabbit.oak.segment.scheduler.Commit.apply(Commit.java:99)\n\tat 
org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.execute(LockBasedScheduler.java:299)\n\tat
 
org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.schedule(LockBasedScheduler.java:270)\n\tat
 
org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:211)\n\tat
 
org.apache.jackrabbit.oak.composite.CompositeNodeStore.merge(CompositeNodeStore.java:151)\n\tat
 org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:252)\n\tat 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:348)\n\tat
 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:503)\n\t...
 18 more\n\n\t... 11 more\n",
        "errorMessage": "Error processing distribution package 
dstrpck-1615494012187-af61eeb4-be2e-43d2-974d-797387a8f96a at offset 85098 
first path /var/test. Retry attempts 127/infinite. Url: 
https://aemk8s.blob.core.windows.net/aem-distribution/42361682-65c2-4f58-b378-384e9a14f4d4?sig=%2Fv%2FZNjyPTzPOvP0OauuqKbvQmoatK4ZXM4DgFw7BViY%3D&se=2021-03-21T20%3A20%3A12Z&sv=2019-02-02&sp=r&sr=b,
 retrying, Message: javax.jcr.AccessDeniedException: OakAccess0000: Access 
denied",
        "sling:resourceType": "sling/distribution/service/agent/queue/item",
        "action": "ADD",
        "id": "-0@85098",
        "time": "Thu Mar 11 20:20:12 UTC 2021",
        "state": "ERROR",
        "userid": "admin",
        "attempts": "127"
      }
    },
    "ce0d68de-9be9-4165-a951-e106cb963d5b-publishSubscriber": {
      "capabilities": [],
      "sling:resourceType": "sling/distribution/service/agent/queue",
      "state": "RUNNING",
      "items": [
        "-0@85098"
      ],
      "itemsCount": "1",
      "empty": false,
      "-0@85098": {
        "size": 4291,
        "paths": [
          "/var/test"
        ],
        "sling:resourceType": "sling/distribution/service/agent/queue/item",
        "action": "ADD",
        "id": "-0@85098",
        "time": "Thu Mar 11 20:20:12 UTC 2021",
        "state": "QUEUED",
        "userid": "admin",
        "attempts": "0"
      }
    }
  },
  "log": {
    "sling:resourceType": "sling/distribution/service/log"
  },
  "status": {
    "state": "BLOCKED"
  }
}
{code}

  was:
The queue API currently exposes the number of attempts to import a given entry 
but not the logs corresponding to the last attempt. The logs typically contain 
the root cause for the failure.

Providing the logs as properties of each queue item will allow investigating 
the root cause of increasing attempts without having to access and scrape logs.

By using the default GET servlet, we currently obtain the following informations

{code}
curl -u admin:admin 
localhost:9500/libs/sling/distribution/services/agents/publish.-1.json | jq 
'.queues'
{
  "sling:resourceType": "sling/distribution/service/agent/queue/list",
  "items": [
    "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber"
  ],
  "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber": {
    "capabilities": [],
    "sling:resourceType": "sling/distribution/service/agent/queue",
    "state": "RUNNING",
    "items": [
      "aemdistribution_package-0@576438706"
    ],
    "itemsCount": "1",
    "empty": false,
    "aemdistribution_package-0@576438706": {
      "size": 3771,
      "paths": [
        "/libs"
      ],
      "sling:resourceType": "sling/distribution/service/agent/queue/item",
      "action": "ADD",
      "id": "aemdistribution_package-0@576438706",
      "time": "Fri Mar 05 15:56:56 UTC 2021",
      "state": "QUEUED",
      "userid": "admin",
      "attempts": "2"
    }
  }
}
{code}

We would add two properties, a `message` and `stackTrace` corresponding to the 
last processing attempt.

{code}
{
  "sling:resourceType": "sling/distribution/service/agent/queue/list",
  "items": [
    "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber"
  ],
  "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber": {
    "capabilities": [],
    "sling:resourceType": "sling/distribution/service/agent/queue",
    "state": "RUNNING",
    "items": [
      "aemdistribution_package-0@576438706"
    ],
    "itemsCount": "1",
    "empty": false,
    "aemdistribution_package-0@576438706": {
      "size": 3771,
      "paths": [
        "/libs"
      ],
      "sling:resourceType": "sling/distribution/service/agent/queue/item",
      "action": "ADD",
      "id": "aemdistribution_package-0@576438706",
      "time": "Fri Mar 05 15:56:56 UTC 2021",
      "state": "ERROR",
      "userid": "admin",
      "attempts": "2",
      "errorMessage": "Failed to import the package xxx",
      "errorTrace": "java.lang.Exception: This the importer exception\n\tat 
org.apache.sling.distribution.journal.queue.impl.QueueEntryFactory.buildQueueItemStatus(QueueEntryFactory.java:57)\n\tat
 
org.apache.sling.distribution.journal.queue.impl.QueueEntryFactory.create(QueueEntryFactory.java:48)\n\tat
 
org.apache.sling.distribution.journal.queue.impl.PubQueue.getEntries(PubQueue.java:120)\n\tat
 
org.apache.sling.distribution.resources.impl.ExtendedDistributionServiceResourceProvider$QueueItemsIterator.hasNext(ExtendedDistributionServiceResourceProvider.java:265)\n\tat
 
org.apache.sling.distribution.resources.impl.common.SimpleReadableResourceIterator.hasNext(SimpleReadableResourceIterator.java:45)\n\tat
 
org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider$SecureIterator.seek(AuthenticatedResourceProvider.java:430)\n\tat
 
org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider$SecureIterator.seek(AuthenticatedResourceProvider.java:420)\n\tat
 
org.apache.sling.resourceresolver.impl.helper.AbstractIterator.hasNext(AbstractIterator.java:33)\n\tat
 
org.apache.commons.collections4.iterators.IteratorChain.updateCurrentIterator(IteratorChain.java:222)\n\tat
 
org.apache.commons.collections4.iterators.IteratorChain.hasNext(IteratorChain.java:236)\n\tat
 
org.apache.sling.resourceresolver.impl.helper.UniqueResourceIterator.seek(UniqueResourceIterator.java:43)\n\tat
 
org.apache.sling.resourceresolver.impl.helper.UniqueResourceIterator.seek(UniqueResourceIterator.java:30)\n\tat
 
org.apache.sling.resourceresolver.impl.helper.AbstractIterator.hasNext(AbstractIterator.java:33)\n\tat
 
org.apache.sling.resourceresolver.impl.helper.ResourceIteratorDecorator.hasNext(ResourceIteratorDecorator.java:45)\n\tat
 
org.apache.sling.servlets.get.impl.util.ResourceTraversor.collectChildren(ResourceTraversor.java:101)\n\tat
 
org.apache.sling.servlets.get.impl.util.ResourceTraversor.collectChildren(ResourceTraversor.java:125)\n\tat
 
org.apache.sling.servlets.get.impl.util.ResourceTraversor.collectResources(ResourceTraversor.java:82)\n\tat
 
org.apache.sling.servlets.get.impl.helpers.JsonRenderer.render(JsonRenderer.java:98)\n\tat
 
org.apache.sling.servlets.get.impl.DefaultGetServlet.doGet(DefaultGetServlet.java:316)\n\tat
 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266)\n\tat
 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342)\n\tat
 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374)\n\tat
 
org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:570)\n\tat
 
org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82)\n\tat
 
com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)\n\tat 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.granite.metrics.knownerrors.impl.ErrorLoggingComponentFilter.doFilter(ErrorLoggingComponentFilter.java:76)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)\n\tat
 
com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)\n\tat
 
org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82)\n\tat
 
com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:504)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:141)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:122)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:70)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter.doFilter(AssetContentDispositionFilter.java:96)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:369)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.cq.samples.sss.core.filters.LoggingFilter.doFilter(LoggingFilter.java:56)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.dam.core.impl.servlet.DisableLegacyServletFilter.executeFilter(DisableLegacyServletFilter.java:197)\n\tat
 
com.day.cq.dam.core.impl.servlet.DisableLegacyServletFilter.doFilter(DisableLegacyServletFilter.java:154)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.granite.uriprovider.dba.DBAHeaderFilter.doFilter(DBAHeaderFilter.java:107)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:110)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:226)\n\tat
 
com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76)\n\tat 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:226)\n\tat
 
com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet.doFilter(CoreFormHandlingServlet.java:123)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:111)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:87)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:81)\n\tat
 
com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:60)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)\n\tat 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217)\n\tat 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:154)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)\n\tat
 
com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83)\n\tat
 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)\n\tat
 
org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)\n\tat
 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:250)\n\tat
 
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:123)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86)\n\tat
 
com.adobe.granite.metrics.redimpl.REDMetricsServletFilter.doFilter(REDMetricsServletFilter.java:172)\n\tat
 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 
com.adobe.granite.metrics.knownerrors.impl.ReportingRequestFilter.doFilter(ReportingRequestFilter.java:84)\n\tat
 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 com.adobe.granite.cors.impl.CORSFilter.doFilter(CORSFilter.java:87)\n\tat 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 
com.adobe.granite.license.impl.http.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:301)\n\tat
 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)\n\tat 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 
org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)\n\tat
 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 
org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)\n\tat
 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 
org.apache.sling.engine.impl.parameters.RequestParameterSupportConfigurer.doFilter(RequestParameterSupportConfigurer.java:67)\n\tat
 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)\n\tat
 
org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)\n\tat
 
org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:146)\n\tat
 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1002)\n\tat
 
com.adobe.granite.auth.oauth.impl.OAuthCallbackFilter.doFilter(OAuthCallbackFilter.java:69)\n\tat
 
org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137)\n\tat
 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)\n\tat
 com.adobe.granite.cors.impl.CORSFilter.doFilter(CORSFilter.java:87)\n\tat 
org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137)\n\tat
 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)\n\tat
 
org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:326)\n\tat
 
org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137)\n\tat
 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)\n\tat
 
org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:97)\n\tat
 
org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137)\n\tat
 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)\n\tat
 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:1012)\n\tat
 
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:91)\n\tat
 
org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)\n\tat
 javax.servlet.http.HttpServlet.service(HttpServlet.java:725)\n\tat 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)\n\tat 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat
 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat
 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\n\tat 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\n\tat
 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat
 org.eclipse.jetty.server.Server.handle(Server.java:516)\n\tat 
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)\n\tat
 org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)\n\tat 
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)\n\tat 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)\n\tat
 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\n\tat
 org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\n\tat 
org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\n\tat 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)\n\tat
 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)\n\tat
 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)\n\tat
 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)\n\tat
 
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)\n\tat
 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)\n\tat
 
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)\n\tat
 java.base/java.lang.Thread.run(Thread.java:834)\n"
      }
    }
  }
}
{code}


> Provide the importer errors as queue properties
> -----------------------------------------------
>
>                 Key: SLING-10200
>                 URL: https://issues.apache.org/jira/browse/SLING-10200
>             Project: Sling
>          Issue Type: Bug
>          Components: Content Distribution
>    Affects Versions: Content Distribution Journal Core 0.1.18, Content 
> Distribution Core 0.4.6
>            Reporter: Timothee Maret
>            Assignee: Timothee Maret
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The queue API currently exposes the number of attempts to import a given 
> entry but not the logs corresponding to the last attempt. The logs typically 
> contain the root cause for the failure.
> Providing the logs as properties of each queue item will allow investigating 
> the root cause of increasing attempts without having to access and scrape 
> logs.
> By using the default GET servlet, we currently obtain the following 
> informations
> {code}
> curl -u admin:admin 
> localhost:9500/libs/sling/distribution/services/agents/publish.-1.json | jq 
> '.queues'
> {
>   "sling:resourceType": "sling/distribution/service/agent/queue/list",
>   "items": [
>     "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber"
>   ],
>   "00b6b2a8-e63a-49e8-9481-1700312c3e59-publishSubscriber": {
>     "capabilities": [],
>     "sling:resourceType": "sling/distribution/service/agent/queue",
>     "state": "RUNNING",
>     "items": [
>       "aemdistribution_package-0@576438706"
>     ],
>     "itemsCount": "1",
>     "empty": false,
>     "aemdistribution_package-0@576438706": {
>       "size": 3771,
>       "paths": [
>         "/libs"
>       ],
>       "sling:resourceType": "sling/distribution/service/agent/queue/item",
>       "action": "ADD",
>       "id": "aemdistribution_package-0@576438706",
>       "time": "Fri Mar 05 15:56:56 UTC 2021",
>       "state": "QUEUED",
>       "userid": "admin",
>       "attempts": "2"
>     }
>   }
> }
> {code}
> We would add two properties, a `message` and `stackTrace` corresponding to 
> the last processing attempt.
> {code}
> {
>   "name": "publish",
>   "sling:resourceType": "sling/distribution/service/agent",
>   "queues": {
>     "sling:resourceType": "sling/distribution/service/agent/queue/list",
>     "items": [
>       "8ca33c66-4c3a-459f-a61d-6a5a02a8a2a5-publishSubscriber",
>       "ce0d68de-9be9-4165-a951-e106cb963d5b-publishSubscriber"
>     ],
>     "8ca33c66-4c3a-459f-a61d-6a5a02a8a2a5-publishSubscriber": {
>       "capabilities": [
>         "removable",
>         "clearable"
>       ],
>       "sling:resourceType": "sling/distribution/service/agent/queue",
>       "state": "BLOCKED",
>       "items": [
>         "-0@85098"
>       ],
>       "itemsCount": "1",
>       "empty": false,
>       "-0@85098": {
>         "size": 4291,
>         "paths": [
>           "/var/test"
>         ],
>         "errorTrace": "java.lang.Throwable: Error processing distribution 
> package dstrpck-1615494012187-af61eeb4-be2e-43d2-974d-797387a8f96a at offset 
> 85098 first path /var/test. Retry attempts 127/infinite. Url: 
> https://aemk8s.blob.core.windows.net/aem-distribution/42361682-65c2-4f58-b378-384e9a14f4d4?sig=%2Fv%2FZNjyPTzPOvP0OauuqKbvQmoatK4ZXM4DgFw7BViY%3D&se=2021-03-21T20%3A20%3A12Z&sv=2019-02-02&sp=r&sr=b,
>  retrying, Message: javax.jcr.AccessDeniedException: OakAccess0000: Access 
> denied\n\tat 
> org.apache.sling.distribution.journal.queue.impl.QueueErrors.toThrowable(QueueErrors.java:68)\n\tat
>  
> org.apache.sling.distribution.journal.queue.impl.QueueErrors.handleEvent(QueueErrors.java:63)\n\tat
>  
> org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:431)\n\tat
>  
> org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutDenylistTiming(HandlerTask.java:82)\n\tat
>  
> org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:107)\n\tat
>  
> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:167)\n\tat
>  
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat
>  java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat
>  
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat
>  java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: 
> java.lang.Throwable: 
> org.apache.sling.distribution.common.DistributionException: 
> javax.jcr.AccessDeniedException: OakAccess0000: Access denied\n\tat 
> org.apache.sling.distribution.serialization.impl.vlt.FileVaultContentSerializer.importFromStream(FileVaultContentSerializer.java:170)\n\tat
>  
> org.apache.sling.distribution.packaging.impl.InMemoryDistributionPackageBuilder.installPackageInternal(InMemoryDistributionPackageBuilder.java:119)\n\tat
>  
> org.apache.sling.distribution.packaging.impl.AbstractDistributionPackageBuilder.installPackage(AbstractDistributionPackageBuilder.java:156)\n\tat
>  
> org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.installPackage(MonitoringDistributionPackageBuilder.java:92)\n\tat
>  
> org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory.installPackage(VaultDistributionPackageBuilderFactory.java:340)\n\tat
>  
> org.apache.sling.distribution.journal.bookkeeper.PackageHandler.installAddPackage(PackageHandler.java:78)\n\tat
>  
> org.apache.sling.distribution.journal.bookkeeper.PackageHandler.apply(PackageHandler.java:61)\n\tat
>  
> org.apache.sling.distribution.journal.bookkeeper.BookKeeper.importPackage(BookKeeper.java:149)\n\tat
>  
> org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueueItem(DistributionSubscriber.java:354)\n\tat
>  
> org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.fetchAndProcessQueueItem(DistributionSubscriber.java:311)\n\tat
>  
> org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueue(DistributionSubscriber.java:287)\n\tat
>  java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: 
> javax.jcr.AccessDeniedException: OakAccess0000: Access denied\n\tat 
> org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:232)\n\tat
>  
> org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:213)\n\tat
>  
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:684)\n\tat
>  
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:505)\n\tat
>  
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:424)\n\tat
>  
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:275)\n\tat
>  
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:421)\n\tat
>  
> com.adobe.granite.repository.impl.CRX3SessionImpl.save(CRX3SessionImpl.java:207)\n\tat
>  org.apache.jackrabbit.vault.fs.io.AutoSave.save(AutoSave.java:177)\n\tat 
> org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:441)\n\tat 
> org.apache.sling.distribution.serialization.impl.vlt.FileVaultContentSerializer.importFromStream(FileVaultContentSerializer.java:162)\n\t...
>  11 more\nCaused by: org.apache.jackrabbit.oak.api.CommitFailedException: 
> OakAccess0000: Access denied\n\tat 
> org.apache.jackrabbit.oak.security.authorization.permission.PermissionValidator.checkIsGranted(PermissionValidator.java:352)\n\tat
>  
> org.apache.jackrabbit.oak.security.authorization.permission.PermissionValidator.checkPermissions(PermissionValidator.java:205)\n\tat
>  
> org.apache.jackrabbit.oak.security.authorization.permission.PermissionValidator.childNodeAdded(PermissionValidator.java:145)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.VisibleValidator.childNodeAdded(VisibleValidator.java:104)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.VisibleValidator.childNodeAdded(VisibleValidator.java:30)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.CompositeEditor.childNodeAdded(CompositeEditor.java:107)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:115)\n\tat
>  
> org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeAdded(MapRecord.java:465)\n\tat
>  
> org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:527)\n\tat 
> org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:462)\n\tat 
> org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:651)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147)\n\tat
>  
> org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeChanged(CompositeNodeState.java:309)\n\tat
>  
> org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeChanged(CompositeNodeState.java:256)\n\tat
>  
> org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:430)\n\tat
>  
> org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeChanged(MapRecord.java:471)\n\tat
>  
> org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:517)\n\tat 
> org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:462)\n\tat 
> org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:420)\n\tat 
> org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:651)\n\tat
>  
> org.apache.jackrabbit.oak.composite.CompositeNodeState.compareAgainstBaseState(CompositeNodeState.java:163)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)\n\tat
>  
> org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60)\n\tat
>  
> org.apache.jackrabbit.oak.composite.CommitHookEnhancer.processCommit(CommitHookEnhancer.java:55)\n\tat
>  
> org.apache.jackrabbit.oak.segment.scheduler.Commit.apply(Commit.java:99)\n\tat
>  
> org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.execute(LockBasedScheduler.java:299)\n\tat
>  
> org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.schedule(LockBasedScheduler.java:270)\n\tat
>  
> org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:211)\n\tat
>  
> org.apache.jackrabbit.oak.composite.CompositeNodeStore.merge(CompositeNodeStore.java:151)\n\tat
>  
> org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:252)\n\tat 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:348)\n\tat
>  
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:503)\n\t...
>  18 more\n\n\t... 11 more\n",
>         "errorMessage": "Error processing distribution package 
> dstrpck-1615494012187-af61eeb4-be2e-43d2-974d-797387a8f96a at offset 85098 
> first path /var/test. Retry attempts 127/infinite. Url: 
> https://aemk8s.blob.core.windows.net/aem-distribution/42361682-65c2-4f58-b378-384e9a14f4d4?sig=%2Fv%2FZNjyPTzPOvP0OauuqKbvQmoatK4ZXM4DgFw7BViY%3D&se=2021-03-21T20%3A20%3A12Z&sv=2019-02-02&sp=r&sr=b,
>  retrying, Message: javax.jcr.AccessDeniedException: OakAccess0000: Access 
> denied",
>         "sling:resourceType": "sling/distribution/service/agent/queue/item",
>         "action": "ADD",
>         "id": "-0@85098",
>         "time": "Thu Mar 11 20:20:12 UTC 2021",
>         "state": "ERROR",
>         "userid": "admin",
>         "attempts": "127"
>       }
>     },
>     "ce0d68de-9be9-4165-a951-e106cb963d5b-publishSubscriber": {
>       "capabilities": [],
>       "sling:resourceType": "sling/distribution/service/agent/queue",
>       "state": "RUNNING",
>       "items": [
>         "-0@85098"
>       ],
>       "itemsCount": "1",
>       "empty": false,
>       "-0@85098": {
>         "size": 4291,
>         "paths": [
>           "/var/test"
>         ],
>         "sling:resourceType": "sling/distribution/service/agent/queue/item",
>         "action": "ADD",
>         "id": "-0@85098",
>         "time": "Thu Mar 11 20:20:12 UTC 2021",
>         "state": "QUEUED",
>         "userid": "admin",
>         "attempts": "0"
>       }
>     }
>   },
>   "log": {
>     "sling:resourceType": "sling/distribution/service/log"
>   },
>   "status": {
>     "state": "BLOCKED"
>   }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to