You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Timothee Maret (Jira)" <ji...@apache.org> on 2021/07/06 16:06:02 UTC

[jira] [Closed] (SLING-10200) Provide the importer errors as queue properties

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

Timothee Maret closed SLING-10200.
----------------------------------

> 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
>             Fix For: Content Distribution Journal Core 0.1.18, Content Distribution Core 0.4.6
>
>          Time Spent: 20m
>  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)