I'd like to use "setup-passwords interactive" for settings passwords in my setup script.
This command works nice in manual mode, but for some reason fails with
Exception in thread "main" java.lang.NullPointerException
at org.elasticsearch.cli.Terminal$SystemTerminal.readSecret(Terminal.java:174)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$InteractiveSetup.promptForPassword(SetupPasswordTool.java:191)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$InteractiveSetup.lambda$execute$0(SetupPasswordTool.java:184)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$SetupCommand.changePasswords(SetupPasswordTool.java:380)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$InteractiveSetup.execute(SetupPasswordTool.java:184)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool.main(SetupPasswordTool.java:105)
exception when I submitting my answers automatically, inside script. I tried "here document" and other standart ways - the same issue.
The setup-passwords tool isn't designed to be scriptable.
All it is doing it scripting some API call calls to set passwords.
The intent is that you would call the _xpack/security/user/.../_password API directly if you want to automate it.
Hi I am John,
I was installed xpack in elastic search ....
How to check xpack installed for not ?
How open elastic search in local Host in Windows machine?
How to set default password elastic search?
How to change password in elastic search?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.