activemq-karaf-itest failing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

activemq-karaf-itest failing

chughpiyush
This post was updated on .
Hey all! I am stuck due to failing tests in the ActiveMQ master branch code. Since it seems to be an integration test issue, I didn't create a JIRA ticket for the same. I'll try to share all the information I can for someone to help me: - Why am I doing code changes? - How am I impacted? - Where exactly am I stuck? - My suspected reason for failing test - How to potentially reproduce it? TL;DR - ActiveMQBrokerNdCamelFeatureTest failing as unable to download artefacts from http://repo1.maven.org/maven2/

1. Why am I doing code changes?

I want to contribute to ActiveMQ project on Github and I am doing some version updates in parent pom of ActiveMQ. I did my changes and just before pushing, I am running smoke tests to be sure I haven't broken anything. I am using -Dactivemq.tests=smoke to run tests. It was here when I started to notice failing tests. IDE - IntelliJ Java version - 8

2. - How am I impacted?

I think this is an existing issue but still, I am not sure if I should push my proposed changes until these tests are fixed. The Jenkins job on https://builds.apache.org/ might not have failed as it cached all dependencies already.

3. Where exactly am I stuck?

2 tests are failing for me in activemq-karaf-itest module - ActiveMQBrokerNdCamelFeatureTest and ActiveMQAMQPBrokerFeatureTest. Initially they were failing due to:
Caused by: java.io.FileNotFoundException: /karaf.log (Permission denied)
I fixed it by updating pax-exam-version to 4.13.1. Now I am running testProduceConsume test from ActiveMQAMQPBrokerFeatureTest in IntelliJ. This is the log of the error I get:
[org.ops4j.pax.exam.spi.DefaultExamSystem] : Pax Exam System (Version: 4.13.1) created.
[org.ops4j.store.intern.TemporaryStore] : Storage Area is /tmp/1581074004170-0
[org.ops4j.pax.exam.junit.impl.ProbeRunner] : creating PaxExam runner for class org.apache.activemq.karaf.itest.ActiveMQAMQPBrokerFeatureTest
[org.ops4j.pax.exam.spi.PaxExamRuntime] : Found TestContainerFactory: org.ops4j.pax.exam.karaf.container.internal.KarafTestContainerFactory
[org.ops4j.pax.exam.spi.DefaultExamSystem] : creating default probe
[org.ops4j.pax.exam.spi.reactors.ReactorManager] : User defined probe hook found: probeConfiguration
[org.ops4j.pax.exam.spi.intern.DefaultTestAddress] : NEW ADDRESS= PaxExam-3d955932-46a7-490f parent=null root=[TestAddress:PaxExam-3d955932-46a7-490f root:PaxExam-3d955932-46a7-490] args=[Ljava.lang.Object;@5906ebcb
[org.ops4j.pax.exam.spi.DefaultExamReactor] : Staging reactor with probes: 1 using strategy: org.ops4j.pax.exam.spi.reactors.PerClass@3b938003
[org.ops4j.store.intern.TemporaryStore] : Storage Area is /tmp/1581074004170-0
[org.ops4j.pax.exam.spi.intern.DefaultTestAddress] : NEW ADDRESS= PaxExam-db26dfcd-c398-4805 parent=[TestAddress:PaxExam-3d955932-46a7-490f root:PaxExam-3d955932-46a7-490f] root=[TestAddress:PaxExam-3d955932-46a7-490f root:PaxExam-3d955932-46a7-490f] args=[Ljava.lang.Object;@6ab7a896
[org.ops4j.pax.exam.junit.impl.ProbeRunner] : running test class org.apache.activemq.karaf.itest.ActiveMQAMQPBrokerFeatureTest
[org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer] : Creating RMI registry server on 127.0.0.1:21000
[org.ops4j.store.intern.TemporaryStore] : Storage Area is /tmp/1581074004170-0
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving [mvn:org.apache.karaf/apache-karaf/4.2.6/tar.gz]
[shaded.org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider] : Using manager PaxLocalRepositoryManager with priority 0.0 for /*/*/.m2/repository
[org.ops4j.pax.url.mvn.internal.AetherBasedResolver] : Resolved (org.apache.karaf:apache-karaf:tar.gz:4.2.6) as /*/*/.m2/repository/org/apache/karaf/apache-karaf/4.2.6/apache-karaf-4.2.6.tar.gz
[shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager] : Connection manager is shutting down Ignored FQCN: shaded.org.apache.commons.logging.impl.SLF4JLocationAwareLog
[shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager] : Connection manager shut down Ignored FQCN: shaded.org.apache.commons.logging.impl.SLF4JLocationAwareLog
[org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer] : Found 0 options when requesting OverrideJUnitBundlesOption.class
[org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer] : Test Container started in 7 millis
[org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer] : Wait for test container to finish its initialization [ RelativeTimeout value = 180000 ]
[org.ops4j.pax.exam.rbc.client.RemoteBundleContextClient] : Waiting for remote bundle context.. on 21000 name: 66c46122-c919 timout: [ RelativeTimeout value = 180000 ]
org.apache.karaf.features.internal.util.MultiException: Error:
	Error downloading mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.2.6
	at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:91)
	at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
	at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:457)
	at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:452)
	at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:452)
	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:224)
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:393)
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: java.io.IOException: Error downloading mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.2.6
		at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:77)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
		at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
		... 3 more
	Caused by: java.io.IOException: Error resolving artifact org.apache.karaf.scr:org.apache.karaf.scr.management:jar:4.2.6: [Could not transfer artifact org.apache.karaf.scr:org.apache.karaf.scr.management:jar:4.2.6 from/to central (http://repo1.maven.org/maven2/): Failed to transfer file http://repo1.maven.org/maven2/org/apache/karaf/scr/org.apache.karaf.scr.management/4.2.6/org.apache.karaf.scr.management-4.2.6.jar with status code 501]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.configureIOException(AetherBasedResolver.java:803)
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:774)
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657)
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598)
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565)
		at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:52)
		at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
		... 7 more
		Suppressed: shaded.org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.karaf.scr:org.apache.karaf.scr.management:jar:4.2.6 from/to central (http://repo1.maven.org/maven2/): Failed to transfer file http://repo1.maven.org/maven2/org/apache/karaf/scr/org.apache.karaf.scr.management/4.2.6/org.apache.karaf.scr.management-4.2.6.jar with status code 501
			at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52)
			at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:368)
			at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
			at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:642)
			at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:262)
			at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:489)
			at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:390)
			at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215)
			at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192)
			at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247)
			at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767)
			... 12 more
		Caused by: shaded.org.apache.maven.wagon.TransferFailedException: Failed to transfer file http://repo1.maven.org/maven2/org/apache/karaf/scr/org.apache.karaf.scr.management/4.2.6/org.apache.karaf.scr.management-4.2.6.jar with status code 501
			at shaded.org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1139)
			at shaded.org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1072)
			at shaded.org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:126)
			at shaded.org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
			at shaded.org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
			at shaded.org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:567)
			at shaded.org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:435)
			at shaded.org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:412)
			at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456)
			at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:363)
			... 21 more
	Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.apache.karaf.scr:org.apache.karaf.scr.management:jar:4.2.6
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:413)
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215)
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192)
		at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247)
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767)
		... 12 more

