-
Bug
-
Resolution: Done
-
Major
-
1.0.0.Beta1
-
None
While looking at some other test issues I noticed test logging that indicates that the server embedded in the CLI seems to not always be cleaning up properly, resulting in MSC leaving mbeans installed and subsequent mbean registration errors when the next attempt to launch happens.
Here's an example from a server.log; my impression is one test method attempts to create a server with an invalid --empty-config param, and when that fails the appropriate cleanup doesn't happen.
2015-04-20 11:27:44,020 ERROR [org.jboss.msc.service.fail] (MSC service thread 17-1) MSC000001: Failed to start service jboss.as.server-controller: org.jboss.msc.service.StartException in service jboss.as.server-controller: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalStateException: WFLYCTL0389: Could not create an empty configuration at file /Users/bstansberry/dev/wildfly/wildfly-core/testsuite/manualmode/target/wildfly-core/standalone/configuration/standalone-cli.xml as there is an existing non-empty configuration there at org.jboss.as.controller.persistence.ConfigurationFile.getBootFile(ConfigurationFile.java:242) at org.jboss.as.controller.persistence.BackupXmlConfigurationPersister.<init>(BackupXmlConfigurationPersister.java:70) at org.jboss.as.server.Bootstrap$Configuration$1.createConfigurationPersister(Bootstrap.java:178) at org.jboss.as.server.ServerService.start(ServerService.java:241) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) ... 3 more 2015-04-20 11:27:44,031 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.2.Final 2015-04-20 11:27:44,032 ERROR [org.jboss.msc] (main) MSC000010: Failed to register MBean with MBeanServer: javax.management.InstanceAlreadyExistsException: jboss.msc:type=container,name=jboss-as at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) at org.jboss.msc.service.ServiceContainerImpl.<init>(ServiceContainerImpl.java:372) at org.jboss.msc.service.ServiceContainer$Factory.create(ServiceContainer.java:266) at org.jboss.as.server.BootstrapImpl$ShutdownHook.register(BootstrapImpl.java:198) at org.jboss.as.server.BootstrapImpl$ShutdownHook.access$100(BootstrapImpl.java:188) at org.jboss.as.server.BootstrapImpl.<init>(BootstrapImpl.java:62) at org.jboss.as.server.Bootstrap$Factory.newInstance(Bootstrap.java:243) at org.wildfly.core.embedded.EmbeddedStandAloneServerFactory$StandaloneServerImpl.start(EmbeddedStandAloneServerFactory.java:280) at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.wildfly.core.embedded.StandaloneServerIndirection.invokeOnServer(StandaloneServerIndirection.java:70) at org.wildfly.core.embedded.StandaloneServerIndirection.start(StandaloneServerIndirection.java:55) at org.jboss.as.cli.embedded.EmbedServerHandler.doHandle(EmbedServerHandler.java:201) at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:88) at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:676) at org.jboss.as.test.integration.management.util.CLIWrapper.sendLine(CLIWrapper.java:163) at org.jboss.as.test.integration.management.util.CLIWrapper.sendLine(CLIWrapper.java:177) at org.jboss.as.test.manualmode.management.cli.CLIEmbedServerTestCase.stdoutTest(CLIEmbedServerTestCase.java:219) at org.jboss.as.test.manualmode.management.cli.CLIEmbedServerTestCase.testStdOutEcho(CLIEmbedServerTestCase.java:199)