Elasticsearch user creation fails

Hello team,
When I try to create user with below command getting below error in ES version:7.17.0, please help....

./elasticsearch-setup-passwords interactive -u "https://test.com:9085"

But following settings are in elasticsearch.yml

xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.verification_mode: certificate
xpack.security.http.ssl.keystore.path: elastic-certificates.p12
xpack.security.http.ssl.truststore.path: elastic-certificates.p12
xpack.security.http.ssl.client_authentication: optional

Error:

15:57:19.799 [main] CRITICAL org.elasticsearch.deprecation.xpack.core.ssl.SSLService - invalid configuration for xpack.security.transport.ssl - [xpack.security.transport.ssl.enabled] is not set, but the following settings have been configured in elasticsearch.yml : [xpack.security.transport.ssl.keystore.secure_password,xpack.security.transport.ssl.truststore.secure_password]

Seems like you have not set https SSL certificate in config. check that

I have also faced similar issue on during installation of new instance with SSL on first startup(for http endpoint 9200).
I have removed SSL and then able to set passwords. Once done, enabled SSL.

Hi Chandrakanth,
Thanks for the reply...
Tired with changing:
xpack.security.enabled:false
and
xpack.security.http.ssl.enabled:false
Now I'm facing different error:
./Elasticsearch-setup-passwords interactive -u " http://test.com:9085"
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
at java.base/java.util.HashMap.putMapEntries(HashMap.java:495)
at java.base/java.util.HashMap.putAll(HashMap.java:783)
at org.Elasticsearch.xpack.security.authc.esnative.tool.HttpResponse.(HttpResponse.java:29)
at org.Elasticsearch.xpack.security.authc.esnative.tool.HttpResponse$HttpResponseBuilder.build(HttpResponse.java:61)
at org.Elasticsearch.xpack.security.authc.esnative.tool.CommandLineHttpClient.execute(CommandLineHttpClient.java:139)
at org.Elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$SetupCommand.checkElasticKeystorePasswordValid(SetupPasswordTool.java:327)
at org.Elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$InteractiveSetup.execute(SetupPasswordTool.java:199)
at org.Elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.Elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.Elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
at org.Elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.Elasticsearch.cli.Command.main(Command.java:77)
at org.Elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool.main(SetupPasswordTool.java:128)

Any clue, why I'm getting this error?
Thanks in advance...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.