4. My suspected reason for failing test

If you notice, it is trying to get an artifact from http://repo1.maven.org/maven2/, but we know that http is no more supported. I think some library is still using http for maven artifact download and that is why it is failing. I am not able to figure out which library is the culprit. I got this exception for many different artifacts, so in my try to fix it I manually ran mvn dependency:get to download those failing dependencies, and it partially worked since the missing artifacts kept on changing.

5. How to potentially reproduce it?

- Get latest master branch code. - Update pax-exam-version to 4.13.1 - Delete some or all of the following dependencies from your local maven cache:
-DgroupId=org.apache.servicemix.specs -DartifactId=org.apache.servicemix.specs.stax-api-1.0 -Dversion=2.4.0
-DgroupId=org.apache.servicemix.bundles -DartifactId=org.apache.servicemix.bundles.jasypt -Dversion=1.9.2_1
-DgroupId=joda-time -DartifactId=joda-time -Dversion=2.9 
-DgroupId=org.ops4j.pax.web -DartifactId=pax-web-runtime -Dversion=7.2.10 
-DgroupId=org.ops4j.pax.web -DartifactId=pax-web-jetty -Dversion=7.2.10 
-DgroupId=org.apache.camel.karaf -DartifactId=camel-karaf-commands -Dversion=2.24.1 
Run ActiveMQAMQPBrokerFeatureTest test in your IDE. I think you should get a similar stacktrace. Any help to fix this will be appreciated. --- Thanks & Regards, Piyush Chugh -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq-karaf-itest failing

