Jenkins + Maven + Pax-exam-karaf problem

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

Jenkins + Maven + Pax-exam-karaf problem

ggerla
Hi all
I'm experimenting 2 strange behaviours with integration tests under jenkins.
The first problem is that often integration tests fail with a
java.rmi.NoBoundException. This is a randomic behaviour. The same tests
works fine on my pc.
The second problem is that when a test fails jenkins doesn't kill the test
process and in this way I have several ghost process.

Do you have some idea?



Following some additional information:
O.S. ubuntu 64bit
Jenkins -> 2.60.3
Karaf -> 4.0.9
pax-exam -> 4.9.1
maven 3.5.0


Regards
Giuseppe
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins + Maven + Pax-exam-karaf problem

jbonofre
Hi Giuseppe,

I guess you mean your own Jenkins ?

The NoBoundException is cause by itests using RMI right ?

For Jenkins, I can share with you the configuration I did on our job in the
Apache Jenkins.

Regards
JB

On 09/07/2017 10:51 PM, Giuseppe Gerla wrote:

> Hi all
> I'm experimenting 2 strange behaviours with integration tests under jenkins.
> The first problem is that often integration tests fail with a
> java.rmi.NoBoundException. This is a randomic behaviour. The same tests
> works fine on my pc.
> The second problem is that when a test fails jenkins doesn't kill the test
> process and in this way I have several ghost process.
>
> Do you have some idea?
>
>
>
> Following some additional information:
> O.S. ubuntu 64bit
> Jenkins -> 2.60.3
> Karaf -> 4.0.9
> pax-exam -> 4.9.1
> maven 3.5.0
>
>
> Regards
> Giuseppe
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins + Maven + Pax-exam-karaf problem

ggerla
Hi JB
yes I mean my Jenkins.
My itest is created with following code


        MavenArtifactUrlReference karafUrl =
maven().groupId("org.apache.karaf").artifactId("apache-karaf")
            .versionAsInProject().type("tar.gz");


customOptions.add(karafDistributionConfiguration().frameworkUrl(karafUrl)
            .karafVersion(getKarafVersion()).unpackDirectory(new
File("target/exam")).useDeployFolder(false));

        customOptions.add(keepRuntimeFolder());
        customOptions.add(junitBundles());
        customOptions.add(KarafDistributionOption
            .editConfigurationFilePut("etc/org.apache.karaf.features.cfg",
"featuresBoot",
                                      "(aries-blueprint, bundle, config,
deployer, diagnostic, feature, instance, jaas, kar, log, management,
package, service, shell, shell-compat, ssh, system, wrap)"));
        MavenUrlReference karafStandardRepo =
maven().groupId("org.apache.karaf.features")

.artifactId("standard").classifier("features").type("xml").versionAsInProject();
        MavenUrlReference activemqStandardRepo =
maven().groupId("org.apache.activemq")

.artifactId("activemq-karaf").classifier("features").type("xml").versionAsInProject();


customOptions.add(KarafDistributionOption.features(karafStandardRepo,
"scr"));

customOptions.add(KarafDistributionOption.features(activemqStandardRepo,
"activemq-broker-noweb"));

In the /data/log/karaf.log file there are no errors. But on the console i
receive following exception


java.rmi.NotBoundException: 459dd019-b343-45a2-825c-4cc630909d16
        at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:166)
        at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:411)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:272)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:379)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.getRemoteBundleContext(RemoteBundleContextClientImpl.java:242)
        at org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.waitForState(RemoteBundleContextClientImpl.java:211)
        at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.waitForState(KarafTestContainer.java:580)
        at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.startKaraf(KarafTestContainer.java:230)
        at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.start(KarafTestContainer.java:180)
        at org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactor.invoke(AllConfinedStagedReactor.java:79)
        at org.ops4j.pax.exam.junit.impl.ProbeRunner$2.evaluate(ProbeRunner.java:267)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:98)
        at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)



if you share your jenkins configuration, it will be great




Regards

Giuseppe



2017-09-08 7:27 GMT+02:00 Jean-Baptiste Onofré <[hidden email]>:

> Hi Giuseppe,
>
> I guess you mean your own Jenkins ?
>
> The NoBoundException is cause by itests using RMI right ?
>
> For Jenkins, I can share with you the configuration I did on our job in
> the Apache Jenkins.
>
> Regards
> JB
>
>
> On 09/07/2017 10:51 PM, Giuseppe Gerla wrote:
>
>> Hi all
>> I'm experimenting 2 strange behaviours with integration tests under
>> jenkins.
>> The first problem is that often integration tests fail with a
>> java.rmi.NoBoundException. This is a randomic behaviour. The same tests
>> works fine on my pc.
>> The second problem is that when a test fails jenkins doesn't kill the test
>> process and in this way I have several ghost process.
>>
>> Do you have some idea?
>>
>>
>>
>> Following some additional information:
>> O.S. ubuntu 64bit
>> Jenkins -> 2.60.3
>> Karaf -> 4.0.9
>> pax-exam -> 4.9.1
>> maven 3.5.0
>>
>>
>> Regards
>> Giuseppe
>>
>>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>