在JBoss EAP 5.1上,我无法阻止容器。 当我执行container.stop时,端口状态如下:
TCP 127.0.0.1:2927 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2928 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2929 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2930 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2931 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2932 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2933 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2934 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2935 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2936 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2937 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2938 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2939 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2940 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2941 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2942 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2943 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2944 127.0.0.1:8080 TIME_WAIT
并有以下例外:
Caused by: org.codehaus.cargo.container.ContainerException: Server port 8080 did not shutdown within the timeout period [120000]
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:390)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:301)
at org.codehaus.cargo.container.jboss.internal.AbstractJBossInstalledLocalContainer.waitForCompletion(AbstractJBossInstalledLocalContainer.java:154)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:214)
... 33 more
org.codehaus.cargo.container.ContainerException: Server port 8080 did not shutdown within the timeout period [120000]
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:390)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:301)
at org.codehaus.cargo.container.jboss.internal.AbstractJBossInstalledLocalContainer.waitForCompletion(AbstractJBossInstalledLocalContainer.java:154)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:214)
at jp.co.nri.kinshasa.util.server.JBossServerImpl.stopContainer(JBossServerImpl.java:151)
我的代码就像我使用JBoss51xInstalledLocalContainer:
private void prepareJBoss() {
ConfigurationFactory configurationFactory = new DefaultConfigurationFactory();
localConfiguration = (StandaloneLocalConfiguration) configurationFactory
.createConfiguration("jboss51x", ContainerType.INSTALLED,
ConfigurationType.STANDALONE, WORK_HOME);
localConfiguration.setProperty(JBossPropertySet.JBOSS_USER, "admin");
localConfiguration
.setProperty(JBossPropertySet.JBOSS_PASSWORD, "admin");
localConfiguration.setProperty(GeneralPropertySet.JVMARGS,
"-Xms512m -Xmx512m");
}
private void startContainer() {
container = new JBoss51xInstalledLocalContainer(localConfiguration);
container.setHome(JBOSS_HOME);
container.setExtraClasspath(new String[] {
PROJECT_PATH + "/target/external/kss/apl_conf",
PROJECT_PATH + "/target/external/kss/kiban_conf" });
container.start();
}
答案 0 :(得分:0)
如果您关闭,则需要保持适当的环境。
您使用shutdown --server=localhost:1099 --user=admin --password=admin
关闭服务器。
但在您的环境中,您忘记在/conf/props/jmx-console-users.properties