]
Tristan Tarrant updated ISPN-10910:
-----------------------------------
Fix Version/s: 10.1.0.CR1
(was: 10.1.0.Beta1)
Server should not keep running after a startup error
----------------------------------------------------
Key: ISPN-10910
URL:
https://issues.jboss.org/browse/ISPN-10910
Project: Infinispan
Issue Type: Bug
Components: Server
Affects Versions: 10.0.1.Final
Reporter: Dan Berindei
Priority: Major
Fix For: 10.1.0.CR1
Some startup exceptions are logged on the console and ignored:
{noformat}
java.lang.IllegalArgumentException: A metric with metricID
MetricID{name='Server_Transport_numberOfGlobalConnections',
tags=[_domain="test_domain",name="Memcached-11221"]} already exists
java.lang.RuntimeException: java.lang.IllegalArgumentException: A metric with metricID
MetricID{name='Server_Transport_numberOfGlobalConnections',
tags=[_domain="test_domain",name="Memcached-11221"]} already exists
at
org.infinispan.server.core.AbstractProtocolServer.registerServerMBeans(AbstractProtocolServer.java:168)
at
org.infinispan.server.core.AbstractProtocolServer.startTransport(AbstractProtocolServer.java:116)
at
org.infinispan.server.core.AbstractProtocolServer.startInternal(AbstractProtocolServer.java:72)
at
org.infinispan.server.memcached.MemcachedServer.startInternal(MemcachedServer.java:60)
at
org.infinispan.server.memcached.MemcachedServer.startInternal(MemcachedServer.java:33)
at
org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.java:103)
at
org.infinispan.server.SecurityActions.lambda$startProtocolServer$4(SecurityActions.java:72)
at org.infinispan.security.Security.doPrivileged(Security.java:47)
at org.infinispan.server.SecurityActions.doPrivileged(SecurityActions.java:32)
at org.infinispan.server.SecurityActions.startProtocolServer(SecurityActions.java:75)
at org.infinispan.server.Server.lambda$run$1(Server.java:294)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at
java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.lang.IllegalArgumentException: A metric with metricID
MetricID{name='Server_Transport_numberOfGlobalConnections',
tags=[_domain="test_domain",name="Memcached-11221"]} already exists
at io.smallrye.metrics.MetricsRegistryImpl.register(MetricsRegistryImpl.java:129)
at
org.infinispan.metrics.impl.ApplicationMetricsRegistry.register(ApplicationMetricsRegistry.java:81)
at
org.infinispan.jmx.AbstractJmxRegistration.registerExternalMBean(AbstractJmxRegistration.java:222)
at
org.infinispan.jmx.CacheManagerJmxRegistration.registerExternalMBean(CacheManagerJmxRegistration.java:16)
at
org.infinispan.server.core.AbstractProtocolServer.registerServerMBeans(AbstractProtocolServer.java:165)
... 20 more
{noformat}
Other exceptions are only logged during stop:
{noformat}
09:09:48,404 ERROR (testng-ShutdownRestIT:[]) [TestSuiteProgress] Test failed:
suite.null
java.lang.RuntimeException: null
at
org.infinispan.server.test.EmbeddedInfinispanServerDriver.stop(EmbeddedInfinispanServerDriver.java:59)
~[test-classes/:?]
at
org.infinispan.server.test.InfinispanServerDriver.after(InfinispanServerDriver.java:101)
~[test-classes/:?]
at
org.infinispan.server.test.InfinispanServerRule$1.evaluate(InfinispanServerRule.java:72)
~[test-classes/:?]
at org.junit.rules.RunRules.evaluate(RunRules.java:20) ~[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
at org.junit.runners.Suite.runChild(Suite.java:128) [junit-4.12.jar:4.12]
at org.junit.runners.Suite.runChild(Suite.java:27) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
Suppressed: java.util.concurrent.ExecutionException:
io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) ~[?:?]
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999) ~[?:?]
at
org.infinispan.server.test.EmbeddedInfinispanServerDriver.stop(EmbeddedInfinispanServerDriver.java:65)
~[test-classes/:?]
at
org.infinispan.server.test.InfinispanServerDriver.after(InfinispanServerDriver.java:101)
~[test-classes/:?]
at
org.infinispan.server.test.InfinispanServerRule$1.evaluate(InfinispanServerRule.java:72)
~[test-classes/:?]
at org.junit.rules.RunRules.evaluate(RunRules.java:20) ~[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
at org.junit.runners.Suite.runChild(Suite.java:128) [junit-4.12.jar:4.12]
at org.junit.runners.Suite.runChild(Suite.java:27) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
[surefire-junit47-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
[surefire-booter-3.0.0-M3.jar:3.0.0-M3]
Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address
already in use
{noformat}
It would be much better for the test suite if the server failed fast instead of showing
an exception only after the test has run with a broken server.