[
https://issues.apache.org/jira/browse/SLING-9332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17076256#comment-17076256
]
Mohit Arora edited comment on SLING-9332 at 4/7/20, 4:12 AM:
-------------------------------------------------------------
The main problem is sling-distribution-core bundle using very old version of
[sling
parent|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/pom.xml#L28].
This version was changed from 26 to 28 [quite
recently|https://github.com/apache/sling-org-apache-sling-distribution-core/commit/a1850193d63ddedced4ad982df18a62345cdf41b#diff-600376dffeb79835ede4a0b285078036]
by [~cschneider]. Probably because of some compatibility concerns, it was not
changed to a higher version. Sling parent has moved to 1.7.x version of slf4j a
[long time
back|https://github.com/apache/sling-parent/commit/4b673afd477272f84449bdede7e4f0596dcd0513]
and I think we should at least be using that version of parent pom with latest
slf4j version. If, however, that's not possible without trivial changes, the
version of slf4j bundles should be overridden in distribution-core pom as it
has always been the case.
EDIT - I just checked that version of 28 of sling-parent contains the update to
slf4j bundle version. In that case we only need to adapt the log statement.
was (Author: mohiaror):
The main problem is sling-distribution-core bundle using very old version of
[sling
parent|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/pom.xml#L28].
This version was changed from 26 to 28 [quite
recently|https://github.com/apache/sling-org-apache-sling-distribution-core/commit/a1850193d63ddedced4ad982df18a62345cdf41b#diff-600376dffeb79835ede4a0b285078036]
by [~cschneider]. Probably because of some compatibility concerns, it was not
changed to a higher version. Sling parent has moved to 1.7.x version of slf4j a
[long time
back|https://github.com/apache/sling-parent/commit/4b673afd477272f84449bdede7e4f0596dcd0513]
and I think we should at least be using that version of parent pom with latest
slf4j version. If, however, that's not possible without non-trivial changes,
the version of log4j bundles should be overridden in distribution-core pom as
it has always been the case.
EDIT - I just checked that version of 28 of sling-parent contains the update to
slf4j bundle version. In that case we only need to adapt the log statement.
> Error logged for NonRecoverableDistributionException in
> SimpleDistributionAgentQueueProcessor does not log queuename
> --------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-9332
> URL: https://issues.apache.org/jira/browse/SLING-9332
> Project: Sling
> Issue Type: Bug
> Components: Content Distribution
> Reporter: Mohit Arora
> Priority: Minor
> Fix For: Content Distribution Core 0.4.4
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The [error message logged
> in|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L157]
> SimpleDistributionAgentQueueProcessor uses an _Object_ to log
> distributionpackage ID and queuename. However, from version 1.7 onward, log4j
> seems to have stopped processing the object arrays for log statements.
> Because of this the error logged in case of unsuccessful distribution looks
> like -
> {noformat}06.04.2020 07:48:30.411 *ERROR*
> [sling-default-1-resource-queueProcessor-bpdistributionagent0-queue-bpdistributionagent0]
>
> org.apache.sling.distribution.agent.impl.SimpleDistributionAgentQueueProcessor
> could not deliver package
> [dstrpck-1586159284848-e4c369fc-5bbf-4cfc-9ea3-2819af650784,
> queue-bpdistributionagent0] from queue {}
> org.apache.sling.distribution.common.DistributionException:
> org.apache.http.client.HttpResponseException: Bad Gateway
> at
> org.apache.sling.distribution.transport.impl.SimpleHttpDistributionTransport.deliverPackage(SimpleHttpDistributionTransport.java:162)
> [org.apache.sling.distribution.core:0.4.2]
> at
> org.apache.sling.distribution.packaging.impl.importer.RemoteDistributionPackageImporter.importPackage(RemoteDistributionPackageImporter.java:66)
> [org.apache.sling.distribution.core:0.4.2]
> at
> org.apache.sling.distribution.agent.impl.SimpleDistributionAgentQueueProcessor.processQueueItem(SimpleDistributionAgentQueueProcessor.java:134)
> [org.apache.sling.distribution.core:0.4.2]
> at
> org.apache.sling.distribution.agent.impl.SimpleDistributionAgentQueueProcessor.process(SimpleDistributionAgentQueueProcessor.java:91)
> [org.apache.sling.distribution.core:0.4.2]
> at
> org.apache.sling.distribution.queue.impl.simple.SimpleDistributionQueueProcessor.run(SimpleDistributionQueueProcessor.java:53)
> [org.apache.sling.distribution.core:0.4.2]
> at
> org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:347)
> [org.apache.sling.commons.scheduler:2.7.6]
> at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> [org.apache.sling.commons.scheduler:2.7.6]
> 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: org.apache.http.client.HttpResponseException: Bad Gateway
> at
> org.apache.http.impl.client.AbstractResponseHandler.handleResponse(AbstractResponseHandler.java:70)
> [org.apache.httpcomponents.httpclient:4.5.4]
> at
> org.apache.http.client.fluent.Response.handleResponse(Response.java:90)
> [org.apache.httpcomponents.httpclient:4.5.4]
> at
> org.apache.http.client.fluent.Response.returnContent(Response.java:97)
> [org.apache.httpcomponents.httpclient:4.5.4]
> at
> org.apache.sling.distribution.transport.impl.SimpleHttpDistributionTransport.deliverPackage(SimpleHttpDistributionTransport.java:148)
> [org.apache.sling.distribution.core:0.4.2]
> ... 9 common frames omitted{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)