elastic/elasticsearch · warning · UserException

65

65

Error message

installation aborted by user

What it means

Thrown by PluginSecurity.prompt when the user, asked `Continue with installation? [y/N]` after reviewing plugin security permissions, answers anything other than `y` (case-insensitive). It is the user-driven abort path with exit code DATA_ERROR (65). Note PluginsConfig.validate throws a generic RuntimeException for the same family of validation; here the CLI uses UserException so the exit code is meaningful.

Source

Thrown at distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginSecurity.java:77

                // print all entitlements:
                for (String entitlement : requested) {
                    terminal.errorPrintln(Verbosity.NORMAL, "* " + entitlement);
                }
                terminal.errorPrintln(Verbosity.NORMAL, "See " + ENTITLEMENTS_DESCRIPTION_URL);
                terminal.errorPrintln(Verbosity.NORMAL, "for descriptions of what these entitlements allow and the associated risks.");

                if (batch == false) {
                    prompt(terminal);
                }
            }
        }
    }

    private static void prompt(final Terminal terminal) throws UserException {
        terminal.println(Verbosity.NORMAL, "");
        String text = terminal.readText("Continue with installation? [y/N]");
        if (text.equalsIgnoreCase("y") == false) {
            throw new UserException(ExitCodes.DATA_ERROR, "installation aborted by user");
        }
    }
}

View on GitHub (pinned to db6a809a66)

Solutions

  1. If you accept the permissions, answer `y` at the prompt or pass `--batch` to auto-accept.
  2. If you do not accept, remove the plugin from your install list and find an alternative or build it yourself with a narrower policy.
  3. In automated installs always pass `--batch` to avoid an interactive prompt that defaults to abort.

Example fix

# before (interactive, declined):
#   Continue with installation? [y/N] n   -> exit 65
# after (auto-accept in CI):
bin/elasticsearch-plugin install analysis-icu --batch
Defensive patterns

Strategy: try-catch

Try / catch

try {
    installAction.execute(...);
} catch (UserException e) {
    if (e.exitCode == ExitCodes.DATA_ERROR && e.getMessage().contains("aborted")) {
        // user declined — treat as non-error in interactive flows
        return Optional.empty();
    }
    throw e;
}

Prevention

When it happens

Trigger: A plugin ships a plugin-security.policy with extended permissions; PluginSecurity prints the permissions, prompts in non-batch mode, and on a non-`y` answer throws. Running interactively and pressing Enter (default N), or typing `n`, triggers it.

Common situations: Operator reviews the security policy of a third-party plugin and declines; CI scripts that forget `--batch` get an interactive prompt and time out / get an N; piping `/dev/null` as stdin yields empty input which is not `y`.

Related errors


AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12). Data as JSON: /api/errors/d1d53fc1b130d541. Report an issue: GitHub.