chughpiyush
Posting permalink of the post (The original post somehow decided to remove my
stacktraces in  < raw > tags) -
http://activemq.2283324.n4.nabble.com/activemq-karaf-itest-failing-tp4754899.html



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
Reply | Threaded
Open this post in threaded view
|

Re: activemq-karaf-itest failing

chughpiyush
In reply to this post by chughpiyush
I fixed the original issue by manually downloading the missing dependencies
but now the tests in activemq-karaf-itest (ActiveMQAMQPBrokerFeatureTest
and ActiveMQBrokerNdCamelFeatureTest) are failing and I am getting the
following error:

Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to
resolve activemq/5.16.0.SNAPSHOT: missing requirement
[activemq/5.16.0.SNAPSHOT] osgi.identity; osgi.identity=activemq-client;
type=karaf.feature; version="[5.16.0.SNAPSHOT,5.16.0.SNAPSHOT]" [caused by:
Unable to resolve activemq-client/5.16.0.SNAPSHOT: missing requirement
[activemq-client/5.16.0.SNAPSHOT] osgi.identity; osgi.identity=spring;
type=karaf.feature; version="[4.0.0,5.0.0)"]
...
java.lang.RuntimeException: Container never came up
...
java.lang.RuntimeException: Cannot get the remote bundle context

The full stacktrace is available at - https://pastr.io/view/ZJytQSGbS32

P.S. The latest build on Jenkins might be failing because of the same issue.

On Fri, Feb 7, 2020 at 5:30 PM chughpiyush <[hidden email]>
wrote:

> Hey all!
>
> I am stuck due to failing tests in the ActiveMQ master branch code. Since
> it
> seems to be an integration test issue, I didn't create a JIRA ticket for
> the
> same. I'll try to share all the information I can for someone to help me:
>
> - Why am I doing code changes?
> - How am I impacted?
> - Where exactly am I stuck?
> - My suspected reason for failing test
> - How to potentially reproduce it?
>
> TL;DR - *ActiveMQBrokerNdCamelFeatureTest* failing as unable to download
> artefacts from  *http://repo1.maven.org/maven2/*
>
> 1. Why am I doing code changes?
>
> I want to contribute to ActiveMQ project on Github and I am doing some
> version updates in parent pom of ActiveMQ. I did my changes and just before
> pushing, I am running smoke tests to be sure I haven't broken anything. I
> am
> using *-Dactivemq.tests=smoke* to run tests. It was here when I started to
> notice failing tests.
>
> IDE - IntelliJ
> Java version - 8
>
> 2. - How am I impacted?
>
> I think this is an existing issue but still, I am not sure if I should push
> my proposed changes until these tests are fixed.
> The Jenkins job on https://builds.apache.org/ might not have failed as it
> cached all dependencies already.
>
> 3. Where exactly am I stuck?
>
> 2 tests are failing for me in *activemq-karaf-itest* module -
> *ActiveMQBrokerNdCamelFeatureTest* and *ActiveMQAMQPBrokerFeatureTest*.
> Initially they were failing due to:
>
>
>
> I fixed it by updating *pax-exam-version* to *4.13.1*. Now I am running
> *testProduceConsume* test from *ActiveMQAMQPBrokerFeatureTest* in IntelliJ.
> This is the log of the error I get:
>
>
>
> 4. My suspected reason for failing test
>
> If you notice, it is trying to get an artifact from
> *http://repo1.maven.org/maven2/*, but we know that *http* is no more
> supported. I think some library is still using *http* for maven artifact
> download and that is why it is failing. I am not able to figure out which
> library is the culprit. I got this exception for many different artifacts,
> so in my try to fix it I manually ran *mvn dependency:get* to download
> those
> failing dependencies, and it partially worked since the missing artifacts
> kept on changing.
>
> 5. How to potentially reproduce it?
>
> - Get latest master branch code.
> - Update *pax-exam-version* to *4.13.1*
> - Delete some or all of the following dependencies from your local maven
> cache:
>
>
>
> Run *ActiveMQAMQPBrokerFeatureTest* test in your IDE. I think you should
> get
> a similar stacktrace.
> Any help to fix this will be appreciated.
> ---
>
> Thanks & Regards,
> Piyush Chugh
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
>
Reply | Threaded
Open this post in threaded view
|

Re: activemq-karaf-itest failing

jbonofre
Hi,

