ops4j / org.ops4j.pax.exam2

Pax Exam is a testing framework for OSGi
https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/
Apache License 2.0
84 stars 100 forks source link

Put dynamic RMI port values into Karaf's management configuration file #1088

Closed oliverlietz closed 11 months ago

oliverlietz commented 11 months ago
Exception in thread "JMX Connector Thread [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root]" java.lang.RuntimeException: 
Port already in use: 44444; 
You may have started two containers.  If you need to start a second container or the default ports are already in use update the config file etc/org.apache.karaf.management.cfg and change the Registry Port and Server Port to unused ports
    at org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:325)
    at java.lang.Thread.run(Thread.java:750)
Exception in thread "JMX Connector Thread [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root]" java.lang.RuntimeException: 
Port already in use: 44444; 
You may have started two containers.  If you need to start a second container or the default ports are already in use update the config file etc/org.apache.karaf.management.cfg and change the Registry Port and Server Port to unused ports
    at org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:325)
    at java.lang.Thread.run(Thread.java:750)
10:12:20.817 [main] WARN  o.o.pax.exam.spi.DefaultExamSystem - Option org.ops4j.pax.exam.karaf.options.libraries.OverrideJUnitBundlesOption has not been recognized.
10:12:20.817 [main] WARN  o.o.pax.exam.spi.DefaultExamSystem - Option org.ops4j.pax.exam.karaf.options.KarafDistributionConfigurationOption has not been recognized.
10:12:20.817 [main] WARN  o.o.pax.exam.spi.DefaultExamSystem - Option org.ops4j.pax.exam.options.FrameworkStartLevelOption has not been recognized.
10:12:20.833 [main] WARN  o.o.pax.exam.spi.DefaultExamSystem - Option org.ops4j.pax.exam.karaf.options.libraries.OverrideJUnitBundlesOption has not been recognized.
10:12:20.833 [main] WARN  o.o.pax.exam.spi.DefaultExamSystem - Option org.ops4j.pax.exam.karaf.options.KarafDistributionConfigurationOption has not been recognized.
10:12:20.833 [main] WARN  o.o.pax.exam.spi.DefaultExamSystem - Option org.ops4j.pax.exam.options.FrameworkStartLevelOption has not been recognized.
10:12:21.130 [main] INFO  o.o.p.e.spi.reactors.ReactorManager - suite finished
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 117.0 s -- in org.ops4j.pax.exam.karaf.container.ValidateOverridingJUnitBundlesIT
Error:  Surefire is going to kill self fork JVM. The exit has elapsed 30 seconds after System.exit(0).
[INFO] 
[INFO] Results:
[INFO] 
Error:  Errors: 
Error:    Karaf3TestContainerIT.checkKarafSystemService � NotBound 8a71afe1-b45d-45ba-b9ec-40b4a2693cf8
[INFO] 
Error:  Tests run: 7, Failures: 0, Errors: 1, Skipped:

See comment in #1084