elasticsearch
elasticsearch copied to clipboard
plugin install fails cause of input dialog/tty
The cookbook can't install plugins anymore (I don't know if it could before) But plugin installs requires a y/N answer when installing.
* elasticsearch_plugin[repository-s3] action install[2021-08-02T14:40:10+02:00] INFO: Processing elasticsearch_plugin[repository-s3] action install (dp_elasticsearch_wrapper::default line 136)
================================================================================
Error executing action `install` on resource 'elasticsearch_plugin[repository-s3]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/share/elasticsearch/bin/elasticsearch-plugin", "install", "repository-s3"] ----
STDOUT: -> Downloading repository-s3 from elastic
[=================================================] 100%
STDERR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.SocketPermission * connect,resolve
* java.util.PropertyPermission es.allow_insecure_settings read,write
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
Exception in thread "main" java.lang.IllegalStateException: unable to read from standard input; is standard input open and a tty attached?
at org.elasticsearch.cli.Terminal$SystemTerminal.readText(Terminal.java:207)
at org.elasticsearch.plugins.PluginSecurity.prompt(PluginSecurity.java:74)
at org.elasticsearch.plugins.PluginSecurity.confirmPolicyExceptions(PluginSecurity.java:67)
at org.elasticsearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:812)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:786)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:232)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:217)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)
---- End output of ["/usr/share/elasticsearch/bin/elasticsearch-plugin", "install", "repository-s3"] ----
Ran ["/usr/share/elasticsearch/bin/elasticsearch-plugin", "install", "repository-s3"] returned 1
Cookbook Trace:
---------------
/var/cache/chef/cookbooks/elasticsearch/libraries/provider_plugin.rb:101:in `shell_out_as_user!'
/var/cache/chef/cookbooks/elasticsearch/libraries/provider_plugin.rb:52:in `manage_plugin'
/var/cache/chef/cookbooks/elasticsearch/libraries/provider_plugin.rb:17:in `action_install'
Resource Declaration:
---------------------
# In /var/cache/chef/cookbooks/dp_elasticsearch_wrapper/recipes/default.rb
136: elasticsearch_plugin 'repository-s3' do
137: action :install
138: end
139:
Compiled Resource:
------------------
# Declared in /var/cache/chef/cookbooks/dp_elasticsearch_wrapper/recipes/default.rb:136:in `from_file'
elasticsearch_plugin("repository-s3") do
action [:install]
default_guard_interpreter :default
declared_type :elasticsearch_plugin
cookbook_name "dp_elasticsearch_wrapper"
recipe_name "default"
plugin_name "repository-s3"
end
System Info:
------------
chef_version=14.14.29
platform=ubuntu
platform_version=18.04
ruby=ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef/bin/chef-client
I assume this can be fixed with batch mode
-b, --batch Enable batch mode explicitly, automatic confirmation of
security permission