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/16 08:11:02 UTC

[jira] [Commented] (SLING-9052) DistributionSubscriber is not failing correctly on OakConstraint0025

    [ https://issues.apache.org/jira/browse/SLING-9052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381883#comment-17381883 ] 

Timothee Maret commented on SLING-9052:
---------------------------------------

Currently, the code [catches all exceptions raised during import|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/697c9dd7ba83c5bf10e6a148aba971db1e8e7832/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java#L313-L316],  retries follow an exponential delay (since SLING-10592) and the number of import attempts is reflected in the json representation of the queue and/or queue item. One can get the json representation at /libs/sling/distribution/services/agents/publish/queues.2.json and looking at the property .<queueName>.<itemId>.attempts (e.g. 76cbf150-d210-4183-9af7-1a311e4e134a-publishSubscriber/package-0@878209/attempts).

[~dsuess] Anything left here ? Can you still reproduce this issue ? If not, I suggest to resolve this one as `Cannot Reproduce`.


> DistributionSubscriber is not failing correctly on  OakConstraint0025
> ---------------------------------------------------------------------
>
>                 Key: SLING-9052
>                 URL: https://issues.apache.org/jira/browse/SLING-9052
>             Project: Sling
>          Issue Type: Bug
>          Components: Content Distribution
>            Reporter: Dominik Süß
>            Assignee: Christian Schneider
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.1.20
>
>
> During the reproduction attempt of another issue a node was mistakenly replicated incomplete (not satisfying the OakConstraints) leading to OakConstraint0025 - this should have caused the replication to be considered failed as the replicated node couldn't be written into the repository at first hand - instead this caused >4000 retries within an hour until being noticed.
> {code}
> *ERROR* [Queue Processor for Subscriber agent forwardSubscriber] org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber Error processing queue item
> org.apache.sling.distribution.common.DistributionException: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0025: /etc/packages/my_packages/temptest.zip[[nt:file]]: Mandatory child node jcr:content not found in a new node
> 	at org.apache.sling.distribution.serialization.impl.vlt.FileVaultContentSerializer.importFromStream(FileVaultContentSerializer.java:170) [org.apache.sling.distribution.core:0.4.1.T201912202217-537bb57]
> 	at org.apache.sling.distribution.packaging.impl.InMemoryDistributionPackageBuilder.installPackageInternal(InMemoryDistributionPackageBuilder.java:119) [org.apache.sling.distribution.core:0.4.1.T201912202217-537bb57]
> 	at org.apache.sling.distribution.packaging.impl.AbstractDistributionPackageBuilder.installPackage(AbstractDistributionPackageBuilder.java:156) [org.apache.sling.distribution.core:0.4.1.T201912202217-537bb57]
> 	at org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.installPackage(MonitoringDistributionPackageBuilder.java:92) [org.apache.sling.distribution.core:0.4.1.T201912202217-537bb57]
> 	at org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory.installPackage(VaultDistributionPackageBuilderFactory.java:340) [org.apache.sling.distribution.core:0.4.1.T201912202217-537bb57]
> 	at org.apache.sling.distribution.journal.impl.subscriber.PackageHandler.installAddPackage(PackageHandler.java:70) [org.apache.sling.distribution.journal:0.1.7.T202023011551-c372493]
> 	at org.apache.sling.distribution.journal.impl.subscriber.PackageHandler.apply(PackageHandler.java:53) [org.apache.sling.distribution.journal:0.1.7.T202023011551-c372493]
> 	at org.apache.sling.distribution.journal.impl.subscriber.BookKeeper.importPackage(BookKeeper.java:153) [org.apache.sling.distribution.journal:0.1.7.T202023011551-c372493]
> 	at org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueueItem(DistributionSubscriber.java:408) [org.apache.sling.distribution.journal:0.1.7.T202023011551-c372493]
> 	at org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.fetchAndProcessQueueItem(DistributionSubscriber.java:369) [org.apache.sling.distribution.journal:0.1.7.T202023011551-c372493]
> 	at org.apache.sling.distribution.journal.impl.subscriber.DistributionSubscriber.processQueue(DistributionSubscriber.java:353) [org.apache.sling.distribution.journal:0.1.7.T202023011551-c372493]
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0025: /etc/packages/my_packages/temptest.zip[[nt:file]]: Mandatory child node jcr:content not found in a new node
> {code}
> Clarification: 
> The expected behavior would be at least having the queue being blocked (which happened at no point) and in the specific case retries are doomed to continously fail as the package is incompatible with the target while. The errormessage does spam the error.log



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