Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-1222

JBoss7xInstalledLocalContainer unable to stop container running on hostname other than localhost

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 1.4.4
    • Fix versions: 1.4.5
    • Components: JBoss, WildFly
    • Labels:
      None
    • Environment:

      OS's tested on: openSUSE 12.3, Windows 7

      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.

      /**
      * {@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();
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Savas Ali Tokmen (Inactive)
              Reporter:
              Alex Austin (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: