@Override
  protected int executeCommand() throws CommandException, CommandValidationException {
    // if the local password isn't available, the instance isn't running
    // (localPassword is set by initInstance)
    File serverDir = getServerDirs().getServerDir();

    if (serverDir == null || !serverDir.isDirectory()) return noSuchInstance();

    if (getServerDirs().getLocalPassword() == null) return instanceNotRunning();

    String serverName = getServerDirs().getServerName();
    HostAndPort addr = getAdminAddress(serverName);
    programOpts.setHostAndPort(addr);

    logger.finer("StopInstance.stoppingMessage" + addr.getPort());

    if (!isRunning()) return instanceNotRunning();

    logger.finer("It's the correct Instance");
    return doRemoteCommand();
  }