I already identified that and I’m fixing, it’s simply the missing spring-legacy feature ref.

Regards
JB

> Le 12 févr. 2020 à 10:34, Piyush Chugh <[hidden email]> a écrit :
>
> I fixed the original issue by manually downloading the missing dependencies
> but now the tests in activemq-karaf-itest (ActiveMQAMQPBrokerFeatureTest
> and ActiveMQBrokerNdCamelFeatureTest) are failing and I am getting the
> following error:
>
> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to
> resolve activemq/5.16.0.SNAPSHOT: missing requirement
> [activemq/5.16.0.SNAPSHOT] osgi.identity; osgi.identity=activemq-client;
> type=karaf.feature; version="[5.16.0.SNAPSHOT,5.16.0.SNAPSHOT]" [caused by:
> Unable to resolve activemq-client/5.16.0.SNAPSHOT: missing requirement
> [activemq-client/5.16.0.SNAPSHOT] osgi.identity; osgi.identity=spring;
> type=karaf.feature; version="[4.0.0,5.0.0)"]
> ...
> java.lang.RuntimeException: Container never came up
> ...
> java.lang.RuntimeException: Cannot get the remote bundle context
>
> The full stacktrace is available at - https://pastr.io/view/ZJytQSGbS32
>
> P.S. The latest build on Jenkins might be failing because of the same issue.
>
> On Fri, Feb 7, 2020 at 5:30 PM chughpiyush <[hidden email]>
> wrote:
>
>> Hey all!
>>
>> I am stuck due to failing tests in the ActiveMQ master branch code. Since
>> it
>> seems to be an integration test issue, I didn't create a JIRA ticket for
>> the
>> same. I'll try to share all the information I can for someone to help me:
>>
>> - Why am I doing code changes?
>> - How am I impacted?
>> - Where exactly am I stuck?
>> - My suspected reason for failing test
>> - How to potentially reproduce it?
>>
>> TL;DR - *ActiveMQBrokerNdCamelFeatureTest* failing as unable to download
>> artefacts from  *http://repo1.maven.org/maven2/*
>>
>> 1. Why am I doing code changes?
>>
>> I want to contribute to ActiveMQ project on Github and I am doing some
>> version updates in parent pom of ActiveMQ. I did my changes and just before
>> pushing, I am running smoke tests to be sure I haven't broken anything. I
>> am
>> using *-Dactivemq.tests=smoke* to run tests. It was here when I started to
>> notice failing tests.
>>
>> IDE - IntelliJ
>> Java version - 8
>>
>> 2. - How am I impacted?
>>
>> I think this is an existing issue but still, I am not sure if I should push
>> my proposed changes until these tests are fixed.
>> The Jenkins job on https://builds.apache.org/ might not have failed as it
>> cached all dependencies already.
>>
>> 3. Where exactly am I stuck?
>>
>> 2 tests are failing for me in *activemq-karaf-itest* module -
>> *ActiveMQBrokerNdCamelFeatureTest* and *ActiveMQAMQPBrokerFeatureTest*.
>> Initially they were failing due to:
>>
>>
>>
>> I fixed it by updating *pax-exam-version* to *4.13.1*. Now I am running
>> *testProduceConsume* test from *ActiveMQAMQPBrokerFeatureTest* in IntelliJ.
>> This is the log of the error I get:
>>
>>
>>
>> 4. My suspected reason for failing test
>>
>> If you notice, it is trying to get an artifact from
>> *http://repo1.maven.org/maven2/*, but we know that *http* is no more
>> supported. I think some library is still using *http* for maven artifact
>> download and that is why it is failing. I am not able to figure out which
>> library is the culprit. I got this exception for many different artifacts,
>> so in my try to fix it I manually ran *mvn dependency:get* to download
>> those
>> failing dependencies, and it partially worked since the missing artifacts
>> kept on changing.
>>
>> 5. How to potentially reproduce it?
>>
>> - Get latest master branch code.
>> - Update *pax-exam-version* to *4.13.1*
>> - Delete some or all of the following dependencies from your local maven
>> cache:
>>
>>
>>
>> Run *ActiveMQAMQPBrokerFeatureTest* test in your IDE. I think you should
>> get
>> a similar stacktrace.
>> Any help to fix this will be appreciated.
>> ---
>>
>> Thanks & Regards,
>> Piyush Chugh
>>
>>
>>
>>
>> --
>> Sent from:
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
>>