We're updating the issue view to help you get more done. 

JBoss7xInstalledLocalContainer unable to stop container running on hostname other than localhost

Description

When running a clustered test environment on a single local machine with multiple virtual IPs and using multiple cargo containers none of the containers would stop. I noticed that in the doStop method of the JBoss containers it has some arguments that get passed in that weren't working for us. In particular it always calls localhost and we needed to pass in the HOSTNAME. In addition it was throwing an error on the shutdown command=:shutdown with this in the logs 'command=:shutdown' is not a valid operation name.' I'm not sure this would be universal to the other JBoss containers, but this code snippet is what is working for us.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 /** * {@inheritDoc} */ @Override protected void doStop(JvmLauncher java) throws Exception { String port = getConfiguration().getPropertyValue(JBossPropertySet.JBOSS_MANAGEMENT_NATIVE_PORT); String hostName = getConfiguration().getPropertyValue(GeneralPropertySet.HOSTNAME); java.setJarFile(new File(getHome(), "jboss-modules.jar")); java.addAppArguments( "-mp", getHome() + "/modules", "org.jboss.as.cli", "--connect", "controller=" + hostName + ":" + port, ":shutdown"); java.start(); }

Status

Assignee

Savas Ali Tokmen

Reporter

Alex Austin

Components

Fix versions

Affects versions

1.4.4

Priority

Minor